Package uk.ac.starlink.ttools.plot2.geom
Class PlaneAxisAnnotation
- java.lang.Object
-
- uk.ac.starlink.ttools.plot2.geom.PlaneAxisAnnotation
-
- All Implemented Interfaces:
AxisAnnotation
public class PlaneAxisAnnotation extends java.lang.Object implements AxisAnnotation
AxisAnnotation implementation for 2D surfaces.- Since:
- 26 Jul 2013
- Author:
- Mark Taylor
-
-
Field Summary
Fields Modifier and Type Field Description static booleanINVERT_Ystatic OrientationX_ORIENTstatic OrientationY_ORIENT
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddrawLabels(java.awt.Graphics g)Paints the annotations.java.awt.InsetsgetPadding(boolean withScroll)Returns the padding insets around the edge of a plot bounds rectangle required to accommodate the labels painted by this object.
-
-
-
Field Detail
-
INVERT_Y
public static final boolean INVERT_Y
- See Also:
- Constant Field Values
-
X_ORIENT
public static final Orientation X_ORIENT
-
Y_ORIENT
public static final Orientation Y_ORIENT
-
-
Constructor Detail
-
PlaneAxisAnnotation
public PlaneAxisAnnotation(int gxlo, int gxhi, int gylo, int gyhi, Axis xaxis, Axis yaxis, Tick[] xticks, Tick[] yticks, java.lang.String xlabel, java.lang.String ylabel, Captioner captioner, boolean xAnnotate, boolean yAnnotate)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 axisxlabel- text label on X axisylabel- text label on Y axiscaptioner- text renderer for axis labels etcxAnnotate- true iff annotations are required on X axisyAnnotate- true iff annotations are required on Y axis
-
-
Method Detail
-
drawLabels
public void drawLabels(java.awt.Graphics g)
Description copied from interface:AxisAnnotationPaints the annotations. They should fit in the padding region defined by the result of the {link #getPadding} method.- Specified by:
drawLabelsin interfaceAxisAnnotation- Parameters:
g- graphics context
-
getPadding
public java.awt.Insets getPadding(boolean withScroll)
Description copied from interface:AxisAnnotationReturns the padding insets around the edge of a plot bounds rectangle required to accommodate the labels painted by this object.- Specified by:
getPaddingin interfaceAxisAnnotation- Parameters:
withScroll- true if the padding should be large enough to accommodate labelling requirements if the surface is scrolled- Returns:
- padding insets
-
-