RSE
Release 2.0

org.eclipse.rse.files.ui.widgets
Class SystemFileTreeAndListGroup

java.lang.Object
  extended by org.eclipse.core.commands.common.EventManager
      extended by org.eclipse.ui.internal.ide.dialogs.ResourceTreeAndListGroup
          extended by org.eclipse.rse.files.ui.widgets.SystemFileTreeAndListGroup
All Implemented Interfaces:
ICheckStateListener, ISelectionChangedListener, ITreeViewerListener

public class SystemFileTreeAndListGroup
extends org.eclipse.ui.internal.ide.dialogs.ResourceTreeAndListGroup

This is a private-use subclass of the internal Eclipse ResourceTreeAndListGroup composite widget. This is for selecting multiple local or remote files. It contains a checkbox tree on the left for selecting the folder, and a checkbox list on the right for selecting the files.

We subclass this to add some slight additional functionality, including support for refreshing the contents.


Constructor Summary
SystemFileTreeAndListGroup(Composite parent, ITreeContentProvider treeContentProvider, ILabelProvider treeLabelProvider, IStructuredContentProvider listContentProvider, ILabelProvider listLabelProvider, int style, int width, int height)
          Constructor when there is no initial content
SystemFileTreeAndListGroup(Composite parent, Object rootObject, ITreeContentProvider treeContentProvider, ILabelProvider treeLabelProvider, IStructuredContentProvider listContentProvider, ILabelProvider listLabelProvider, int style, int width, int height)
          Constructor when there is initial content
 
Method Summary
 void clearAll()
          Clear the contents
 void refresh()
          Refesh all the contents of the checkbox viewers
 void refreshFiles()
          Refesh the contents of the file-selection checkbox viewer.
 void selectionChanged(SelectionChangedEvent event)
          Handle the selection of an item in the tree viewer.
 void setRoot(Object newRoot)
          Set the root of the widget to be new Root.
 
Methods inherited from class org.eclipse.ui.internal.ide.dialogs.ResourceTreeAndListGroup
aboutToOpen, addCheckStateListener, areAllChildrenWhiteChecked, areAllElementsChecked, checkNewTreeElements, checkStateChanged, createContents, createListViewer, createTreeViewer, determineShouldBeAtLeastGrayChecked, determineShouldBeWhiteChecked, determineWhiteCheckedDescendents, expandAll, getAllCheckedListItems, getAllCheckedListItems, getAllWhiteCheckedItems, getCheckedElementCount, getFullLabel, getListItemsSize, getListTable, grayCheckHierarchy, initialCheckListItem, initialCheckTreeItem, initialize, listItemChecked, notifyCheckStateChangeListeners, populateListViewer, removeCheckStateListener, setAllSelections, setFocus, setListComparator, setListProviders, setTreeChecked, setTreeComparator, setTreeProviders, setWhiteChecked, treeCollapsed, treeExpanded, treeItemChecked, ungrayCheckHierarchy, updateHierarchy, updateSelections
 
Methods inherited from class org.eclipse.core.commands.common.EventManager
addListenerObject, clearListeners, getListeners, isListenerAttached, removeListenerObject
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SystemFileTreeAndListGroup

public SystemFileTreeAndListGroup(Composite parent,
                                  Object rootObject,
                                  ITreeContentProvider treeContentProvider,
                                  ILabelProvider treeLabelProvider,
                                  IStructuredContentProvider listContentProvider,
                                  ILabelProvider listLabelProvider,
                                  int style,
                                  int width,
                                  int height)
Constructor when there is initial content

Parameters:
parent - org.eclipse.swt.widgets.Composite
rootObject - java.lang.Object
treeContentProvider - supplies the folders for the tree
treeLabelProvider - supplies the names and icons of the folders for the tree
listContentProvider - supplies the files for the tree
listLabelProvider - supplies the names and icons for the files for the list
style - int
width - int
height - int

SystemFileTreeAndListGroup

public SystemFileTreeAndListGroup(Composite parent,
                                  ITreeContentProvider treeContentProvider,
                                  ILabelProvider treeLabelProvider,
                                  IStructuredContentProvider listContentProvider,
                                  ILabelProvider listLabelProvider,
                                  int style,
                                  int width,
                                  int height)
Constructor when there is no initial content

Parameters:
parent - org.eclipse.swt.widgets.Composite
treeContentProvider - supplies the folders for the tree
treeLabelProvider - supplies the names and icons of the folders for the tree
listContentProvider - supplies the files for the tree
listLabelProvider - supplies the names and icons for the files for the list
style - int
width - int
height - int
Method Detail

refresh

public void refresh()
Refesh all the contents of the checkbox viewers


refreshFiles

public void refreshFiles()
Refesh the contents of the file-selection checkbox viewer.


selectionChanged

public void selectionChanged(SelectionChangedEvent event)
Handle the selection of an item in the tree viewer. Intercept of parent so we can record the last selected tree node.

Specified by:
selectionChanged in interface ISelectionChangedListener
Overrides:
selectionChanged in class org.eclipse.ui.internal.ide.dialogs.ResourceTreeAndListGroup
Parameters:
event - the selection changed event

setRoot

public void setRoot(Object newRoot)
Set the root of the widget to be new Root. Regenerate all of the tables and lists from this value. Intercept of parent so we can refresh internal variables.

Overrides:
setRoot in class org.eclipse.ui.internal.ide.dialogs.ResourceTreeAndListGroup
Parameters:
newRoot -

clearAll

public void clearAll()
Clear the contents


RSE
Release 2.0

Copyright (c) IBM Corporation and others 2000, 2007. All Rights Reserved.