Class Pin

java.lang.Object
  |
  +--Pin

class Pin
extends java.lang.Object
implements NonTerminal

A basic Pin with a round top and a cross.


Field Summary
private  java.util.Vector children
          children
private  Ellipse circle
          Modified circle.
private  Cross cross
          Modified cross.
 java.awt.Graphics graphics
          Graphics context for this Geometric object.
private  Ellipse original_circle
          Original circle
private  Cross original_cross
          Original cross.
 
Constructor Summary
(package private) Pin(Ellipse circle, Cross cross)
          The constructor.
 
Method Summary
 java.util.Vector getChildren()
          This method should return a vector containing the children of this object.
 Polygon[] getPolygonalBoundsArray()
          This method should return the polygonal array bounds of this non-terminal object.
 Rectangle getRectangularBounds()
          This method should return the Rectangular bounds of this non-terminal object.
 java.lang.String getType()
          Implement Paintable
 void paint()
          Draw the Pin.
 void paint(java.awt.Graphics g)
          Draw the Pin
 void paintOriginal(java.awt.Graphics g)
          This method is used to paint the original data points that forms this GeometricObject
 void setGraphicsContext(java.awt.Graphics g)
          Set graphics context for this Pin object.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

original_cross

private Cross original_cross
Original cross.

original_circle

private Ellipse original_circle
Original circle

cross

private Cross cross
Modified cross.

circle

private Ellipse circle
Modified circle.

children

private java.util.Vector children
children

graphics

public java.awt.Graphics graphics
Graphics context for this Geometric object.
Constructor Detail

Pin

Pin(Ellipse circle,
    Cross cross)
The constructor.
Method Detail

paint

public void paint()
Draw the Pin.

paint

public void paint(java.awt.Graphics g)
Draw the Pin

setGraphicsContext

public void setGraphicsContext(java.awt.Graphics g)
Set graphics context for this Pin object. Must be set at least once before doing any drawing.

getType

public java.lang.String getType()
Implement Paintable

paintOriginal

public void paintOriginal(java.awt.Graphics g)
This method is used to paint the original data points that forms this GeometricObject

getRectangularBounds

public Rectangle getRectangularBounds()
This method should return the Rectangular bounds of this non-terminal object.
Specified by:
getRectangularBounds in interface NonTerminal

getPolygonalBoundsArray

public Polygon[] getPolygonalBoundsArray()
This method should return the polygonal array bounds of this non-terminal object. This is a rough approximation of the constituents of the object.
Specified by:
getPolygonalBoundsArray in interface NonTerminal

getChildren

public java.util.Vector getChildren()
This method should return a vector containing the children of this object. Children are the Terminal or NonTerminal constituents of this object.
Specified by:
getChildren in interface NonTerminal