com.partnersoft.v3x.gadgets
Class CollectionEditor

java.lang.Object
  extended by com.partnersoft.v3x.gadgets.EditorGadget
      extended by com.partnersoft.v3x.gadgets.CollectionEditor
All Implemented Interfaces:
Editor

public class CollectionEditor
extends EditorGadget

An Editor for Collections. Uses a pick-and-edit scheme by coupling a a Selector and another Editor. Handles refresh of the selector whenever the set changes.


Constructor Summary
CollectionEditor(Selector picker, Editor changer)
          Create a new SetEditor from the given Selector and Editor.
 
Method Summary
 void add(java.lang.Object newItem)
          Add an item to the collection set.
 java.lang.Object getEdited()
           
 void removeSelected()
           
 void reset()
          Restore working copy of set to match state of edited set at last save.
 void save()
          Save changes to the set.
 void setEdited(java.lang.Object newVictim)
          Set the edited object.
 
Methods inherited from class com.partnersoft.v3x.gadgets.EditorGadget
addEditListener, delete, fireChanged, removeEditListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CollectionEditor

public CollectionEditor(Selector picker,
                        Editor changer)
Create a new SetEditor from the given Selector and Editor. Autosaving is on by default.

Method Detail

save

public void save()
Save changes to the set.

Specified by:
save in interface Editor
Overrides:
save in class EditorGadget

reset

public void reset()
Restore working copy of set to match state of edited set at last save. WARNING: DOESN'T WORK!


add

public void add(java.lang.Object newItem)
Add an item to the collection set.


removeSelected

public void removeSelected()

setEdited

public void setEdited(java.lang.Object newVictim)
Description copied from class: EditorGadget
Set the edited object. Subclasses should call this if they override it (and they should probably override it).

Specified by:
setEdited in interface Editor
Overrides:
setEdited in class EditorGadget

getEdited

public java.lang.Object getEdited()