ix.iview
Class AbstractUISetEditor

java.lang.Object
  extended by ix.iface.ui.AbstractSetEditor
      extended by ix.iview.AbstractUISetEditor
Direct Known Subclasses:
UIObjectClassSetEditor, UIRefinementSetEditor

public abstract class AbstractUISetEditor
extends AbstractSetEditor

Support for editing sets of named objects (e.g. refinements or object classes). 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
 
Fields inherited from class ix.iface.ui.AbstractSetEditor
ADD, added, CANCEL, edited, label, lazyOwn, manager, members, NEWNAME, originals, OVERWRITE, removed
 
Constructor Summary
AbstractUISetEditor(DomainObjectManager manager, java.util.LinkedList objects)
           
 
Method Summary
 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.
 void fireConstructRemoved(java.lang.Object object)
           
 Named getAnyNamedObject(java.lang.String name)
          Finds an object whose name matches the given string.
 IXObject getBaseObject(Named object)
           
 Domain getDomain()
           
 java.lang.String getName(java.lang.Object object)
          Gets a string representation of the object to identify it uniquely
 Named getNamedObject(java.lang.String name)
          Finds an object whose name matches the given string.
 java.lang.Object getOriginal(java.lang.Object uiOb)
          Finds the original version of the given object in the originals map
abstract  Named getStringOriginal(java.lang.String name)
           
 UIDomain getUIDomain()
           
 boolean hasOriginal(Named object)
          Checks whether the given object has an original base object
 boolean isEmpty(java.lang.Object object)
          Checks whether the given object is empty
 boolean isUndefined(java.lang.Object object)
          Checks whether the given object is undefined
 void loadOriginal(java.lang.Object own)
           
 void rememberClear()
           
 void removeFromDomain(Domain domain, java.lang.Object object)
           
 void saveToDomain(Domain domain)
           
 void setManager(DomainObjectManager manager, java.util.LinkedList objects)
           
 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
 
Methods inherited from class ix.iface.ui.AbstractSetEditor
addConstruct, addedObject, clear, defaultMakeOwnObject, ensureConstruct, findOwnObject, fireConstructAdded, fireConstructEdited, getAllConstructs, getOriginals, getOwnObject, handleNameClash, hasChangedConstructs, hasChangedFromOriginal, hasOriginal, isCurrentNamedObject, isCurrentOwnObject, isEmpty, isLoading, isOwnObject, makeOwnObject, newOwnObject, print, printDetails, printSet, publishedEdits, removeConstruct, resetEdits, sameConstruct, setLegalName, setManager, setOverwrite, updateConstruct
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractUISetEditor

public AbstractUISetEditor(DomainObjectManager manager,
                           java.util.LinkedList objects)
Method Detail

setManager

public void setManager(DomainObjectManager manager,
                       java.util.LinkedList objects)

setObjects

public void setObjects(java.util.LinkedList objects)
Overrides:
setObjects in class AbstractSetEditor

getDomain

public Domain getDomain()

getUIDomain

public UIDomain getUIDomain()

getOriginal

public java.lang.Object getOriginal(java.lang.Object uiOb)
Description copied from class: AbstractSetEditor
Finds the original version of the given object in the originals map

Overrides:
getOriginal in class AbstractSetEditor

setOriginal

public void setOriginal(java.lang.Object own,
                        java.lang.Object original)
Description copied from class: AbstractSetEditor
Finds the original version of the given object in the originals map

Overrides:
setOriginal in class AbstractSetEditor

rememberClear

public void rememberClear()

getName

public java.lang.String getName(java.lang.Object object)
Description copied from class: AbstractSetEditor
Gets a string representation of the object to identify it uniquely

Specified by:
getName in class AbstractSetEditor

setName

public void setName(java.lang.Object object,
                    java.lang.String name)
Description copied from class: AbstractSetEditor
Sets a string representation of the object that identifies it uniquely

Specified by:
setName in class AbstractSetEditor

getAnyNamedObject

public Named getAnyNamedObject(java.lang.String name)
Finds an object whose name matches the given string.

Returns:
a UIObject, an IXObject, or null - depending on which exists. Checks whether the named object is current, but will return stale objects.

getNamedObject

public Named getNamedObject(java.lang.String name)
Finds an object whose name matches the given string.

Specified by:
getNamedObject in class AbstractSetEditor
Returns:
a UIObject, an IXObject, or null - depending on which exists. Checks whether the named object is current.

getStringOriginal

public abstract Named getStringOriginal(java.lang.String name)
Specified by:
getStringOriginal in class AbstractSetEditor

loadOriginal

public void loadOriginal(java.lang.Object own)
Overrides:
loadOriginal in class AbstractSetEditor

hasOriginal

public boolean hasOriginal(Named object)
Checks whether the given object has an original base object


isEmpty

public boolean isEmpty(java.lang.Object object)
Checks whether the given object is empty

Specified by:
isEmpty in class AbstractSetEditor

isUndefined

public boolean isUndefined(java.lang.Object object)
Description copied from class: AbstractSetEditor
Checks whether the given object is undefined

Specified by:
isUndefined in class AbstractSetEditor

getBaseObject

public IXObject getBaseObject(Named object)

cloneConstruct

public java.lang.Object cloneConstruct(java.lang.Object o)
                                throws java.lang.CloneNotSupportedException
Description copied from class: AbstractSetEditor
Clones the given construct so as not to overwrite the original.

Specified by:
cloneConstruct in class AbstractSetEditor
Throws:
java.lang.CloneNotSupportedException

saveToDomain

public void saveToDomain(Domain domain)

removeFromDomain

public void removeFromDomain(Domain domain,
                             java.lang.Object object)

collectConstructChanges

public java.util.List collectConstructChanges()
Collects descriptions of any changes in constructs in the set.

Overrides:
collectConstructChanges in class AbstractSetEditor

fireConstructRemoved

public void fireConstructRemoved(java.lang.Object object)
Overrides:
fireConstructRemoved in class AbstractSetEditor