easik.sketch.vertex
Class SketchVertex

java.lang.Object
  extended by easik.sketch.vertex.SketchVertex
Direct Known Subclasses:
Constraint, EntityNode

public abstract class SketchVertex
extends java.lang.Object

The superclass of all nodes on the sketch, has a name and a coordinate.

Author:
Rob Fletcher 2005

Field Summary
protected  boolean _marked
          Stores whether this vertex is marked or not
protected  java.lang.String _name
          The name of this node
protected  int _posX
          The x-position of this node
protected  int _posY
          The y-position of this node
 
Constructor Summary
SketchVertex()
          Create a blank sketch vertex, no name, and located at (0, 0)
SketchVertex(java.lang.String name, int x, int y)
          Create a vertex with basic attributes
 
Method Summary
 boolean getMarked()
          Accessor for the marked flag
 java.lang.String getName()
          Accessor for the name field
 int getX()
          Accessor for the X coordinate
 int getY()
          Accessor for the Y Coordinate
 void setMarked(boolean inMark)
          Mutator for the marked flag.
 void setName(java.lang.String name)
          Mutator for the name field
 void setX(int inX)
          Mutator for the X coordinate
 void setY(int inY)
          Mutator for the Y coordinate
 java.lang.String toString()
          To string method returns the name
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

_marked

protected boolean _marked
Stores whether this vertex is marked or not


_posX

protected int _posX
The x-position of this node


_posY

protected int _posY
The y-position of this node


_name

protected java.lang.String _name
The name of this node

Constructor Detail

SketchVertex

public SketchVertex()
Create a blank sketch vertex, no name, and located at (0, 0)


SketchVertex

public SketchVertex(java.lang.String name,
                    int x,
                    int y)
Create a vertex with basic attributes

Parameters:
name - Label
x - X coordinate
y - Y coordinate
Method Detail

setName

public void setName(java.lang.String name)
Mutator for the name field

Parameters:
name - The new name

toString

public java.lang.String toString()
To string method returns the name

Overrides:
toString in class java.lang.Object
Returns:
Current name

getName

public java.lang.String getName()
Accessor for the name field

Returns:
the name

getX

public int getX()
Accessor for the X coordinate

Returns:
The x coordinate

getY

public int getY()
Accessor for the Y Coordinate

Returns:
The Y Coordinate

setX

public void setX(int inX)
Mutator for the X coordinate

Parameters:
inX - new X coordinate

setY

public void setY(int inY)
Mutator for the Y coordinate

Parameters:
inY - The new Y Coordinate

setMarked

public void setMarked(boolean inMark)
Mutator for the marked flag. Used when generating SQL

Parameters:
inMark -

getMarked

public boolean getMarked()
Accessor for the marked flag

Returns:
The marked flag