visual
Class ScaledVisualizationRenderer

java.lang.Object
  extended by visual.ScaledVisualizationRenderer
All Implemented Interfaces:
VisualizationRenderer

public class ScaledVisualizationRenderer
extends java.lang.Object
implements VisualizationRenderer

A decorator of a VisualizationRenderer that adds scaling capabilities. That is, a ScaledVisualizationRenderer will scale all of the content to fit its component.

See Also:
"The Design and Implementation of Multimedia Software © 2011"

Constructor Summary
ScaledVisualizationRenderer(VisualizationRenderer decorated, double width, double height)
          Explicit Value Constructor
 
Method Summary
 void postRendering(java.awt.Graphics g, Visualization model, VisualizationView view)
          Operations to perform after rendering.
 void preRendering(java.awt.Graphics g, Visualization model, VisualizationView view)
          Operations to perform before rendering.
 void render(java.awt.Graphics g, Visualization model, VisualizationView view)
          Render the content contained in the model.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ScaledVisualizationRenderer

public ScaledVisualizationRenderer(VisualizationRenderer decorated,
                                   double width,
                                   double height)
Explicit Value Constructor

Parameters:
decorated - The VisualizatioRenderer to decorate
width - The full-size width of the content
height - The full-size height of the content
Method Detail

postRendering

public void postRendering(java.awt.Graphics g,
                          Visualization model,
                          VisualizationView view)
Operations to perform after rendering.

Specified by:
postRendering in interface VisualizationRenderer
Parameters:
g - The rendering engine
model - The Visualization containing the content
view - The component presenting the content

preRendering

public void preRendering(java.awt.Graphics g,
                         Visualization model,
                         VisualizationView view)
Operations to perform before rendering.

Specified by:
preRendering in interface VisualizationRenderer
Parameters:
g - The rendering engine
model - The Visualization containing the content
view - The component presenting the content

render

public void render(java.awt.Graphics g,
                   Visualization model,
                   VisualizationView view)
Render the content contained in the model.

Specified by:
render in interface VisualizationRenderer
Parameters:
g - The rendering engine
model - The Visualization containing the content
view - The component presenting the content


Design and Implementation of Multimedia Software, Jones and Bartlett Publishers