org.primordion.xholon.io
Interface IGraphicalTreeViewer

All Superinterfaces:
IViewer
All Known Implementing Classes:
TreeViewerJung

public interface IGraphicalTreeViewer
extends IViewer

Interface for a graphical tree viewer, for example TreeViewerJung.

Since:
0.2 (Created on November 29, 2005)
Author:
Ken Webb

Method Summary
 void createGraph(IXholon xhRoot, java.lang.String title, boolean showNodeLabels)
          Create a graph using a tree layout.
 void remove()
          Remove the graph from the screen.
 void setDistances(int distX, int distY)
          Set the default x and y distances between vertices.
 void setGraphSize(int sizeX, int sizeY)
          Set the size of the graph.
 void setLabelFontSize(int fontSize)
          Set the font size for displaying labels on vertices.
 

Method Detail

setDistances

public void setDistances(int distX,
                         int distY)
Set the default x and y distances between vertices.

Parameters:
distX - Distance in the x direction (system default is 50).
distY - Distance in the y direction (system default is 50).

setGraphSize

public void setGraphSize(int sizeX,
                         int sizeY)
Set the size of the graph.

Parameters:
sizeX - Size in the x direction.
sizeY - Size in the y direction.

setLabelFontSize

public void setLabelFontSize(int fontSize)
Set the font size for displaying labels on vertices.

Parameters:
fontSize - The font size (default is 9).

createGraph

public void createGraph(IXholon xhRoot,
                        java.lang.String title,
                        boolean showNodeLabels)
Create a graph using a tree layout.

Parameters:
xhRoot - The root of the IXholon tree.
title - The title to appear in the viewer window,
showNodeLabels - Whether vertices (nodes) should initially appear labelled.

remove

public void remove()
Remove the graph from the screen.