Java Doc for ResourceTreeAndListGroup.java in  » IDE-Eclipse » ui-ide » org » eclipse » ui » internal » ide » dialogs » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » IDE Eclipse » ui ide » org.eclipse.ui.internal.ide.dialogs 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.eclipse.ui.internal.ide.dialogs.ResourceTreeAndListGroup

ResourceTreeAndListGroup
public class ResourceTreeAndListGroup extends EventManager implements ICheckStateListener,ISelectionChangedListener,ITreeViewerListener(Code)
Workbench-level composite that combines a CheckboxTreeViewer and CheckboxListViewer. All viewer selection-driven interactions are handled within this object



Constructor Summary
public  ResourceTreeAndListGroup(Composite parent, Object rootObject, ITreeContentProvider treeContentProvider, ILabelProvider treeLabelProvider, IStructuredContentProvider listContentProvider, ILabelProvider listLabelProvider, int style, boolean useHeightHint)
     Create an instance of this class.

Method Summary
public  voidaboutToOpen()
     This method must be called just before this window becomes visible.
public  voidaddCheckStateListener(ICheckStateListener listener)
    
protected  booleanareAllChildrenWhiteChecked(Object treeElement)
    
protected  booleanareAllElementsChecked(Object treeElement)
    
protected  voidcheckNewTreeElements(Object[] elements)
    
public  voidcheckStateChanged(CheckStateChangedEvent event)
     An item was checked in one of self's two views.
protected  voidcreateContents(Composite parent, int style, boolean useHeightHint)
     Lay out and initialize self's visual components.
protected  voidcreateListViewer(Composite parent, boolean useHeightHint)
     Create this group's list viewer.
protected  voidcreateTreeViewer(Composite parent, boolean useHeightHint)
     Create this group's tree viewer.
protected  booleandetermineShouldBeAtLeastGrayChecked(Object treeElement)
     Returns a boolean indicating whether the passed tree element should be at LEAST gray-checked.
protected  booleandetermineShouldBeWhiteChecked(Object treeElement)
     Returns a boolean indicating whether the passed tree item should be white-checked.
protected  voiddetermineWhiteCheckedDescendents(Object treeElement)
     Recursively add appropriate tree elements to the collection of known white-checked tree elements.
public  voidexpandAll()
    
public  voidgetAllCheckedListItems(IElementFilter filter, IProgressMonitor monitor)
     Returns a flat list of all of the leaf elements which are checked.
public  ListgetAllCheckedListItems()
     Returns a flat list of all of the leaf elements which are checked. all of the leaf elements which are checked.
public  ListgetAllWhiteCheckedItems()
     Returns a list of all of the items that are white checked. Any folders that are white checked are added and then any files from white checked folders are added.
public  intgetCheckedElementCount()
     Answer the number of elements that have been checked by the user.
protected  StringgetFullLabel(Object treeElement, String parentLabel)
     Get the full label of the treeElement (its name and its parent's name).
protected  intgetListItemsSize(Object treeElement)
     Return a count of the number of list items associated with a given tree item.
public  TablegetListTable()
     Get the table the list viewer uses.
protected  voidgrayCheckHierarchy(Object treeElement)
    
public  voidinitialCheckListItem(Object element)
     Set the initial checked state of the passed list element to true.
public  voidinitialCheckTreeItem(Object element)
    
protected  voidinitialize()
     Initialize this group's viewers after they have been laid out.
protected  voidlistItemChecked(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  voidnotifyCheckStateChangeListeners(CheckStateChangedEvent event)
    
protected  voidpopulateListViewer(Object treeElement)
     Set the contents of the list viewer based upon the specified selected tree element.
public  voidremoveCheckStateListener(ICheckStateListener listener)
    
public  voidselectionChanged(SelectionChangedEvent event)
    
public  voidsetAllSelections(boolean selection)
     Select or deselect all of the elements in the tree depending on the value of the selection boolean.
public  voidsetFocus()
     Set the focus on to the list widget.
public  voidsetListComparator(ViewerComparator comparator)
    
public  voidsetListProviders(IStructuredContentProvider contentProvider, ILabelProvider labelProvider)
    
public  voidsetRoot(Object newRoot)
     Set the root of the widget to be new Root.
protected  voidsetTreeChecked(Object treeElement, boolean state)
    
public  voidsetTreeComparator(ViewerComparator comparator)
    
public  voidsetTreeProviders(ITreeContentProvider contentProvider, ILabelProvider labelProvider)
    
protected  voidsetWhiteChecked(Object treeElement, boolean isWhiteChecked)
     Adjust the collection of references to white-checked tree elements appropriately.
public  voidtreeCollapsed(TreeExpansionEvent event)
    
public  voidtreeExpanded(TreeExpansionEvent event)
    
protected  voidtreeItemChecked(Object treeElement, boolean state)
     Callback that's invoked when the checked status of an item in the tree is changed by the user.
protected  voidungrayCheckHierarchy(Object treeElement)
     Logically un-gray-check all ancestors of treeItem iff appropriate.
protected  voidupdateHierarchy(Object treeElement)
    
public  voidupdateSelections(Map items)
     Update the selections of the tree elements in items to reflect the new selections provided.
Parameters:
  items - Map with keys of Object (the tree element) and values of List (the selectedlist elements).


Constructor Detail
ResourceTreeAndListGroup
public ResourceTreeAndListGroup(Composite parent, Object rootObject, ITreeContentProvider treeContentProvider, ILabelProvider treeLabelProvider, IStructuredContentProvider listContentProvider, ILabelProvider listLabelProvider, int style, boolean useHeightHint)(Code)
Create an instance of this class. Use this constructor if you wish to specify the width and/or height of the combined widget (to only hardcode one of the sizing dimensions, specify the other dimension's value as -1)
Parameters:
  parent -
Parameters:
  rootObject -
Parameters:
  treeContentProvider -
Parameters:
  treeLabelProvider -
Parameters:
  listContentProvider -
Parameters:
  listLabelProvider -
Parameters:
  style -
Parameters:
  useHeightHint - If true then use the height hintto make this group big enough




Method Detail
aboutToOpen
public void aboutToOpen()(Code)
This method must be called just before this window becomes visible.



addCheckStateListener
public void addCheckStateListener(ICheckStateListener listener)(Code)
Add the passed listener to self's collection of clients that listen for changes to element checked states
Parameters:
  listener - ICheckStateListener



areAllChildrenWhiteChecked
protected boolean areAllChildrenWhiteChecked(Object treeElement)(Code)
Return a boolean indicating whether all children of the passed tree element are currently white-checked boolean
Parameters:
  treeElement - java.lang.Object



areAllElementsChecked
protected boolean areAllElementsChecked(Object treeElement)(Code)
Return a boolean indicating whether all list elements associated with the passed tree element are currently checked boolean
Parameters:
  treeElement - java.lang.Object



checkNewTreeElements
protected void checkNewTreeElements(Object[] elements)(Code)
Iterate through the passed elements which are being realized for the first time and check each one in the tree viewer as appropriate



checkStateChanged
public void checkStateChanged(CheckStateChangedEvent event)(Code)
An item was checked in one of self's two views. Determine which view this occurred in and delegate appropriately
Parameters:
  event - CheckStateChangedEvent



createContents
protected void createContents(Composite parent, int style, boolean useHeightHint)(Code)
Lay out and initialize self's visual components.
Parameters:
  parent - org.eclipse.swt.widgets.Composite
Parameters:
  style - the style flags for the new Composite
Parameters:
  useHeightHint - If true yse the preferredHeight.



createListViewer
protected void createListViewer(Composite parent, boolean useHeightHint)(Code)
Create this group's list viewer.



createTreeViewer
protected void createTreeViewer(Composite parent, boolean useHeightHint)(Code)
Create this group's tree viewer.



determineShouldBeAtLeastGrayChecked
protected boolean determineShouldBeAtLeastGrayChecked(Object treeElement)(Code)
Returns a boolean indicating whether the passed tree element should be at LEAST gray-checked. Note that this method does not consider whether it should be white-checked, so a specified tree item which should be white-checked will result in a true answer from this method. To determine whether a tree item should be white-checked use method #determineShouldBeWhiteChecked(Object).
Parameters:
  treeElement - java.lang.Object boolean
See Also:   ResourceTreeAndListGroup.determineShouldBeWhiteChecked(Object)



determineShouldBeWhiteChecked
protected boolean determineShouldBeWhiteChecked(Object treeElement)(Code)
Returns a boolean indicating whether the passed tree item should be white-checked. boolean
Parameters:
  treeElement - java.lang.Object



determineWhiteCheckedDescendents
protected void determineWhiteCheckedDescendents(Object treeElement)(Code)
Recursively add appropriate tree elements to the collection of known white-checked tree elements.
Parameters:
  treeElement - java.lang.Object



expandAll
public void expandAll()(Code)
Cause the tree viewer to expand all its items



getAllCheckedListItems
public void getAllCheckedListItems(IElementFilter filter, IProgressMonitor monitor) throws InterruptedException(Code)
Returns a flat list of all of the leaf elements which are checked. Filter then based on the supplied ElementFilter. If monitor is cancelled then return null
Parameters:
  filter - -the filter for the data
Parameters:
  monitor - IProgressMonitor or null
throws:
  InterruptedException - If the find is interrupted.



getAllCheckedListItems
public List getAllCheckedListItems()(Code)
Returns a flat list of all of the leaf elements which are checked. all of the leaf elements which are checked. This API does notreturn null in order to keep backwards compatibility.



getAllWhiteCheckedItems
public List getAllWhiteCheckedItems()(Code)
Returns a list of all of the items that are white checked. Any folders that are white checked are added and then any files from white checked folders are added. the list of all of the items that are white checked



getCheckedElementCount
public int getCheckedElementCount()(Code)
Answer the number of elements that have been checked by the user. int



getFullLabel
protected String getFullLabel(Object treeElement, String parentLabel)(Code)
Get the full label of the treeElement (its name and its parent's name).
Parameters:
  treeElement - - the element being exported
Parameters:
  parentLabel - - the label of the parent, can be null String



getListItemsSize
protected int getListItemsSize(Object treeElement)(Code)
Return a count of the number of list items associated with a given tree item. int
Parameters:
  treeElement - java.lang.Object



getListTable
public Table getListTable()(Code)
Get the table the list viewer uses. org.eclipse.swt.widgets.Table



grayCheckHierarchy
protected void grayCheckHierarchy(Object treeElement)(Code)
Logically gray-check all ancestors of treeItem by ensuring that they appear in the checked table



initialCheckListItem
public void initialCheckListItem(Object element)(Code)
Set the initial checked state of the passed list element to true.
Parameters:
  element -



initialCheckTreeItem
public void initialCheckTreeItem(Object element)(Code)
Set the initial checked state of the passed element to true, as well as to all of its children and associated list elements
Parameters:
  element -



initialize
protected void initialize()(Code)
Initialize this group's viewers after they have been laid out.



listItemChecked
protected void listItemChecked(Object listElement, boolean state, boolean updatingFromSelection)(Code)
Callback that's invoked when the checked status of an item in the list is changed by the user. Do not try and update the hierarchy if we are building the initial list.



notifyCheckStateChangeListeners
protected void notifyCheckStateChangeListeners(CheckStateChangedEvent event)(Code)
Notify all checked state listeners that the passed element has had its checked state changed to the passed state



populateListViewer
protected void populateListViewer(Object treeElement)(Code)
Set the contents of the list viewer based upon the specified selected tree element. This also includes checking the appropriate list items.
Parameters:
  treeElement - java.lang.Object



removeCheckStateListener
public void removeCheckStateListener(ICheckStateListener listener)(Code)
Remove the passed listener from self's collection of clients that listen for changes to element checked states
Parameters:
  listener - ICheckStateListener



selectionChanged
public void selectionChanged(SelectionChangedEvent event)(Code)
Handle the selection of an item in the tree viewer
Parameters:
  event - SelectionChangedEvent



setAllSelections
public void setAllSelections(boolean selection)(Code)
Select or deselect all of the elements in the tree depending on the value of the selection boolean. Be sure to update the displayed files as well.
Parameters:
  selection -



setFocus
public void setFocus()(Code)
Set the focus on to the list widget.



setListComparator
public void setListComparator(ViewerComparator comparator)(Code)
Set the comparator that is to be applied to self's list viewer
Parameters:
  comparator - the sorter for the list



setListProviders
public void setListProviders(IStructuredContentProvider contentProvider, ILabelProvider labelProvider)(Code)
Set the list viewer's providers to those passed
Parameters:
  contentProvider - ITreeContentProvider
Parameters:
  labelProvider - ILabelProvider



setRoot
public void setRoot(Object newRoot)(Code)
Set the root of the widget to be new Root. Regenerate all of the tables and lists from this value.
Parameters:
  newRoot -



setTreeChecked
protected void setTreeChecked(Object treeElement, boolean state)(Code)
Set the checked state of the passed tree element appropriately, and do so recursively to all of its child tree elements as well



setTreeComparator
public void setTreeComparator(ViewerComparator comparator)(Code)
Set the comparator that is to be applied to self's tree viewer
Parameters:
  comparator - the comparator for the tree



setTreeProviders
public void setTreeProviders(ITreeContentProvider contentProvider, ILabelProvider labelProvider)(Code)
Set the tree viewer's providers to those passed
Parameters:
  contentProvider - ITreeContentProvider
Parameters:
  labelProvider - ILabelProvider



setWhiteChecked
protected void setWhiteChecked(Object treeElement, boolean isWhiteChecked)(Code)
Adjust the collection of references to white-checked tree elements appropriately.
Parameters:
  treeElement - java.lang.Object
Parameters:
  isWhiteChecked - boolean



treeCollapsed
public void treeCollapsed(TreeExpansionEvent event)(Code)
Handle the collapsing of an element in a tree viewer



treeExpanded
public void treeExpanded(TreeExpansionEvent event)(Code)
Handle the expansionsion of an element in a tree viewer



treeItemChecked
protected void treeItemChecked(Object treeElement, boolean state)(Code)
Callback that's invoked when the checked status of an item in the tree is changed by the user.



ungrayCheckHierarchy
protected void ungrayCheckHierarchy(Object treeElement)(Code)
Logically un-gray-check all ancestors of treeItem iff appropriate.



updateHierarchy
protected void updateHierarchy(Object treeElement)(Code)
Set the checked state of self and all ancestors appropriately



updateSelections
public void updateSelections(Map items)(Code)
Update the selections of the tree elements in items to reflect the new selections provided.
Parameters:
  items - Map with keys of Object (the tree element) and values of List (the selectedlist 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 selecteditems, do not include the element in the Map.



www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.