Class AxisTitlePainterDefault
java.lang.Object
info.monitorenter.gui.chart.axistitlepainters.AxisTitlePainterDefault
- All Implemented Interfaces:
IAxisTitlePainter
,Serializable
An
IAxisTitlePainter
implementation that will render
titles in a default way while adapting to x or y axis use.
For x axis the title will be displayed centered below the axis. For y axis the title will be displayed rotated by 90 degrees centered left of the axis.
The y axis rotation will only be performed when the given
Object is of type
Graphics
.
Graphics2D
- Version:
- $Revision: 1.14 $
- Author:
- Achim Westermann
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint
Returns the height of this axis title in px with respect to the current title of the given axis title.int
Returns the width of this axis title in px with respect to the current title of the given axis.void
paintTitle
(IAxis<?> axis, Graphics g) TODO: This will not work for multiple axis in the same dimension and position (overwriting titles)!
-
Constructor Details
-
AxisTitlePainterDefault
public AxisTitlePainterDefault()Defcon.
-
-
Method Details
-
getHeight
Description copied from interface:IAxisTitlePainter
Returns the height of this axis title in px with respect to the current title of the given axis title.- Specified by:
getHeight
in interfaceIAxisTitlePainter
- Parameters:
axis
- the instance this title painter is working for.g2d
- needed for size informations (e.g. font widths).- Returns:
- the height of this axis title in px with respect to the current title of the given axis.
- See Also:
-
getWidth
Description copied from interface:IAxisTitlePainter
Returns the width of this axis title in px with respect to the current title of the given axis.- Specified by:
getWidth
in interfaceIAxisTitlePainter
- Parameters:
axis
- the instance this title painter is working for.g2d
- needed for size informations (e.g. font widths).- Returns:
- the width of this axis title in px with respect to the current title of the given axis.
- See Also:
-
paintTitle
TODO: This will not work for multiple axis in the same dimension and position (overwriting titles)!- Specified by:
paintTitle
in interfaceIAxisTitlePainter
- Parameters:
axis
- the axis to paint the title of.g
- needed for size informations.- See Also:
-