Class UISwapContainer
- All Implemented Interfaces:
EventListener,IFocusComp,IMessageBox,IComponent,ICustomDataProvider,IGProp<GProp<?>[]>,IPropCnr,IUIComp,IUIContainer,IUIContextMenuOwner,IUIFocusComp,IUIGroupSeparator,IUIAnimatedSingleIndexedSelectionComp,IUIIndexedSelectionComp,IUISelectionComp,IUISingleIndexedSelectionComp,IVSComponentListener,IVSComponentState,IVSFieldListener,IVSGenericComponentListener,Cloneable
- Direct Known Subclasses:
EUISwapContainer
- 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
FieldsModifier and TypeFieldDescriptionprotected static final AtomProperty atom: current open view.protected static final StringProperty name: current open view.static final StringThe transition property name.static final StringThe transition type property name.Fields inherited from class com.iizix.prop.ui.UIContainer
UICOMP_CLASS, VS_STATE_FOCUS_PROP_NAME, WARN_EMPTY_PROP_NAMEFields 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_ID, nameTableFields 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_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.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 container without name with a null value.UISwapContainer(Atom propertyAtom) Creates the container with the specified name with a null value.UISwapContainer(Atom propertyAtom, GProp<?>[] properties) Creates a swap container with the specified name and properties.Method Summary
Modifier and TypeMethodDescriptionbooleanReturns if the component can be aligned left, right, center, or horizontal fill.booleanReturns if the component can be aligned top, bottom, middle or vertical fill.Clear the selection.clone()Creates a clone out of this property.final intGets the device type: -1=mobile, 0=both, 1=desktop.intgetGroupID(GroupNameProp groupName) Gets the unique ID for a group name.Returns the method to use for onUISelection notifications that is attached to this selection component.voidGets potential references to predefined properties for this container.intGets the first selected index.Gets the current selection of the component.getSelectionListenerHandler(boolean doCreate) Returns the generic selection listener.Returns the selection property atom for verification of selection changes.intGets the selection type of the component.intGets the transition direction.Gets the transition type currently used.booleanReturns if the component has implicit component horizontal fill.booleanReturns if the component has implicit component vertical fill.booleanReturns the animation flag.booleanReturns if the context menu is supported for this component or not.booleanReturns the selection of state of the component.booleanDoes this component require an explicitly defined height?booleanDoes this component require an explicitly defined width?booleanDoes this component require a height?booleanDoes this component require a width?voidonEventSelf(GEvent event) Event checking to update the VSField from selection index or combobox text.protected voidonPrepare(ClassReference cr, List<Throwable> errors) Called to resolve methods for the component from main "onPrepare" once the ClassReference has been found.setSelection(int index, boolean isAnimated) Sets the selection as a single selected item at specified index.booleansetTransition(int dir) Sets the animation transition direction to use from now on when a view is changed or swapped programmatically or through a focus change.booleansetTransition(Transition type) Sets the animation transition type to use from now on when a view is changed or swapped programmatically or through a focus change.setUIContainerFocus(UIComp requestor, boolean doAnimate) Sets the focus to the UI container and all its parents.Methods inherited from class com.iizix.prop.ui.UIContainer
addPredefinedProps, addPredefinedPropsImpl, canAcceptUIContainerFocus, createCompsCnr, doIssueEmptyContainerWarning, getApproximateSize, getComponentCount, getComponents, getCompsCnr, getFirstContainerVSStateFocus, getFirstUIComponent, getFirstUIComponentNull, getRadioSelectionComponents, getSelectedRadioComponent, getUIComponent, getUIComponentNull, getVSStateFocus, invokeOnUICreateTree, isEmptyContainerAllowed, isMobileContextMenuSupported, onBroken, onComponentSelectedInParent, onResolved, onSelectionChanged, onSelectionChanged, onStateChanged, onVirtualContainerCreated, onVSComponentSelectionChanged, resetComponentID, setRadioSelectionComponent, updateUICompsReference, verify, verifyComponentScopeMethods inherited from class com.iizix.prop.ui.UIComp
add, addMappings, assignFontInfoResolver, canFillX, canFillY, canRequestFocus, canRequestFocus, clearErrorMessage, couldRequestFocusIfVirtualized, createStyles, createTitleProp, disconnectVSField, enterVSProcessing, exitVSProcessing, fireSelection, fireSelection, forbiddenGetCustomDataMap, getBadge, getBestVSFieldValueType, getComponentID, getComponentMappings, getErrorMessage, getErrorMessage, getErrorMessageEx, getErrorMessageString, getErrorMessageString, getErrorMessageStringEx, 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, hasExplicitHeight, hasExplicitWidth, hasFocus, hasImplicitHeight, hasImplicitWidth, hasSelectionChanged, initPropCnr, isEnabled, isMobile, isReadOnly, isRTL, isVisible, isVSFieldDisconnected, onBroken, onFocusGained, onNotifySelectionChanged, onParentStateChanged, onPrepare, onPropDispose, onRemoteEvent, onResolved, onStateChanged, onValueChanged, processVSComponentSelection, reconnectVSField, requestFocus, requestFocus, requestFocus, requestFocus, requestFocusEx, requestFocusEx, requestFocusEx, requestFocusEx, setBadge, setBadge, setComponentToVSField, setEnabled, setEnabled, setErrorMessage, setErrorMessage, setErrorMessage, setErrorMessage, setHTMLText, setLayoutMgr, setMessage, setMessage, setReadOnly, setReadOnly, setText, setText, setTitle, setTitle, setTitle, setTooltip, setTooltip, setVisible, setVisible, setVSFieldMessageToComponent, setVSFieldToComponentMethods inherited from class com.iizix.prop.PropCnr
__transferChildProps, 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, isSibling, list, list, logPropNotFound, maybeAddProp, onInsertProp, onPropRemoved, onPropTreeInitialized, onReferenceEvent, 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, 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, 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, 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, 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, warning, warning, warningMethods inherited from interface com.iizix.gyro.IMessageBox
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, 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, validateClassInstancesMethods inherited from interface com.iizix.prop.ui.selection.IUIAnimatedSingleIndexedSelectionComp
setSelectionMethods 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, setComponentToVSField, setErrorMessage, setErrorMessage, setVSFieldMessageToComponent, setVSFieldToComponentMethods inherited from interface com.iizix.prop.ui.IUIContextMenuOwner
getContainedContextMenu, getContextMenu, getReferencedContextMenu, onBroken, onResolvedMethods inherited from interface com.iizix.prop.ui.IUIFocusComp
onFocusGained, onFocusLostMethods inherited from interface com.iizix.prop.ui.IUIGroupSeparator
getRadioSelectionComponents, setRadioSelectionComponent, setRadioSelectionComponentMethods inherited from interface com.iizix.prop.ui.selection.IUIIndexedSelectionComp
isSelectionIndexBased, setSelection, setSelection, setSelection, setSelection, setSelectionMethods inherited from interface com.iizix.prop.ui.selection.IUISelectionComp
addSelectionListener, isSelectionBooleanBased, isSelectionCellBased, isSelectionTriStateBased, removeSelectionListener, setSelectionMethods inherited from interface com.iizix.prop.ui.selection.IUISingleIndexedSelectionComp
getFirstSelectedIndex, getSelectedIndicies, setSelectionMethods inherited from interface com.iizix.prop.vs.IVSComponentListener
onParentStateChangedMethods inherited from interface com.iizix.prop.vs.IVSFieldListener
getBestVSFieldValueType, onBroken, onResolved, onStateChanged, onValueChanged
Field Details
PN_OPEN_VIEW
Property name: current open view.- See Also:
OPEN_VIEW_ATOM
Property atom: current open view.TRANSITION_TYPE_PROP_NAME
The transition type property name.- See Also:
TRANSITION_DIR_PROP_NAME
The transition property name.- See Also:
Constructor Details
UISwapContainer
public UISwapContainer()Creates the container without name with a null value.UISwapContainer
Creates the container with the specified name with a null value.- Parameters:
propertyAtom- the property atom.
UISwapContainer
Creates a swap container with the specified name and properties.- Parameters:
propertyAtom- the property atom.properties- the property array value for the container.- Throws:
PropException- when properties are not correctly defined.
Method Details
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:
getPredefinedPropsin classUIContainer
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!
- Overrides:
clonein classUIContainer
mustHaveWidth
public boolean mustHaveWidth()Does this component require a width?- Overrides:
mustHaveWidthin classUIContainer- Returns:
- true if the width must be defined and non-zero, false otherwise.
mustHaveHeight
public boolean mustHaveHeight()Does this component require a height?- Overrides:
mustHaveHeightin classUIContainer- Returns:
- true if the height must be defined and non-zero, false otherwise.
mustHaveExplicitWidth
public boolean mustHaveExplicitWidth()Does this component require an explicitly defined width?- Overrides:
mustHaveExplicitWidthin classUIComp- Returns:
- true if the width must be defined and non-zero, false otherwise.
mustHaveExplicitHeight
public boolean mustHaveExplicitHeight()Does this component require an explicitly defined height?- Overrides:
mustHaveExplicitHeightin classUIComp- Returns:
- true if the height must be defined and non-zero, false otherwise.
hasImplicitAlignFillX
public boolean hasImplicitAlignFillX()Returns if the component has implicit component horizontal fill.- Overrides:
hasImplicitAlignFillXin classUIContainer- Returns:
- Always true: true means component will always fill the space in X.
hasImplicitAlignFillY
public boolean hasImplicitAlignFillY()Returns if the component has implicit component vertical fill.- Overrides:
hasImplicitAlignFillYin classUIContainer- Returns:
- Always: true means component will always fill the space in Y.
canAlignX
public boolean canAlignX()Returns if the component can be aligned left, right, center, or horizontal fill.canAlignY
public boolean canAlignY()Returns if the component can be aligned top, bottom, middle or vertical fill.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:
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.
onEventSelf
Event checking to update the VSField from selection index or combobox text.- Specified by:
onEventSelfin interfaceIGProp<GProp<?>[]>- Overrides:
onEventSelfin classUIComp- Parameters:
event- The property event.
getDeviceType
public final int getDeviceType()Gets the device type: -1=mobile, 0=both, 1=desktop.- Specified by:
getDeviceTypein interfaceIUIComp- Overrides:
getDeviceTypein classUIContainer
isContextMenuSupported
public boolean isContextMenuSupported()Returns if the context menu is supported for this component or not.- Specified by:
isContextMenuSupportedin interfaceIUIContextMenuOwner- Returns:
- false as the Swap Container does not support context menus.
getGroupID
Gets the unique ID for a group name.- Specified by:
getGroupIDin interfaceIUIGroupSeparator- Parameters:
groupName- The group name. Return The unique for the group name.
getSelectionType
public int getSelectionType()Gets the selection type of the component.- Specified by:
getSelectionTypein interfaceIUISelectionComp- Returns:
- A value indicating the selection capability as the SELECTION_TYPE_* values define.
getSelectedIndex
public int getSelectedIndex()Gets the first selected index.- Specified by:
getSelectedIndexin interfaceIUISingleIndexedSelectionComp- Returns:
- The first index in the current selection, or -1 for none.
isAnimated
public boolean isAnimated()Returns the animation flag.- Specified by:
isAnimatedin interfaceIUIAnimatedSingleIndexedSelectionComp- Returns:
- If the selection is done with animation or not.
setSelection
Sets the selection as a single selected item at specified index.- Specified by:
setSelectionin interfaceIUIAnimatedSingleIndexedSelectionComp- Parameters:
index- The single item to select at index, -1 to clear the selection.isAnimated- The animation flag.- Returns:
- null for success, otherwise an error message why the selection failed.
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:
isSelectedin interfaceIUISelectionComp- Returns:
- true if the component is selected, false otherwise.
clearSelection
Clear the selection.- Specified by:
clearSelectionin interfaceIUIIndexedSelectionComp- Returns:
- Always "Swap container cannot clear selection".
getSelection
Gets the current selection of the component.- Specified by:
getSelectionin interfaceIUISelectionComp- Returns:
- The current selection of the component.
setTransition
Sets the animation transition type to use from now on when a view is changed or swapped programmatically or through a focus change.Default type is SLIDE.
- Parameters:
type- The transition type.- Returns:
- true if animation type was changed, false for no change.
setTransition
public boolean setTransition(int dir) Sets the animation transition direction to use from now on when a view is changed or swapped programmatically or through a focus change.- Parameters:
dir- The transition direction. If 1, transition forward. If 0, automatic transition forward or backward depending on view ordering when switching, If -1, transition backward. For example, the slide transition slides the view from right to left when dir == 1, and from left to right when dir == -1.- Returns:
- true if animation direction was changed, false for no change.
- Throws:
IllegalArgumentException- Ifdiris not -1, 0 or 1.
getTransitionType
Gets the transition type currently used.The default transition is SLIDE.
- Returns:
- The Transition.
getTransitionDir
public int getTransitionDir()Gets the transition direction.- Returns:
- The transition direction: 1 = forward, 0 = automatic (default), -1 = backward.
setUIContainerFocus
Sets the focus to the UI container and all its parents. This method is called when focus is to be set to a component, making it possible for containers such as accordion/swap/tab to change its main container into view.Subclasses must override this method to process it, but make sure to call
super.setUIContainerFocus(requestor)first!- Specified by:
setUIContainerFocusin interfaceIUIComp- Overrides:
setUIContainerFocusin classUIContainer- Parameters:
requestor- The requestor is a child to this container.doAnimate- Flag to enable animation when selection is changed for e.g. accordion, swap or tab containers.- Returns:
- null for success, otherwise an error message why it failed.
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.