Interface IVSComponent
- All Superinterfaces:
ICustomDataProvider,IFocusComp,IGProp<GProp<?>[]>,IMessageBox,IPropCnr,IVSComponentListener,IVSComponentState
- All Known Subinterfaces:
IVSMessageComponent
- All Known Implementing Classes:
EditorVirtualSpace,EditorVSAction,EditorVSColumnHeader,EditorVSField,EditorVSGroup,EditorVSRow,EditorVSTable,VirtualSpace,VSAction,VSColumnHeader,VSComponent,VSField,VSGroup,VSRow,VSTable
- 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 TypeFieldDescriptionstatic final AtomThe property atom for ignore focus from UI = "$ignoreUIFocus".static final intMessage category: error (=2).static final intMessage category: information (=0).static final intMessage category: none (=-1).static final intMessage category: warning (=1).Fields inherited from interface com.iizix.prop.IGProp
EQC_ERROR_IGNORE_ALL, EQC_ERROR_IGNORE_REFERENCES, EQC_IGNORE_ARRAY, EQC_IGNORE_VOLATILE_OR_EDITOR, EQC_INCLUDE_PRIVATE, EQC_SAVE_FILE, EXT_CONTAINER_EXTENDS, EXT_CONTAINER_EXTENDS_VALID, EXT_EXTENDED, EXT_FINAL, EXT_OVERRIDES, EXT_OVERRIDES_FINAL_ERR, EXT_PRIVATEFields inherited from interface com.iizix.gyro.IMessageBox
ICON_ERROR, ICON_INFORMATION, ICON_MAP, ICON_NONE, ICON_QUESTION, ICON_WARNINGMethod Summary
Modifier and TypeMethodDescriptiondefault VSActionGets the action with the specified path.default VSActiongetAction2(@FullVSRef String fullVSRef) Gets the action with the specified full VS reference path.default VSActiongetActionNull(@VSRef String path) Gets the action with the specified path.default VSActiongetActionNull2(@FullVSRef String fullVSRef) Gets the action with the specified full VS reference path.default StringGets the description of the component.default VSFieldGets the field with the specified path.default VSFieldgetField2(@FullVSRef String fullVSRef) Gets the field with the specified full VS reference path.default VSFieldgetFieldNull(@VSRef String path) Gets the field with the specified path.default VSFieldgetFieldNull2(@FullVSRef String fullVSRef) Gets the field with the specified full VS reference path.default VSGroupGets the group with the specified path.default VSGroupgetGroup2(@FullVSRef String fullVSRef) Gets the group with the specified full VS reference path.default VSGroupgetGroupNull(@VSRef String path) Gets the group with the specified path.default VSGroupgetGroupNull2(@FullVSRef String fullVSRef) Gets the group with the specified full VS reference path.Gets the non-virtualized instance of this component, if it exists.default VSTableGets the table with the specified path.default VSTablegetTable2(@FullVSRef String fullVSRef) Gets the table with the specified full VS reference path.default VSTablegetTableNull(@VSRef String path) Gets the table with the specified path.default VSTablegetTableNull2(@FullVSRef String fullVSRef) Gets the table with the specified full VS reference path.default VirtualSpaceGets a virtualized VirtualSpace for the application session.Gets the VirtualSpace instance.default <COMP extends IVSComponent>
COMPgetVSComponent(@VSRef String path, Class<COMP> clazz) Gets the VS component with the specified path.default <COMP extends IVSComponent>
COMPgetVSComponent2(@FullVSRef String fullVSRef, Class<COMP> clazz) Gets the VS component with the specified full reference path.default <COMP extends IVSComponent>
COMPgetVSComponentNull(@VSRef String path, Class<COMP> clazz) Gets the VS component with the specified path.default <COMP extends IVSComponent>
COMPgetVSComponentNull2(@FullVSRef String fullVSRef, Class<COMP> clazz) Gets the VS component with the specified full reference path.getVSRef()Gets the components relative path to the name space.default booleanGets the enabled state of this component regardless of the parent(s) enabled state.default booleanGets the enabled state of this component inside its parent(s).default booleanGets the read-only state of this component regardless of the parent(s) read-only state.default booleanGets the enabled state of this component inside its parent(s).default booleanGets the selected state.default booleanGets the visibility state of this component regardless of the parent(s) visible state.default booleanGets the visibility state of this component inside its parent(s).default voidmessageBox(IMessageBoxReply reply, IMessageBox.Icon icon, KString title, KString message, KString... buttons) Displays a message box with the specified title and message.default booleansetEnabled(boolean on) Sets the enabled state.default booleansetEnabled(boolean on, IGProp<?> trigger) Sets the enabled state.default booleansetIgnoreFocusFromUI(boolean doIgnore) Sets the flag to ignore focus from the UI.default booleansetReadOnly(boolean on) Sets the read-only state.default booleansetReadOnly(boolean on, IGProp<?> trigger) Sets the read-only state.default booleansetSelected(boolean on) Sets the selected state.default booleansetSelected(boolean on, IGProp<?> trigger) Sets the selected state.default StringSets the focus to this VS component (if possible), regardless if the VS component is virtualized or not.default StringsetVirtualizeSupportFocus(IGProp<?> trigger) Sets the focus to this VS component (if possible), regardless if the VS component is virtualized or not.default booleansetVisible(boolean on) Sets the visibility state.default booleansetVisible(boolean on, IGProp<?> trigger) Sets the visibility state.default booleanChecks if this component should ignore focus requests from the UI.Methods inherited from interface com.iizix.prop.ICustomDataProvider
forbiddenGetCustomDataMap, getCustomData, putCustomData, putCustomDataIfAbsentMethods inherited from interface com.iizix.gyro.IFocusComp
onFocusGained, onFocusLost, 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.vs.IVSComponentListener
onParentStateChanged
Field Details
NONE
static final int NONEMessage category: none (=-1).- See Also:
INFORMATION
static final int INFORMATIONMessage category: information (=0).- See Also:
WARNING
static final int WARNINGMessage category: warning (=1).- See Also:
ERROR
static final int ERRORMessage category: error (=2).- See Also:
ATOM_IGNORE_UI_FOCUS
The property atom for ignore focus from UI = "$ignoreUIFocus".
Method Details
getDescription
Gets the description of the component.- Returns:
- The description, or null for none.
getVirtualSpace
VirtualSpace getVirtualSpace()Gets the VirtualSpace instance.- Returns:
- The VirtualSpace instance (an ancestor of this property or itself), or null if not found (i.e. property is not yet attached to a VirtualSpace).
getNonVirtualized
IVSComponent getNonVirtualized()Gets the non-virtualized instance of this component, if it exists.The non-virtualized counterpart may not exist in case the component has been programmatically created or is e.g. a row or cell in a table that has been filled by a data connector.
- Returns:
- The non-virtualized component, null if not found.
isEnabled
default boolean isEnabled()Gets the enabled state of this component regardless of the parent(s) enabled state.Note: all components in the VirtualSpace implements this setting, but not all handle it. It can be used programmatically in all cases.
- Returns:
- The enabled state of this component regardless of the parent(s).
isEnabledInParent
default boolean isEnabledInParent()Gets the enabled state of this component inside its parent(s). If a parent is not enabled, this method returns false.Note: all components in the VirtualSpace implements this setting, but not all handle it. It can be used programmatically in all cases.
- Returns:
- false if a parent is not enabled, otherwise the enabled state of this component. false is also returned if the component is not added into a VirtualSpace.
setEnabled
default boolean setEnabled(boolean on) Sets the enabled state.Note: all components in the VirtualSpace implements this setting, but not all handle it. It can be used programmatically in all cases.
- Parameters:
on- The enabled state.- Returns:
- true when this property container has been changed, false otherwise (or for error).
setEnabled
Sets the enabled state.Note: all components in the VirtualSpace implements this setting, but not all handle it. It can be used programmatically in all cases.
- Parameters:
on- The enabled state.- Returns:
- true when this property container has been changed, false otherwise (or for error).
isReadOnly
default boolean isReadOnly()Gets the read-only state of this component regardless of the parent(s) read-only state.Note: all components in the VirtualSpace implements this setting, but not all handle it. It can be used programmatically in all cases.
- Returns:
- The read-only state of this component regardless of the parent(s).
isReadOnlyInParent
default boolean isReadOnlyInParent()Gets the enabled state of this component inside its parent(s). If a parent is not enabled, this method returns false.Note: all components in the VirtualSpace implements this setting, but not all handle it. It can be used programmatically in all cases.
- Returns:
- true if a parent is read-only, otherwise the read-only state of this component. true is also returned if the component is not added into a VirtualSpace.
setReadOnly
default boolean setReadOnly(boolean on) Sets the read-only state.Note: all components in the VirtualSpace implements this setting, but not all handle it. It can be used programmatically in all cases.
- Parameters:
on- The read-only state.- Returns:
- true when this property container has been changed, false otherwise (or for error).
setReadOnly
Sets the read-only state.Note: all components in the VirtualSpace implements this setting, but not all handle it. It can be used programmatically in all cases.
- Parameters:
on- The read-only state.- Returns:
- true when this property container has been changed, false otherwise (or for error).
isVisible
default boolean isVisible()Gets the visibility state of this component regardless of the parent(s) visible state.Note: all components in the VirtualSpace implements this setting, but not all handle it. It can be used programmatically in all cases.
- Returns:
- The visibility state of this component regardless of the parent(s).
isVisibleInParent
default boolean isVisibleInParent()Gets the visibility state of this component inside its parent(s). If a parent is not visible, this method returns false.Note: all components in the VirtualSpace implements this setting, but not all handle it. It can be used programmatically in all cases.
- Returns:
- false if a parent is not visible, otherwise the visibility state of this component. false is also returned if the component is not added into a VirtualSpace.
setVisible
default boolean setVisible(boolean on) Sets the visibility state.Note: all components in the VirtualSpace implements this setting, but not all handle it. It can be used programmatically in all cases.
- Parameters:
on- The visibility state.- Returns:
- true when this property container has been changed, false otherwise (or for error).
setVisible
Sets the visibility state.Note: all components in the VirtualSpace implements this setting, but not all handle it. It can be used programmatically in all cases.
- Parameters:
on- The visibility state.- Returns:
- true when this property container has been changed, false otherwise (or for error).
isSelected
default boolean isSelected()Gets the selected state.Note: all components in the VirtualSpace implements this setting, but not all handle it. It can be used programmatically in all cases.
- Returns:
- The selected state.
setSelected
default boolean setSelected(boolean on) Sets the selected state.Note: all components in the VirtualSpace implements this setting, but not all handle it. It can be used programmatically in all cases.
- Parameters:
on- The selected state.- Returns:
- true when this property container has been changed, false otherwise (or for error).
setSelected
Sets the selected state.Note: all components in the VirtualSpace implements this setting, but not all handle it. It can be used programmatically in all cases.
- Parameters:
on- The selected state.- Returns:
- true when this property container has been changed, false otherwise (or for error).
shouldIgnoreFocusFromUI
default boolean shouldIgnoreFocusFromUI()Checks if this component should ignore focus requests from the UI. This component is still focusable programmatically, but not from the UI.- Returns:
- true to ignore focus from UI, false for default processing.
setIgnoreFocusFromUI
default boolean setIgnoreFocusFromUI(boolean doIgnore) Sets the flag to ignore focus from the UI.- Parameters:
doIgnore- The ignore flag.- Returns:
- true for changed, false for no change.
getField
Gets the field with the specified path.- Parameters:
path- The path to the field in the VirtualSpace, cannot start with '/' or contain ':'.- Returns:
- The field, never null.
- Throws:
NotFoundException- If the field is not found.
getFieldNull
Gets the field with the specified path.It is preferable to use
getField(String)instead of this method if the field always should be present because it will throw and log errors.- Parameters:
path- The path to the field in the VirtualSpace, cannot start with '/' or contain ':'.- Returns:
- The field, null if not found.
getField2
Gets the field with the specified full VS reference path.- Parameters:
fullVSRef- The full VS reference to the field in the VirtualSpace, as "module:/vs/path".- Returns:
- The field, never null.
- Throws:
NotFoundException- If the field is not found.
getFieldNull2
Gets the field with the specified full VS reference path.It is preferable to use
getField2(String)instead of this method if the field always should be present because it will throw and log errors.- Parameters:
fullVSRef- The full VS reference to the field in the VirtualSpace, as "module:/vs/path".- Returns:
- The field, null if not found.
getTable
Gets the table with the specified path.- Parameters:
path- The path to the table in the VirtualSpace, cannot start with '/' or contain ':'.- Returns:
- The table, never null.
- Throws:
NotFoundException- If the table is not found.
getTableNull
Gets the table with the specified path.It is preferable to use
getTable(String)instead of this method if the table always should be present because it will throw and log errors.- Parameters:
path- The path to the table in the VirtualSpace, cannot start with '/' or contain ':'.- Returns:
- The table, null if not found.
getTable2
Gets the table with the specified full VS reference path.- Parameters:
fullVSRef- The full VS reference to the table in the VirtualSpace, as "module:/vs/path".- Returns:
- The table, never null.
- Throws:
NotFoundException- If the table is not found.
getTableNull2
Gets the table with the specified full VS reference path.It is preferable to use
getTable2(String)instead of this method if the table always should be present because it will throw and log errors.- Parameters:
fullVSRef- The full VS reference to the table in the VirtualSpace, as "module:/vs/path".- Returns:
- The table, null if not found.
getAction
Gets the action with the specified path.- Parameters:
path- The path to the action in the VirtualSpace, cannot start with '/' or contain ':'.- Returns:
- The action, never null.
- Throws:
NotFoundException- If the action is not found.
getActionNull
Gets the action with the specified path.It is preferable to use
getAction(String)instead of this method if the action always should be present because it will throw and log errors.- Parameters:
path- The path to the action in the VirtualSpace, cannot start with '/' or contain ':'.- Returns:
- The action, null if not found.
getAction2
Gets the action with the specified full VS reference path.- Parameters:
fullVSRef- The full VS reference to the action in the VirtualSpace, as "module:/vs/path".- Returns:
- The action, never null.
- Throws:
NotFoundException- If the action is not found.
getActionNull2
Gets the action with the specified full VS reference path.It is preferable to use
getAction2(String)instead of this method if the action always should be present because it will throw and log errors.- Parameters:
fullVSRef- The full VS reference to the action in the VirtualSpace, as "module:/vs/path".- Returns:
- The action, null if not found.
getGroup
Gets the group with the specified path.- Parameters:
path- The path to the group in the VirtualSpace, cannot start with '/' or contain ':'.- Returns:
- The group, never null.
- Throws:
NotFoundException- If the action is not found.
getGroupNull
Gets the group with the specified path.It is preferable to use
getGroup(String)instead of this method if the group always should be present because it will throw and log errors.- Parameters:
path- The path to the group in the VirtualSpace, cannot start with '/' or contain ':'.- Returns:
- The group, null if not found.
getGroup2
Gets the group with the specified full VS reference path.- Parameters:
fullVSRef- The full VS reference to the group in the VirtualSpace, as "module:/vs/path".- Returns:
- The group, never null.
- Throws:
NotFoundException- If the group is not found.
getGroupNull2
Gets the group with the specified full VS reference path.It is preferable to use
getGroup2(String)instead of this method if the group always should be present because it will throw and log errors.- Parameters:
fullVSRef- The full VS reference to the group in the VirtualSpace, as "module:/vs/path".- Returns:
- The group, null if not found.
getVSComponent
default <COMP extends IVSComponent> COMP getVSComponent(@VSRef String path, Class<COMP> clazz) throws NotFoundException Gets the VS component with the specified path.- Parameters:
path- The path to the VS component in the VirtualSpace, cannot start with '/' or contain ':'.clazz- The requested VS component class.- Returns:
- The component, never null or wrong class.
- Throws:
NotFoundException- If the component is not found or wrong class.
getVSComponentNull
Gets the VS component with the specified path.- Parameters:
path- The path to the VS component in the VirtualSpace, cannot start with '/' or contain ':'.clazz- The requested VS component class.- Returns:
- The component, null if not found or wrong class.
getVSComponent2
default <COMP extends IVSComponent> COMP getVSComponent2(@FullVSRef String fullVSRef, Class<COMP> clazz) throws NotFoundException Gets the VS component with the specified full reference path.- Parameters:
fullVSRef- The full reference path to the VS component in the VirtualSpace, as "module:/vs/path".clazz- The requested VS component class.- Returns:
- The component, never null or wrong class.
- Throws:
NotFoundException- If the component is not found or wrong class.
getVSComponentNull2
default <COMP extends IVSComponent> COMP getVSComponentNull2(@FullVSRef String fullVSRef, Class<COMP> clazz) Gets the VS component with the specified full reference path.- Parameters:
fullVSRef- The full reference path to the VS component in the VirtualSpace, as "module:/vs/path".clazz- The requested VS component class.- Returns:
- The component, null if not found or wrong class.
getVirtualizedVirtualSpace
Gets a virtualized VirtualSpace for the application session. The VirtualSpace to get MUST already have been virtualized prior to this call.- Parameters:
path- The path of the VirtualSpace name relative the parent of the current VirtualSpace. This path can be e.g. just a plain name for a direct sibling of this VirtualSpace, a folder based path such as "folder/virtualSpaceB" or a full reference path as "module:/vs/[folderPath/]virtualSpace".- Returns:
- The VirtualSpace at selected path, never null.
- Throws:
NotFoundException- If the VirtualSpace is not found within the virtualized VirtualSpaces.IllegalStateException- If the current VirtualSpace is disposed or the application session gyro is not found.IllegalArgumentException- If path is invalid.
getVSRef
Gets the components relative path to the name space.- Returns:
- The relative VS component path to the name space, empty string if called on a name space.
- Throws:
IllegalStateException- If the VS component tree is invalid.
setVirtualizeSupportFocus
Sets the focus to this VS component (if possible), regardless if the VS component is virtualized or not. If not virtualized, it will be prior to setting the focus.- Returns:
- Error message, or null for success.
setVirtualizeSupportFocus
Sets the focus to this VS component (if possible), regardless if the VS component is virtualized or not. If not virtualized, it will be prior to setting the focus.- Parameters:
trigger- The trigger component, null for none.- Returns:
- Error message, or null for success.
messageBox
default void messageBox(IMessageBoxReply reply, IMessageBox.Icon icon, KString title, KString message, KString... buttons) Displays a message box with the specified title and message.The message box is displayed for the application session, thus all client sessions.
- Specified by:
messageBoxin interfaceIMessageBox- Parameters:
reply- The reply callback that is called when the user chooses a button or session is closed,nullfor none.icon- Icon to display, see the{link Icon}enumeration.title- The title string, must be non-null.message- The message to display, must be non-null.buttons- The strings for the buttons to display, if none, just anOKbutton is displayed. This array of buttons defined the index value returned by this method.- Throws:
NullPointerException- Ificonormessageis null, or if any of the elements inbuttonsarray is null.IllegalStateException- If the application session is not found or the application session is disposed of.