Package org.processmining.prediction
Class PrefuseTreeVisualization
- java.lang.Object
-
- org.processmining.prediction.PrefuseTreeVisualization
-
- All Implemented Interfaces:
java.io.Serializable,weka.gui.visualize.plugins.TreeVisualizePlugin
public class PrefuseTreeVisualization extends java.lang.Object implements java.io.Serializable, weka.gui.visualize.plugins.TreeVisualizePluginDisplays a tree in GraphViz's dotty format as Prefuse tree. See also the treeml.dtd. Based on theprefuse.demos.TreeViewdemo class.- Version:
- $Revision$
- Author:
- jeffrey heer (original prefuse demo), fracpete (fracpete at waikato dot ac dot nz)
- See Also:
prefuse.demos.TreeView, Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classPrefuseTreeVisualization.DottyToTreeTurns the GraphViz dotty format into Prefuse's tree XML format (according to the tree.dtd).static classPrefuseTreeVisualization.TreePanelDisplays a tree.
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringLABELthe constant for "label".static java.lang.StringTREEthe constant for "tree".static java.lang.StringTREE_EDGESthe constant for "tree.edges".static java.lang.StringTREE_NODESthe constant for "tree.nodes".
-
Constructor Summary
Constructors Constructor Description PrefuseTreeVisualization()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.lang.Stringconvert(java.lang.String dotty)Converts the dotty format to GraphML.PrefuseTreeVisualization.TreePaneldisplay(java.lang.String dotty, java.lang.String name)Displays the graph.protected voiddisplayError(java.lang.String msg)Displays the error.java.lang.StringgetDesignVersion()Get the specific version of Weka the class is designed for.java.lang.StringgetMaxVersion()Get the maximum version of Weka, exclusive, the class is designed to work with.java.lang.StringgetMinVersion()Get the minimum version of Weka, inclusive, the class is designed to work with.javax.swing.JMenuItemgetVisualizeMenuItem(java.lang.String dotty, java.lang.String name)Get a JMenu or JMenuItem which contain action listeners that perform the visualization of the tree in GraphViz's dotty format.protected prefuse.data.Treeparse(java.lang.String graphml)Parses the graph in GraphML and returns the built graph.
-
-
-
Field Detail
-
TREE
public static final java.lang.String TREE
the constant for "tree".- See Also:
- Constant Field Values
-
TREE_NODES
public static final java.lang.String TREE_NODES
the constant for "tree.nodes".- See Also:
- Constant Field Values
-
TREE_EDGES
public static final java.lang.String TREE_EDGES
the constant for "tree.edges".- See Also:
- Constant Field Values
-
LABEL
public static final java.lang.String LABEL
the constant for "label".- See Also:
- Constant Field Values
-
-
Method Detail
-
getMinVersion
public java.lang.String getMinVersion()
Get the minimum version of Weka, inclusive, the class is designed to work with. eg:3.5.0- Specified by:
getMinVersionin interfaceweka.gui.visualize.plugins.TreeVisualizePlugin- Returns:
- the minimum version
-
getMaxVersion
public java.lang.String getMaxVersion()
Get the maximum version of Weka, exclusive, the class is designed to work with. eg:3.6.0- Specified by:
getMaxVersionin interfaceweka.gui.visualize.plugins.TreeVisualizePlugin- Returns:
- the maximum version
-
getDesignVersion
public java.lang.String getDesignVersion()
Get the specific version of Weka the class is designed for. eg:3.5.1- Specified by:
getDesignVersionin interfaceweka.gui.visualize.plugins.TreeVisualizePlugin- Returns:
- the version the plugin was designed for
-
getVisualizeMenuItem
public javax.swing.JMenuItem getVisualizeMenuItem(java.lang.String dotty, java.lang.String name)Get a JMenu or JMenuItem which contain action listeners that perform the visualization of the tree in GraphViz's dotty format. Exceptions thrown because of changes in Weka since compilation need to be caught by the implementer.- Specified by:
getVisualizeMenuItemin interfaceweka.gui.visualize.plugins.TreeVisualizePlugin- Parameters:
dotty- the tree in dotty formatname- the name of the item (in the Explorer's history list)- Returns:
- menuitem for opening visualization(s), or null to indicate no visualization is applicable for the input
- See Also:
NoClassDefFoundError,IncompatibleClassChangeError
-
displayError
protected void displayError(java.lang.String msg)
Displays the error.- Parameters:
msg- the error to display
-
convert
protected java.lang.String convert(java.lang.String dotty)
Converts the dotty format to GraphML.- Parameters:
dotty- the graph in dotty format- Returns:
- the graph in tree XML or null in case of an error
-
parse
protected prefuse.data.Tree parse(java.lang.String graphml)
Parses the graph in GraphML and returns the built graph.- Parameters:
graphml- the graph in GraphML- Returns:
- the graph or null in case of an error
-
display
public PrefuseTreeVisualization.TreePanel display(java.lang.String dotty, java.lang.String name)
Displays the graph.- Parameters:
dotty- the graph in dotty formatname- the name of the graph- Returns:
-
-