discovery.view
Class EndPointView

java.lang.Object
  extended by java.awt.geom.RectangularShape
      extended by java.awt.geom.Rectangle2D
          extended by java.awt.geom.Rectangle2D.Double
              extended by discovery.view.EndPointView
All Implemented Interfaces:
ComponentView, java.awt.Shape, java.io.Serializable, java.lang.Cloneable

public class EndPointView
extends java.awt.geom.Rectangle2D.Double
implements java.awt.Shape, ComponentView

This class represents the view of an End Point. It implements the ComponentView interface, and the Shape interface. It extends the Rectangle2D class. This class doesn't actually deal with the drawing of an End Point shape, but it does store the bounds of the End Point.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class java.awt.geom.Rectangle2D
java.awt.geom.Rectangle2D.Double, java.awt.geom.Rectangle2D.Float
 
Field Summary
 
Fields inherited from class java.awt.geom.Rectangle2D.Double
height, width
 
Fields inherited from class java.awt.geom.Rectangle2D
OUT_BOTTOM, OUT_LEFT, OUT_RIGHT, OUT_TOP
 
Constructor Summary
EndPointView()
          The empty constructor, creates an EndPointView object with no label.
EndPointView(double xc, double yc, double wid, double hei)
          A constructor which specifies the bounds of the end point
 
Method Summary
 int getID()
          Accessor to get the end point's ID.
 java.lang.String getLabel()
          Accessor to get the end point's label.
 java.lang.String getType()
          Accessor method to get the end point's type.
 void setLabel(java.lang.String n)
          Must have this method according to the ComponentView interface, but end points are not labelled, so label is always null.
 
Methods inherited from class java.awt.geom.Rectangle2D.Double
createIntersection, createUnion, getBounds2D, getHeight, getWidth, getX, getY, isEmpty, outcode, setRect, setRect, toString
 
Methods inherited from class java.awt.geom.Rectangle2D
add, add, add, contains, contains, equals, getPathIterator, getPathIterator, hashCode, intersect, intersects, intersectsLine, intersectsLine, outcode, setFrame, union
 
Methods inherited from class java.awt.geom.RectangularShape
clone, contains, contains, getBounds, getCenterX, getCenterY, getFrame, getMaxX, getMaxY, getMinX, getMinY, intersects, setFrame, setFrame, setFrameFromCenter, setFrameFromCenter, setFrameFromDiagonal, setFrameFromDiagonal
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.awt.Shape
contains, contains, contains, contains, getBounds, getBounds2D, getPathIterator, getPathIterator, intersects, intersects
 

Constructor Detail

EndPointView

public EndPointView()
The empty constructor, creates an EndPointView object with no label.


EndPointView

public EndPointView(double xc,
                    double yc,
                    double wid,
                    double hei)
A constructor which specifies the bounds of the end point

Parameters:
xc - the bounding box's x-coordinate
yc - the bounding box's y-coordinate
wid - the bounding box's width
hei - the bounding box's height
Method Detail

getID

public int getID()
Accessor to get the end point's ID. Always returns -1 as end points don't have an ID.

Specified by:
getID in interface ComponentView
Returns:
-1

getLabel

public java.lang.String getLabel()
Accessor to get the end point's label. Always returns null, as end points aren't labelled.

Specified by:
getLabel in interface ComponentView
Returns:
null

getType

public java.lang.String getType()
Accessor method to get the end point's type.

Specified by:
getType in interface ComponentView
Returns:
the string "end point"

setLabel

public void setLabel(java.lang.String n)
Must have this method according to the ComponentView interface, but end points are not labelled, so label is always null.

Specified by:
setLabel in interface ComponentView
Parameters:
n - a string