info.monitorenter.gui.chart.axistickpainters
Class AxisTickPainterDefault

java.lang.Object
  extended by info.monitorenter.gui.chart.axistickpainters.AxisTickPainterDefault
All Implemented Interfaces:
IAxisTickPainter, Serializable

public class AxisTickPainterDefault
extends Object
implements IAxisTickPainter

Default implementation for a tick painter that uses all given arguments (no proprietary behaviour).

Version:
$Revision: 1.2 $
Author:
Achim Westermann
See Also:
Serialized Form

Constructor Summary
AxisTickPainterDefault()
          Defcon.
 
Method Summary
 int getMajorTickLength()
          Returns the major tick length in pixel.
 int getMinorTickLength()
          Returns the minor tick length in pixel.
 void paintXLabel(int x, int y, String label, Graphics2D g)
          Paint the given label for the x axis.
 void paintXTick(int x, int y, boolean isMajorTick, Graphics2D g)
          Paint the little marker for a label of the x axis.
 void paintYLabel(int x, int y, String label, Graphics2D g)
          Paint the given label for the y axis.
 void paintYTick(int x, int y, boolean isMajorTick, Graphics2D g)
          Paint the little marker for a label of the y axis.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AxisTickPainterDefault

public AxisTickPainterDefault()
Defcon.

Method Detail

paintXLabel

public void paintXLabel(int x,
                        int y,
                        String label,
                        Graphics2D g)
Description copied from interface: IAxisTickPainter
Paint the given label for the x axis.

Specified by:
paintXLabel in interface IAxisTickPainter
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.Graphics2D)

paintXTick

public void paintXTick(int x,
                       int y,
                       boolean isMajorTick,
                       Graphics2D g)
Description copied from interface: IAxisTickPainter
Paint the little marker for a label of the x axis.

Specified by:
paintXTick in interface IAxisTickPainter
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.
g - the graphic context to draw on.
See Also:
IAxisTickPainter.paintXTick(int, int, boolean, java.awt.Graphics2D)

paintYLabel

public void paintYLabel(int x,
                        int y,
                        String label,
                        Graphics2D g)
Description copied from interface: IAxisTickPainter
Paint the given label for the y axis.

Specified by:
paintYLabel in interface IAxisTickPainter
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.Graphics2D)

paintYTick

public void paintYTick(int x,
                       int y,
                       boolean isMajorTick,
                       Graphics2D g)
Description copied from interface: IAxisTickPainter
Paint the little marker for a label of the y axis.

Specified by:
paintYTick in interface IAxisTickPainter
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.
g - the graphic context to draw on.
See Also:
IAxisTickPainter.paintYTick(int, int, boolean, java.awt.Graphics2D)

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 interface IAxisTickPainter
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 interface IAxisTickPainter
Returns:
the minor tick length in pixel.
See Also:
IAxisTickPainter.getMinorTickLength()


Copyright © 2001 - 2007 LGPL, All Rights Footloose.