Class CIDProp
- java.lang.Object
- com.iizix.prop.GProp<java.lang.Integer>
- com.iizix.prop.Int32Prop
- com.iizix.prop.ui.CIDProp
- All Implemented Interfaces:
EventListener,IGProp<java.lang.Integer>,java.lang.Cloneable
public final class CIDProp extends Int32Prop
Component ID property is used to assign a unique value known on both client and server. The Component ID is used for references such as LabelFor.- Author:
- Christopher Mindus
Field Summary
Fields inherited from class com.iizix.prop.GProp
GPDEBUG, PROP_ATTR_STRING_EDITOR_PROP, PROP_ATTR_STRING_ERRORED_NAME, PROP_ATTR_STRING_EXTENDS, PROP_ATTR_STRING_EXTENDS_FINAL, PROP_ATTR_STRING_EXTENDS_PRIVATE, PROP_ATTR_STRING_NULLABLE, PROP_ATTR_STRING_PRIVATE, PROP_ATTR_STRING_PRIVATE_CHANGE_EVENT, PROP_ATTR_STRING_READ_ONLY, PROP_USER_1, PROP_USER_2
Fields inherited from interface com.iizix.prop.IGProp
EQC_ERROR_IGNORE_ALL, EQC_ERROR_IGNORE_REFERENCES, EQC_IGNORE_ARRAY, EQC_IGNORE_VOLATILE_OR_EDITOR, EQC_PRIVATE, EQC_SAVE_FILE, EXT_CONTAINER_EXTENDS, EXT_CONTAINER_EXTENDS_VALID, EXT_EXTENDED, EXT_FINAL, EXT_OVERRIDES, EXT_OVERRIDES_FINAL_ERR, EXT_PRIVATE
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidappendPropValue(PropMgr propertyManager, SendTransaction trans, java.lang.Object value)Appends the integer property value.java.lang.ObjectfromElementString(java.lang.String string)Called from theinitializeProperty(Element element)method once the element String is retrieved from the "value" attribute of the element.intgetComponentID()Gets the Component ID.protected voidinitializeProp(org.w3c.dom.Element element)Called to initialize the property from anElement.protected intmodifyPropValue(java.lang.Object oldValue, java.lang.Object newValue, PropMgr propMgr)Called when setting a new value for this property.voidonEventSelf(GEvent event)Called when a property event is send to this property.voidonPropTreeInitialized()Called when the property has initialized from the Element when streamed from an XML file, has had all (if any) children elements and nodes added as properties and that the property has been added into it's parent.protected java.lang.ObjecttoNativeValue0(java.lang.Object value, int index)Tries conversion of possibly accepted properties values using thesetPropertyValuemethod into the most preferred property value type.Methods inherited from class com.iizix.prop.Int32Prop
getInt, getInt, getPropValue0, getValueClasses, initializeValue, setPropValue, validatePropType
Methods inherited from class com.iizix.prop.GProp
addPropError, addPropListener, clone, convertPropError, dispose, equals, equals, equalsErrors, equalsObj, equalsPropValue, equalsTree, equalValues, extendsClone, finalize, fine, fine, finer, finer, finest, finest, getAliasName, getAppSessionGyro, getAppWorker, getAtomPath, getAttribute, getChildReferencePropName, getClientSessionGyro, getClientWorker, getConstraints, getEnvironment, getErroredPropItems, getErroredProps, getErrorsProp, getExtendsRootContainer, getFullPropName, getFullPropName, getFullPropNameDebug, getFullPropNameDebug, getListeners, getModuleFolder, getModuleFolder, getParent, getParent, getProjectName, getPropAtom, getPropBaseReference, getPropError, getPropError, getPropErroredName, getPropErrorSeverity, getPropExtendsFlags, getPropFromPath, getPropFromPath, getPropFromReference, getPropFromReference, getPropIndex, getPropName, getPropPath, getPropPath, getPropReferenceTarget, getPropRootPropMgr, getPropTreeErrorSeverity, getPropValue, getPropValue, getPropValueObject, getReferencePropName, getReferences, getRelativePropName, getRootFromName, getRootName, getRootParent, getRootParent, getTreeLock, getVSReference, hasChanged, hasPrivateChangeEventProp, hasPropError, hasPropTreeError, info, info, initializeElement, initializeGElement, initializeGProp, isDisposed, isPropChildOf, isPropClientCreated, isPropCommunicating, isPropCreateRequired, isPropExtended, isPropExtendsFinal, isPropExtendsPrivate, isPropExtendsPrivateInRoot, isPropExtendsPrivateInRoot, isPropFile, isPropFolder, isPropForEditor, isPropNullable, isPropPrivate, isPropPrivateAtCreation, isPropReadOnly, isPropReferenceTreeValid, isPropRoot, isPropUSER, isPropValueTreeLockNeeded, isPropVirtualized, isPropVirtualizing, isPropVolatile, isPropVolatileOrEditorOnly, isProxied, list, list, list, list, list, mapAliasToReference, mapAliasToReference, mapReferenceToAlias, mapReferenceToAlias, mapReferenceToProjectRelative, moveProp, moveProp, moveProp, onEvent, onPrepare, onPropDispose, onPropInvalidateCache, onPropParentChanged, onPropValueSet, onReferenceEvent, onRemoteEvent, onVirtualizationCompleted, onVirtualized, paramString, paramValue, post, post, removePropError, removePropListener, removePropUSER, renameProp, renameProp2, resetChangedTree, resolveRuntimeReferences, setChanged, setConstraints, setConstraints, setCreateRequiredProp, setParent, setPrivateChangeEventProp, setPrivateCreateRequiredProp, setPropError, setPropErroredName, setPropExtended, setPropExtendsFinal, setPropExtendsPrivate, setPropForEditor, setPropNullable, setPropPrivate, setPropReadOnly, setPropUSER, setPropValue, setPropValue, setPropValue, setPropValueIncognito, setPropVolatile, severe, severe, severe, shouldSerializeToXML, throwIfReadOnly, toElementString, toNativeValue, toString, toString, triggerRemoteEvent, triggerRemoteEvent, validateProp, validatePropValue, verify, verifyHasPropertyItem, virtualize, warning, warning, warning
Constructor Detail
CIDProp
public CIDProp()
Default constructor.
CIDProp
public CIDProp(Atom atom)
Default constructor with name.
Method Detail
onPropTreeInitialized
public void onPropTreeInitialized()
Called when the property has initialized from the Element when streamed from an XML file, has had all (if any) children elements and nodes added as properties and that the property has been added into it's parent.The
PropertyContainercalls all its children with this method in order to inform the tree.The
ExtendablePropertyContaineroverrides this method to load all extended containers.This method
- Specified by:
onPropTreeInitializedin interfaceIGProp<java.lang.Integer>- Overrides:
onPropTreeInitializedin classGProp<java.lang.Integer>
initializeProp
protected void initializeProp(org.w3c.dom.Element element)
Called to initialize the property from anElement. The property should initialize itself from attributes and nodes with appropriate information.Subclasses should override this method if custom initialization is required.
The default implementation gets the attribute "value" and calls the methods
object=convertPropertyValue(string)followed bysetPropertyValue(object).- Overrides:
initializePropin classGProp<java.lang.Integer>- Parameters:
element- TheElement.
fromElementString
public java.lang.Object fromElementString(java.lang.String string)
Called from theinitializeProperty(Element element)method once the element String is retrieved from the "value" attribute of the element. Override this method to provide the appropriateStringtoObjectconversion.The default implementation returns the
Stringpassed as the parameter.- Specified by:
fromElementStringin interfaceIGProp<java.lang.Integer>- Overrides:
fromElementStringin classInt32Prop- Parameters:
string- the String value of the object from the String value attribute.- Returns:
- The Zero Integer value, always.
toNativeValue0
protected java.lang.Object toNativeValue0(java.lang.Object value, int index)Tries conversion of possibly accepted properties values using thesetPropertyValuemethod into the most preferred property value type. If the input value already is of the preferred type, the same object is returned.Subclasses overrides the method
toNativeValue0in order to provide the appropriate conversion.- Overrides:
toNativeValue0in classInt32Prop- Parameters:
value- The input value to convert to native value.index- The index in the array returned bygetValueClasses(), or -1 if not found.- Returns:
- The Zero Integer value, always.
modifyPropValue
protected int modifyPropValue(java.lang.Object oldValue, java.lang.Object newValue, PropMgr propMgr) throws PropExceptionCalled when setting a new value for this property. This method is normally not overridden by subclasses, but e.g. for properties containing arrays, this may be handled here, in order not modify the "oldValue" (such as an array, but rather to change it with the data from the "newValue").NOTE: if running with assertions, this method will throw an assert exception as the CIDProp value should never be changed programmatically.
- Overrides:
modifyPropValuein classGProp<java.lang.Integer>- Parameters:
oldValue- The old value.newValue- The new value.propMgr- The property manager for remote change, null for local.- Returns:
- 1 for value has changed, 0 for same value as current value, -1 for not processed. 2 can also be returned to indicate the current value has been modified with new contents. This is e.g. the case for the StringMapProp.
- Throws:
PropException- when the new value doesn't validate correctly.
onEventSelf
public void onEventSelf(GEvent event)
Called when a property event is send to this property.A subclass can override this method to perform appropriate processing and is not required to call
super.onEventSelf(e).- Specified by:
onEventSelfin interfaceIGProp<java.lang.Integer>- Overrides:
onEventSelfin classGProp<java.lang.Integer>- Parameters:
event- The property event.
getComponentID
public int getComponentID()
Gets the Component ID.
appendPropValue
protected void appendPropValue(PropMgr propertyManager, SendTransaction trans, java.lang.Object value)
Appends the integer property value. If uninitialized,-1is appended.- Overrides:
appendPropValuein classInt32Prop- Parameters:
propertyManager- the property manager instance.trans- transaction to append the properties to.value- the value to append to the transaction, a reference to the current property value.