All Packages  Class Hierarchy  This Package  Previous  Next  Index  WEKA's home

Class weka.gui.treevisualizer.Edge

java.lang.Object
    |
    +----weka.gui.treevisualizer.Edge

public class Edge
extends java.lang.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: 1.3 $
Author:
Malcolm Ware (mfw4@cs.waikato.ac.nz)

Constructor Index

 o Edge(String, String, String)
This constructs an Edge with the specified label and parent , child serial tags.

Method Index

 o getLabel()
Get the value of label.
 o getLine(int)
Returns line number n
 o getRsource()
Get the value of rsource.
 o getRtarget()
Get the value of rtarget.
 o getSource()
Get the value of source.
 o getTarget()
Get the value of target.
 o setRsource(String)
Set the value of rsource.
 o setRtarget(String)
Set the value of rtarget.
 o setSource(Node)
Set the value of source.
 o setTarget(Node)
Set the value of target.
 o stringSize(FontMetrics)
This will calculate how large a rectangle using the FontMetrics passed that the lines of the label will take up

Constructor Detail

 o Edge
public Edge(java.lang.String label,
            java.lang.String source,
            java.lang.String target)
          This constructs an Edge with the specified label and parent , child serial tags.
Parameters:
label - The text caption for the edge.
source - The ID string for this edges parent.
target - The ID string for this edges child.

Method Detail

 o getLabel
public java.lang.String getLabel()
          Get the value of label.
Returns:
Value of label.
 o stringSize
public java.awt.Dimension stringSize(java.awt.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
 o getLine
public java.lang.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
 o getRsource
public java.lang.String getRsource()
          Get the value of rsource.
Returns:
Value of rsource.
 o setRsource
public void setRsource(java.lang.String v)
          Set the value of rsource.
Parameters:
v - Value to assign to rsource.
 o getRtarget
public java.lang.String getRtarget()
          Get the value of rtarget.
Returns:
Value of rtarget.
 o setRtarget
public void setRtarget(java.lang.String v)
          Set the value of rtarget.
Parameters:
v - Value to assign to rtarget.
 o getSource
public Node getSource()
          Get the value of source.
Returns:
Value of source.
 o 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.
 o getTarget
public Node getTarget()
          Get the value of target.
Returns:
Value of target.
 o 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.

All Packages  Class Hierarchy  This Package  Previous  Next  Index  WEKA's home