Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| org.openide.nodes 6.7.22
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.openide.nodes
Class NodeOperation

    java.lang.Object
      org.openide.nodes.NodeOperation

    public abstract class NodeOperation

extends Object

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

Since:
  3.14

Constructor Summary
`protected` | `NodeOperation()` Subclass constructor.

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).
`static NodeOperation` | `getDefault()` Get default instance from lookup.
`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

### NodeOperation

    protected NodeOperation()

  Subclass constructor.

Method Detail

### getDefault

    public static NodeOperation getDefault()

  Get default instance from lookup.

  Returns:
    some instance

### 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)`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| org.openide.nodes 6.7.22
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Built on December 7 2006. | Portions Copyright 1997-2005 Sun Microsystems, Inc. All rights reserved.