Class AxisTickPainterDefault
- java.lang.Object
-
- info.monitorenter.gui.chart.axistickpainters.AxisTickPainterDefault
-
- All Implemented Interfaces:
IAxisTickPainter
,java.io.Serializable
public class AxisTickPainterDefault extends java.lang.Object implements IAxisTickPainter
Default implementation for a tick painter that uses all given arguments (no proprietary behaviour).- Version:
- $Revision: 1.7 $
- Author:
- Achim Westermann
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description AxisTickPainterDefault()
Defcon.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getMajorTickLength()
Returns the major tick length in pixel.int
getMinorTickLength()
Returns the minor tick length in pixel.void
paintXLabel(int x, int y, java.lang.String label, java.awt.Graphics g)
Paint the given label for the x axis.void
paintXTick(int x, int y, boolean isMajorTick, boolean isBottomSide, java.awt.Graphics g)
Paint the little marker for a label of the x axis.void
paintYLabel(int x, int y, java.lang.String label, java.awt.Graphics g)
Paint the given label for the y axis.void
paintYTick(int x, int y, boolean isMajorTick, boolean isLeftSide, java.awt.Graphics g)
Paint the little marker for a label of the y axis.
-
-
-
Method Detail
-
getMajorTickLength
public int getMajorTickLength()
Description copied from interface:IAxisTickPainter
Returns the major tick length in pixel.Implementations should access a static variable for performance boost.
- Specified by:
getMajorTickLength
in interfaceIAxisTickPainter
- Returns:
- the major tick length in pixel.
- See Also:
IAxisTickPainter.getMajorTickLength()
-
getMinorTickLength
public int getMinorTickLength()
Description copied from interface:IAxisTickPainter
Returns the minor tick length in pixel.Implementations should access a static variable for performance boost.
- Specified by:
getMinorTickLength
in interfaceIAxisTickPainter
- Returns:
- the minor tick length in pixel.
- See Also:
IAxisTickPainter.getMinorTickLength()
-
paintXLabel
public void paintXLabel(int x, int y, java.lang.String label, java.awt.Graphics g)
Description copied from interface:IAxisTickPainter
Paint the given label for the x axis.- Specified by:
paintXLabel
in interfaceIAxisTickPainter
- Parameters:
x
- the x coordinate of the baseline for the label.y
- the y coordinate of the baseline for the label.label
- the formatted label String.g
- the graphic context to draw on.- See Also:
IAxisTickPainter.paintXLabel(int, int, java.lang.String, java.awt.Graphics)
-
paintXTick
public void paintXTick(int x, int y, boolean isMajorTick, boolean isBottomSide, java.awt.Graphics g)
Description copied from interface:IAxisTickPainter
Paint the little marker for a label of the x axis.- Specified by:
paintXTick
in interfaceIAxisTickPainter
- Parameters:
x
- the x coordinate of the baseline for the label.y
- the y coordinate of the baseline for the label.isMajorTick
- if true, this is a major tick.isBottomSide
- if true the tick is painted for an
on the bottom of the chart (see e.g.:IAxis
).Chart2D.addAxisXBottom(info.monitorenter.gui.chart.axis.AAxis)
g
- the graphic context to draw on.- See Also:
IAxisTickPainter.paintXTick(int, int, boolean, boolean, java.awt.Graphics)
-
paintYLabel
public void paintYLabel(int x, int y, java.lang.String label, java.awt.Graphics g)
Description copied from interface:IAxisTickPainter
Paint the given label for the y axis.- Specified by:
paintYLabel
in interfaceIAxisTickPainter
- Parameters:
x
- the x coordinate of the baseline for the label.y
- the y coordinate of the baseline for the label.label
- the formatted label String.g
- the graphic context to draw on.- See Also:
IAxisTickPainter.paintYLabel(int, int, java.lang.String, java.awt.Graphics)
-
paintYTick
public void paintYTick(int x, int y, boolean isMajorTick, boolean isLeftSide, java.awt.Graphics g)
Description copied from interface:IAxisTickPainter
Paint the little marker for a label of the y axis.- Specified by:
paintYTick
in interfaceIAxisTickPainter
- Parameters:
x
- the x coordinate of the baseline for the label.y
- the y coordinate of the baseline for the label.isMajorTick
- if true, this is a major tick.isLeftSide
- if true the tick is painted for an
on the left side (see e.g.:IAxis
).Chart2D.addAxisYLeft(info.monitorenter.gui.chart.axis.AAxis)
g
- the graphic context to draw on.- See Also:
IAxisTickPainter.paintYTick(int, int, boolean, boolean, java.awt.Graphics)
-
-