vmm.core
Class Axes2D

java.lang.Object
  extended by vmm.core.Decoration
      extended by vmm.core.Axes2D
Direct Known Subclasses:
Axes3D

public class Axes2D
extends Decoration

A pair of lines representing axes in the xy-plane. The Axes are in layer -100 by default, which will certainly put them behind the exhibit and probably most everything.


Field Summary
 
Fields inherited from class vmm.core.Decoration
decorationNeedsRedraw
 
Constructor Summary
Axes2D()
          Construct an Axes2D Decoration, with default color (gray), to be drawn in layer -100.
 
Method Summary
 void doDraw(java.awt.Graphics2D g, View view, Transform transform)
          Draws the axes in a specified View.
 java.awt.Color getColor()
          Get the color that is used for drawing the axes.
 void setColor(java.awt.Color c)
          Set the color that is used for drawing the axes.
 
Methods inherited from class vmm.core.Decoration
addChangeListener, addExtraXML, computeDrawData, fireDecorationChangeEvent, forceRedraw, getLayer, readExtraXML, removeChangeListener, setLayer
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Axes2D

public Axes2D()
Construct an Axes2D Decoration, with default color (gray), to be drawn in layer -100.

Method Detail

setColor

public void setColor(java.awt.Color c)
Set the color that is used for drawing the axes.

Parameters:
c - The color of the axes; if the value is null, the default color (gray) is used.

getColor

public java.awt.Color getColor()
Get the color that is used for drawing the axes.

Returns:
the non-null color of the axes

doDraw

public void doDraw(java.awt.Graphics2D g,
                   View view,
                   Transform transform)
Draws the axes in a specified View. Note that if an axis is outside the xy-limits on the view, then that axis is not drawn.

Overrides:
doDraw in class Decoration
Parameters:
g - The graphics context where the Exhibit and its decorations are being drawn.
view - The View that is drawing the Exhibit; this object contains other information that might be of use, such as the Display, if any, associated with the View, and the the actual Exhibit that is being drawn.
transform - Contains information about the rectangular area in the xy-plane that is being drawn and about the rectangle of pixels in the graphics context where it is drawn. Note that at least for the top-level View class, transform.getX() and transform.getY() can be assumed to be zero.
See Also:
Exhibit.render(Graphics2D, View, Transform, ArrayList), Decoration.computeDrawData(View, boolean, Transform, Transform)