org.apache.pivot.wtk.content
Class TableViewCellEditor

java.lang.Object
  extended by org.apache.pivot.wtk.content.TableViewCellEditor
All Implemented Interfaces:
Editor, TableView.RowEditor

public class TableViewCellEditor
extends Object
implements TableView.RowEditor

Default table view cell editor.


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.apache.pivot.wtk.TableView.RowEditor
TableView.RowEditor.RowEditorListenerList
 
Constructor Summary
TableViewCellEditor()
           
 
Method Summary
 void cancelEdit()
          Cancels an edit that is in progress by reverting any edits the user has made.
 void editRow(TableView tableView, int rowIndex, int columnIndex)
          Notifies the editor that editing should begin.
 ListenerList<TableView.RowEditorListener> getRowEditorListeners()
          Gets the row editor listener list.
 boolean isEditing()
          Tells whether or not an edit is currently in progress.
 boolean 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

TableViewCellEditor

public TableViewCellEditor()
Method Detail

editRow

public void editRow(TableView tableView,
                    int rowIndex,
                    int columnIndex)
Notifies the editor that editing should begin. If the editor is currently installed on the table view, the skin may call this method when the user executes the appropriate gesture (as defined by the skin).

Specified by:
editRow in interface TableView.RowEditor
Parameters:
tableView - The table view
rowIndex - The row index of the cell to edit
columnIndex - The column index of the cell to edit
See Also:
TableView.setRowEditor(RowEditor)

isEditing

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

Specified by:
isEditing in interface Editor

saveChanges

public boolean 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
Returns:
true if the changes were successfully saved; false otherwise.

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

getRowEditorListeners

public ListenerList<TableView.RowEditorListener> getRowEditorListeners()
Gets the row editor listener list.

Specified by:
getRowEditorListeners in interface TableView.RowEditor