public abstract class NodeOperation extends Object
Modifier | Constructor and Description |
---|---|
protected |
NodeOperation()
Subclass constructor.
|
Modifier and Type | Method and Description |
---|---|
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.
|
void |
showCustomEditorDialog(Node.Property<?> property,
Object... beans)
Shows a modal dialog with the custom editor of given property, just like
it would be invoked when clicking the [...] button next to a property in
the property sheet.
|
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.
|
public static NodeOperation getDefault()
public abstract boolean customize(Node n)
n
- the node to customizetrue
if the node had a customizer,
false
if notNode.hasCustomizer()
,
Node.getCustomizer()
public abstract void explore(Node n)
n
- the node to explorepublic abstract void showProperties(Node n)
n
- the node to show properties ofpublic abstract void showProperties(Node[] n)
n
- the array of nodes to show properties ofNodeOperation.showProperties(Node)
public void showCustomEditorDialog(Node.Property<?> property, Object... beans)
property
- The property to be edited (its property editor to be used).beans
- The objects the property belongs to. Typically one item
array with the Node of the property. The meaning is the same as in
explorer.propertysheet.PropertyEnv
.public abstract Node[] select(String title, String rootTitle, Node root, NodeAcceptor acceptor, Component top) throws UserCancelException
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.
title
- title of the dialogrootTitle
- label at root of dialog. May use &
for a mnemonic
.root
- root node to exploreacceptor
- class asked to accept or reject current selectiontop
- an extra component to be placed on the dialog (may be null
)UserCancelException
- if the selection is interrupted by the userpublic Node[] select(String title, String rootTitle, Node root, NodeAcceptor acceptor) throws UserCancelException
title
- title of the dialogrootTitle
- label at root of dialog. May use &
for a mnemonic
.root
- root node to exploreacceptor
- class asked to accept or reject current selectionUserCancelException
- if the selection is interrupted by the userNodeOperation.select(String, String, Node, NodeAcceptor, Component)
public final Node select(String title, String rootTitle, Node root) throws UserCancelException
title
- title of the dialogrootTitle
- label at root of dialog. May use &
for a mnemonic
.root
- root node to exploreUserCancelException
- if the selection is interrupted by the userNodeOperation.select(String, String, Node, NodeAcceptor)