alun.viewgraph
Class AbstractMappable

java.lang.Object
  extended by alun.viewgraph.AbstractMappable
All Implemented Interfaces:
CartesianPoint, Mappable
Direct Known Subclasses:
LabelledBlob

public abstract class AbstractMappable
extends java.lang.Object
implements Mappable

An abstract class that defines what is needed of an object in order to be able to set coordinates and draw it.


Constructor Summary
AbstractMappable()
           
 
Method Summary
abstract  boolean contains(double x, double y)
          Returns true iff the given point is contained in the drawn image of the object.
 java.awt.Color getColor()
          Gets the colour of the object.
 java.awt.Color getOutline()
          Gets the colour of the outline.
 double getX()
           
 double getY()
           
 boolean isMobile()
           
abstract  void paint(java.awt.Graphics g)
          Draws the object to the graphics object.
 void setColor(java.awt.Color cc)
          Sets the colour of the object.
 void setHighLighted(boolean b)
           
 void setMobile(boolean b)
           
 void setOutline(java.awt.Color cc)
          Sets the colour of the outline.
 void setX(double a)
           
 void setY(double a)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractMappable

public AbstractMappable()
Method Detail

contains

public abstract boolean contains(double x,
                                 double y)
Returns true iff the given point is contained in the drawn image of the object.

Specified by:
contains in interface Mappable

paint

public abstract void paint(java.awt.Graphics g)
Draws the object to the graphics object.

Specified by:
paint in interface Mappable

getX

public final double getX()
Specified by:
getX in interface CartesianPoint

getY

public final double getY()
Specified by:
getY in interface CartesianPoint

setX

public final void setX(double a)
Specified by:
setX in interface CartesianPoint

setY

public final void setY(double a)
Specified by:
setY in interface CartesianPoint

isMobile

public final boolean isMobile()
Specified by:
isMobile in interface Mappable

setMobile

public final void setMobile(boolean b)
Specified by:
setMobile in interface Mappable

setHighLighted

public void setHighLighted(boolean b)
Specified by:
setHighLighted in interface Mappable

setColor

public void setColor(java.awt.Color cc)
Sets the colour of the object.


getColor

public java.awt.Color getColor()
Gets the colour of the object.


setOutline

public void setOutline(java.awt.Color cc)
Sets the colour of the outline.


getOutline

public java.awt.Color getOutline()
Gets the colour of the outline.