| 
Jedit 4.1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--edu.bsu.cs.graph.Vertex
The base class for implementing a graph vertex. A vertex consists of the following attributes: a string label, integer coordinates x and y, a vertexColor, a boolean marked, and a weight.
Serializable, 
Serialized Form| Constructor Summary | |
protected  | 
Vertex()
Default constructor.  | 
protected  | 
Vertex(Vertex source)
Cloning constructor.  | 
| Method Summary | |
protected  Color | 
getColor()
Returns the color of the Vertex.  | 
protected  Point | 
getCoord()
Returns a point containing the x,y coordinates of the Vertex.  | 
protected  String | 
getLabel()
Returns the string label of the Vertex.  | 
protected  double | 
getWeight()
Returns the weight of the Vertex.  | 
protected  boolean | 
isMarked()
Returns true if Vertex is marked.  | 
protected  void | 
mark()
Marks the Vertex by setting an internal attribute marked to true and by setting the attribute vertexColor to JeditFrame.DEFAULT_MARKED_COLOR.  | 
protected  void | 
setColor(Color newColor)
Sets the color of the Vertex to be the value of newColor.  | 
protected  void | 
setCoord(Point newPoint)
Sets the x,y coordinates of the Vertex to be the value of the x,y coordinates in newPoint.  | 
protected  void | 
setLabel(String newString)
Sets the string label of the Vertex to be the value of newString.  | 
protected  void | 
setWeight(double newWeight)
Sets the weight of the Vertex to be the value of newWeight.  | 
 String | 
toString()
Returns a string in the form of [label]([x],[y]) [weight].  | 
protected  void | 
unmark()
Unmarks the Vertex by setting an internal attribute marked to false and by setting the attribute vertexColor to JeditFrame.DEFAULT_VERTEX_COLOR.  | 
| Methods inherited from class java.lang.Object | 
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait | 
| Constructor Detail | 
protected Vertex()
protected Vertex(Vertex source)
source - the vertex to clone| Method Detail | 
protected void mark()
protected void unmark()
protected boolean isMarked()
protected Color getColor()
protected void setColor(Color newColor)
newColor - the color to set the vertex toprotected String getLabel()
protected void setLabel(String newString)
newString - the string to set the vertex label toprotected double getWeight()
protected void setWeight(double newWeight)
newWeight - the value to set the vertex weight toprotected void setCoord(Point newPoint)
newPoint - the new coordinates of the pointprotected Point getCoord()
public String toString()
toString in class Object
  | 
Jedit 4.1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||