org.apache.pivot.wtk
Interface TreeView.NodeEditorListener

All Known Implementing Classes:
TreeView.NodeEditor.NodeEditorListenerList, TreeView.NodeEditorListener.Adapter
Enclosing class:
TreeView

public static interface TreeView.NodeEditorListener

The node editor listener interface. This provides callers with notifications about a node editor's activity.


Nested Class Summary
static class TreeView.NodeEditorListener.Adapter
          Node editor listener adapter.
 
Method Summary
 void changesSaved(TreeView.NodeEditor nodeEditor, TreeView treeView, Sequence.Tree.Path path)
          Called when changes have been saved.
 void editCancelled(TreeView.NodeEditor nodeEditor, TreeView treeView, Sequence.Tree.Path path)
          Called when an edit has been cancelled.
 void editNodeVetoed(TreeView.NodeEditor nodeEditor, Vote reason)
          Called when a node edit was vetoed by a listener in the preview event.
 void nodeEditing(TreeView.NodeEditor nodeEditor, TreeView treeView, Sequence.Tree.Path path)
          Called when editing has begun.
 Vote previewEditNode(TreeView.NodeEditor nodeEditor, TreeView treeView, Sequence.Tree.Path path)
          Called to preview a node edit.
 Vote previewSaveChanges(TreeView.NodeEditor nodeEditor, TreeView treeView, Sequence.Tree.Path path, Object changes)
          Called to preview a save.
 void saveChangesVetoed(TreeView.NodeEditor nodeEditor, Vote reason)
          Called when a save was vetoed by a listener in the preview event.
 

Method Detail

previewEditNode

Vote previewEditNode(TreeView.NodeEditor nodeEditor,
                     TreeView treeView,
                     Sequence.Tree.Path path)
Called to preview a node edit.

Parameters:
nodeEditor - The node editor
treeView - The tree view containing the node to be edited.
path - The path to the node to edit.
Returns:
A vote on whether editing should be allowed to begin.

editNodeVetoed

void editNodeVetoed(TreeView.NodeEditor nodeEditor,
                    Vote reason)
Called when a node edit was vetoed by a listener in the preview event.

Parameters:
nodeEditor - The node editor
reason - The reason for the veto

nodeEditing

void nodeEditing(TreeView.NodeEditor nodeEditor,
                 TreeView treeView,
                 Sequence.Tree.Path path)
Called when editing has begun.

Parameters:
nodeEditor - The node editor
treeView - The tree view containing the node being edited.
path - The path to the node being edited.

previewSaveChanges

Vote previewSaveChanges(TreeView.NodeEditor nodeEditor,
                        TreeView treeView,
                        Sequence.Tree.Path path,
                        Object changes)
Called to preview a save.

Parameters:
nodeEditor - The node editor
treeView - The tree view containing the node being edited.
path - The path to the node being edited.
changes - The proposed changes. The type of this object will depend on the editor implementation.
Returns:
A vote on whether the changes should be allowed to be saved.

saveChangesVetoed

void saveChangesVetoed(TreeView.NodeEditor nodeEditor,
                       Vote reason)
Called when a save was vetoed by a listener in the preview event.

Parameters:
nodeEditor - The node editor
reason - The reason for the veto

changesSaved

void changesSaved(TreeView.NodeEditor nodeEditor,
                  TreeView treeView,
                  Sequence.Tree.Path path)
Called when changes have been saved.

Parameters:
nodeEditor - The node editor
treeView - The tree view containing the node that was edited.
path - The path to the node that was edited.

editCancelled

void editCancelled(TreeView.NodeEditor nodeEditor,
                   TreeView treeView,
                   Sequence.Tree.Path path)
Called when an edit has been cancelled.

Parameters:
nodeEditor - The node editor
treeView - The tree view containing the node that was being edited.
path - The path to the node that was being edited.