|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object ix.iface.ui.AbstractSetEditor
public abstract class AbstractSetEditor
Support for editing sets of objects (e.g. constraints) Looks after adding/removing/editing the objects and keeping the set consistent. Handles overwrites, finding objects in the set, working out whether the set has changed.
Field Summary | |
---|---|
protected static int |
ADD
|
protected java.util.LinkedList |
added
list of Objects added to the set (unless removed). |
protected static int |
CANCEL
Constants for handling overwrite |
protected java.util.HashSet |
edited
list of Objects edited in the set (unless added). |
protected java.lang.String |
label
|
boolean |
lazyOwn
|
ObjectManager |
manager
|
protected StableHashMap |
members
List of objects in the editor. |
protected static int |
NEWNAME
|
protected StableHashMap |
originals
original to copy map; note that new Objects do *not* appear |
protected static int |
OVERWRITE
|
protected java.util.HashSet |
removed
list of Objects removed from the set (unless added). |
Constructor Summary | |
---|---|
AbstractSetEditor(ObjectManager manager,
java.util.LinkedList objects)
|
Method Summary | |
---|---|
boolean |
addConstruct(java.lang.Object object)
Adds a given construct to the set. |
void |
addedObject(java.lang.Object own,
java.lang.Object original)
|
void |
clear()
|
abstract java.lang.Object |
cloneConstruct(java.lang.Object o)
Clones the given construct so as not to overwrite the original. |
java.util.List |
collectConstructChanges()
Collects descriptions of any changes in constructs in the set. |
java.lang.Object |
defaultMakeOwnObject(java.lang.Object original)
|
void |
ensureConstruct(java.lang.Object object)
Adds a given construct to the set unless it is already there or undefined. |
java.lang.Object |
findOwnObject(java.lang.Object object)
Finds an ownObject from the given Object by looking it up in the "originals" list. |
void |
fireConstructAdded(java.lang.Object object)
|
void |
fireConstructEdited(java.lang.Object object)
|
void |
fireConstructRemoved(java.lang.Object object)
|
java.util.LinkedList |
getAllConstructs()
|
abstract java.lang.String |
getName(java.lang.Object object)
Gets a string representation of the object to identify it uniquely |
abstract Named |
getNamedObject(java.lang.String name)
Finds a construct whose getName(Object) matches the given string. |
java.lang.Object |
getOriginal(java.lang.Object object)
Finds the original version of the given object in the originals map |
java.util.LinkedList |
getOriginals()
Gets all original objects from the originals map. |
java.lang.Object |
getOwnObject(java.lang.Object object)
|
abstract Named |
getStringOriginal(java.lang.String name)
|
boolean |
handleNameClash(Named changeO,
java.lang.String newName,
java.lang.Object old)
The two given named objects clash if changeO changes its name to newName. |
boolean |
hasChangedConstructs()
Finds out whether any constructs in the set have changed. |
boolean |
hasChangedFromOriginal(java.lang.Object o)
|
boolean |
hasOriginal(java.lang.Object object)
Checks whether the given object has an original base object |
boolean |
isCurrentNamedObject(java.lang.Object o)
|
boolean |
isCurrentOwnObject(java.lang.Object o)
|
boolean |
isEmpty()
Checks whether there are objects in the set |
abstract boolean |
isEmpty(java.lang.Object object)
Checks whether the given object is empty |
boolean |
isLoading()
|
abstract boolean |
isOwnObject(java.lang.Object object)
Checks whether the given object is one of this editor's own, e.g. |
abstract boolean |
isUndefined(java.lang.Object object)
Checks whether the given object is undefined |
protected void |
loadOriginal(java.lang.Object own)
|
abstract java.lang.Object |
makeOwnObject(java.lang.Object object)
Makes an own object from the given one |
java.lang.Object |
newOwnObject(java.lang.Object object)
|
java.lang.String |
print()
|
java.lang.String |
printDetails()
|
java.lang.String |
printSet()
|
void |
publishedEdits()
|
void |
removeConstruct(java.lang.Object object)
|
void |
resetEdits()
|
abstract boolean |
sameConstruct(java.lang.Object one,
java.lang.Object other)
Checks whether the two given objects have the same specifications. |
abstract void |
setLegalName(java.lang.Object object,
java.lang.String name)
Sets a string representation of the object that identifies it uniquely |
void |
setManager(ObjectManager manager,
java.util.LinkedList objects)
|
abstract void |
setName(java.lang.Object object,
java.lang.String name)
Sets a string representation of the object that identifies it uniquely |
void |
setObjects(java.util.LinkedList objects)
|
void |
setOriginal(java.lang.Object own,
java.lang.Object original)
Finds the original version of the given object in the originals map |
void |
setOverwrite(boolean onOff)
|
void |
updateConstruct(java.lang.Object object)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public ObjectManager manager
public boolean lazyOwn
protected java.lang.String label
protected static final int CANCEL
protected static final int ADD
protected static final int OVERWRITE
protected static final int NEWNAME
protected StableHashMap members
protected java.util.LinkedList added
protected java.util.HashSet edited
protected java.util.HashSet removed
protected StableHashMap originals
Constructor Detail |
---|
public AbstractSetEditor(ObjectManager manager, java.util.LinkedList objects)
Method Detail |
---|
public void setManager(ObjectManager manager, java.util.LinkedList objects)
public void setObjects(java.util.LinkedList objects)
public java.lang.Object defaultMakeOwnObject(java.lang.Object original)
public void clear()
public abstract Named getStringOriginal(java.lang.String name)
protected void loadOriginal(java.lang.Object own)
public void publishedEdits()
public void resetEdits()
public boolean isLoading()
public void setOverwrite(boolean onOff)
public abstract boolean isOwnObject(java.lang.Object object)
public abstract boolean sameConstruct(java.lang.Object one, java.lang.Object other)
public abstract java.lang.Object makeOwnObject(java.lang.Object object)
public abstract java.lang.String getName(java.lang.Object object)
public abstract void setName(java.lang.Object object, java.lang.String name)
public abstract void setLegalName(java.lang.Object object, java.lang.String name)
public abstract Named getNamedObject(java.lang.String name)
public abstract boolean isEmpty(java.lang.Object object)
public abstract boolean isUndefined(java.lang.Object object)
public abstract java.lang.Object cloneConstruct(java.lang.Object o) throws java.lang.CloneNotSupportedException
java.lang.CloneNotSupportedException
public boolean isCurrentOwnObject(java.lang.Object o)
public boolean isCurrentNamedObject(java.lang.Object o)
public boolean hasOriginal(java.lang.Object object)
public java.util.LinkedList getOriginals()
public java.lang.Object getOriginal(java.lang.Object object)
public void setOriginal(java.lang.Object own, java.lang.Object original)
public boolean isEmpty()
public void ensureConstruct(java.lang.Object object)
public boolean addConstruct(java.lang.Object object)
public boolean handleNameClash(Named changeO, java.lang.String newName, java.lang.Object old)
public boolean hasChangedFromOriginal(java.lang.Object o)
public void updateConstruct(java.lang.Object object)
public void removeConstruct(java.lang.Object object)
public boolean hasChangedConstructs()
public java.util.List collectConstructChanges()
public java.lang.Object newOwnObject(java.lang.Object object)
public java.lang.Object getOwnObject(java.lang.Object object)
public java.lang.Object findOwnObject(java.lang.Object object)
public void addedObject(java.lang.Object own, java.lang.Object original)
public java.util.LinkedList getAllConstructs()
public void fireConstructAdded(java.lang.Object object)
public void fireConstructEdited(java.lang.Object object)
public void fireConstructRemoved(java.lang.Object object)
public java.lang.String print()
public java.lang.String printDetails()
public java.lang.String printSet()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |