public class UISwapContainer extends UIContainer implements IUIAnimatedSingleIndexedSelectionComp, IUIGroupSeparator
IMessageBox.Icon
IVSComponentState.State
Modifier and Type | Field and Description |
---|---|
protected static Atom |
OPEN_VIEW_ATOM
Property atom: current open view.
|
protected static String |
PN_OPEN_VIEW
Property name: current open view.
|
static String |
TRANSITION_DIR_PROP_NAME
The transition property name.
|
static String |
TRANSITION_TYPE_PROP_NAME
The transition type property name.
|
UICOMP_CLASS, VS_STATE_FOCUS_PROP_NAME
EMPTY, REMOTE_FOCUS_EVENT, styles, vsField
EMPTY_CLASSES, EMPTY_CNRS, EXTENDS_FRAMEWORK_ERROR_ID
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
SELECTION_TYPE_MULTIPLE, SELECTION_TYPE_NONE, SELECTION_TYPE_SINGLE
ERROR, INFORMATION, NONE, REMOTE_FOCUS_EVENT, WARNING
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
ICON_ERROR, ICON_INFORMATION, ICON_MAP, ICON_NONE, ICON_QUESTION, ICON_WARNING
Constructor and Description |
---|
UISwapContainer()
Creates 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.
|
Modifier and Type | Method and Description |
---|---|
boolean |
canAlignX()
Returns if the component can be aligned left, right, center, or horizontal fill.
|
boolean |
canAlignY()
Returns if the component can be aligned top, bottom, middle or vertical fill.
|
String |
clearSelection()
Clear the selection.
|
UISwapContainer |
clone()
Creates a clone out of this property.
|
int |
getDeviceType()
Gets the device type: -1=mobile, 0=both, 1=desktop.
|
int |
getGroupID(GroupNameProp groupName)
Gets the unique ID for a group name.
|
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.
|
AnimatedSingleIndexSelection |
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.
|
int |
getTransitionDir()
Gets the transition direction.
|
Transition |
getTransitionType()
Gets the transition type currently used.
|
boolean |
hasImplicitAlignFillX()
Returns if the component has implicit component horizontal fill.
|
boolean |
hasImplicitAlignFillY()
Returns if the component has implicit component vertical fill.
|
boolean |
isAnimated()
Returns the animation flag.
|
boolean |
isContextMenuSupported()
Returns if the context menu is supported for this component or not.
|
boolean |
isSelected()
Returns the selection of state of the component.
|
boolean |
mustHaveExplicitHeight()
Does this component require an explicitly defined height?
|
boolean |
mustHaveExplicitWidth()
Does this component require an explicitly defined width?
|
boolean |
mustHaveHeight()
Does this component require a height?
|
boolean |
mustHaveWidth()
Does this component require a width?
|
void |
onEventSelf(GEvent event)
Event checking to update the VSField from selection index or combobox text.
|
protected void |
onPrepare(ClassReference cr,
List<Throwable> errors)
Called to resolve methods for the component from main "onPrepare" once the ClassReference has been found.
|
String |
setSelection(int index,
boolean isAnimated)
Sets the selection as a single selected item at specified index.
|
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.
|
boolean |
setTransition(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.
|
String |
setUIContainerFocus(UIComp requestor,
boolean doAnimate)
Sets the focus to the UI container and all its parents.
|
addPredefinedProps, addPredefinedPropsImpl, canAcceptUIContainerFocus, createCompsCnr, getApproximateSize, getComponentCount, getComponents, getCompsCnr, getFirstContainerVSStateFocus, getFirstUIComponent, getFirstUIComponentNull, getRadioSelectionComponents, getSelectedRadioComponent, getUIComponent, getUIComponentNull, getVSStateFocus, isEmptyContainerAllowed, isMobileContextMenuSupported, onBroken, onComponentSelectedInParent, onResolved, onSelectionChanged, onSelectionChanged, onStateChanged, onVSComponentSelectionChanged, setRadioSelectionComponent, updateUICompsReference, verify, verifyComponentScope
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, isEnabled, isMobile, isReadOnly, isRTL, isVisible, isVSFieldDisconnected, onBroken, onFocusGained, onNotifySelectionChanged, onParentStateChanged, onPrepare, onPropDispose, onRemoteEvent, onResolved, onStateChanged, onValueChanged, onVirtualizationCompleted, 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, setVSFieldToComponent
__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, getPropBaseReference, getPropCnr, 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, removeProp, removeProp, removeProp, removeProp, removeProp, removeProp, removeProp, 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, toElementString, toNativeValue0, usePropHashMap, usesPropIndex, validateChildPropInValue, validateClassInstances, validatePropType, validatePropValue, verifyInternalUseOnly, verifyTree, virtualize
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, 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
getClass, hashCode, notify, notifyAll, wait, wait, wait
setSelection
getFirstSelectedIndex, getSelectedIndicies, setSelection
isSelectionIndexBased, setSelection, setSelection, setSelection, setSelection, setSelection
addSelectionListener, isSelectionBooleanBased, isSelectionCellBased, isSelectionTriStateBased, removeSelectionListener, setSelection
canAcceptUIContainerFocus, disconnectVSField, getComponentID, getComponentMappings, getErrorMessage, getErrorMessage, getFirstUIComponent, getFirstUIComponentNull, getFixHeight, getFixWidth, getLayout, getLayoutMgr, getPanelUIComponent, getPanelUIComponentNull, getUIRef, getValue, getValue, getVirtualSpace, getVSField, isMobile, isRTL, isVSFieldDisconnected, reconnectVSField, setComponentToVSField, setErrorMessage, setErrorMessage, setVSFieldMessageToComponent, setVSFieldToComponent
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
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, 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, removeProp, removeProp, removeProp, removeProp, removeProp, removeProp, removeProp, 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
addPropError, addPropListener, dispose, equals, fine, fine, finer, finer, finest, finest, fromElementString, getAppSessionGyro, getAtomPath, getClientSessionGyro, getConstraints, getEnvironment, getErroredPropItems, getErroredProps, getErrorsProp, getExtendsRootContainer, getFullPropName, getFullPropNameDebug, 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
messageBox, messageBox
getBestVSFieldValueType, onBroken, onResolved, onStateChanged, onValueChanged
onParentStateChanged
forbiddenGetCustomDataMap, getCustomData, putCustomData, putCustomDataIfAbsent
getRadioSelectionComponents, setRadioSelectionComponent, setRadioSelectionComponent
onFocusGained, onFocusLost
requestFocus, requestFocus, requestFocusEx, requestFocusEx
getContainedContextMenu, getContextMenu, getReferencedContextMenu, onBroken, onResolved
protected static final String PN_OPEN_VIEW
protected static final Atom OPEN_VIEW_ATOM
public static final String TRANSITION_TYPE_PROP_NAME
public static final String TRANSITION_DIR_PROP_NAME
public UISwapContainer()
public UISwapContainer(Atom propertyAtom)
propertyAtom
- the property atom.public UISwapContainer(Atom propertyAtom, GProp<?>[] properties) throws PropException
propertyAtom
- the property atom.properties
- the property array value for the container.PropException
- when properties are not correctly defined.public void getPredefinedProps()
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
during addPredefinedProps()
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.
getPredefinedProps
in class UIContainer
public UISwapContainer clone()
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!
clone
in class UIContainer
public boolean mustHaveWidth()
mustHaveWidth
in class UIContainer
public boolean mustHaveHeight()
mustHaveHeight
in class UIContainer
public boolean mustHaveExplicitWidth()
mustHaveExplicitWidth
in class UIComp
public boolean mustHaveExplicitHeight()
mustHaveExplicitHeight
in class UIComp
public boolean hasImplicitAlignFillX()
hasImplicitAlignFillX
in class UIContainer
public boolean hasImplicitAlignFillY()
hasImplicitAlignFillY
in class UIContainer
public boolean canAlignX()
public boolean canAlignY()
public Atom getSelectionPropAtom()
This method is used by the framework in UIComp to fire selection events when the property value changes.
getSelectionPropAtom
in interface IUISelectionComp
public GenericListener<IUISelectionListener> getSelectionListenerHandler(boolean doCreate)
getSelectionListenerHandler
in interface IUISelectionComp
doCreate
- Create the listener handler if it doesn't exist, false not to.public void onEventSelf(GEvent event)
onEventSelf
in interface IGProp<GProp<?>[]>
onEventSelf
in class UIComp
event
- The property event.public final int getDeviceType()
getDeviceType
in interface IUIComp
getDeviceType
in class UIContainer
public boolean isContextMenuSupported()
isContextMenuSupported
in interface IUIContextMenuOwner
public int getGroupID(GroupNameProp groupName)
getGroupID
in interface IUIGroupSeparator
groupName
- The group name.
Return The unique for the group name.public int getSelectionType()
getSelectionType
in interface IUISelectionComp
public int getSelectedIndex()
getSelectedIndex
in interface IUISingleIndexedSelectionComp
public boolean isAnimated()
isAnimated
in interface IUIAnimatedSingleIndexedSelectionComp
public String setSelection(int index, boolean isAnimated)
setSelection
in interface IUIAnimatedSingleIndexedSelectionComp
index
- The single item to select at index, -1 to clear the selection.isAnimated
- The animation flag.public boolean isSelected()
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.
isSelected
in interface IUISelectionComp
public String clearSelection()
clearSelection
in interface IUIIndexedSelectionComp
public AnimatedSingleIndexSelection getSelection()
getSelection
in interface IUISelectionComp
public boolean setTransition(Transition type)
Default type is SLIDE.
type
- The transition type.public boolean setTransition(int dir)
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.IllegalArgumentException
- If dir
is not -1, 0 or 1.public Transition getTransitionType()
The default transition is SLIDE.
public int getTransitionDir()
public String setUIContainerFocus(UIComp requestor, boolean doAnimate)
Subclasses must override this method to process it, but make sure to call
super.setUIContainerFocus(requestor)
first!
setUIContainerFocus
in interface IUIComp
setUIContainerFocus
in class UIContainer
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.protected void onPrepare(ClassReference cr, List<Throwable> errors)
Components should override this method to load it's required methods.
public Method getOnUISelectionMethod()
@OnUISelection(name = "some/property")
public void onUISelection(UISelectionEvent event)
getOnUISelectionMethod
in interface IUISelectionComp
iizi® is a registered trademark of Mindus SARL. © Copyright Mindus SARL, 2020. All rights reserved.