org.apache.pivot.wtk
Interface ListView.ItemEditorListener

All Known Implementing Classes:
ListView.ItemEditor.ItemEditorListenerList, ListView.ItemEditorListener.Adapter
Enclosing class:
ListView

public static interface ListView.ItemEditorListener

The item editor listener interface. This provides callers with notifications about an item editor's activity.


Nested Class Summary
static class ListView.ItemEditorListener.Adapter
          Item editor listener adapter.
 
Method Summary
 void changesSaved(ListView.ItemEditor itemEditor, ListView listView, int index)
          Called when changes have been saved.
 void editCancelled(ListView.ItemEditor itemEditor, ListView listView, int index)
          Called when an edit has been cancelled.
 void editItemVetoed(ListView.ItemEditor itemEditor, Vote reason)
          Called when an item edit was vetoed by a listener in the preview event.
 void itemEditing(ListView.ItemEditor itemEditor, ListView listView, int index)
          Called when editing has begun.
 Vote previewEditItem(ListView.ItemEditor itemEditor, ListView listView, int index)
          Called to preview an item edit.
 Vote previewSaveChanges(ListView.ItemEditor itemEditor, ListView listView, int index, Object changes)
          Called to preview a save.
 void saveChangesVetoed(ListView.ItemEditor itemEditor, Vote reason)
          Called when a save was vetoed by a listener in the preview event.
 

Method Detail

previewEditItem

Vote previewEditItem(ListView.ItemEditor itemEditor,
                     ListView listView,
                     int index)
Called to preview an item edit.

Parameters:
itemEditor - The item editor
listView - The list view containing the item to be edited.
index - The index of the item to edit.
Returns:
A vote on whether editing should be allowed to begin.

editItemVetoed

void editItemVetoed(ListView.ItemEditor itemEditor,
                    Vote reason)
Called when an item edit was vetoed by a listener in the preview event.

Parameters:
itemEditor - The item editor
reason - The reason for the veto

itemEditing

void itemEditing(ListView.ItemEditor itemEditor,
                 ListView listView,
                 int index)
Called when editing has begun.

Parameters:
itemEditor - The item editor
listView - The list view containing the item being edited.
index - The index of the item being edited.

previewSaveChanges

Vote previewSaveChanges(ListView.ItemEditor itemEditor,
                        ListView listView,
                        int index,
                        Object changes)
Called to preview a save.

Parameters:
itemEditor - The item editor
listView - The list view containing the item being edited.
index - The index of the item 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(ListView.ItemEditor itemEditor,
                       Vote reason)
Called when a save was vetoed by a listener in the preview event.

Parameters:
itemEditor - The item editor
reason - The reason for the veto

changesSaved

void changesSaved(ListView.ItemEditor itemEditor,
                  ListView listView,
                  int index)
Called when changes have been saved.

Parameters:
itemEditor - The item editor
listView - The list view containing the item that was edited.
index - The index of the item that was edited.

editCancelled

void editCancelled(ListView.ItemEditor itemEditor,
                   ListView listView,
                   int index)
Called when an edit has been cancelled.

Parameters:
itemEditor - The item editor
listView - The list view containing the item that was being edited.
index - The index of the item that was being edited.