|
TPTP 4.5.0 Platform Project Internal API Specification |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.eclipse.tptp.platform.probekit.launch.internal.wizard.CustomResourceTreeAndListGroup
public class CustomResourceTreeAndListGroup
Workbench-level composite that combines a CheckboxTreeViewer and CheckboxListViewer. All viewer selection-driven interactions are handled within this object. See also org.eclipse.ui.internal.ide.dialogs.ResourceTreeAndListGroup.
| Constructor Summary | |
|---|---|
CustomResourceTreeAndListGroup(org.eclipse.swt.widgets.Composite parent,
java.lang.Object rootObject,
org.eclipse.jface.viewers.ITreeContentProvider treeContentProvider,
org.eclipse.jface.viewers.ILabelProvider treeLabelProvider,
org.eclipse.jface.viewers.IStructuredContentProvider listContentProvider,
org.eclipse.jface.viewers.ILabelProvider listLabelProvider,
int style,
boolean useHeightHint)
Create an instance of this class. |
|
| Method Summary | |
|---|---|
void |
aboutToOpen()
This method must be called just before this window becomes visible. |
void |
addCheckStateListener(org.eclipse.jface.viewers.ICheckStateListener listener)
Add the passed listener to self's collection of clients that listen for changes to element checked states |
protected boolean |
areAllChildrenWhiteChecked(java.lang.Object treeElement)
Return a boolean indicating whether all children of the passed tree element are currently white-checked |
protected boolean |
areAllElementsChecked(java.lang.Object treeElement)
Return a boolean indicating whether all list elements associated with the passed tree element are currently checked |
protected void |
checkNewTreeElements(java.lang.Object[] elements)
Iterate through the passed elements which are being realized for the first time and check each one in the tree viewer as appropriate |
void |
checkStateChanged(org.eclipse.jface.viewers.CheckStateChangedEvent event)
An item was checked in one of self's two views. |
protected void |
createContents(org.eclipse.swt.widgets.Composite parent,
int style,
boolean useHeightHint)
Lay out and initialize self's visual components. |
protected void |
createListViewer(org.eclipse.swt.widgets.Composite parent,
boolean useHeightHint)
Create this group's list viewer. |
protected void |
createTreeViewer(org.eclipse.swt.widgets.Composite parent,
boolean useHeightHint)
Create this group's tree viewer. |
protected boolean |
determineShouldBeAtLeastGrayChecked(java.lang.Object treeElement)
Returns a boolean indicating whether the passed tree element should be at LEAST gray-checked. |
protected boolean |
determineShouldBeWhiteChecked(java.lang.Object treeElement)
Returns a boolean indicating whether the passed tree item should be white-checked. |
protected void |
determineWhiteCheckedDescendents(java.lang.Object treeElement)
Recursively add appropriate tree elements to the collection of known white-checked tree elements. |
void |
expandAll()
Cause the tree viewer to expand all its items |
java.util.List |
getAllCheckedListItems()
Returns a flat list of all of the leaf elements which are checked. |
void |
getAllCheckedListItems(ICustomElementFilter filter,
org.eclipse.core.runtime.IProgressMonitor monitor)
Returns a flat list of all of the leaf elements which are checked. |
java.util.List |
getAllWhiteCheckedItems()
Returns a list of all of the items that are white checked. |
int |
getCheckedElementCount()
Answer the number of elements that have been checked by the user. |
protected java.lang.String |
getFullLabel(java.lang.Object treeElement,
java.lang.String parentLabel)
Get the full label of the treeElement (its name and its parent's name). |
protected int |
getListItemsSize(java.lang.Object treeElement)
Return a count of the number of list items associated with a given tree item. |
org.eclipse.swt.widgets.Table |
getListTable()
Get the table the list viewer uses. |
org.eclipse.swt.widgets.Tree |
getTree()
Get the tree the tree viewer uses. |
protected void |
grayCheckHierarchy(java.lang.Object treeElement)
Logically gray-check all ancestors of treeItem by ensuring that they appear in the checked table |
void |
initialCheckListItem(java.lang.Object element)
Set the initial checked state of the passed list element to true. |
void |
initialCheckTreeItem(java.lang.Object element)
Set 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()
Initialize this group's viewers after they have been laid out. |
protected void |
listItemChecked(java.lang.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(org.eclipse.jface.viewers.CheckStateChangedEvent event)
Notify all checked state listeners that the passed element has had its checked state changed to the passed state |
protected void |
populateListViewer(java.lang.Object treeElement)
Set the contents of the list viewer based upon the specified selected tree element. |
void |
removeCheckStateListener(org.eclipse.jface.viewers.ICheckStateListener listener)
Remove the passed listener from self's collection of clients that listen for changes to element checked states |
void |
selectionChanged(org.eclipse.jface.viewers.SelectionChangedEvent event)
Handle the selection of an item in the tree viewer |
void |
setAllSelections(boolean selection)
Select or deselect all of the elements in the tree depending on the value of the selection boolean. |
void |
setFocus()
Set the focus on to the list widget. |
void |
setListProviders(org.eclipse.jface.viewers.IStructuredContentProvider contentProvider,
org.eclipse.jface.viewers.ILabelProvider labelProvider)
Set the list viewer's providers to those passed |
void |
setListSorter(org.eclipse.jface.viewers.ViewerSorter sorter)
Set the sorter that is to be applied to self's list viewer |
void |
setRoot(java.lang.Object newRoot)
Set the root of the widget to be new Root. |
protected void |
setTreeChecked(java.lang.Object treeElement,
boolean state)
Set the checked state of the passed tree element appropriately, and do so recursively to all of its child tree elements as well |
void |
setTreeProviders(org.eclipse.jface.viewers.ITreeContentProvider contentProvider,
org.eclipse.jface.viewers.ILabelProvider labelProvider)
Set the tree viewer's providers to those passed |
void |
setTreeSorter(org.eclipse.jface.viewers.ViewerSorter sorter)
Set the sorter that is to be applied to self's tree viewer |
protected void |
setWhiteChecked(java.lang.Object treeElement,
boolean isWhiteChecked)
Adjust the collection of references to white-checked tree elements appropriately. |
void |
treeCollapsed(org.eclipse.jface.viewers.TreeExpansionEvent event)
Handle the collapsing of an element in a tree viewer |
void |
treeExpanded(org.eclipse.jface.viewers.TreeExpansionEvent event)
Handle the expansionsion of an element in a tree viewer |
protected void |
treeItemChecked(java.lang.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(java.lang.Object treeElement)
Logically un-gray-check all ancestors of treeItem iff appropriate. |
protected void |
updateHierarchy(java.lang.Object treeElement)
Set the checked state of self and all ancestors appropriately |
void |
updateSelections(java.util.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 CustomResourceTreeAndListGroup(org.eclipse.swt.widgets.Composite parent,
java.lang.Object rootObject,
org.eclipse.jface.viewers.ITreeContentProvider treeContentProvider,
org.eclipse.jface.viewers.ILabelProvider treeLabelProvider,
org.eclipse.jface.viewers.IStructuredContentProvider listContentProvider,
org.eclipse.jface.viewers.ILabelProvider listLabelProvider,
int style,
boolean useHeightHint)
parent - org.eclipse.swt.widgets.Compositestyle - introotObject - java.lang.ObjectchildPropertyName - java.lang.StringparentPropertyName - java.lang.StringlistPropertyName - java.lang.StringuseHeightHint - If true then use the height hint
to make this group big enough| Method Detail |
|---|
public void aboutToOpen()
public void addCheckStateListener(org.eclipse.jface.viewers.ICheckStateListener listener)
listener - ICheckStateListenerprotected boolean areAllChildrenWhiteChecked(java.lang.Object treeElement)
treeElement - java.lang.Object
protected boolean areAllElementsChecked(java.lang.Object treeElement)
treeElement - java.lang.Object
protected void checkNewTreeElements(java.lang.Object[] elements)
public void checkStateChanged(org.eclipse.jface.viewers.CheckStateChangedEvent event)
checkStateChanged in interface org.eclipse.jface.viewers.ICheckStateListenerevent - CheckStateChangedEvent
protected void createContents(org.eclipse.swt.widgets.Composite parent,
int style,
boolean useHeightHint)
parent - org.eclipse.swt.widgets.CompositeuseHeightHint. - If true yse the preferredHeight.
protected void createListViewer(org.eclipse.swt.widgets.Composite parent,
boolean useHeightHint)
protected void createTreeViewer(org.eclipse.swt.widgets.Composite parent,
boolean useHeightHint)
protected boolean determineShouldBeAtLeastGrayChecked(java.lang.Object treeElement)
true answer from this method.
To determine whether a tree item should be white-checked use method
#determineShouldBeWhiteChecked(Object).
element - java.lang.Object
determineShouldBeWhiteChecked(java.lang.Object)protected boolean determineShouldBeWhiteChecked(java.lang.Object treeElement)
treeElement - java.lang.Object
protected void determineWhiteCheckedDescendents(java.lang.Object treeElement)
treeElement - java.lang.Objectpublic void expandAll()
public void getAllCheckedListItems(ICustomElementFilter filter,
org.eclipse.core.runtime.IProgressMonitor monitor)
throws java.lang.InterruptedException
filter - - the filter for the datamonitor - IProgressMonitor or null
java.lang.InterruptedExceptionpublic java.util.List getAllCheckedListItems()
public java.util.List getAllWhiteCheckedItems()
public int getCheckedElementCount()
protected java.lang.String getFullLabel(java.lang.Object treeElement,
java.lang.String parentLabel)
treeElement - - the element being exportedparentLabel - - the label of the parent, can be null
protected int getListItemsSize(java.lang.Object treeElement)
treeElement - java.lang.Object
public org.eclipse.swt.widgets.Table getListTable()
public org.eclipse.swt.widgets.Tree getTree()
protected void grayCheckHierarchy(java.lang.Object treeElement)
public void initialCheckListItem(java.lang.Object element)
public void initialCheckTreeItem(java.lang.Object element)
protected void initialize()
protected void listItemChecked(java.lang.Object listElement,
boolean state,
boolean updatingFromSelection)
protected void notifyCheckStateChangeListeners(org.eclipse.jface.viewers.CheckStateChangedEvent event)
protected void populateListViewer(java.lang.Object treeElement)
treeElement - java.lang.Objectpublic void removeCheckStateListener(org.eclipse.jface.viewers.ICheckStateListener listener)
listener - ICheckStateListenerpublic void selectionChanged(org.eclipse.jface.viewers.SelectionChangedEvent event)
selectionChanged in interface org.eclipse.jface.viewers.ISelectionChangedListenerselection - ISelectionpublic void setAllSelections(boolean selection)
public void setListProviders(org.eclipse.jface.viewers.IStructuredContentProvider contentProvider,
org.eclipse.jface.viewers.ILabelProvider labelProvider)
contentProvider - ITreeContentProviderlabelProvider - ILabelProviderpublic void setListSorter(org.eclipse.jface.viewers.ViewerSorter sorter)
public void setRoot(java.lang.Object newRoot)
newRoot -
protected void setTreeChecked(java.lang.Object treeElement,
boolean state)
public void setTreeProviders(org.eclipse.jface.viewers.ITreeContentProvider contentProvider,
org.eclipse.jface.viewers.ILabelProvider labelProvider)
contentProvider - ITreeContentProviderlabelProvider - ILabelProviderpublic void setTreeSorter(org.eclipse.jface.viewers.ViewerSorter sorter)
protected void setWhiteChecked(java.lang.Object treeElement,
boolean isWhiteChecked)
treeElement - java.lang.ObjectisWhiteChecked - booleanpublic void treeCollapsed(org.eclipse.jface.viewers.TreeExpansionEvent event)
treeCollapsed in interface org.eclipse.jface.viewers.ITreeViewerListenerpublic void treeExpanded(org.eclipse.jface.viewers.TreeExpansionEvent event)
treeExpanded in interface org.eclipse.jface.viewers.ITreeViewerListener
protected void treeItemChecked(java.lang.Object treeElement,
boolean state)
protected void ungrayCheckHierarchy(java.lang.Object treeElement)
protected void updateHierarchy(java.lang.Object treeElement)
public void updateSelections(java.util.Map items)
Map - with keys of Object (the tree element) and values of List (the selected
list elements). NOTE: This method does not special case keys with no values (i.e.,
a tree element with an empty list). If a tree element does not have any selected
items, do not include the element in the Map.public void setFocus()
|
TPTP 4.5.0 Platform Project Internal API Specification |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||