# Class Annotation

java.lang.Object
jspecview.common.Coordinate
jspecview.common.Annotation

Direct Known Subclasses:
  `ColoredAnnotation, JSVDialog, Measurement`

public class Annotation extends Coordinate
The `Annotation` class stores the spectral x and pixel y values of an annotation text along with its text

Author:
  Debbie-Ann Facey, Khari A. Bryan, Prof Robert J. Lancashire, Bob Hanson hansonr@stolaf.edu

## Nested Class Summary

Nested Classes
Modifier and Type
Class
Description
`static enum`
`Annotation.AType`

## Field Summary

Fields
Modifier and Type
Field
Description
`protected boolean`
`isPixels`
`String`
`text`

## Constructor Summary

Constructors
Constructor
Description
`Annotation()`

## Method Summary

Modifier and Type
Method
Description
`static Annotation`
`getColoredAnnotation(GenericGraphics g2d, Spectrum spec, Lst<String> args, Annotation lastAnnotation)`
`protected Annotation`
`setA(double x, double y, Spectrum spec, String text, boolean isPixels, boolean is2D, int offsetX, int offsetY)`
`String`
`toString()`
Overrides Objects toString() method

### Methods inherited from class Coordinate

`applyScale, copy, deltaX, equals, findXForPeakNearest, getMaxX, getMaxX, getMaxY, getMaxYUser, getMinX, getMinX, getMinY, getMinYUser, getNearestIndexForX, getNearestXWithYAbove, getXVal, getYVal, getYValueAt, isYInRange, normalise, parabolicInterpolation, parseDSV, removeScale, reverse, set, setXVal, setYVal, shiftX`

### Methods inherited from class Object

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

## Field Details

### text

public String text

### isPixels

protected boolean isPixels

## Constructor Details

### Annotation

public Annotation()

## Method Details

### setA

protected Annotation setA(double x, double y, Spectrum spec, String text, boolean isPixels, boolean is2D, int offsetX, int offsetY)

### toString

public String toString()
Overrides Objects toString() method

Overrides:
  `toString` in class `Coordinate`
Returns:
  the String representation of this coordinate

### getColoredAnnotation

public static Annotation getColoredAnnotation(GenericGraphics g2d, Spectrum spec, Lst<String> args, Annotation lastAnnotation)