Interface IComponent
- All Superinterfaces:
IGProp<GProp<?>[]>
,IMessageBox
,IPropCnr
- All Known Subinterfaces:
IContentItem
,IEntry
,IEUIComp
,IEUICompCommon
,IEUIContainer
,IEUIPanel
,IUIAction
,IUIAnimatedSingleIndexedSelectionComp
,IUIBooleanSelectionComp
,IUICellSelectionComp
,IUICheck2Component
,IUICheckComponent
,IUIComp
,IUICompRelativeTarget
,IUIContainer
,IUIDateTimeComponent
,IUIDateValueComponent
,IUIDoubleRangeValueComponent
,IUIDoubleValueComponent
,IUIHint
,IUIIndexedSelectionComp
,IUILabelForTarget
,IUINullableValueComponent
,IUIRadioComponent
,IUISelectionComp
,IUISingleIndexedSelectionComp
,IUITimeValueComponent
,IUITriStateSelectionComp
,IUIValueComponent
- All Known Implementing Classes:
AbstractContentUIContainer
,AbstractUIAction
,CalendarEvent
,ECalendarEvent
,EMapMarkerProp
,EMapMarkers
,EMLGroup
,EMList
,EMLItemProp
,EMUIHeading
,EMUISimpleDialog
,EMUISwitch
,EMUITabBar
,EUIAccordion
,EUIButton
,EUICalendar
,EUICalendarList
,EUIChart
,EUICheckBox
,EUICheckedMenuItem
,EUIComboBox
,EUIContainer
,EUIContextMenu
,EUIDateTime
,EUIDialog
,EUIEmpty
,EUIGauge
,EUIImage
,EUIImage2
,EUILabel
,EUIMap
,EUIMedia
,EUIMenu
,EUIMenuBar
,EUIMenuItem
,EUIMenuSeparator
,EUIOutput
,EUIPanel
,EUIPanelPart
,EUIPanelPartCnr
,EUIProgress
,EUIRadioButton
,EUIRadioMenuItem
,EUISlider
,EUISpinner
,EUISwapContainer
,EUITabContainer
,EUITable
,EUITableColumn
,EUIText
,EUITextArea
,EUITitlePane
,MapMarkerProp
,MapMarkers
,MLGroup
,MList
,MLItemProp
,MUIHeading
,MUISimpleDialog
,MUISwitch
,MUITabBar
,UIAbstractListChoice
,UIAccordion
,UIButton
,UICalendar
,UICalendarList
,UIChart
,UICheckBox
,UICheckedMenuItem
,UIComboBox
,UIComp
,UIContainer
,UIContextMenu
,UIDateTime
,UIDialog
,UIEmpty
,UIGauge
,UIImage
,UIImage2
,UILabel
,UIMap
,UIMedia
,UIMenu
,UIMenuBar
,UIMenuItem
,UIMenuSeparator
,UIOutput
,UIPanel
,UIPanelBase
,UIPanelPart
,UIPanelPartCnr
,UIProgress
,UIRadioButton
,UIRadioMenuItem
,UISlider
,UISpinner
,UISwapContainer
,UITabContainer
,UITable
,UITableColumn
,UIText
,UITextArea
,UITitlePane
- Author:
- Christopher Mindus
Nested Class Summary
Nested classes/interfaces inherited from interface com.iizix.gyro.IMessageBox
IMessageBox.Icon
Field Summary
Modifier and TypeFieldDescriptionstatic final int
Message category: ERROR (=2).static final int
Message category: INFORMATION (= 0).static final int
Message category: NONE (= -1).static final int
Message 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_PRIVATE
Fields inherited from interface com.iizix.gyro.IMessageBox
ICON_ERROR, ICON_INFORMATION, ICON_MAP, ICON_NONE, ICON_QUESTION, ICON_WARNING
Method Summary
Modifier and TypeMethodDescriptionboolean
Clears the error message, if any.getBadge()
Gets the badge for the component.Gets the text from the control as aKString
.LayoutMgr
<?> Gets the UI LayoutManager for the component.Gets the current message for the component.Gets the current message text for the component as a plain string.Gets the styles container.getText()
Gets the text.Gets the current tooltip for the component.Gets the current tooltip text for the component as a plain string.Gets the UIPanelBase (that is a file saved to disk).Gets the parent container of this component.boolean
Get the enabled state of the component.boolean
Get the read-only state of the component.boolean
Get the visibility state of the component.default void
messageBox
(IMessageBoxReply reply, IMessageBox.Icon icon, KString title, KString message, KString... buttons) Displays a message box with the specified title and message.Requests focus to this component.requestFocus
(boolean doAnimate) Requests focus to this component.boolean
Requests focus to this component.boolean
requestFocusEx
(boolean doAnimate) Requests focus to this component.boolean
Sets or clears the badge of the component.boolean
Sets a red badge text with default font size for the component as a plain string.boolean
setEnabled
(boolean on) Sets the enabled state of the component.boolean
setErrorMessage
(KString errorMessage) Sets (or removes) the ERROR message for the component.boolean
setErrorMessage
(String errorMessage) Sets (or removes) the ERROR message for the component.boolean
setHTMLText
(String text) Sets the HTML text property KStringProp without tags processing.LayoutMgr
<?> setLayoutMgr
(LayoutMgr<?> layoutManager) Sets the UI LayoutManager for the component.boolean
setMessage
(KTooltip message) Sets (or removes) the message for the component.boolean
setMessage
(String message, int category) Sets (or removes) a plain message string for the component with specified category.boolean
setReadOnly
(boolean on) Sets the read-only state of the component.boolean
Sets the HTML text property KStringProp Atom.TEXT ($text).boolean
Sets the plain text property without tags processing.boolean
setTooltip
(KTooltip tooltip) Sets (or removes) the tooltip for the component.boolean
setTooltip
(String text) Sets (or removes) the plain tooltip text for the component.boolean
setVisible
(boolean on) Sets the visibility state of the component.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, 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, warning
Methods inherited from interface com.iizix.gyro.IMessageBox
messageBox, 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, 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
Field Details
ERROR
static final int ERRORMessage category: ERROR (=2).- See Also:
WARNING
static final int WARNINGMessage category: WARNING (=1).- See Also:
INFORMATION
static final int INFORMATIONMessage category: INFORMATION (= 0).- See Also:
NONE
static final int NONEMessage category: NONE (= -1).- See Also:
Method Details
getStyles
Styles getStyles()Gets the styles container.- Returns:
- The styles container (never null).
setEnabled
boolean setEnabled(boolean on) Sets the enabled state of the component.- Parameters:
on
- the enabled state.- Returns:
- true when this property has been changed, false otherwise (or for error).
isEnabled
boolean isEnabled()Get the enabled state of the component.- Returns:
- true if component is enabled, false otherwise.
setReadOnly
boolean setReadOnly(boolean on) Sets the read-only state of the component.Note: certain components are always in a "kind of read-only" mode, thus this property doesn't really apply to them.
- Parameters:
on
- the read-only state.- Returns:
- true when this property has been changed, false otherwise (or for error).
isReadOnly
boolean isReadOnly()Get the read-only state of the component.Note: certain components are always in a "kind of read-only" mode, thus this property doesn't really apply to them.
- Returns:
- true if component is read-only, false otherwise.
setVisible
boolean setVisible(boolean on) Sets the visibility state of the component.- Parameters:
on
- the visibility state.- Returns:
- true when this property has been changed, false otherwise (or for error).
isVisible
boolean isVisible()Get the visibility state of the component.- Returns:
- true if component is visible, false otherwise.
requestFocus
String requestFocus()Requests focus to this component. This call is redirected to the panel focus engine. The engine may veto the focus change, because it currently cannot change focus, or the request is not virtualized.This method is less precise than
requestFocusEx()
, but avoids try-catching.- Returns:
null
for success, otherwise an error message indicating why focus was not able to be changed.
requestFocusEx
Requests focus to this component. This call is redirected to the panel focus engine. The engine may veto the focus change, because it currently cannot change focus, or the request is not virtualized.- Returns:
- true if focus was changed, false otherwise.
- Throws:
FocusException
- If focus could not be changed.
requestFocus
Requests focus to this component. This call is redirected to the panel focus engine. The engine may veto the focus change, because it currently cannot change focus, or the request is not virtualized.This method is less precise than
requestFocusEx()
, but avoids try-catching.- Parameters:
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 indicating why focus was not able to be changed.
requestFocusEx
Requests focus to this component. This call is redirected to the panel focus engine. The engine may veto the focus change, because it currently cannot change focus, or the request is not virtualized.- Parameters:
doAnimate
- Flag to enable animation when selection is changed for e.g. accordion, swap or tab containers.- Returns:
- true if focus was changed, false otherwise.
- Throws:
FocusException
- If focus could not be changed.
setLayoutMgr
Sets the UI LayoutManager for the component. If the same layout manager is set twice, there will be no change and the return value is the instance of thelayoutManager
parameter passed into this method.- Parameters:
layoutManager
- the layout manager instance, or null to remove the layout manager.- Returns:
- the previous layout manager instance, or
null
if none was set.
getLayoutMgr
LayoutMgr<?> getLayoutMgr()Gets the UI LayoutManager for the component.- Returns:
- the layout manager instance, or
null
if none is set.
getText
String getText()Gets the text. The string is retrieved from the Atom.TEXT ($text) property and can be eitherStringProp
orKStringProp
.If it's a
KString
, the plain string is returned. It is recommended to use the more accurate text methodsgetPlainText()
orgetHTMLText()
to have better control.- Returns:
- The plain text string or null if not supported.
getKStringText
KString getKStringText()Gets the text from the control as aKString
. This KString can be plain or in HTML depending on the input, butKString
provides methods to get text in different ways.Components implementing KString support implements the
interface.IUIHTMLTextComponent
- Returns:
- The
KString
of the text if available, or null if none is present or KString is not supported by the component.
setText
Sets the plain text property without tags processing.If the component is connected to a VirtualSpace Field, that text is set instead of the UI component's text.
- Parameters:
text
- The text to set in plain text (no tags and no HTML tags will be processed).- Returns:
- true for change of text, false for no change or not supported.
setText
Sets the HTML text property KStringProp Atom.TEXT ($text).Components implementing KString support implements the
interface.IUIHTMLTextComponent
- Parameters:
text
- The text to set.- Returns:
- true for change of text, false for no change or not supported.
setHTMLText
Sets the HTML text property KStringProp without tags processing.The
KStringException
is caught in case of invalid HTML text and logs a warning message.Components implementing KString support implements the
interface.IUIHTMLTextComponent
- Parameters:
text
- The text to set.- Returns:
- true for change of text, false for no change or not supported.
setTooltip
Sets (or removes) the tooltip for the component.- Parameters:
tooltip
- The tooltip, ornull
to remove it.- Returns:
- true for changed, false for no change.
setTooltip
Sets (or removes) the plain tooltip text for the component.- Parameters:
text
- The plain tooltip text, ornull
to remove it.- Returns:
- true for changed, false for no change.
getTooltip
KTooltip getTooltip()Gets the current tooltip for the component.- Returns:
- The tooltip, or
null
for none.
getTooltipText
String getTooltipText()Gets the current tooltip text for the component as a plain string.- Returns:
- The tooltip as a plain string, or
null
for none.
setMessage
Sets (or removes) the message for the component.- Parameters:
message
- The message, ornull
to remove it.- Returns:
- true for changed, false for no change.
setMessage
Sets (or removes) a plain message string for the component with specified category.- Parameters:
message
- The message to set, ornull
to clear it.category
- The category of the message:NONE
,INFORMATION
,WARNING
orERROR
.- Returns:
- true for changed, false for no change.
setErrorMessage
Sets (or removes) the ERROR message for the component.- Parameters:
errorMessage
- The ERROR message, ornull
to remove it.- Returns:
- true for changed, false for no change.
setErrorMessage
Sets (or removes) the ERROR message for the component.- Parameters:
errorMessage
- The ERROR message, ornull
to remove it.- Returns:
- true for changed, false for no change.
clearErrorMessage
boolean clearErrorMessage()Clears the error message, if any.- Returns:
- true if changed, false otherwise.
getMessage
KTooltip getMessage()Gets the current message for the component.- Returns:
- The message, or
null
for none.
getMessageText
String getMessageText()Gets the current message text for the component as a plain string.- Returns:
- The message as a plain string, or
null
for none.
setBadge
Sets a red badge text with default font size for the component as a plain string.- Parameters:
text
- The plain text string, or null to clear it.- Returns:
- true for changed, false for no change.
setBadge
Sets or clears the badge of the component.- Parameters:
badge
- The badge to set, or null to clear it.- Returns:
- true for changed, false for no change.
getBadge
GBadge getBadge()Gets the badge for the component.- Returns:
- The badge, or null if undefined.
getUIParent
UIContainer getUIParent()Gets the parent container of this component.- Returns:
- null if none is present.
getUIPanel
UIPanelBase getUIPanel()Gets the UIPanelBase (that is a file saved to disk).- Returns:
- null if none is present.
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 on the client session that displays this panel component.
- Specified by:
messageBox
in interfaceIMessageBox
- Parameters:
reply
- The reply callback that is called when the user chooses a button or session is closed,null
for none.icon
- Icon to display, see theICON_*
values, e.g.
.IMessageBox.ICON_INFORMATION
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 anOK
button is displayed. This array of buttons defined the index value returned by this method.- Throws:
NullPointerException
- Ificon
ormessage
is null, or if any of the elements inbuttons
array is null.IllegalStateException
- If the client session is not found or the client session is disposed of.