Class UICheckBox
- All Implemented Interfaces:
EventListener,IFocusComp,IMessageBox,IComponent,ICustomDataProvider,IGProp<GProp<?>[]>,IPropCnr,IUICheckComponent,IUIComp,IUICompRelativeTarget,IUIContextMenuOwner,IUIFocusComp,IUILabelForTarget,IUISelectionComp,IUITriStateSelectionComp,IVSComponentListener,IVSComponentState,IVSFieldListener,Cloneable
- Direct Known Subclasses:
EUICheckBox
- Author:
- Christopher Mindus
Nested Class Summary
Nested classes/interfaces inherited from interface com.iizix.gyro.IMessageBox
IMessageBox.IconNested classes/interfaces inherited from interface com.iizix.prop.vs.IVSComponentState
IVSComponentState.StateField Summary
Fields inherited from class com.iizix.prop.ui.UIComp
EMPTY, REMOTE_FOCUS_EVENT, styles, vsFieldFields inherited from class com.iizix.prop.PropCnr
EMPTY_CLASSES, EMPTY_CNRS, EXTENDS_FRAMEWORK_ERROR_IDFields 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_2Fields 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_PRIVATEFields inherited from interface com.iizix.gyro.IMessageBox
ICON_ERROR, ICON_INFORMATION, ICON_MAP, ICON_NONE, ICON_QUESTION, ICON_WARNINGFields inherited from interface com.iizix.prop.ui.IUICheckComponent
CHECKED_ATOM, PN_CHECK_NO_MATCH, PN_CHECKED, PN_CHECKED_VALUE, PN_UNCHECKED_VALUEFields inherited from interface com.iizix.prop.ui.IUIComp
ERROR, INFORMATION, NONE, REMOTE_FOCUS_EVENT, WARNINGFields inherited from interface com.iizix.prop.ui.selection.IUISelectionComp
SELECTION_TYPE_MULTIPLE, SELECTION_TYPE_NONE, SELECTION_TYPE_SINGLEConstructor Summary
ConstructorsConstructorDescriptionCreates the component without a name.UICheckBox(Atom propertyAtom) Creates the component with the specified name.UICheckBox(Atom propertyAtom, GProp<?>[] newValue) Creates the component with the specified name, initialized to contain theGPropitems.Method Summary
Modifier and TypeMethodDescriptionbooleancanFillX()Returns if the component can fill in X or not.booleancanFillY()Returns if the component can fill in Y or not.clone()Creates a clone out of this property.Returns the size of the component in pixels.final intGets the device type: -1=mobile, 0=both, 1=desktop.Returns the method to use for onUISelection notifications that is attached to this selection component.getSelectionListenerHandler(boolean doCreate) Returns the generic selection listener.Returns the selection property atom for verification of selection changes.booleanReturns if the component can show the context menu in mobile mode.protected voidonPrepare(ClassReference cr, List<Throwable> errors) Called to resolve methods for the component from main "onPrepare" once the ClassReference has been found.protected voidonSelectionChanged(GEvent event) Method called when the selection of the component changed due to a property change (value changed, property added or removed).static intonValueChanged(UIComp comp, VSField field) Called when the field value is set.voidonValueChanged(VSField field, Value value, GProp<?> trigger, IPostEventProcessing postProcessing) Called when the field value is set.static intsetComponentCheckStateToVSField(UIComp comp, VSField field) Sets the checkbox component from its check state values to its VirtualSpace Field, if any.Methods inherited from class com.iizix.prop.ui.UIComp
add, addMappings, assignFontInfoResolver, canAcceptUIContainerFocus, canAlignX, canAlignY, canRequestFocus, canRequestFocus, clearErrorMessage, couldRequestFocusIfVirtualized, createStyles, createTitleProp, disconnectVSField, doUpdateVSFieldFromUIComponent, enterVSProcessing, exitVSProcessing, fireSelection, fireSelection, forbiddenGetCustomDataMap, getBadge, getBestVSFieldValueType, getComponentID, getComponentMappings, getCSSClassNames, getErrorMessage, getErrorMessage, getErrorMessageEx, getErrorMessageString, getErrorMessageString, getErrorMessageStringEx, getFirstContainerVSStateFocus, getFixHeight, getFixWidth, getFontInfo, getForcedAlignX, getForcedAlignY, getKStringText, getLayout, getLayoutMgr, getLayoutMgr, getMappedVSComponent, getMessage, getMessageText, getPixelHeight, getPixelWidth, getPredefinedProps, getSize, getStyles, getStyles, getText, getTitle, getTitleKS, getTitlePKS, getTooltip, getTooltipText, getTrigger, getUIPanel, getUIParent, getValue, getValue, getVirtualSpace, getVSField, getVSStateFocus, hasExplicitHeight, hasExplicitWidth, hasFocus, hasImplicitAlignFillX, hasImplicitAlignFillY, hasImplicitHeight, hasImplicitWidth, hasSelectionChanged, initPropCnr, invokeOnUICreateTree, isEnabled, isMobile, isReadOnly, isRTL, isVisible, isVSFieldDisconnected, mustHaveExplicitHeight, mustHaveExplicitWidth, mustHaveHeight, mustHaveWidth, onBroken, onComponentSelectedInParent, onEventSelf, onFocusGained, onNotifySelectionChanged, onParentStateChanged, onPrepare, onPropDispose, onRemoteEvent, onResolved, onStateChanged, processVSComponentSelection, reconnectVSField, requestFocus, requestFocus, requestFocus, requestFocus, requestFocusEx, requestFocusEx, requestFocusEx, requestFocusEx, resetComponentID, setBadge, setBadge, setComponentToVSField, setCSSClassNames, setCSSClassNames2, setEnabled, setEnabled, setErrorMessage, setErrorMessage, setErrorMessage, setErrorMessage, setHTMLText, setLayoutMgr, setMessage, setMessage, setReadOnly, setReadOnly, setText, setText, setTitle, setTitle, setTitle, setTooltip, setTooltip, setUIContainerFocus, setVisible, setVisible, setVSFieldMessageToComponent, setVSFieldToComponent, verify, verifyComponentScopeMethods inherited from class com.iizix.prop.PropCnr
__transferChildProps, addPredefinedProps, addProp, addProp, addProp2, addProp2, appendPropValue, completeVirtualize, containsProp, containsProp, convertLoadedProp, createCopyOfAtom, createUniqueAtom, createUniqueAtom, createUniqueAtom, createVSReference, doPropEqualsArrayValues, enablePropCommunication, enablePropHashMap, equalsTree, equalsTree, getAllProps, getAllProps, getAllProps, getAllProps, getAllProps, getAllProps, getAllProps, getAllProps, getBool, getBool, getBool, getBool, getChildPropError, getChildPropError, getChildPropErrorSeverity, getChildPropErrorSeverity, getErrorsProp, getExtendsContainer, getExtendsError, getExtendsName, getExtendsOverride, getExtendsPossibleClasses, getFirstProp, getFirstProp, getFocusEngine, getInt, getInt, getInt, getInt, getLong, getLong, getLong, getLong, getNumber, getNumber, getNumber, getNumber, getPossibleChildren, getProp, getProp, getProp, getProp, getProp, getProp, getProp, getProp, getProp, getProp, getProp, getPropBaseReference, getPropCnr, getPropCount, getPropCount, getPropIndex, getPropIndex, getPropIndexes, getProps, getProps, getPropValue, getPropValue, getPropValue, getPropValue, getPropValue, getPropValue, getPropValue, getPropValue0, getRetargetedVerifyContainer, getString, getString, getString, getString, getValueClasses, getVSReference, hasSendData, initializeElement, initializeExtendsFramework, initializeProp, initializeValue, insertProp, insertProp2, isChild, isExtendsOverriden, isExtendsPropertyValid, isExtendsRoot, isPropAddRemoveAllowed, isPropCommunicating, isPropExtended, list, list, logPropNotFound, maybeAddProp, onInsertProp, onPropRemoved, onPropTreeInitialized, onReferenceEvent, onVirtualContainerCreated, onVirtualizationCompleted, paramString, prepare, removeAllProps, removeAllProps2, removeProp, removeProp, removeProp, removeProp, removeProp, removeProp, removeProp, removeProp2, removeProp2, removeProp2, removeProp2, removeProp2, removeProp2, removeProp2, reorderProps, replaceProps, requestFocus, requestFocusEx, resolveReferences, resolveRuntimeReferences, setBool, setBool, setBool, setBool, setCreateRequiredProp, setExtendsName, setExtendsOverride, setInt, setInt, setInt, setLong, setLong, setLong, setLong, setNumber, setNumber, setNumber, setNumber, setProp, setProp, setProp, setProp2, setProp2, setPropValue, setPropValue, setPropValue, setPropValue, setPropValue, setPropValue, setString, setString, setString, setString, shouldCreateProps, shouldSerializeToXML, toElementString, toNativeValue0, usePropHashMap, usesPropIndex, validateChildPropInValue, validateClassInstances, validatePropType, validatePropValue, verifyInternalUseOnly, verifyTree, virtualizeMethods inherited from class com.iizix.prop.GProp
addPropError, addPropListener, appendProp, convertPropError, dispose, equals, equals, equalsErrors, equalsObj, equalsPropValue, equalValues, finalize, fine, fine, finer, finer, finest, finest, fromElementString, 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, 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, hasChanged, hasCircularReferencesError, hasPrivateChangeEventProp, hasPropError, hasPropTreeError, info, info, initializeGElement, initializeGProp, isDisposed, isPropChildOf, isPropClientCreated, 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, mapAliasToReference, mapAliasToReference, mapReferenceToAlias, mapReferenceToAlias, mapReferenceToProjectRelative, modifyPropValue, moveProp, moveProp, moveProp, onEvent, onPropInvalidateCache, onPropParentChanged, onPropValueSet, paramString, paramValue, post, post, removePropError, removePropListener, removePropUSER, renameProp, renameProp2, resetChangedTree, setChanged, setConstraints, setConstraints, setParent, setPrivateChangeEventProp, setPrivateCreateRequiredProp, setPropError, setPropErroredName, setPropExtended, setPropExtendsFinal, setPropExtendsPrivate, setPropForEditor, setPropNullable, setPropPrivate, setPropReadOnly, setPropUSER, setPropValue, setPropValue, setPropValue, setPropValueIncognito, setPropVolatile, severe, severe, severe, shouldSerializeToXML, throwIfReadOnly, toNativeValue, toString, toString, triggerRemoteEvent, triggerRemoteEvent, validateProp, warning, warning, warningMethods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.iizix.IComponent
clearErrorMessage, getBadge, getKStringText, getLayoutMgr, getMessage, getMessageText, getStyles, getText, getTooltip, getTooltipText, getUIPanel, getUIParent, isEnabled, isReadOnly, isVisible, messageBox, requestFocus, requestFocus, requestFocusEx, requestFocusEx, setBadge, setBadge, setEnabled, setErrorMessage, setErrorMessage, setHTMLText, setLayoutMgr, setMessage, setMessage, setReadOnly, setText, setText, setTooltip, setTooltip, setVisibleMethods inherited from interface com.iizix.prop.ICustomDataProvider
forbiddenGetCustomDataMap, getCustomData, putCustomData, putCustomDataIfAbsentMethods inherited from interface com.iizix.gyro.IFocusComp
requestFocus, requestFocus, requestFocusEx, requestFocusExMethods inherited from interface com.iizix.prop.IGProp
addPropError, addPropListener, dispose, equals, fine, fine, finer, finer, finest, finest, fromElementString, getAppSessionGyro, getAtomPath, getClientSessionGyro, getConstraints, getEnvironment, getErroredPropItems, getErroredProps, getErrorsProp, getExtendsRootContainer, getFullPropName, getFullPropNameDebug, getModuleFolder, getModuleFolder, getParent, getParent, getPropAtom, getPropBaseReference, getPropError, getPropError, getPropErrorSeverity, getPropExtendsFlags, getPropFromPath, getPropFromReference, getPropIndex, getPropName, getPropPath, getPropPath, getPropRootPropMgr, getPropTreeErrorSeverity, getPropValue, getPropValue, getReferencePropName, getRelativePropName, getRootParent, getTreeLock, getValueClasses, getVSReference, hasChanged, hasCircularReferencesError, hasPrivateChangeEventProp, hasPropError, hasPropTreeError, info, info, initializeGElement, initializeGProp, isDisposed, isPropChildOf, isPropClientCreated, isPropCommunicating, isPropCreateRequired, isPropExtended, isPropExtendsFinal, isPropExtendsPrivate, isPropExtendsPrivateInRoot, isPropExtendsPrivateInRoot, isPropFile, isPropFolder, isPropNullable, isPropPrivate, isPropReadOnly, isPropReferenceTreeValid, isPropRoot, isPropVirtualized, isSibling, list, list, list, list, list, mapAliasToReference, mapReferenceToAlias, mapReferenceToProjectRelative, moveProp, moveProp, moveProp, onEvent, onEventSelf, onPropTreeInitialized, onRemoteEvent, removePropError, removePropListener, renameProp, resolveRuntimeReferences, setChanged, setConstraints, setConstraints, setParent, setPrivateChangeEventProp, setPropError, setPropExtendsFinal, setPropExtendsPrivate, setPropNullable, setPropPrivate, setPropReadOnly, setPropValue, setPropValue, severe, severe, severe, toElementString, toNativeValue, triggerRemoteEvent, triggerRemoteEvent, validateProp, validatePropType, validatePropValue, verify, warning, warning, warningMethods inherited from interface com.iizix.gyro.IMessageBox
messageBox, messageBox, messageBoxMethods inherited from interface com.iizix.prop.IPropCnr
addProp, addProp, addProp2, addProp2, canRequestFocus, canRequestFocus, canRequestFocus, containsProp, containsProp, couldRequestFocusIfVirtualized, couldRequestFocusIfVirtualized, couldRequestFocusIfVirtualized, createCopyOfAtom, createUniqueAtom, createUniqueAtom, enablePropCommunication, enablePropHashMap, getAllProps, getAllProps, getAllProps, getAllProps, getAllProps, getAllProps, getAllProps, getAllProps, getBool, getBool, getBool, getBool, getChildPropError, getChildPropError, getChildPropErrorSeverity, getChildPropErrorSeverity, getErrorsProp, getExtendsError, getExtendsName, getExtendsPossibleClasses, getFirstProp, getFirstProp, getFocusEngine, getInt, getInt, getInt, getInt, getLong, getLong, getLong, getLong, getNumber, getNumber, getNumber, getNumber, getPossibleChildren, getProp, getProp, getProp, getProp, getProp, getProp, getProp, getProp, getProp, getProp, getProp, getPropCnr, getPropCount, getPropIndex, getPropIndex, getPropIndexes, getProps, getProps, getPropValue, getPropValue, getPropValue, getPropValue, getPropValue, getPropValue, getPropValue, getString, getString, getString, getString, hasFocus, initializeExtendsFramework, insertProp, insertProp2, isChild, isExtendsOverriden, isExtendsRoot, isPropAddRemoveAllowed, isPropExtended, removeAllProps, removeAllProps2, removeProp, removeProp, removeProp, removeProp, removeProp, removeProp, removeProp, removeProp2, removeProp2, removeProp2, removeProp2, removeProp2, removeProp2, removeProp2, reorderProps, requestFocus, requestFocusEx, setBool, setBool, setBool, setBool, setExtendsName, setExtendsOverride, setInt, setInt, setInt, setLong, setLong, setLong, setLong, setNumber, setNumber, setNumber, setNumber, setProp, setProp, setProp, setProp2, setProp2, setPropValue, setPropValue, setPropValue, setPropValue, setPropValue, setPropValue, setString, setString, setString, setString, usePropHashMap, usesPropIndex, validateClassInstancesMethods inherited from interface com.iizix.prop.ui.IUICheckComponent
getCheckState, getSelection, getSelectionType, isChecked, isSelected, isSelectionTriStateBased, isThirdState, isUnselected, setChecked, setCheckedMethods inherited from interface com.iizix.prop.ui.IUIComp
canAcceptUIContainerFocus, disconnectVSField, getComponentID, getComponentMappings, getContainerFirstUIComponent, getContainerFirstUIComponentNull, getCSSClassNames, getErrorMessage, getErrorMessage, getFirstUIComponent, getFirstUIComponentNull, getFixHeight, getFixWidth, getLayout, getLayoutMgr, getPanelUIComponent, getPanelUIComponentNull, getUIRef, getValue, getValue, getVirtualSpace, getVSField, isMobile, isRTL, isVSFieldDisconnected, reconnectVSField, setComponentToVSField, setCSSClassNames, setCSSClassNames2, setErrorMessage, setErrorMessage, setUIContainerFocus, setVSFieldMessageToComponent, setVSFieldToComponentMethods inherited from interface com.iizix.prop.ui.IUIContextMenuOwner
getContainedContextMenu, getContextMenu, getReferencedContextMenu, isContextMenuSupported, onBroken, onResolvedMethods inherited from interface com.iizix.prop.ui.IUIFocusComp
onFocusGained, onFocusLostMethods inherited from interface com.iizix.prop.ui.selection.IUISelectionComp
addSelectionListener, isSelectionBooleanBased, isSelectionCellBased, isSelectionIndexBased, removeSelectionListener, setSelectionMethods inherited from interface com.iizix.prop.vs.IVSComponentListener
onParentStateChangedMethods inherited from interface com.iizix.prop.vs.IVSFieldListener
getBestVSFieldValueType, onBroken, onResolved, onStateChanged
Constructor Details
UICheckBox
public UICheckBox()Creates the component without a name. The name must be set in all cases using thesetPropertyAtomcall.UICheckBox
Creates 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.
UICheckBox
Creates the component with the specified name, initialized to contain theGPropitems. All system-reserved names for components begins with "$".- Parameters:
propertyAtom- The name of the component, unique within it's parent.newValue- The array of all properties the component should have.- Throws:
PropException- when at least one of the properties to initialize the component with is invalid.
Method Details
clone
Creates a clone out of this property. The cloning is overridden by the subclasses in order to handle cloning of its class variables appropriately.Cloning is used for "virtualization" of a property tree in the server. Client property classes will therefore throw
CloneNotSupportedException.Once a tree has been cloned, the change-flag is reset, and the create-flag is set. All listeners are also removed! The new cloned property is an orphan, i.e. has no parent set. All children properties are also (deep) cloned.
Note that the cloning process is done WITHOUT thread synchronization for performance reasons, thus no modifications should be done to the tree!
getSelectionPropAtom
Returns the selection property atom for verification of selection changes.- Specified by:
getSelectionPropAtomin interfaceIUISelectionComp- Returns:
- The atom of the selection property.
getSelectionListenerHandler
Returns the generic selection listener.- Specified by:
getSelectionListenerHandlerin interfaceIUISelectionComp- Parameters:
doCreate- Create the listener handler if it doesn't exist, false not to.- Returns:
- The selection listener handler, or null if not created.
getDeviceType
public final int getDeviceType()Gets the device type: -1=mobile, 0=both, 1=desktop.- Specified by:
getDeviceTypein interfaceIUIComp
isMobileContextMenuSupported
public boolean isMobileContextMenuSupported()Returns if the component can show the context menu in mobile mode.- Specified by:
isMobileContextMenuSupportedin interfaceIUIContextMenuOwner- Returns:
- Checkbox supports context menus for mobile.
canFillX
public boolean canFillX()Returns if the component can fill in X or not.canFillY
public boolean canFillY()Returns if the component can fill in Y or not.onValueChanged
public void onValueChanged(VSField field, Value value, GProp<?> trigger, IPostEventProcessing postProcessing) Called when the field value is set.The check component overrides this method to set the check state in the component accordingly.
- Specified by:
onValueChangedin interfaceIVSFieldListener- Overrides:
onValueChangedin classUIComp- Parameters:
field- The VS field.value- The value, never null, butvalue.isNull()could be true.trigger- The trigger property that may be null.postProcessing- Post-processing instance.
onSelectionChanged
Method called when the selection of the component changed due to a property change (value changed, property added or removed).- Overrides:
onSelectionChangedin classUIComp- Parameters:
event- The event that causes the selection change.
setComponentCheckStateToVSField
Sets the checkbox component from its check state values to its VirtualSpace Field, if any.- Parameters:
comp- The component containing the PN_CHECKED_VALUE, PN_UNCHECKED_VALUE, PN_CHECK_NO_MATCH and PN_CHECKED properties.field- The VS field that will be updated.- Returns:
- 1 for update completed, 0 for nothing done and -1 for error occurred.
onValueChanged
Called when the field value is set.The check component overrides this method to set the check state in the component accordingly.
- Parameters:
comp- The component containing the PN_CHECKED_VALUE, PN_UNCHECKED_VALUE and PN_CHECK_NO_MATCH properties that will have its PN_CHECKED IntProp set.field- The VS field.- Returns:
- The new check state (0=unchecked, 1=checked, 2=third state), -1 if not changed.
onPrepare
Called to resolve methods for the component from main "onPrepare" once the ClassReference has been found.Components should override this method to load it's required methods.
getOnUISelectionMethod
Returns the method to use for onUISelection notifications that is attached to this selection component. The method name is not important, but must have the annotation and signature:@OnUISelection(name = "some/property")
public void onUISelection(UISelectionEvent event)- Specified by:
getOnUISelectionMethodin interfaceIUISelectionComp- Returns:
- The method, or null if none is registered.
getApproximateSize
Returns the size of the component in pixels. The size is a calculation and does not exactly reflect the real size that may be different due to additional styles not taken into account by this method. The size is calculated from the font of the component and default or defined values (such as character length or number of lines for text area).- Specified by:
getApproximateSizein classUIComp- Returns:
- The size of the component: 16x16.