|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecteasik.sketch.vertex.SketchVertex
public abstract class SketchVertex
The superclass of all nodes on the sketch, has a name and a coordinate.
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 |
---|
protected boolean _marked
protected int _posX
protected int _posY
protected java.lang.String _name
Constructor Detail |
---|
public SketchVertex()
public SketchVertex(java.lang.String name, int x, int y)
name
- Labelx
- X coordinatey
- Y coordinateMethod Detail |
---|
public void setName(java.lang.String name)
name
- The new namepublic java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String getName()
public int getX()
public int getY()
public void setX(int inX)
inX
- new X coordinatepublic void setY(int inY)
inY
- The new Y Coordinatepublic void setMarked(boolean inMark)
inMark
- public boolean getMarked()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |