org.openide
Class TopManager.NodeOperation

java.lang.Object
  |
  +--org.openide.TopManager.NodeOperation
Enclosing class:
TopManager

public abstract static class TopManager.NodeOperation
extends Object

Provides common operations on nodes. Any component may ask to open a customizer for, or explore, any node.


Constructor Summary
TopManager.NodeOperation()
           
 
Method Summary
abstract  boolean customize(Node n)
          Tries to open a customization dialog for the specified node.
abstract  void explore(Node n)
          Explore a node (and its subhierarchy).
 Node select(String title, String rootTitle, Node root)
          Open a modal Explorer accepting only a single node.
 Node[] select(String title, String rootTitle, Node root, NodeAcceptor acceptor)
          Open a modal Explorer without any extra dialog component.
abstract  Node[] select(String title, String rootTitle, Node root, NodeAcceptor acceptor, Component top)
          Open a modal Explorer on a root node, permitting a node selection to be returned.
abstract  void showProperties(Node n)
          Open a modal Property Sheet on a node.
abstract  void showProperties(Node[] n)
          Open a modal Property Sheet on a set of nodes.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TopManager.NodeOperation

public TopManager.NodeOperation()
Method Detail

customize

public abstract boolean customize(Node n)
Tries to open a customization dialog for the specified node. The dialog is modal and the function returns only after customization is finished, if it was possible.
Parameters:
n - the node to customize
Returns:
true if the node had a customizer, false if not
See Also:
Node.hasCustomizer(), Node.getCustomizer()

explore

public abstract void explore(Node n)
Explore a node (and its subhierarchy). It will be opened in a new Explorer view, as the root node of that window.
Parameters:
n - the node to explore

showProperties

public abstract void showProperties(Node n)
Open a modal Property Sheet on a node.
Parameters:
n - the node to show properties of

showProperties

public abstract void showProperties(Node[] n)
Open a modal Property Sheet on a set of nodes.
Parameters:
n - the array of nodes to show properties of
See Also:
showProperties(Node)

select

public abstract Node[] select(String title,
                              String rootTitle,
                              Node root,
                              NodeAcceptor acceptor,
                              Component top)
                       throws UserCancelException
Open a modal Explorer on a root node, permitting a node selection to be returned.

The acceptor should be asked each time the set of selected nodes changes, whether to accept or reject the current result. This will affect for example the display of the "OK" button.

Parameters:
title - title of the dialog
rootTitle - label at root of dialog. May use & for a mnemonic.
root - root node to explore
acceptor - class asked to accept or reject current selection
top - an extra component to be placed on the dialog (may be null)
Returns:
an array of selected (and accepted) nodes
Throws:
UserCancelException - if the selection is interrupted by the user

select

public Node[] select(String title,
                     String rootTitle,
                     Node root,
                     NodeAcceptor acceptor)
              throws UserCancelException
Open a modal Explorer without any extra dialog component.
Parameters:
title - title of the dialog
rootTitle - label at root of dialog. May use & for a mnemonic.
root - root node to explore
acceptor - class asked to accept or reject current selection
Returns:
an array of selected (and accepted) nodes
Throws:
UserCancelException - if the selection is interrupted by the user
See Also:
select(String, String, Node, NodeAcceptor, Component)

select

public final Node select(String title,
                         String rootTitle,
                         Node root)
                  throws UserCancelException
Open a modal Explorer accepting only a single node.
Parameters:
title - title of the dialog
rootTitle - label at root of dialog. May use & for a mnemonic.
root - root node to explore
Returns:
the selected node
Throws:
UserCancelException - if the selection is interrupted by the user
See Also:
select(String, String, Node, NodeAcceptor)


Built on December 12 2001.  |  Portions Copyright 1997-2001 Sun Microsystems, Inc. All rights reserved.