|
Remote Systems v6.4.1 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ibm.etools.systems.files.importexport.jar.RemoteCheckboxTreeAndListGroup
Combines a CheckboxTreeViewer and CheckboxListViewer. All viewer selection-driven interactions are handled within this viewer
Constructor Summary | |
---|---|
RemoteCheckboxTreeAndListGroup(Composite parent,
Object rootObject,
ITreeContentProvider treeContentProvider,
ILabelProvider treeLabelProvider,
IStructuredContentProvider listContentProvider,
ILabelProvider listLabelProvider,
int style,
int width,
int height)
Creates an instance of this class. |
Method Summary | |
---|---|
void |
aboutToOpen()
This method must be called just before this window becomes visible. |
void |
addCheckStateListener(ICheckStateListener listener)
Adds the passed listener to self's collection of clients that listen for changes to element checked states |
void |
addListFilter(ViewerFilter filter)
Adds the given filter to the list viewer and triggers refiltering and resorting of the elements. |
void |
addTreeFilter(ViewerFilter filter)
Adds the given filter to the tree viewer and triggers refiltering and resorting of the elements. |
protected boolean |
areAllChildrenWhiteChecked(Object treeElement)
Returns a boolean indicating whether all children of the passed tree element are currently white-checked |
protected boolean |
areAllElementsChecked(Object treeElement)
Returns a boolean indicating whether all list elements associated with the passed tree element are currently checked |
protected void |
checkNewTreeElements(Object[] elements)
Iterates through the passed elements which are being realized for the first time and check each one in the tree viewer as appropriate |
void |
checkStateChanged(CheckStateChangedEvent event)
An item was checked in one of self's two views. |
protected void |
createContents(Composite parent,
int width,
int height,
int style)
Lay out and initialize self's visual components. |
protected void |
createListViewer(Composite parent,
int width,
int height)
Creates this group's list viewer. |
protected void |
createTreeViewer(Composite parent,
int width,
int height)
Creates this group's tree viewer. |
protected boolean |
determineShouldBeAtLeastGrayChecked(Object treeElement)
Returns a boolean indicating whether the passed tree element should be at LEAST gray-checked. |
protected boolean |
determineShouldBeWhiteChecked(Object treeElement)
Returns a boolean indicating whether the passed tree item should be white-checked. |
protected void |
determineWhiteCheckedDescendents(Object treeElement)
Recursively adds appropriate tree elements to the collection of known white-checked tree elements. |
void |
expandAll()
Causes the tree viewer to expand all its items |
void |
expandTreeToLevel(Object object,
int level)
For a given element, expand its chidren to a level. |
protected Object[] |
filter(ViewerFilter[] filters,
Object[] elements)
Returns the result of running the given elements through the filters. |
Iterator |
getAllCheckedListItems()
Answers a flat collection of all of the checked elements in the list portion of self |
Set |
getAllCheckedTreeItems()
Answer a collection of all of the checked elements in the tree portion of self |
int |
getCheckedElementCount()
Answers the number of elements that have been checked by the user. |
protected int |
getListItemsSize(Object treeElement)
Returns a count of the number of list items associated with a given tree item. |
Table |
getTable()
Gets the table that displays the folder content |
Tree |
getTree()
Gets the tree that displays the list for a folder |
Set |
getWhiteCheckedTreeItems()
|
protected void |
grayCheckHierarchy(Object treeElement)
Logically gray-check all ancestors of treeItem by ensuring that they appear in the checked table |
void |
initialCheckListItem(Object element)
Sets the initial checked state of the passed list element to true. |
void |
initialCheckTreeItem(Object element)
Sets the initial checked state of the passed element to true, as well as to all of its children and associated list elements |
protected void |
initialize()
Initializes this group's viewers after they have been laid out. |
boolean |
isTreeItemGreyChecked(Object object)
Checks if an element is grey checked. |
protected void |
listItemChecked(Object listElement,
boolean state,
boolean updatingFromSelection)
Callback that's invoked when the checked status of an item in the list is changed by the user. |
protected void |
notifyCheckStateChangeListeners(CheckStateChangedEvent event)
Notifies all checked state listeners that the passed element has had its checked state changed to the passed state |
protected void |
populateListViewer(Object treeElement)
Sets the contents of the list viewer based upon the specified selected tree element. |
void |
removeCheckStateListener(ICheckStateListener listener)
Removes the passed listener from self's collection of clients that listen for changes to element checked states |
void |
selectionChanged(SelectionChangedEvent event)
Handles the selection of an item in the tree viewer |
void |
setAllSelections(boolean selection)
Selects or deselect all of the elements in the tree depending on the value of the selection boolean. |
void |
setListProviders(IStructuredContentProvider contentProvider,
ILabelProvider labelProvider)
Sets the list viewer's providers to those passed |
void |
setListSorter(ViewerSorter sorter)
Sets the sorter that is to be applied to self's list viewer |
void |
setRoot(Object newRoot)
Sets the root of the widget to be new Root. |
protected void |
setTreeChecked(Object treeElement,
boolean state)
Sets the checked state of the passed tree element appropriately, and do so recursively to all of its child tree elements as well |
void |
setTreeProviders(ITreeContentProvider contentProvider,
ILabelProvider labelProvider)
Sets the tree viewer's providers to those passed |
void |
setTreeSelection(ISelection selection)
|
void |
setTreeSorter(ViewerSorter sorter)
Sets the sorter that is to be applied to self's tree viewer |
protected void |
setWhiteChecked(Object treeElement,
boolean isWhiteChecked)
Adjusts the collection of references to white-checked tree elements appropriately. |
void |
treeCollapsed(TreeExpansionEvent event)
Handle the collapsing of an element in a tree viewer |
void |
treeExpanded(TreeExpansionEvent event)
Handles the expansionsion of an element in a tree viewer |
protected void |
treeItemChecked(Object treeElement,
boolean state)
Callback that's invoked when the checked status of an item in the tree is changed by the user. |
protected void |
ungrayCheckHierarchy(Object treeElement)
Logically un-gray-check all ancestors of treeItem iff appropriate. |
protected void |
updateHierarchy(Object treeElement)
Sets the checked state of self and all ancestors appropriately |
void |
updateSelections(Map items)
Update the selections of the tree elements in items to reflect the new selections provided. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public RemoteCheckboxTreeAndListGroup(Composite parent, Object rootObject, ITreeContentProvider treeContentProvider, ILabelProvider treeLabelProvider, IStructuredContentProvider listContentProvider, ILabelProvider listLabelProvider, int style, int width, int height)
Method Detail |
public void aboutToOpen()
public void addCheckStateListener(ICheckStateListener listener)
listener
- ICheckStateListenerprotected boolean areAllChildrenWhiteChecked(Object treeElement)
treeElement
- java.lang.Object
protected boolean areAllElementsChecked(Object treeElement)
treeElement
- java.lang.Object
protected void checkNewTreeElements(Object[] elements)
public void checkStateChanged(CheckStateChangedEvent event)
event
- CheckStateChangedEventprotected void createContents(Composite parent, int width, int height, int style)
parent
- org.eclipse.swt.widgets.Compositewidth
- intheight
- intprotected void createListViewer(Composite parent, int width, int height)
protected void createTreeViewer(Composite parent, int width, int height)
protected boolean determineShouldBeAtLeastGrayChecked(Object treeElement)
true
answer from this method.
To determine whether a tree item should be white-checked use method
#determineShouldBeWhiteChecked(Object).
treeElement
- java.lang.Object
determineShouldBeWhiteChecked(java.lang.Object)
protected boolean determineShouldBeWhiteChecked(Object treeElement)
treeElement
- java.lang.Object
protected void determineWhiteCheckedDescendents(Object treeElement)
treeElement
- java.lang.Objectpublic void expandAll()
public Iterator getAllCheckedListItems()
public Set getAllCheckedTreeItems()
public int getCheckedElementCount()
protected int getListItemsSize(Object treeElement)
treeElement
- java.lang.Object
public Table getTable()
public Tree getTree()
public void addTreeFilter(ViewerFilter filter)
filter
- a viewer filterpublic void addListFilter(ViewerFilter filter)
filter
- a viewer filterprotected void grayCheckHierarchy(Object treeElement)
public void initialCheckListItem(Object element)
public void initialCheckTreeItem(Object element)
protected void initialize()
protected void listItemChecked(Object listElement, boolean state, boolean updatingFromSelection)
protected void notifyCheckStateChangeListeners(CheckStateChangedEvent event)
protected void populateListViewer(Object treeElement)
treeElement
- java.lang.Objectpublic void removeCheckStateListener(ICheckStateListener listener)
listener
- ICheckStateListenerpublic void selectionChanged(SelectionChangedEvent event)
event
- ISelectionpublic void setAllSelections(boolean selection)
public void setListProviders(IStructuredContentProvider contentProvider, ILabelProvider labelProvider)
contentProvider
- ITreeContentProviderlabelProvider
- ILabelProviderpublic void setListSorter(ViewerSorter sorter)
public void setRoot(Object newRoot)
newRoot
- protected void setTreeChecked(Object treeElement, boolean state)
public void setTreeProviders(ITreeContentProvider contentProvider, ILabelProvider labelProvider)
contentProvider
- ITreeContentProviderlabelProvider
- ILabelProviderpublic void setTreeSorter(ViewerSorter sorter)
protected void setWhiteChecked(Object treeElement, boolean isWhiteChecked)
treeElement
- java.lang.ObjectisWhiteChecked
- booleanpublic void treeCollapsed(TreeExpansionEvent event)
public void treeExpanded(TreeExpansionEvent event)
protected void treeItemChecked(Object treeElement, boolean state)
protected void ungrayCheckHierarchy(Object treeElement)
protected void updateHierarchy(Object treeElement)
public void updateSelections(Map items)
items
- with keys of Object (the tree element) and values of List (the selected
list elements).protected Object[] filter(ViewerFilter[] filters, Object[] elements)
elements
- the elements to filter
public Set getWhiteCheckedTreeItems()
public boolean isTreeItemGreyChecked(Object object)
public void expandTreeToLevel(Object object, int level)
public void setTreeSelection(ISelection selection)
selection
-
|
Remote Systems v6.4.1 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |