org.primordion.xholon.io
Interface IGraphicalNetworkViewer

All Superinterfaces:
IViewer
All Known Implementing Classes:
AbstractNetworkViewerJung, NetworkViewerJung, NetworkViewerJungCell

public interface IGraphicalNetworkViewer
extends IViewer

Interface for a graphical network viewer, for example AbstractNetworkViewerJung.

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

Field Summary
static int LAYOUT_CIRCLE
          Circle.
static int LAYOUT_DAG
          Directed Acyclic Graph.
static int LAYOUT_FR
          Fruchterman-Reingold algorithm.
static int LAYOUT_ISOM
          Implementation of a self-organizing map.
static int LAYOUT_KK
          Kamada-Kawai algorithm.
static int LAYOUT_KKINT
          Kamada-Kawai algorithm using integers.
static int LAYOUT_NONE
          No algorithm specified.
static int LAYOUT_SPRING
          Spring.
static int LAYOUT_STATIC
          Static.
 
Method Summary
 void createGraph(IXholon xhRoot, java.lang.String title, boolean showNodeLabels)
          Create a graph using a tree layout.
 boolean isActive()
          Is this network viewer active? If it's active then it can be refreshed.
 void refresh()
          Refresh the physical display to reflect changed information, such as the current coloring of the icons when states change in a state machine.
 void refresh(IXholon xhNode)
          Refresh the physical display for this sub tree only, to reflect changed information, such as the current coloring of the icons when states change in a state machine.
 void remove()
          Remove the graph from the screen.
 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.
 void setLayoutType(int layoutType)
          Select one of the layout types available with JUNG.
 void setShowContainers(boolean showContainers)
          Select whether of not to include containers, and their edges, in the graph.
 

Field Detail

LAYOUT_NONE

public static final int LAYOUT_NONE
No algorithm specified.

See Also:
Constant Field Values

LAYOUT_FR

public static final int LAYOUT_FR
Fruchterman-Reingold algorithm.

See Also:
Constant Field Values

LAYOUT_ISOM

public static final int LAYOUT_ISOM
Implementation of a self-organizing map.

See Also:
Constant Field Values

LAYOUT_KK

public static final int LAYOUT_KK
Kamada-Kawai algorithm.

See Also:
Constant Field Values

LAYOUT_KKINT

public static final int LAYOUT_KKINT
Kamada-Kawai algorithm using integers.

See Also:
Constant Field Values

LAYOUT_SPRING

public static final int LAYOUT_SPRING
Spring.

See Also:
Constant Field Values

LAYOUT_STATIC

public static final int LAYOUT_STATIC
Static.

See Also:
Constant Field Values

LAYOUT_CIRCLE

public static final int LAYOUT_CIRCLE
Circle.

See Also:
Constant Field Values

LAYOUT_DAG

public static final int LAYOUT_DAG
Directed Acyclic Graph.

See Also:
Constant Field Values
Method Detail

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).

setLayoutType

public void setLayoutType(int layoutType)
Select one of the layout types available with JUNG. The default is the FRLayout.

Parameters:
layoutType - The layout type.

setShowContainers

public void setShowContainers(boolean showContainers)
Select whether of not to include containers, and their edges, in the graph.

Parameters:
showContainers - Whether or not to show containers.

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.


refresh

public void refresh()
Refresh the physical display to reflect changed information, such as the current coloring of the icons when states change in a state machine.


refresh

public void refresh(IXholon xhNode)
Refresh the physical display for this sub tree only, to reflect changed information, such as the current coloring of the icons when states change in a state machine.


isActive

public boolean isActive()
Is this network viewer active? If it's active then it can be refreshed.

Returns:
true or false