Class CIDProp
- All Implemented Interfaces:
EventListener
,IGProp<Integer>
,Cloneable
- 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_INCLUDE_PRIVATE, EQC_SAVE_FILE, EXT_CONTAINER_EXTENDS, EXT_CONTAINER_EXTENDS_VALID, EXT_EXTENDED, EXT_FINAL, EXT_OVERRIDES, EXT_OVERRIDES_FINAL_ERR, EXT_PRIVATE
Constructor Summary
Method Summary
Modifier and TypeMethodDescriptionprotected void
appendPropValue
(PropMgr propertyManager, SendTransaction trans, Object value) Appends the integer property value.fromElementString
(String string) Called from theinitializeProperty(Element element)
method once the element String is retrieved from the "value" attribute of the element.int
Gets the Component ID.protected void
initializeProp
(Element element) Called to initialize the property from anElement
.protected int
modifyPropValue
(Object oldValue, Object newValue, PropMgr propMgr) Called when setting a new value for this property.void
onEventSelf
(GEvent event) Called when a property event is send to this property.void
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 Object
toNativeValue0
(Object value, int index) Tries conversion of possibly accepted properties values using thesetPropertyValue
method 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, appendProp, clone, convertPropError, dispose, equals, equals, equalsErrors, equalsObj, equalsPropValue, equalsTree, equalValues, 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, getReferencePropNameNoAssert, getRelativePropName, getRootFromName, getRootName, getRootParent, getRootParentNoAssert, getTreeLock, getVSReference, hasChanged, hasCircularReferencesError, 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, isPropRootLoading, isPropRootTreeModificationsAllowed, isPropUSER, isPropValueTreeLockNeeded, isPropVirtualized, isPropVirtualizing, isPropVolatile, isPropVolatileOrEditorOnly, isProxied, isSibling, list, list, list, list, list, mapAliasToReference, mapAliasToReference, mapReferenceToAlias, mapReferenceToAlias, mapReferenceToProjectRelative, moveProp, moveProp, moveProp, onEvent, onPrepare, onPropDispose, onPropInvalidateCache, onPropParentChanged, onPropValueSet, onReferenceEvent, onRemoteEvent, onVirtualizationCompleted, paramString, 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, virtualize, warning, warning, warning
Constructor Details
CIDProp
public CIDProp()Default constructor.CIDProp
Default constructor with name.
Method Details
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
PropertyContainer
calls all its children with this method in order to inform the tree.The
ExtendablePropertyContainer
overrides this method to load all extended containers.This method
- Specified by:
onPropTreeInitialized
in interfaceIGProp<Integer>
- Overrides:
onPropTreeInitialized
in classGProp<Integer>
initializeProp
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:
initializeProp
in classGProp<Integer>
- Parameters:
element
- TheElement
.
fromElementString
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 appropriateString
toObject
conversion.The default implementation returns the
String
passed as the parameter.- Specified by:
fromElementString
in interfaceIGProp<Integer>
- Overrides:
fromElementString
in classInt32Prop
- Parameters:
string
- the String value of the object from the String value attribute.- Returns:
- The Zero Integer value, always.
toNativeValue0
Tries conversion of possibly accepted properties values using thesetPropertyValue
method 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
toNativeValue0
in order to provide the appropriate conversion.- Overrides:
toNativeValue0
in 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(Object oldValue, Object newValue, PropMgr propMgr) throws PropException Called 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:
modifyPropValue
in classGProp<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
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:
onEventSelf
in interfaceIGProp<Integer>
- Overrides:
onEventSelf
in classGProp<Integer>
- Parameters:
event
- The property event.
getComponentID
public int getComponentID()Gets the Component ID.appendPropValue
Appends the integer property value. If uninitialized,-1
is appended.- Overrides:
appendPropValue
in 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.