org.glassbox.graphview
Class GraphGroup

java.lang.Object
  extended by org.glassbox.gui.AbstractGroup
      extended by org.glassbox.gui.JLayeredGroup
          extended by org.glassbox.graphview.GraphGroup
All Implemented Interfaces:
Group, LayeredGroup, LayeredGroup.Layer, Member, Visible, VisibleGroup, VisibleMember

public class GraphGroup
extends JLayeredGroup
implements LayeredGroup.Layer

Implementation of a layered group to display graphs. It uses a JLayeredPane as view. The group offers a GGraphPane on the background layer (i.e. the layer with index 0).


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.glassbox.gui.LayeredGroup
LayeredGroup.Layer
 
Field Summary
protected  GGraphPane _graphpane
           
static int GRAPH_COMPONENT_LAYER
          The position of the graph component layer (one above background).
static int GRAPH_LAYER
          The position of the graph layer (background).
static java.lang.String IDENTIFIER
           
 
Fields inherited from class org.glassbox.gui.JLayeredGroup
_layers, _layersbyview, _parent, _view
 
Fields inherited from class org.glassbox.gui.AbstractGroup
_members, _properties
 
Fields inherited from interface org.glassbox.gui.VisibleGroup
MODAL_MEMBER_KEY, VIEWPORT_SIZE_KEY
 
Fields inherited from interface org.glassbox.gui.Group
APPLICATION_STATUS_KEY, EXITING, INITIATED, PAUSED, RUNNING, UNDEFINED
 
Constructor Summary
GraphGroup()
           
GraphGroup(boolean showgraphpane)
           
 
Method Summary
 void addMember(VisibleMember member, Edge edge)
          Add a visible member to the group on the GRAPH_COMPONENT_LAYER and attach it to the specified edge.
 void addMember(VisibleMember member, int position)
          Add a member to the specified layer.
 void addMember(VisibleMember member, int position, java.lang.Object constraints)
          Add a member to the specified layer.
 void addMember(VisibleMember member, Node node)
          Add a visible member to the group on the GRAPH_COMPONENT_LAYER and attach it to the specified node.
 void addVisible(Visible view)
          Adds the visible's view to the GRAPH_COMPONENT_LAYER.
 void addVisible(Visible view, java.lang.Object constraints)
          Adds the visible's view to the GRAPH_COMPONENT_LAYER.
 Graph getGraph()
          Get the current graph.
 GGraphPane getGraphPane()
          Get the graph pane.
 java.lang.String getIdentifier()
          Get a unique identifier of the member.
 void removeVisible(Visible view)
          Remove a visible from the layer.
 void setGraph(Graph graph)
          Set the current graph.
 void setProperty(java.lang.String name, java.lang.Object newvalue)
          Overridden to handle certain property changes within this group.
The following properties are interpreted by this method:
 
Methods inherited from class org.glassbox.gui.JLayeredGroup
addLayer, addMember, getGroup, getView, groupPropertyChanged, memberViewUpdated, moveToBack, moveToFront, removeMember, setGroup
 
Methods inherited from class org.glassbox.gui.AbstractGroup
firePropertyChanged, getMember, getProperty
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.glassbox.gui.Visible
getView
 
Methods inherited from interface org.glassbox.gui.Group
getMember, getProperty
 

Field Detail

IDENTIFIER

public static final java.lang.String IDENTIFIER
See Also:
Constant Field Values

GRAPH_LAYER

public static final int GRAPH_LAYER
The position of the graph layer (background).

See Also:
Constant Field Values

GRAPH_COMPONENT_LAYER

public static final int GRAPH_COMPONENT_LAYER
The position of the graph component layer (one above background).

See Also:
Constant Field Values

_graphpane

protected GGraphPane _graphpane
Constructor Detail

GraphGroup

public GraphGroup()

GraphGroup

public GraphGroup(boolean showgraphpane)
Method Detail

setGraph

public void setGraph(Graph graph)
Set the current graph.


getGraph

public Graph getGraph()
Get the current graph.


getGraphPane

public GGraphPane getGraphPane()
Get the graph pane.


addMember

public void addMember(VisibleMember member,
                      Node node)
Add a visible member to the group on the GRAPH_COMPONENT_LAYER and attach it to the specified node. Not implemented yet, simply calls addMember(member, GRAPH_COMPONENT_LAYER).


addMember

public void addMember(VisibleMember member,
                      Edge edge)
Add a visible member to the group on the GRAPH_COMPONENT_LAYER and attach it to the specified edge. Not implemented yet, simply calls addMember(member, GRAPH_COMPONENT_LAYER).


addVisible

public void addVisible(Visible view,
                       java.lang.Object constraints)
Adds the visible's view to the GRAPH_COMPONENT_LAYER. This method should not be used by clients, use addMember(VisibleMember, {Node | Edge}) instead.

Specified by:
addVisible in interface LayeredGroup.Layer

addVisible

public void addVisible(Visible view)
Adds the visible's view to the GRAPH_COMPONENT_LAYER. This method should not be used by clients, use addMember(VisibleMember, {Node | Edge}) instead.

Specified by:
addVisible in interface LayeredGroup.Layer

removeVisible

public void removeVisible(Visible view)
Description copied from interface: LayeredGroup.Layer
Remove a visible from the layer.

Specified by:
removeVisible in interface LayeredGroup.Layer

getIdentifier

public java.lang.String getIdentifier()
Description copied from interface: Member
Get a unique identifier of the member.

Specified by:
getIdentifier in interface Member
Overrides:
getIdentifier in class JLayeredGroup

addMember

public void addMember(VisibleMember member,
                      int position)
Add a member to the specified layer. It is not allowed to add a member to the background layer (index 0) or the GRAPH_COMPONENT_LAYER.

Specified by:
addMember in interface LayeredGroup
Overrides:
addMember in class JLayeredGroup
Throws:
java.lang.IllegalArgumentException - If the specified layer is <= 0;

addMember

public void addMember(VisibleMember member,
                      int position,
                      java.lang.Object constraints)
Add a member to the specified layer. It is not allowed to add a member to the background layer (index 0) or the GRAPH_COMPONENT_LAYER.

Specified by:
addMember in interface LayeredGroup
Overrides:
addMember in class JLayeredGroup
Throws:
java.lang.IllegalArgumentException - If the specified layer is <= 0;

setProperty

public void setProperty(java.lang.String name,
                        java.lang.Object newvalue)
Overridden to handle certain property changes within this group.
The following properties are interpreted by this method:
glassbox.VisibleGroup.modal-member
Disables and enables the view accordingly.
glassbox.VisibleGroup.viewport-size
Resizes the view.

Specified by:
setProperty in interface Group
Overrides:
setProperty in class JLayeredGroup


Copyright © 2005-2010 The K-Wf Grid Consortium. All Rights Reserved.