Uploaded image for project: 'Pivot'
  1. Pivot
  2. PIVOT-299

Make component editors fire events

    XMLWordPrintableJSON

    Details

    • Type: New Feature
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.3
    • Fix Version/s: 1.4
    • Component/s: wtk
    • Labels:
      None

      Description

      There are several use cases that call for event notifications from the editors (TableViewRowEditor, TreeViewNodeEditor, and ListViewItemEditor). These include preview events as well. Here's the associated API change:

      public interface Editor {
      public boolean isEditing();

      • public void save();
        + public void saveChanges();
      • public void cancel();
        + public void cancelEdit();
        }

      TableView {
      public interface RowEditor extends Editor

      { - public void edit(TableView tableView, int rowIndex, int columnIndex); + public void editRow(TableView tableView, int rowIndex, int columnIndex); + public ListenerList<RowEditorListener> getRowEditorListeners(); }

      public interface RowEditorListener

      { public Vote previewEditRow(RowEditor rowEditor, TableView tableView, int rowIndex, int columnIndex); public void editRowVetoed(RowEditor rowEditor, Vote reason); public void rowEditing(RowEditor rowEditor, TableView tableView, int rowIndex, int columnIndex); public Vote previewSaveChanges(RowEditor rowEditor, TableView tableView, int rowIndex, int columnIndex, Dictionary<String, Object> changes); public void saveChangesVetoed(RowEditor rowEditor, Vote reason); public void changesSaved(RowEditor rowEditor, TableView tableView, int rowIndex, int columnIndex); public void editCancelled(RowEditor rowEditor, TableView tableView, int rowIndex, int columnIndex); }

      }

      TreeView {
      public interface NodeEditor extends Editor

      { - public void edit(TreeView treeView, Path path); + public void editNode(TreeView treeView, Path path); + public ListenerList<NodeEditorListener> getNodeEditorListeners(); }

      public interface NodeEditorListener

      { public Vote previewEditNode(NodeEditor nodeEditor, TreeView treeView, Path path); public void editNodeVetoed(NodeEditor nodeEditor, Vote reason); public void nodeEditing(NodeEditor nodeEditor, TreeView treeView, Path path); public Vote previewSaveChanges(NodeEditor nodeEditor, TreeView treeView, Path path, Object changes); public void saveChangesVetoed(NodeEditor nodeEditor, Vote reason); public void changesSaved(NodeEditor nodeEditor, TreeView treeView, Path path); public void editCancelled(NodeEditor nodeEditor, TreeView treeView, Path path); }

      }

      ListView {
      public interface ItemEditor extends Editor

      { - public void edit(ListView listView, int index); + public void editItem(ListView listView, int index); + public ListenerList<ItemEditorListener> getItemEditorListeners(); }

      public interface ItemEditorListener

      { public Vote previewEditItem(ItemEditor itemEditor, ListView listView, int index); public void editItemVetoed(ItemEditor itemEditor, Vote reason); public void itemEditing(ItemEditor itemEditor, ListView listView, int index); public Vote previewSaveChanges(ItemEditor itemEditor, ListView listView, int index, Object changes); public void saveChangesVetoed(ItemEditor itemEditor, Vote reason); public void changesSaved(ItemEditor itemEditor, ListView listView, int index); public void editCancelled(ItemEditor itemEditor, ListView listView, int index); }

      }

        Attachments

          Activity

            People

            • Assignee:
              tvolkert Todd Volkert
              Reporter:
              tvolkert Todd Volkert
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: