net.java.dev.joode.graphics2D
Class AAGrid
java.lang.Object
net.java.dev.joode.graphics2D.AAGrid
- All Implemented Interfaces:
- Drawable2D
public class AAGrid
- extends java.lang.Object
- implements Drawable2D
Adds an axis aligned grid to a View2D.
- Author:
- Tom Larkworthy
|
Constructor Summary |
AAGrid()
|
AAGrid(float spacing,
boolean labelled,
java.awt.Color labelColor,
java.awt.Color gridColor)
sets up the grid, after construction add it to a View2D |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TARGET_HEIGHT
public static final int TARGET_HEIGHT
- See Also:
- Constant Field Values
TARGET_WIDTH
public static final int TARGET_WIDTH
- See Also:
- Constant Field Values
INDENTATION
public static final int INDENTATION
- See Also:
- Constant Field Values
AAGrid
public AAGrid(float spacing,
boolean labelled,
java.awt.Color labelColor,
java.awt.Color gridColor)
- sets up the grid, after construction add it to a View2D
- Parameters:
spacing - space between lineslabelled - whether the ordinates of the grid lines should be writtenlabelColor - the color of the labelsgridColor - the color of the grid lines
AAGrid
public AAGrid()
draw
public void draw(java.awt.Graphics2D g)
- Specified by:
draw in interface Drawable2D
getGridColor
public java.awt.Color getGridColor()
setGridColor
public void setGridColor(java.awt.Color gridColor)
getLabelColor
public java.awt.Color getLabelColor()
setLabelColor
public void setLabelColor(java.awt.Color labelColor)
getSpacing
public float getSpacing()
setSpacing
public void setSpacing(float spacing)
isLabelled
public boolean isLabelled()
setLabelled
public void setLabelled(boolean labelled)