uk.ac.starlink.ttools.plot2
Class Decoration

java.lang.Object
  extended by 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
Decoration(Icon icon, int gx, int gy)
          Constructor.
 
Method Summary
 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 java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

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 Detail

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


Copyright © 2015 Central Laboratory of the Research Councils. All Rights Reserved.