org.apache.pivot.wtk.content
Class ListViewItemEditor

java.lang.Object
  extended by org.apache.pivot.wtk.content.ListViewItemEditor
All Implemented Interfaces:
Editor, ListView.ItemEditor

public class ListViewItemEditor
extends Object
implements ListView.ItemEditor

Default list view item editor.


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.apache.pivot.wtk.ListView.ItemEditor
ListView.ItemEditor.ItemEditorListenerList
 
Constructor Summary
ListViewItemEditor()
           
 
Method Summary
 void cancelEdit()
          Cancels an edit that is in progress by reverting any edits the user has made.
 void editItem(ListView listView, int index)
          Notifies the editor that editing should begin.
 ListenerList<ListView.ItemEditorListener> getItemEditorListeners()
          Gets the item editor listener list.
 boolean isEditing()
          Tells whether or not an edit is currently in progress.
 void saveChanges()
          Saves an edit that is in progress by updating the appropriate data object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ListViewItemEditor

public ListViewItemEditor()
Method Detail

editItem

public void editItem(ListView listView,
                     int index)
Notifies the editor that editing should begin. If the editor is currently installed on the list view, the skin may call this method when the user executes the appropriate gesture (as defined by the skin).

Specified by:
editItem in interface ListView.ItemEditor
Parameters:
listView - The list view
index - The index of the item to edit
See Also:
ListView.setItemEditor(ItemEditor)

isEditing

public boolean isEditing()
Tells whether or not an edit is currently in progress.

Specified by:
isEditing in interface Editor

saveChanges

public void saveChanges()
Saves an edit that is in progress by updating the appropriate data object. It is up to implementations to define the behavior when isEditing() == false.

Specified by:
saveChanges in interface Editor

cancelEdit

public void cancelEdit()
Cancels an edit that is in progress by reverting any edits the user has made. It is up to implementations to define the behavior when isEditing() == false.

Specified by:
cancelEdit in interface Editor

getItemEditorListeners

public ListenerList<ListView.ItemEditorListener> getItemEditorListeners()
Description copied from interface: ListView.ItemEditor
Gets the item editor listener list.

Specified by:
getItemEditorListeners in interface ListView.ItemEditor