Package uk.ac.starlink.ttools.plot2.geom
Class PlaneAxisAnnotation
java.lang.Object
uk.ac.starlink.ttools.plot2.geom.PlaneAxisAnnotation
- All Implemented Interfaces:
AxisAnnotation
AxisAnnotation implementation for 2D surfaces.
- Since:
- 26 Jul 2013
- Author:
- Mark Taylor
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionPlaneAxisAnnotation
(int gxlo, int gxhi, int gylo, int gyhi, Axis xaxis, Axis yaxis, Tick[] xticks, Tick[] yticks, Orientation xorient, Orientation yorient, String xlabel, String ylabel, Tick[] x2ticks, Tick[] y2ticks, Orientation x2orient, Orientation y2orient, String x2label, String y2label, Captioner captioner, SideFlags annotateFlags) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Paints the annotations.getSurround
(boolean withScroll) Returns the padding space around the edge of a plot bounds rectangle required to accommodate the labels painted by this object.
-
Field Details
-
INVERT_Y
public static final boolean INVERT_Y- See Also:
-
-
Constructor Details
-
PlaneAxisAnnotation
public PlaneAxisAnnotation(int gxlo, int gxhi, int gylo, int gyhi, Axis xaxis, Axis yaxis, Tick[] xticks, Tick[] yticks, Orientation xorient, Orientation yorient, String xlabel, String ylabel, Tick[] x2ticks, Tick[] y2ticks, Orientation x2orient, Orientation y2orient, String x2label, String y2label, Captioner captioner, SideFlags annotateFlags) Constructor.- Parameters:
gxlo
- graphics X coordinate lower boundgxhi
- graphics X coordinate upper boundgylo
- graphics Y coordinate lower boundgyhi
- graphics Y coordinate upper boundxaxis
- X axis objectyaxis
- Y axis objectxticks
- array of ticks along the X axisyticks
- array of ticks along the Y axisxorient
- tick label orientation on X axisyorient
- tick label orientation on Y axisxlabel
- text label on X axisylabel
- text label on Y axisx2ticks
- array of ticks along secondary X axis, may be nully2ticks
- array of ticks along secondary Y axis, may be nullx2orient
- tick label orientation on secondary X axisy2orient
- tick label orientation on secondary Y axisx2label
- text label on secondary X axisy2label
- text label on secondary Y axiscaptioner
- text renderer for axis labels etcannotateFlags
- indicates which sides of the plot are annotated
-
-
Method Details
-
drawLabels
Description copied from interface:AxisAnnotation
Paints the annotations. They should fit in the padding region defined by the result of the {link #getPadding} method.- Specified by:
drawLabels
in interfaceAxisAnnotation
- Parameters:
g
- graphics context
-
getSurround
Description copied from interface:AxisAnnotation
Returns the padding space around the edge of a plot bounds rectangle required to accommodate the labels painted by this object.- Specified by:
getSurround
in interfaceAxisAnnotation
- Parameters:
withScroll
- true if the padding should be large enough to accommodate labelling requirements if the surface is scrolled- Returns:
- padding surround
-