Remote Systems
v6.4.1

com.ibm.etools.systems.core.ui.view.team
Class SystemTeamView

java.lang.Object
  extended byTreeViewer
      extended bycom.ibm.etools.systems.core.ui.view.team.SystemTeamView
All Implemented Interfaces:
EventListener, ISystemResourceChangeListener, ISystemSelectAllTarget

public class SystemTeamView
extends TreeViewer
implements ISystemSelectAllTarget, ISystemResourceChangeListener

We specialize tree viewer for the Team view, so we know when we are dealing with the team view in common code.

See Also:
Serialized Form

Field Summary
 
Fields inherited from interface com.ibm.etools.systems.core.ui.view.ISystemSelectAllTarget
Copyright
 
Fields inherited from interface com.ibm.etools.systems.model.ISystemResourceChangeListener
copyright
 
Constructor Summary
SystemTeamView(Composite parent, int style, SystemTeamViewPart teamViewPart)
           
SystemTeamView(Composite parent, SystemTeamViewPart teamViewPart)
           
 
Method Summary
 void collapseSelected()
          Handles a collapse-selected request
 void doSelectAll(IStructuredSelection selection)
          When this action is run via Edit->Select All or via Ctrl+A, perform the select all action.
 boolean enableSelectAll(IStructuredSelection selection)
          Return true if select all should be enabled for the given object.
 void expandSelected()
          Handles an expand-selected request
 TreeItem findChildTreeItem(TreeItem parentItem, Object dataObject)
          Given a tree item, search the immediate children for an item representing the given object.
 TreeItem findTreeItem(Object dataObject)
          Use findItem to find a tree item given its data object, or null if given object not in tree.
 Object[] getElementNodes(Object element)
          This returns an array containing each element in the tree, up to but not including the root.
 Shell getShell()
          Return the shell
 SystemTeamViewPart getTeamViewPart()
          Return the part view part of this tree view
 void systemResourceChanged(ISystemResourceChangeEvent event)
          Called when something changes in the model
 void updatePropertySheet()
          Called when a property is updated and we need to inform the Property Sheet viewer.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SystemTeamView

public SystemTeamView(Composite parent,
                      SystemTeamViewPart teamViewPart)
Parameters:
parent -

SystemTeamView

public SystemTeamView(Composite parent,
                      int style,
                      SystemTeamViewPart teamViewPart)
Parameters:
parent -
style -
Method Detail

getTeamViewPart

public SystemTeamViewPart getTeamViewPart()
Return the part view part of this tree view


getElementNodes

public Object[] getElementNodes(Object element)
This returns an array containing each element in the tree, up to but not including the root. The array is in reverse order, starting at the leaf and going up.


findTreeItem

public TreeItem findTreeItem(Object dataObject)
Use findItem to find a tree item given its data object, or null if given object not in tree.


findChildTreeItem

public TreeItem findChildTreeItem(TreeItem parentItem,
                                  Object dataObject)
Given a tree item, search the immediate children for an item representing the given object.


updatePropertySheet

public void updatePropertySheet()
Called when a property is updated and we need to inform the Property Sheet viewer. There is no formal mechanism for this so we simulate a selection changed event as this is the only event the property sheet listens for.


systemResourceChanged

public void systemResourceChanged(ISystemResourceChangeEvent event)
Called when something changes in the model

Specified by:
systemResourceChanged in interface ISystemResourceChangeListener
See Also:
ISystemResourceChangeEvent

getShell

public Shell getShell()
Return the shell

Specified by:
getShell in interface ISystemResourceChangeListener

enableSelectAll

public boolean enableSelectAll(IStructuredSelection selection)
Return true if select all should be enabled for the given object. For a tree view, you should return true if and only if the selected object has children. You can use the passed in selection or ignore it and query your own selection.

Specified by:
enableSelectAll in interface ISystemSelectAllTarget

doSelectAll

public void doSelectAll(IStructuredSelection selection)
When this action is run via Edit->Select All or via Ctrl+A, perform the select all action. For a tree view, this should select all the children of the given selected object. You can use the passed in selected object or ignore it and query the selected object yourself.

Specified by:
doSelectAll in interface ISystemSelectAllTarget

collapseSelected

public void collapseSelected()
Handles a collapse-selected request


expandSelected

public void expandSelected()
Handles an expand-selected request


Remote Systems
v6.4.1

Copyright © 2005 IBM Corp. All Rights Reserved.

Note: This documentation is for part of an interim API that is still under development and expected to change significantly before reaching stability. It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken (repeatedly) as the API evolves.