com.partnersoft.v3x.gadgets
Class DictionaryEditor

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

public class DictionaryEditor
extends EditorGadget

An Editor for Maps. 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
DictionaryEditor(Selector picker, Editor changer)
          Create a new DictionaryEditor from the given Selector and Editor.
 
Method Summary
 void add(java.lang.Object key, java.lang.Object newItem)
          Add an item to the working set.
 java.lang.Object getEdited()
           
 java.util.Map getWorkingCopy()
           
 boolean isAutosaving()
           
 boolean isDeepCopying()
           
 boolean isNotCopying()
           
 void rekey(java.lang.Object newKey)
          Change the key for the currently-selected item.
 void remove()
          Delete currently-selected item.
 void reset()
          Restore working copy of dictionary to match state of edited dictionary at last save.
 void save()
          Save changes to the set.
 void setAutosaving(boolean yaWanna)
           
 void setDeepCopying(boolean newIs)
           
 void setEdited(java.lang.Object newVictim)
          Set the edited object.
 void setNotCopying(boolean tizit)
           
 
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

DictionaryEditor

public DictionaryEditor(Selector picker,
                        Editor changer)
Create a new DictionaryEditor 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 dictionary to match state of edited dictionary at last save.


add

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


remove

public void remove()
Delete currently-selected item.


rekey

public void rekey(java.lang.Object newKey)
Change the key for the currently-selected item.


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()

getWorkingCopy

public java.util.Map getWorkingCopy()

isAutosaving

public boolean isAutosaving()

setAutosaving

public void setAutosaving(boolean yaWanna)

isDeepCopying

public boolean isDeepCopying()

setDeepCopying

public void setDeepCopying(boolean newIs)

isNotCopying

public boolean isNotCopying()

setNotCopying

public void setNotCopying(boolean tizit)