Class UIAbstractListChoice
- java.lang.Object
- com.iizix.prop.GProp<GProp<?>[]>
- com.iizix.prop.PropCnr
- com.iizix.prop.ui.UIComp
- com.iizix.prop.ui.UIAbstractListChoice
- All Implemented Interfaces:
EventListener
,IFocusComp
,IMessageBox
,IComponent
,ICodeItemArrayContainer
,ICodeItemsOwner
,ICodeItemsOwnerSelectionSupport
,ICustomDataProvider
,IGProp<GProp<?>[]>
,IKStringArrayContainer
,IPropCnr
,IStringArrayContainer
,IUIComp
,IUICompRelativeTarget
,IUIContextMenuOwner
,IUIFocusComp
,IUIHint
,IUILabelForTarget
,IUIIndexedSelectionComp
,IUISelectionComp
,IUISingleIndexedSelectionComp
,IUIPlainTextComponent
,IUITextComponent
,IVSColumnBestValueListener
,IVSColumnListener
,IVSComponentListener
,IVSComponentState
,IVSFieldListener
,java.lang.Cloneable
- Direct Known Subclasses:
UIComboBox
,UISpinner
public class UIAbstractListChoice extends UIComp implements IVSColumnListener, IUISingleIndexedSelectionComp, IUIPlainTextComponent, IUIHint, IUIFocusComp, IUILabelForTarget, IUIContextMenuOwner, ICodeItemArrayContainer, ICodeItemsOwnerSelectionSupport
Abstract list choice UI component used for combobox and spinner.- Author:
- Christopher Mindus
Nested Class Summary
Nested classes/interfaces inherited from interface com.iizix.gyro.IMessageBox
IMessageBox.Icon
Nested classes/interfaces inherited from interface com.iizix.prop.vs.IVSComponentState
IVSComponentState.State
Field Summary
Fields Modifier and Type Field Description protected static Atom
ATOM_ITEMS_CNR
The items container property atom.protected static java.lang.String
PN_ITEMS_CNR
The items container property name = "items".protected static Atom
SELECTED_ROW_ATOM
The property name: selected row.Fields inherited from class com.iizix.prop.ui.UIComp
EMPTY, REMOTE_FOCUS_EVENT, styles, vsField
Fields inherited from class com.iizix.prop.PropCnr
EMPTY_CLASSES, EMPTY_CNRS, EXTENDS_FRAMEWORK_ERROR_ID
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
Fields inherited from interface com.iizix.gyro.IMessageBox
ICON_ERROR, ICON_INFORMATION, ICON_MAP, ICON_NONE, ICON_QUESTION, ICON_WARNING
Fields inherited from interface com.iizix.prop.ui.IUIComp
ERROR, INFORMATION, NONE, REMOTE_FOCUS_EVENT, WARNING
Fields inherited from interface com.iizix.prop.ui.selection.IUISelectionComp
SELECTION_TYPE_MULTIPLE, SELECTION_TYPE_NONE, SELECTION_TYPE_SINGLE
Constructor Summary
Constructors Constructor Description UIAbstractListChoice()
Creates the component without a name.UIAbstractListChoice(Atom propertyAtom)
Creates the component with the specified name.
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
addPredefinedProps()
Adds the predefined properties for this container.java.lang.String
clearSelection()
Clear the selection.UIAbstractListChoice
clone()
Creates a clone out of this property.Size
getApproximateSize()
Returns the size of the component in pixels.Value.Type
getBestVSColumnHeaderValueType(VSRelativeReference<?> reference)
Requests the value type that would best suit the listener.ICodeItemArrayContainer
getCodeArrayArrayContainer()
Gets the target implementor of the interface.int
getDeviceType()
Gets the device type: -1=mobile, 0=both, 1=desktop.IKStringArrayContainer
getKStringArrayContainer()
Gets the target implementor of the interface.VSColumnHeader
getListDataColumn()
Gets the VS column for the list data.java.lang.reflect.Method
getOnUISelectionMethod()
Returns the method to use for onUISelection notifications that is attached to this selection component.void
getPredefinedProps()
Gets potential references to predefined properties for this container.int
getSelectedIndex()
Gets the first selected index.IUISelection
getSelection()
Gets the current selection of the component.GenericListener<IUISelectionListener>
getSelectionListenerHandler(boolean doCreate)
Returns the generic selection listener.Atom
getSelectionPropAtom()
Returns the selection property atom for verification of selection changes.int
getSelectionType()
Gets the selection type of the component.IStringArrayContainer
getStringArrayContainer()
Gets the target implementor of the interface.VSColumnHeader
getTranslationColumn()
Gets the VS column for the translation list.int
getVisualLength()
Returns the visual length of the entry field.boolean
isHTMLItemSupportEnabled()
Returns if list data items support HTML or not.boolean
isHTMLKStringSupported()
Checks if KString's of HTML type are supported.boolean
isMobileContextMenuSupported()
Returns if the component can show the context menu in mobile mode.boolean
isSelected()
Returns the selection of state of the component.boolean
isVSFieldSelectionIndex()
Returns if the VS field is used for the selection index or the text of the combobox entry field.boolean
isVSTableSelectionSynchronized()
Returns whether the VSTable selection processing is enabled or not.void
onBroken(VSRelativeReference<?> reference, VSColumnHeader column)
Called when the property reference has been broken, i.e.void
onCellValueChanged(VSColumnHeader column, VSField cell, Value value, GProp<?> trigger, IPostEventProcessing postProcessing)
Called when the cell value is set in the column.void
onEventSelf(GEvent event)
Updates a VirtualSpace Field when a component text changes.protected void
onPrepare(ClassReference cr, java.util.List<java.lang.Throwable> errors)
Called to resolve methods for the component from main "onPrepare" once the ClassReference has been found.void
onResolved(VSRelativeReference<?> reference, VSColumnHeader column)
Called when the property reference has been resolved.void
onRowAdded(VSColumnHeader column, VSRow row, int rowIndex)
Called when a row has been added to the table.void
onRowRemoved(VSColumnHeader column, VSRow row, int rowIndex)
Called when a row has been removed from the table.protected void
onSelectionChanged(GEvent event)
Method called when the selection of the component changed due to a property change (value changed, property added or removed).void
onSelectionChanged(VSColumnHeader column, VSRow row, int rowIndex, boolean isSelected)
Called when the row selection is changed to forward to column listeners.void
onSingleSelectionChanged(VSColumnHeader column, int rowIndex)
Called when the row selection in table single-selection mode is changed to forward to column listeners.void
onStateChanged(VSColumnHeader column, IVSComponentState.State state, boolean on)
Called when the column changes state.void
onStateChanged(VSColumnHeader column, VSField cell, IVSComponentState.State state, boolean on)
Called when a cell in the column changes state.void
onValueChanged(VSField field, Value value, GProp<?> trigger, IPostEventProcessing postProcessing)
Called when the field value is set.int
setComponentToVSField()
Sets the text or value from this text or value component to its VirtualSpace Field, if any.java.lang.String
setSelection(int index)
Sets the selection as a single selected item at specified index.protected boolean
shouldCreateProps(org.w3c.dom.Element element)
Checks if a child Element should be created as properties or if it should be skipped.protected void
updateContents(int flags)
Called to update the contents if required with new data.Methods inherited from class com.iizix.prop.ui.UIComp
add, addMappings, assignFontInfoResolver, canAcceptUIContainerFocus, canAlignX, canAlignY, canFillX, canFillY, canRequestFocus, canRequestFocus, clearErrorMessage, couldRequestFocusIfVirtualized, createStyles, createTitleProp, disconnectVSField, enterVSProcessing, exitVSProcessing, fireSelection, fireSelection, forbiddenGetCustomDataMap, getBadge, getBestVSFieldValueType, getComponentID, getComponentMappings, getErrorMessage, getErrorMessage, getErrorMessageEx, getErrorMessageString, getErrorMessageString, getErrorMessageStringEx, getFirstContainerVSStateFocus, getFixHeight, getFixWidth, getFontInfo, getForcedAlignX, getForcedAlignY, getKStringText, getLayout, getLayoutMgr, getLayoutMgr, getMappedVSComponent, getMessage, getMessageText, getPixelHeight, getPixelWidth, 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, isEnabled, isMobile, isReadOnly, isRTL, isVisible, isVSFieldDisconnected, mustHaveExplicitHeight, mustHaveExplicitWidth, mustHaveHeight, mustHaveWidth, onBroken, onComponentSelectedInParent, onFocusGained, onNotifySelectionChanged, onParentStateChanged, onPrepare, onPropDispose, onRemoteEvent, onResolved, onStateChanged, onVirtualizationCompleted, processVSComponentSelection, reconnectVSField, requestFocus, requestFocus, requestFocus, requestFocus, requestFocusEx, requestFocusEx, requestFocusEx, requestFocusEx, resetComponentID, setBadge, setBadge, 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, verifyComponentScope
Methods inherited from class com.iizix.prop.PropCnr
__transferChildProps, addProp, addProp, addProp2, addProp2, appendPropValue, completeVirtualize, containsProp, containsProp, convertLoadedProp, createCopyOfAtom, createUniqueAtom, createUniqueAtom, createUniqueAtom, createVSReference, doPropEqualsArrayValues, doVirtualizePropCnr, 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, getReferences, getRetargetedVerifyContainer, getString, getString, getString, getString, getValueClasses, getVSReference, hasSendData, initializeElement, initializeExtendsFramework, initializeProp, initializeValue, initPropCnr, insertProp, insertProp2, isChild, isExtendsOverriden, isExtendsPropertyValid, isExtendsRoot, isPropAddRemoveAllowed, isPropCommunicating, isPropExtended, isSibling, list, list, logPropNotFound, maybeAddProp, onInsertProp, onPropRemoved, onPropTreeInitialized, onReferenceEvent, 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, shouldSerializeToXML, toElementString, toNativeValue0, usePropHashMap, usesPropIndex, validateChildPropInValue, validateClassInstances, validatePropType, validatePropValue, verifyInternalUseOnly, verifyTree, virtualize
Methods inherited from class com.iizix.prop.GProp
addPropError, addPropListener, convertPropError, dispose, equals, equals, equalsErrors, equalsObj, equalsPropValue, equalValues, extendsClone, 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, getRelativePropName, getRootFromName, getRootName, getRootParent, getRootParent, getTreeLock, hasChanged, 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, isPropUSER, isPropValueTreeLockNeeded, isPropVirtualized, isPropVirtualizing, isPropVolatile, isPropVolatileOrEditorOnly, isProxied, list, list, list, mapAliasToReference, mapAliasToReference, mapReferenceToAlias, mapReferenceToAlias, mapReferenceToProjectRelative, modifyPropValue, moveProp, moveProp, moveProp, onEvent, onPropInvalidateCache, onPropParentChanged, onPropValueSet, onVirtualized, 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, verifyHasPropertyItem, warning, warning, warning
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.iizix.prop.ICodeItemArrayContainer
addItem, addItem, addItem, addItems, addItems, getItem, getItemCount, getItemIndex, getItemKString, getItems, getItemString, insertItem, insertItem, insertItem, removeAllItems, removeAllItems, removeItem, removeItem, setItem, setItem, setItem, sortItems, sortItems, sortItems, sortItems
Methods inherited from interface com.iizix.prop.ICodeItemsOwnerSelectionSupport
getSelectionSupport
Methods 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, setVisible
Methods inherited from interface com.iizix.prop.ICustomDataProvider
forbiddenGetCustomDataMap, getCustomData, putCustomData, putCustomDataIfAbsent
Methods inherited from interface com.iizix.gyro.IFocusComp
requestFocus, requestFocus, requestFocusEx, requestFocusEx
Methods 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, getReferences, getRelativePropName, getRootParent, getTreeLock, getValueClasses, getVSReference, hasChanged, 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, list, list, list, list, list, mapAliasToReference, mapReferenceToAlias, mapReferenceToProjectRelative, moveProp, moveProp, moveProp, onEvent, 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, verifyHasPropertyItem, warning, warning, warning
Methods inherited from interface com.iizix.prop.IKStringArrayContainer
addItems, getItemsAsKStrings, removeItem
Methods inherited from interface com.iizix.gyro.IMessageBox
messageBox, messageBox
Methods 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, isSibling, 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, validateClassInstances
Methods inherited from interface com.iizix.prop.IStringArrayContainer
addItems, getItemsAsStrings, removeItem
Methods inherited from interface com.iizix.prop.ui.IUIComp
canAcceptUIContainerFocus, disconnectVSField, getComponentID, getComponentMappings, getContainerFirstUIComponent, getContainerFirstUIComponentNull, getErrorMessage, getErrorMessage, getFirstUIComponent, getFirstUIComponentNull, getFixHeight, getFixWidth, getLayout, getLayoutMgr, getPanelUIComponent, getPanelUIComponentNull, getUIRef, getValue, getValue, getVirtualSpace, getVSField, isMobile, isRTL, isVSFieldDisconnected, reconnectVSField, setErrorMessage, setErrorMessage, setUIContainerFocus, setVSFieldMessageToComponent, setVSFieldToComponent
Methods inherited from interface com.iizix.prop.ui.IUIContextMenuOwner
getContainedContextMenu, getContextMenu, getReferencedContextMenu, isContextMenuSupported, onBroken, onResolved
Methods inherited from interface com.iizix.prop.ui.IUIFocusComp
onFocusGained, onFocusLost
Methods inherited from interface com.iizix.prop.ui.IUIHint
getHintKString, getHintString, setHint, setHint
Methods inherited from interface com.iizix.prop.ui.selection.IUIIndexedSelectionComp
isSelectionIndexBased, setSelection, setSelection, setSelection, setSelection, setSelection
Methods inherited from interface com.iizix.prop.ui.text.IUIPlainTextComponent
createTextProp
Methods inherited from interface com.iizix.prop.ui.selection.IUISelectionComp
addSelectionListener, isSelectionBooleanBased, isSelectionCellBased, isSelectionTriStateBased, removeSelectionListener, setSelection
Methods inherited from interface com.iizix.prop.ui.selection.IUISingleIndexedSelectionComp
getFirstSelectedIndex, getSelectedIndicies, setSelection
Methods inherited from interface com.iizix.prop.vs.IVSComponentListener
onParentStateChanged
Methods inherited from interface com.iizix.prop.vs.IVSFieldListener
getBestVSFieldValueType, onBroken, onResolved, onStateChanged
Field Detail
SELECTED_ROW_ATOM
protected static final Atom SELECTED_ROW_ATOM
The property name: selected row.
PN_ITEMS_CNR
protected static final java.lang.String PN_ITEMS_CNR
The items container property name = "items".- See Also:
- Constant Field Values
ATOM_ITEMS_CNR
protected static final Atom ATOM_ITEMS_CNR
The items container property atom.
Constructor Detail
UIAbstractListChoice
public UIAbstractListChoice()
Creates the component without a name. The name must be set in all cases using thesetPropertyAtom
call.
UIAbstractListChoice
public UIAbstractListChoice(Atom propertyAtom)
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.
Method Detail
clone
public UIAbstractListChoice 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!
getCodeArrayArrayContainer
public ICodeItemArrayContainer getCodeArrayArrayContainer()
Gets the target implementor of the interface.- Specified by:
getCodeArrayArrayContainer
in interfaceICodeItemArrayContainer
- Returns:
- The target implements of the interface, null for none (this instance).
getStringArrayContainer
public IStringArrayContainer getStringArrayContainer()
Gets the target implementor of the interface.- Specified by:
getStringArrayContainer
in interfaceIStringArrayContainer
- Returns:
- The target implements of the interface, null for none (this instance).
getKStringArrayContainer
public IKStringArrayContainer getKStringArrayContainer()
Gets the target implementor of the interface.- Specified by:
getKStringArrayContainer
in interfaceIKStringArrayContainer
- Returns:
- The target implements of the interface, null for none (this instance).
isHTMLKStringSupported
public boolean isHTMLKStringSupported()
Checks if KString's of HTML type are supported.- Specified by:
isHTMLKStringSupported
in interfaceIKStringArrayContainer
- Returns:
- true for HTML support, false if it must be plain KString's.
getSelectionPropAtom
public Atom getSelectionPropAtom()
Returns the selection property atom for verification of selection changes.This method is used by the framework in UIComp to fire selection events when the property value changes.
- Specified by:
getSelectionPropAtom
in interfaceIUISelectionComp
- Returns:
- The atom of the selection property.
getSelectionListenerHandler
public GenericListener<IUISelectionListener> getSelectionListenerHandler(boolean doCreate)
Returns the generic selection listener.- Specified by:
getSelectionListenerHandler
in 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:
getDeviceType
in interfaceIUIComp
isMobileContextMenuSupported
public boolean isMobileContextMenuSupported()
Returns if the component can show the context menu in mobile mode.- Specified by:
isMobileContextMenuSupported
in interfaceIUIContextMenuOwner
- Returns:
- Combobox component supports context menus for mobile.
shouldCreateProps
protected boolean shouldCreateProps(org.w3c.dom.Element element)
Checks if a child Element should be created as properties or if it should be skipped. Override this method (and callsuper.shouldCreateProps(element)
) if the container creates other child elements.- Overrides:
shouldCreateProps
in classPropCnr
- Parameters:
element
- The element in question.- Returns:
- true to create properties out of it, false to ignore the element.
addPredefinedProps
protected void addPredefinedProps() throws PropException
Adds the predefined properties for this container. This method is called once just after construction of the property container and sometimes population of it.The method should add properties to create or get reference to using the
maybeAddProp
method. When the PropCnr instance is cloned, the methodgetPredefinedProps()
is called in order for the subclass to be able to retrieve the new instances to these properties, if stored in instance variables.- Overrides:
addPredefinedProps
in classPropCnr
- Throws:
PropException
- for property exceptions.
getPredefinedProps
public void getPredefinedProps()
Gets potential references to predefined properties for this container. This method is called once just after cloning of the property container.The method should get reference to using the
getProp(...)
methods. This allows the subclass to be able to retrieve the new instances to the properties created duringaddPredefinedProps()
if stored in instance variables.Subclasses must override this method to do the appropriate initialization, as this method does nothing for the PropCnr class implementation.
- Overrides:
getPredefinedProps
in classUIComp
onEventSelf
public void onEventSelf(GEvent event)
Updates a VirtualSpace Field when a component text changes.- Specified by:
onEventSelf
in interfaceIGProp<GProp<?>[]>
- Overrides:
onEventSelf
in classUIComp
- Parameters:
event
- The property event.
onSelectionChanged
protected void onSelectionChanged(GEvent event)
Method called when the selection of the component changed due to a property change (value changed, property added or removed).- Overrides:
onSelectionChanged
in classUIComp
- Parameters:
event
- The event that causes the selection change.
setComponentToVSField
public int setComponentToVSField()
Sets the text or value from this text or value component to its VirtualSpace Field, if any.- Specified by:
setComponentToVSField
in interfaceIUIComp
- Overrides:
setComponentToVSField
in classUIComp
- Returns:
- 1 for update completed, 0 for nothing done and -1 for error occurred.
isVSTableSelectionSynchronized
public boolean isVSTableSelectionSynchronized()
Returns whether the VSTable selection processing is enabled or not.- Returns:
- true when combobox selection should be synchronized with the VSTable.
isVSFieldSelectionIndex
public boolean isVSFieldSelectionIndex()
Returns if the VS field is used for the selection index or the text of the combobox entry field.- Returns:
- true if VSField is selection index, false if it's the combobox text.
onValueChanged
public void onValueChanged(VSField field, Value value, GProp<?> trigger, IPostEventProcessing postProcessing)
Called when the field value is set.Components must override to provide the implementation when they are not implementing IPlainTextComponent, in this case the default implementation transports the field string value to this text components plain text.
- Specified by:
onValueChanged
in interfaceIVSFieldListener
- Overrides:
onValueChanged
in 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.
isSelected
public boolean isSelected()
Returns the selection of state of the component.For a multiple-selection capable component, this indicates any selection, i.e. true is returned as soon as at least one element is selected, false for none.
The checkbox for example has two "selected states": checked and third state: in this case, true is returned for the third state as well as the checked state.
- Specified by:
isSelected
in interfaceIUISelectionComp
- Returns:
- true if the component is selected, false otherwise.
getSelectedIndex
public int getSelectedIndex()
Gets the first selected index.- Specified by:
getSelectedIndex
in interfaceICodeItemsOwnerSelectionSupport
- Specified by:
getSelectedIndex
in interfaceIUISingleIndexedSelectionComp
- Returns:
- The first index in the current selection, or -1 for none.
getSelectionType
public int getSelectionType()
Gets the selection type of the component.- Specified by:
getSelectionType
in interfaceIUISelectionComp
- Returns:
- A value indicating the selection capability as the SELECTION_TYPE_* values define.
getSelection
public IUISelection getSelection()
Gets the current selection of the component.- Specified by:
getSelection
in interfaceIUISelectionComp
- Returns:
- The current selection of the component.
setSelection
public java.lang.String setSelection(int index)
Sets the selection as a single selected item at specified index.- Specified by:
setSelection
in interfaceICodeItemsOwnerSelectionSupport
- Specified by:
setSelection
in interfaceIUIIndexedSelectionComp
- Parameters:
index
- The single item to select at index, negative value to clear the selection.- Returns:
- null for success, otherwise an error message why the selection failed.
clearSelection
public java.lang.String clearSelection()
Clear the selection.- Specified by:
clearSelection
in interfaceICodeItemsOwnerSelectionSupport
- Specified by:
clearSelection
in interfaceIUIIndexedSelectionComp
- Returns:
- null for OK.
onPrepare
protected void onPrepare(ClassReference cr, java.util.List<java.lang.Throwable> errors)
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
public java.lang.reflect.Method 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:
getOnUISelectionMethod
in interfaceIUISelectionComp
- Returns:
- The method, or null if none is registered.
isHTMLItemSupportEnabled
public boolean isHTMLItemSupportEnabled()
Returns if list data items support HTML or not.- Returns:
- true if items are as HTML KStrings are allowed or not.
getListDataColumn
public VSColumnHeader getListDataColumn()
Gets the VS column for the list data.- Returns:
- The instance of the VS Column used for the list data, or null for none.
getTranslationColumn
public VSColumnHeader getTranslationColumn()
Gets the VS column for the translation list.- Returns:
- The instance of the VS Column used for translation, or null for none.
onResolved
public void onResolved(VSRelativeReference<?> reference, VSColumnHeader column)
Called when the property reference has been resolved. UI components use this method to set its state according to the field. The contents of the list data is refreshed at a later stage.- Specified by:
onResolved
in interfaceIVSColumnListener
- Parameters:
reference
- The VSRelativeReference instance holding the reference.column
- The target reference.
onBroken
public void onBroken(VSRelativeReference<?> reference, VSColumnHeader column)
Called when the property reference has been broken, i.e. unresolved.- Specified by:
onBroken
in interfaceIVSColumnListener
- Parameters:
reference
- The VSRelativeReference instance holding the reference.column
- The target reference.
getBestVSColumnHeaderValueType
public Value.Type getBestVSColumnHeaderValueType(VSRelativeReference<?> reference)
Requests the value type that would best suit the listener.- Specified by:
getBestVSColumnHeaderValueType
in interfaceIVSColumnBestValueListener
- Parameters:
reference
- The VSRelativeReference instance holding the reference.- Returns:
- Type.String is the best representation of the column data for a combobox.
onStateChanged
public void onStateChanged(VSColumnHeader column, IVSComponentState.State state, boolean on)
Called when the column changes state.- Specified by:
onStateChanged
in interfaceIVSColumnListener
- Parameters:
column
- The VS table column.state
- The state change, possible values ENABLED, READONLY, VISIBLE or SELECTED.on
- New state.
onSingleSelectionChanged
public void onSingleSelectionChanged(VSColumnHeader column, int rowIndex)
Called when the row selection in table single-selection mode is changed to forward to column listeners.- Specified by:
onSingleSelectionChanged
in interfaceIVSColumnListener
- Parameters:
column
- The column.rowIndex
- The row index selected, -1 for none.
onSelectionChanged
public void onSelectionChanged(VSColumnHeader column, VSRow row, int rowIndex, boolean isSelected)
Called when the row selection is changed to forward to column listeners.- Specified by:
onSelectionChanged
in interfaceIVSColumnListener
- Parameters:
column
- The column.row
- The row that was changed.rowIndex
- The row index.isSelected
- The selected state.
onRowAdded
public void onRowAdded(VSColumnHeader column, VSRow row, int rowIndex)
Called when a row has been added to the table.- Specified by:
onRowAdded
in interfaceIVSColumnListener
- Parameters:
column
- The column.row
- The row that was added.rowIndex
- The row index where it was inserted.
onRowRemoved
public void onRowRemoved(VSColumnHeader column, VSRow row, int rowIndex)
Called when a row has been removed from the table.- Specified by:
onRowRemoved
in interfaceIVSColumnListener
- Parameters:
column
- The column.row
- The row that was removed.rowIndex
- The row index before removal.
onStateChanged
public void onStateChanged(VSColumnHeader column, VSField cell, IVSComponentState.State state, boolean on)
Called when a cell in the column changes state.- Specified by:
onStateChanged
in interfaceIVSColumnListener
- Parameters:
column
- The VS column.cell
- The VS field.state
- The state change.on
- New state.
onCellValueChanged
public void onCellValueChanged(VSColumnHeader column, VSField cell, Value value, GProp<?> trigger, IPostEventProcessing postProcessing)
Called when the cell value is set in the column.- Specified by:
onCellValueChanged
in interfaceIVSColumnListener
- Parameters:
column
- The VS column.cell
- 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.
updateContents
protected void updateContents(int flags)
Called to update the contents if required with new data. The method does nothing if e.g. a call torefresh(int)
hasn't been called.
getVisualLength
public int getVisualLength()
Returns the visual length of the entry field.- Returns:
- The visual length or 15 by default.
getApproximateSize
public Size 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:
getApproximateSize
in classUIComp
- Returns:
- The size of the component: 16x16.