Cytoscape 2.6.2 (c) 2006,2007 ISB, MSKCC, UCSD

cytoscape.groups
Interface CyGroupViewer


public interface CyGroupViewer

The CyGroupViewer interface provides a mechanism for group view implementations to register themselves and get notified of group creation and deletion. The primary goals of this mechanism are to allow multiple group viewers to maintain different groups at the same time, and to provide a mechanism to retain view mechanism across session save and restore.


Nested Class Summary
static class CyGroupViewer.ChangeType
          The change values
 
Method Summary
 String getViewerName()
          Provide the string name of this viewer.
 void groupChanged(CyGroup group, CyNode changedNode, CyGroupViewer.ChangeType change)
          Provide viewer-specific hooks to the change of a group.
 void groupCreated(CyGroup group)
          Provide viewer-specific initialization after the creation of a group.
 void groupCreated(CyGroup group, CyNetworkView myView)
           
 void groupWillBeRemoved(CyGroup group)
          Provide viewer-specific hooks to deletion of a group.
 

Method Detail

getViewerName

String getViewerName()
Provide the string name of this viewer. This will be used to reassociate this viewer with its groups upon session restoration.

Returns:
String name of the viewer

groupCreated

void groupCreated(CyGroup group)
Provide viewer-specific initialization after the creation of a group. This method will be called when a group is created from outside of the viewer mechanism. For example, when a session is restored. This allows the appropriate viewer to "take ownership" of the group, setting appropriate node attributes, or even adding the group node to the view, if appropriate. Note that this is called *after* the group creation has happened.

Parameters:
group - the CyGroup that was just created.

groupCreated

void groupCreated(CyGroup group,
                  CyNetworkView myView)

groupWillBeRemoved

void groupWillBeRemoved(CyGroup group)
Provide viewer-specific hooks to deletion of a group. Most of the time group deletion would happen completely within the context of the viewer, but there might be occaisions where alternative mechanisms would be provided. Note that this is called *before* the group deletion actually occurs.

Parameters:
group - the CyGroup that will be deleted.

groupChanged

void groupChanged(CyGroup group,
                  CyNode changedNode,
                  CyGroupViewer.ChangeType change)
Provide viewer-specific hooks to the change of a group. At this point, group change will be either the addition or deletion of a node, but it could be imagined in a future implementation where we might want to notify viewers of changes in group edges, state, or viewObject information.

Parameters:
group - the CyGroup that will be deleted.
changedNode - the node that triggered the change
change - the change that was made (see CyGroup defines)

www.cytoscape.org