edu.rit.numeric.plot.impl
Class Axis
- java.lang.Object
-
- edu.rit.numeric.plot.impl.Axis
-
- Direct Known Subclasses:
- NumericalAxis
public abstract class Axis extends java.lang.ObjectClass Axis is the abstract base class for an axis on a plot. It also provides static methods to help determine the scale for an axis.
-
-
Field Summary
Fields Modifier and Type Field and Description static java.awt.PaintDEFAULT_PAINTThe default axis paint (black).static java.awt.StrokeDEFAULT_STROKEThe default axis stroke (solid, width=1).
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method and Description abstract voiddrawHorizontal(java.awt.Graphics2D g2d)Draw this axis in the given graphics context starting at coordinates (0, 0) and moving horizontally to the right.abstract voiddrawVertical(java.awt.Graphics2D g2d)Draw this axis in the given graphics context starting at coordinates (0, 0) and moving vertically up.doublegetLength()Returns the length of this axis on the display.java.awt.PaintgetPaint()Returns the paint for drawing this axis on the display.java.awt.StrokegetStroke()Returns the stroke for drawing this axis on the display.
-
-
-
Field Detail
-
DEFAULT_STROKE
public static final java.awt.Stroke DEFAULT_STROKE
The default axis stroke (solid, width=1).
-
DEFAULT_PAINT
public static final java.awt.Paint DEFAULT_PAINT
The default axis paint (black).
-
-
Method Detail
-
getLength
public double getLength()
Returns the length of this axis on the display.
-
getStroke
public java.awt.Stroke getStroke()
Returns the stroke for drawing this axis on the display.
-
getPaint
public java.awt.Paint getPaint()
Returns the paint for drawing this axis on the display.
-
drawHorizontal
public abstract void drawHorizontal(java.awt.Graphics2D g2d)
Draw this axis in the given graphics context starting at coordinates (0, 0) and moving horizontally to the right.- Parameters:
g2d- 2-D graphics context.
-
drawVertical
public abstract void drawVertical(java.awt.Graphics2D g2d)
Draw this axis in the given graphics context starting at coordinates (0, 0) and moving vertically up.- Parameters:
g2d- 2-D graphics context.
-
-
DMelt 3.0 © DataMelt by jWork.ORG