Package weka.gui.treevisualizer
Class Edge
- java.lang.Object
-
- weka.gui.treevisualizer.Edge
-
public class Edge extends Object
This class is used in conjunction with the Node class to form a tree structure. This in particular contains information about an edges in the tree.- Version:
- $Revision$
- Author:
- Malcolm Ware (mfw4@cs.waikato.ac.nz)
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetLabel()Get the value of label.StringgetLine(int n)Returns line number nStringgetRsource()Get the value of rsource.StringgetRtarget()Get the value of rtarget.NodegetSource()Get the value of source.NodegetTarget()Get the value of target.voidsetRsource(String v)Set the value of rsource.voidsetRtarget(String v)Set the value of rtarget.voidsetSource(Node v)Set the value of source.voidsetTarget(Node v)Set the value of target.DimensionstringSize(FontMetrics f)This will calculate how large a rectangle using the FontMetrics passed that the lines of the label will take up
-
-
-
Method Detail
-
getLabel
public String getLabel()
Get the value of label.- Returns:
- Value of label.
-
stringSize
public Dimension stringSize(FontMetrics f)
This will calculate how large a rectangle using the FontMetrics passed that the lines of the label will take up- Parameters:
f- The size information for a particular Font- Returns:
- A Dimension containing the size and width of the text
-
getLine
public String getLine(int n)
Returns line number n- Parameters:
n- The number of the line requested- Returns:
- The string for the line number or NULL if it didn't exist
-
getRsource
public String getRsource()
Get the value of rsource.- Returns:
- Value of rsource.
-
setRsource
public void setRsource(String v)
Set the value of rsource.- Parameters:
v- Value to assign to rsource.
-
getRtarget
public String getRtarget()
Get the value of rtarget.- Returns:
- Value of rtarget.
-
setRtarget
public void setRtarget(String v)
Set the value of rtarget.- Parameters:
v- Value to assign to rtarget.
-
getSource
public Node getSource()
Get the value of source.- Returns:
- Value of source.
-
setSource
public void setSource(Node v)
Set the value of source. And then call v.addChild to add the edge to the Node.- Parameters:
v- Value to assign to source.
-
getTarget
public Node getTarget()
Get the value of target.- Returns:
- Value of target.
-
setTarget
public void setTarget(Node v)
Set the value of target. And then call v.addParent to add the edge to the Node.- Parameters:
v- Value to assign to target.
-
-