Package uk.ac.starlink.ttools.plot2
Class Orientation
- java.lang.Object
-
- uk.ac.starlink.ttools.plot2.Orientation
-
public abstract class Orientation extends java.lang.Object
Defines text orientation for axis labelling.- Since:
- 13 Feb 2013
- Author:
- Mark Taylor
-
-
Field Summary
Fields Modifier and Type Field Description static Orientation
ANTI_Y
Orientation suitable for labelling right-hand Y axis.static Orientation
X
Orientation suitable for X axis labelling.static Orientation
Y
Orientation suitable for Y axis labelling.
-
Constructor Summary
Constructors Constructor Description Orientation()
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description abstract java.awt.geom.AffineTransform
captionTransform(java.awt.Rectangle bounds, int pad)
Returns a transformation suitable for writing axis captions.abstract boolean
isDown()
Indicates whether the positive Y direction points towards the axis.
-
-
-
Field Detail
-
X
public static final Orientation X
Orientation suitable for X axis labelling.
-
Y
public static final Orientation Y
Orientation suitable for Y axis labelling.
-
ANTI_Y
public static final Orientation ANTI_Y
Orientation suitable for labelling right-hand Y axis.
-
-
Method Detail
-
captionTransform
public abstract java.awt.geom.AffineTransform captionTransform(java.awt.Rectangle bounds, int pad)
Returns a transformation suitable for writing axis captions. If a graphics context is positioned with the point to be annotated at the origin, applying the returned transformation gives a graphics context on which a caption with the given bounding box can be painted. The origin of the bounds should be the baseline at the start of the line, its height should reflect the maximum font height, and the width should be the actual width.
-
isDown
public abstract boolean isDown()
Indicates whether the positive Y direction points towards the axis.- Returns:
- true for axis below text, false for axis above text
-
-