edu.ucsf.groups.model
Interface GroupModel


public interface GroupModel

An interface for classes that handle the model associated with presentation of grouped nodes.


Method Summary
 void copyGroup(CyNode newGroup, CyNode oldGroup)
          This method is called from the GroupManager API when it copies a group from one network to another.
 void createGroup(CyNetwork network, CyNode group_node)
          This method is called from the GroupManager API upon creation of a new group to allow the group abstraction implementation to perform any initialization required.
 String getGroupName()
          Return the "name" of this abstraction.
 GroupViewer getGroupViewer()
          Get the GroupViewer for this group.
 void regroupGroup(CyNode group_node)
          This method is called from the GroupManager API to actually present the group in a 'grouped' state.
 void removeGroup(CyNode group_node)
          This method is called from the GroupManager API upon deletion of a new group to allow the group abstraction implementation to perform any updates in internal data structures.
 void setGroupViewer(GroupViewer viewer)
          Set the GroupViewer for this group.
 void ungroupGroup(CyNode group_node)
          This method is called from the GroupManager API to actually present the group in an 'ungrouped' state.
 

Method Detail

getGroupName

String getGroupName()
Return the "name" of this abstraction. This will be stored as part of the group.

Returns:
a String with the name of the abstraction

setGroupViewer

void setGroupViewer(GroupViewer viewer)
Set the GroupViewer for this group. This is linked to the abstraction since not all viewers will work with all abstractions. Note that each abstraction should provide (or utilize an existing) default viewer.

Parameters:
viewer - the GroupViewer to use

getGroupViewer

GroupViewer getGroupViewer()
Get the GroupViewer for this group.

Returns:
the GroupViewer currently set

createGroup

void createGroup(CyNetwork network,
                 CyNode group_node)
This method is called from the GroupManager API upon creation of a new group to allow the group abstraction implementation to perform any initialization required. This is called after the GroupManager API has completed all of its initialization.

Parameters:
network - the CyNetwork that will contain the resulting group node
group_node - the CyNode that represents the group

copyGroup

void copyGroup(CyNode newGroup,
               CyNode oldGroup)
This method is called from the GroupManager API when it copies a group from one network to another.

Parameters:
oldGroup - the CyNode that represents the group to be copied
newGroup - the CyNode that represents the new group

removeGroup

void removeGroup(CyNode group_node)
This method is called from the GroupManager API upon deletion of a new group to allow the group abstraction implementation to perform any updates in internal data structures. This is called before the GroupManager API performs any updates, including the actual deletion of the node and its associated attributes.

Parameters:
group_node - the CyNode that represents the group

regroupGroup

void regroupGroup(CyNode group_node)
This method is called from the GroupManager API to actually present the group in a 'grouped' state.

Parameters:
group_node - the CyNode that represents the group

ungroupGroup

void ungroupGroup(CyNode group_node)
This method is called from the GroupManager API to actually present the group in an 'ungrouped' state.

Parameters:
group_node - the CyNode that represents the group