vmm3d.core
Class Axes2D
- java.lang.Object
-
- vmm3d.core.Decoration
-
- vmm3d.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.
-
-
Constructor Summary
Constructors Constructor and Description Axes2D()Construct an Axes2D Decoration, with default color (gray), to be drawn in layer -100.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description voiddoDraw(org.freehep.graphics2d.VectorGraphics g, View view, Transform transform)Draws the axes in a specified View.java.awt.ColorgetColor()Get the color that is used for drawing the axes.voidsetColor(java.awt.Color c)Set the color that is used for drawing the axes.-
Methods inherited from class vmm3d.core.Decoration
addChangeListener, addExtraXML, computeDrawData, forceRedraw, getLayer, readExtraXML, removeChangeListener, setLayer
-
-
-
-
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(org.freehep.graphics2d.VectorGraphics 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:
doDrawin classDecoration- 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)
-
-
DMelt 3.0 © DataMelt by jWork.ORG