# Class Decoration

java.lang.Object
uk.ac.starlink.ttools.plot2.Decoration

Direct Known Subclasses:
  `BandDecoration`

@Equality public class Decoration extends Object
Positioned icon, with equality semantics. A decoration is assumed fast to plot.

Since:
  12 Feb 2013
Author:
  Mark Taylor

## Constructor Summary

Constructors
Constructor
Description
`Decoration(Icon icon, int gx, int gy)`
Constructor.

## Method Summary

Modifier and Type
Method
Description
`boolean`
`equals(Object o)`
`Icon`
`getIcon()`
Returns this decoration's icon.
`int`
`getPosX()`
Returns this decoration's X position.
`int`
`getPosY()`
Returns this decoration's Y position.
`int`
`hashCode()`
`void`
`paintDecoration(Graphics g)`
Paints this decoration.
`String`
`toString()`

### Methods inherited from class Object

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

## Constructor Details

### Decoration

public Decoration(Icon icon, int gx, int gy)
Constructor.

Parameters:
  `icon` - decoration content; this icon must have equality semantics
  `gx` - x position for icon
  `gy` - y position for icon

## Method Details

### getIcon

public Icon getIcon()
Returns this decoration's icon.

Returns:
  icon

### getPosX

public int getPosX()
Returns this decoration's X position.

Returns:
  x position

### getPosY

public int getPosY()
Returns this decoration's Y position.

Returns:
  y position

### paintDecoration

public void paintDecoration(Graphics g)
Paints this decoration.

Parameters:
  `g` - graphics context

### toString

public String toString()

Overrides:
  `toString` in class `Object`

### equals

public boolean equals(Object o)

Overrides:
  `equals` in class `Object`

### hashCode

public int hashCode()

Overrides:
  `hashCode` in class `Object`