Package com.iizix.prop
Class ConstrainedIntProp
- All Implemented Interfaces:
- EventListener,- IGProp<Integer>,- Cloneable
This class is used to hold an integer property that has constraints imposed on it. The constraints string is in the format "token,token2,..." where a "token" can be either an integer value or a "range" in the format "min:max". An example for a horizontal position 4,5,6 for left, center, right and 0 (zero) for uninitialized would have the form "0,4-6" or "0,4,5,6".
- 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 SummaryConstructorsModifierConstructorDescription- protectedCreates the component without a name and no constraints.- ConstrainedIntProp- (Atom propertyAtom, String constraints) Creates the component with the specified name.- ConstrainedIntProp- (Atom propertyAtom, String constraints, int newValue) Creates the component with the specified name, initialized to contain the- GPropitems.- protected- ConstrainedIntProp- (String constraints) Creates the component without a name.
- Method SummaryModifier and TypeMethodDescriptionGets the constraints string for this property.- void- setConstraints- (Object constraints, String prevConstraints, Element prevElement) Sets the constraints for the property previously returned from the same constraints call to- setConstraints(String,Element)with the same String and Element as this instance would require.- setConstraints- (String constraints, Element element) Sets the constraints for the property.- void- validatePropValue- (Object newValue) Validates the value to set.- Methods inherited from class com.iizix.prop.IntProp- appendPropValue, fromElementString, getInt, getInt, getPropValue0, getValueClasses, initializeValue, setPropValue, toNativeValue0, 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, 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, initializeProp, 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, modifyPropValue, moveProp, moveProp, moveProp, onEvent, onEventSelf, onPrepare, onPropDispose, onPropInvalidateCache, onPropParentChanged, onPropTreeInitialized, onPropValueSet, onReferenceEvent, onRemoteEvent, onVirtualizationCompleted, paramString, paramString, paramValue, post, post, removePropError, removePropListener, removePropUSER, renameProp, renameProp2, resetChangedTree, resolveRuntimeReferences, setChanged, 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, verify, virtualize, warning, warning, warning
- Constructor Details- ConstrainedIntPropprotected ConstrainedIntProp()Creates the component without a name and no constraints. The name and constraints must be set in all cases using the- setPropertyAtomand- setConstraintscalls.
- ConstrainedIntPropCreates the component without a name. The name must be set in all cases using the- setPropertyAtomcall.- Parameters:
- constraints- The constraints string from the properties definition.
- Throws:
- PropException- For property constraints errors.
 
- ConstrainedIntPropCreates the component with the specified name. All system-reserved names for components begins with "$".- Parameters:
- propertyAtom- the name of the component, unique within it's parent.
- constraints- The constraints string from the properties definition.
- Throws:
- PropException- For property constraints errors.
 
- ConstrainedIntPropCreates the component with the specified name, initialized to contain the- GPropitems. All system-reserved names for components begins with "$".- Parameters:
- propertyAtom- The name of the component, unique within it's parent.
- constraints- The constraints string from the properties definition.
- newValue- The alignment property value (1-9).
- Throws:
- PropException
 
 
- Method Details- setConstraintsSets the constraints for the property.- This method must be overridden by subclasses in order to load the constraints properly if the constraints-string is not sufficient, i.e. that additional settings must be loaded from the XML Element. - Specified by:
- setConstraintsin interface- IGProp<Integer>
- Overrides:
- setConstraintsin class- GProp<Integer>
- Parameters:
- constraints- The constraints string from the properties definition.
- element- The Element that loads the property class from the properties definition. Note that Element may be- nullif the constructor isn't called from the PropertyFactory.
- Returns:
- The constraints object for reuse by the PropertyFactorywith a subsequentsetConstraints(Object)call instead of to this method.
- Throws:
- PropException- For errors in the constraints definitions.
 
- setConstraintspublic void setConstraints- (Object constraints, String prevConstraints, Element prevElement) throws PropException Sets the constraints for the property previously returned from the same constraints call to- setConstraints(String,Element)with the same String and Element as this instance would require.- This method must be overridden by subclasses in order to load the constraints properly if the constraints-string is not sufficient, i.e. that additional settings must be loaded from the XML Element. - Specified by:
- setConstraintsin interface- IGProp<Integer>
- Overrides:
- setConstraintsin class- GProp<Integer>
- Parameters:
- constraints- The constraints Object from the properties definition.
- prevConstraints- The previous constraints string from the properties definition.
- prevElement- The previous Element that loads the property class from the properties definition.
- Throws:
- PropException- For errors in the constraints definitions.
 
- getConstraintsGets the constraints string for this property.- Specified by:
- getConstraintsin interface- IGProp<Integer>
- Overrides:
- getConstraintsin class- GProp<Integer>
- Returns:
- The constraints string used to in setConstraintsto initiate the constraints for this property.
 
- validatePropValueValidates the value to set.- Note: When this method is called, synchronization is done at the property itself, so no synchronization on the tree should be done. - Specified by:
- validatePropValuein interface- IGProp<Integer>
- Overrides:
- validatePropValuein class- GProp<Integer>
- Parameters:
- newValue- The new value to set.
- Throws:
- PropException- when the new value doesn't validate correctly.