Java Doc for ExplorerManager.java in  » IDE-Netbeans » openide » org » openide » explorer » 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 Netbeans » openide » org.openide.explorer 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.openide.explorer.ExplorerManager

All known Subclasses:   org.openide.explorer.propertysheet.IndexedEditorPanel,  org.openide.loaders.TemplateWizard1,  org.openide.explorer.ExplorerPanel,
ExplorerManager
final public class ExplorerManager extends Object implements Serializable,Cloneable(Code)
Manages a selection and root context for a (set of) Explorer view(s). The views should register their java.beans.VetoableChangeListener s and java.beans.PropertyChangeListener s at the ExplorerManager of the Explorer they belong to (usually found in AWT hierarchy using ExplorerManager.find . The manager is then the mediator that keeps the shared state, notifies PropertyChangeListener s and VetoableChangeListener s about changes and allows views to call its setter methods to incluence the root of the visible hierarchy using ExplorerManager.setRootContext , the set of selected nodes using ExplorerManager.setSelectedNodes and also the explored context (useful for org.openide.explorer.view.ListView for example) using ExplorerManager.setExploredContext .

This class interacts with Swing components in the org.openide.explorer.view package and as such it shall be used according to Swing threading model.

To provide an ExplorerManager from your component just let your component implement Provider as described at ExplorerUtils .

Deserialization may throw SafeException if the contexts cannot be restored correctly, but the stream is uncorrupted.
author:
   Ian Formanek, Petr Hamernik, Jaroslav Tulach, Jan Jancura,
author:
   Jesse Glick
See Also:   ExplorerUtils
See Also:   org.openide.explorer.view.TreeView
See Also:   org.openide.explorer.view.ListView


Inner Class :public static interface Provider

Field Summary
final public static  StringPROP_EXPLORED_CONTEXT
     Name of property for the explored context.
final public static  StringPROP_NODE_CHANGE
     Name of property for change in a node.
final public static  StringPROP_ROOT_CONTEXT
     Name of property for the root context.
final public static  StringPROP_SELECTED_NODES
     Name of property for the node selection.
static  RequestProcessorselectionProcessor
     Request processor for managing selections.
final static  longserialVersionUID
    

Constructor Summary
public  ExplorerManager()
     Construct a new manager.

Method Summary
public synchronized  voidaddPropertyChangeListener(PropertyChangeListener l)
     Add a PropertyChangeListener to the listener list.
final  voidaddRemoveListeners(boolean add)
    
public synchronized  voidaddVetoableChangeListener(VetoableChangeListener l)
     Add a VetoableListener to the listener list.
public  ExplorerManagerclone()
     Clones the manager.
public static  ExplorerManagerfind(Component comp)
     Finds the proper Explorer manager for a given component.
static synchronized  ExplorerActionsImplfindExplorerActionsImpl(ExplorerManager em)
     Finds ExplorerActionsImpl for a explorer manager.
static  NodefindPath(Node r, String[] path)
    
final  voidfireInAWT(String propName, Object oldVal, Object newVal)
    
final public  NodegetExploredContext()
     Get the explored context.

The "explored context" is not as frequently used as the node selection; generally it refers to a parent node which contains all of the things being displayed at this moment.

final public  NodegetRootContext()
     Get the root context.

The "root context" is simply the topmost node that this explorer can display or manipulate.

public  Node[]getSelectedNodes()
     Get the set of selected nodes.
static synchronized  RequestProcessorgetSelectionProcessor()
     Creates or retrieves RequestProcessor for selection updates.
public synchronized  voidremovePropertyChangeListener(PropertyChangeListener l)
     Remove a PropertyChangeListener from the listener list.
public synchronized  voidremoveVetoableChangeListener(VetoableChangeListener l)
     Remove a VetoableChangeListener from the listener list.
final public  voidsetExploredContext(Node value)
     Set the explored context.
final public  voidsetExploredContext(Node value, Node[] selection)
     Set the explored context. The node selection will be changed as well.
final public  voidsetExploredContextAndSelection(Node value, Node[] selection)
     Set the explored context and selected nodes.
final public  voidsetRootContext(Node value)
     Set the root context.
final public  voidsetSelectedNodes(Node[] value)
     Set the set of selected nodes.
final  voidsetSelectedNodes0(Node[] nodes)
    
final  voidwaitFinished()
    

Field Detail
PROP_EXPLORED_CONTEXT
final public static String PROP_EXPLORED_CONTEXT(Code)
Name of property for the explored context.



PROP_NODE_CHANGE
final public static String PROP_NODE_CHANGE(Code)
Name of property for change in a node.



PROP_ROOT_CONTEXT
final public static String PROP_ROOT_CONTEXT(Code)
Name of property for the root context.



PROP_SELECTED_NODES
final public static String PROP_SELECTED_NODES(Code)
Name of property for the node selection.



selectionProcessor
static RequestProcessor selectionProcessor(Code)
Request processor for managing selections.



serialVersionUID
final static long serialVersionUID(Code)
generated Serialized Version UID




Constructor Detail
ExplorerManager
public ExplorerManager()(Code)
Construct a new manager.




Method Detail
addPropertyChangeListener
public synchronized void addPropertyChangeListener(PropertyChangeListener l)(Code)
Add a PropertyChangeListener to the listener list.
Parameters:
  l - the listener to add



addRemoveListeners
final void addRemoveListeners(boolean add)(Code)



addVetoableChangeListener
public synchronized void addVetoableChangeListener(VetoableChangeListener l)(Code)
Add a VetoableListener to the listener list.
Parameters:
  l - the listener to add



clone
public ExplorerManager clone()(Code)
Clones the manager. manager with the same settings like this one



find
public static ExplorerManager find(Component comp)(Code)
Finds the proper Explorer manager for a given component. This is done by traversing the component hierarchy and finding the first ancestor that implements Provider .

This method should be used in Component.addNotify of each component that works with the Explorer manager, e.g.:

 private transient ExplorerManager explorer;
 public void addNotify () {
 super.addNotify ();
 explorer = ExplorerManager.find (this);
 }
 

Parameters:
  comp - component to find the manager for the manager, or a new empty manager if no ancestor implementsProvider
See Also:   Provider



findExplorerActionsImpl
static synchronized ExplorerActionsImpl findExplorerActionsImpl(ExplorerManager em)(Code)
Finds ExplorerActionsImpl for a explorer manager.
Parameters:
  em - the manager ExplorerActionsImpl



findPath
static Node findPath(Node r, String[] path)(Code)
Finds node by given path



fireInAWT
final void fireInAWT(String propName, Object oldVal, Object newVal)(Code)



getExploredContext
final public Node getExploredContext()(Code)
Get the explored context.

The "explored context" is not as frequently used as the node selection; generally it refers to a parent node which contains all of the things being displayed at this moment. For BeanTreeView this is irrelevant, but ContextTreeView uses it (in lieu of the node selection) and for IconView it is important (the node whose children are visible, i.e. the "background" of the icon view). the node being explored, or null




getRootContext
final public Node getRootContext()(Code)
Get the root context.

The "root context" is simply the topmost node that this explorer can display or manipulate. For BeanTreeView, this would mean the root node of the tree. For e.g. IconView, this would mean the uppermost possible node that that icon view could display; while the explored context would change at user prompting via the up button and clicking on subfolders, the root context would be fixed by the code displaying the explorer. the root context node




getSelectedNodes
public Node[] getSelectedNodes()(Code)
Get the set of selected nodes. the selected nodes; empty (not null) if none are selected



getSelectionProcessor
static synchronized RequestProcessor getSelectionProcessor()(Code)
Creates or retrieves RequestProcessor for selection updates.



removePropertyChangeListener
public synchronized void removePropertyChangeListener(PropertyChangeListener l)(Code)
Remove a PropertyChangeListener from the listener list.
Parameters:
  l - the listener to remove



removeVetoableChangeListener
public synchronized void removeVetoableChangeListener(VetoableChangeListener l)(Code)
Remove a VetoableChangeListener from the listener list.
Parameters:
  l - the listener to remove



setExploredContext
final public void setExploredContext(Node value)(Code)
Set the explored context. The node selection will be cleared as well.
Parameters:
  value - the new node to explore, or null if none should be explored.
throws:
  IllegalArgumentException - if the node is not within the current root context in the node hierarchy



setExploredContext
final public void setExploredContext(Node value, Node[] selection)(Code)
Set the explored context. The node selection will be changed as well. Note: node selection cannot be vetoed if calling this method. It is generally better to call setExploredContextAndSelection.
Parameters:
  value - the new node to explore, or null if none should be explored.
throws:
  IllegalArgumentException - if the node is not within the current root context in the node hierarchy



setExploredContextAndSelection
final public void setExploredContextAndSelection(Node value, Node[] selection) throws PropertyVetoException(Code)
Set the explored context and selected nodes. If the change in selected nodes is vetoed, PropertyVetoException is rethrown from here.
Parameters:
  value - the new node to explore, or null if none should be explored.
Parameters:
  selection - the new nodes to be selected
throws:
  IllegalArgumentException - if the node is not within the current root context in the node hierarchy
throws:
  PropertyVetoExcepion - if listeners attached to this explorer manager do so



setRootContext
final public void setRootContext(Node value)(Code)
Set the root context. The explored context will be set to the new root context as well. If any of the selected nodes are not inside it, the selection will be cleared.
Parameters:
  value - the new node to serve as a root
throws:
  IllegalArgumentException - if it is null



setSelectedNodes
final public void setSelectedNodes(Node[] value) throws PropertyVetoException(Code)
Set the set of selected nodes.
Parameters:
  value - the nodes to select; empty (not null) if none are to be selected
exception:
  PropertyVetoException - when the given nodes cannot be selected
throws:
  IllegalArgumentException - if null is given, or if any elementsof the selection are not within the current root context



setSelectedNodes0
final void setSelectedNodes0(Node[] nodes)(Code)
Sets selected nodes and handles PropertyVetoException



waitFinished
final void waitFinished()(Code)
Waits till all async processing is finished



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

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