# Class PlaneAxisAnnotation

java.lang.Object
uk.ac.starlink.ttools.plot2.geom.PlaneAxisAnnotation

All Implemented Interfaces:
  `AxisAnnotation`

public class PlaneAxisAnnotation extends Object implements AxisAnnotation
AxisAnnotation implementation for 2D surfaces.

Since:
  26 Jul 2013
Author:
  Mark Taylor

## Field Summary

Fields
Modifier and Type
Field
Description
`static final boolean`
`INVERT_Y`

## Constructor Summary

Constructors
Constructor
Description
`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.

## Method Summary

Modifier and Type
Method
Description
`void`
`drawLabels(Graphics g)`
Paints the annotations.
`Surround`
`getSurround(boolean withScroll)`
Returns the padding space around the edge of a plot bounds rectangle required to accommodate the labels painted by this object.

### Methods inherited from class Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Field Details

### INVERT_Y

public static final boolean INVERT_Y

See Also:
  - Constant Field Values

## 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 bound
  `gxhi` - graphics X coordinate upper bound
  `gylo` - graphics Y coordinate lower bound
  `gyhi` - graphics Y coordinate upper bound
  `xaxis` - X axis object
  `yaxis` - Y axis object
  `xticks` - array of ticks along the X axis
  `yticks` - array of ticks along the Y axis
  `xorient` - tick label orientation on X axis
  `yorient` - tick label orientation on Y axis
  `xlabel` - text label on X axis
  `ylabel` - text label on Y axis
  `x2ticks` - array of ticks along secondary X axis, may be null
  `y2ticks` - array of ticks along secondary Y axis, may be null
  `x2orient` - tick label orientation on secondary X axis
  `y2orient` - tick label orientation on secondary Y axis
  `x2label` - text label on secondary X axis
  `y2label` - text label on secondary Y axis
  `captioner` - text renderer for axis labels etc
  `annotateFlags` - indicates which sides of the plot are annotated

## Method Details

### drawLabels

public void drawLabels(Graphics g)
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 interface `AxisAnnotation`
Parameters:
  `g` - graphics context

### getSurround

public Surround getSurround(boolean withScroll)
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 interface `AxisAnnotation`
Parameters:
  `withScroll` - true if the padding should be large enough to accommodate labelling requirements if the surface is scrolled
Returns:
  padding surround