| 
 | 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.Edge
The base class for implementing a graph edge. An Edge consists of the following attributes: weight, weight2, label, edgeColor, and marked.
| Field Summary | |
| protected  Color | DEFAULTCOLORThe default Edge color. | 
| Constructor Summary | |
| protected  | Edge()Default constructor. | 
| protected  | Edge(Edge source)Cloning constructor. | 
| Method Summary | |
| protected  Color | getColor()Returns the color of the Edge. | 
| protected  String | getLabel()Returns the string label of the Edge. | 
| protected  double | getWeight()Returns the value of weight of the Edge. | 
| protected  double | getWeight2()Returns the value of weight2 of the Edge. | 
| protected  boolean | isMarked()Returns true if Edge is marked. | 
| protected  void | mark()Marks the Edge by setting an internal attribute marked to true and by setting the attribute edgeColor to JeditFrame.DEFAULT_MARKED_COLOR. | 
| protected  void | setColor(Color newColor)Sets the color of the Edge to be the value of newColor. | 
| protected  void | setLabel(String newLabel)Sets the value of the label of the edge to be newLabel. | 
| protected  void | setWeight(double newWeight)Sets the value of weight of the Edge to be newWeight. | 
| protected  void | setWeight2(double newWeight)Sets the value of weight2 of the Edge to be newWeight. | 
|  String | toString()Returns a string in the form of [label]:[weight]. | 
| protected  void | unmark()Unmarks the Edge by setting an internal attribute marked to false and by setting the attribute edgeColor to JeditFrame.DEFAULT_EDGE_COLOR. | 
| Methods inherited from class java.lang.Object | 
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait | 
| Field Detail | 
protected final Color DEFAULTCOLOR
| Constructor Detail | 
protected Edge()
protected Edge(Edge source)
source - the edge 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 change the edge toprotected double getWeight2()
protected double getWeight()
protected String getLabel()
protected void setWeight(double newWeight)
newWeight - the value to set weight of the edge toprotected void setWeight2(double newWeight)
newWeight - the value to set weight2 of the edge toprotected void setLabel(String newLabel)
newLabel - the value to set the edge label topublic 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 | |||||||||