public abstract class UIComp extends PropCnr implements IUIComp
The component has a data container that is not persistent, i.e. is not written e.g. to disk.
IMessageBox.Icon
IVSComponentState.State
Modifier and Type | Field and Description |
---|---|
static UIComp[] |
EMPTY
Empty array of components.
|
protected static int |
REMOTE_FOCUS_EVENT
Remote event for focus.
|
protected Styles |
styles
The style container.
|
protected VSField |
vsField
The connected field, null for none.
|
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
ERROR, INFORMATION, NONE, 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 |
---|
UIComp()
Creates a property container with the specified name with a null value.
|
UIComp(Atom propertyAtom)
Creates a property container with the specified name with a null value.
|
UIComp(Atom propertyAtom,
GProp<?>[] properties)
Creates a property container with the specified name and properties.
|
Modifier and Type | Method and Description |
---|---|
void |
add(UIComp component)
Adds a component to the container with a property for the layout manager.
|
protected void |
addMappings(VSMappings mappings)
Gets the mappings of a VirtualSpace to the panel components.
|
static void |
assignFontInfoResolver(IFontInfo.Resolver resolver)
Assigns the IFontInfo resolver.
|
String |
canAcceptUIContainerFocus()
Returns if this container can accept focus itself or for one of its
children components.
|
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.
|
boolean |
canFillX()
Returns if the component can fill in X or not.
|
boolean |
canFillY()
Returns if the component can fill in Y or not.
|
String |
canRequestFocus()
Returns if this component can receive focus.
|
boolean |
clearErrorMessage()
Clears the error message, if any.
|
UIComp |
clone()
Creates a clone out of this property.
|
String |
couldRequestFocusIfVirtualized(boolean ignoreStates)
Returns if this component could receive focus if it would be virtualized.
|
protected Styles |
createStyles()
Creates the Styles container (can be overridden by Designer to create
com.iizigo.style.prop.EditorStyles).
|
protected GProp<?> |
createTitleProp()
Creates the title property a StringProp, KStringProp or PlainKStringProp
depending on the component.
|
boolean |
disconnectVSField()
Disconnects from the VirtualSpace Field connection.
|
boolean |
enterVSProcessing(VSComponent component)
Call this method when the VSField or the text will update each other, in order to avoid
recursion in event processing.
|
void |
exitVSProcessing()
Call this routine to exit VSField processing routine that was entered using
enterVSProcessing(VSComponent) . |
boolean |
fireSelection()
Fires the selection to the listeners if it is changed.
|
protected boolean |
fireSelection(GEvent event)
Fires the selection to the listeners if it is changed.
|
Map<String,Object> |
forbiddenGetCustomDataMap(boolean doCreate)
Deprecated.
|
abstract Size |
getApproximateSize()
Returns the size of the component in pixels.
|
GBadge |
getBadge()
Gets the badge for the component.
|
Value.Type |
getBestVSFieldValueType(VSRelativeReference<?> reference)
Requests the value type that would best suit the listener.
|
int |
getComponentID()
Creates or gets the unique ID within the panel for a component.
|
Set<IVSComponent> |
getComponentMappings()
Gets the mappings to VSComponent's for this component.
|
KString |
getErrorMessage(LocaleInfo localeInfo,
ValueConversionException exception)
Gets the localized error message for a validation exception.
|
KString |
getErrorMessage(ValueConversionException exception)
Gets the localized error message for a validation exception.
|
KString |
getErrorMessageEx(LocaleInfo localeInfo,
Exception exception)
Gets the localized error message for a validation exception of any kind of exception.
|
String |
getErrorMessageString(LocaleInfo localeInfo,
ValueConversionException exception)
Gets the localized error message for a validation exception.
|
String |
getErrorMessageString(ValueConversionException exception)
Gets the localized error message for a validation exception.
|
String |
getErrorMessageStringEx(LocaleInfo localeInfo,
Exception exception)
Gets the localized error message for a validation exception of any kind of exception.
|
int |
getFixHeight()
Gets the designed fixed height of this component in pixels.
|
int |
getFixWidth()
Gets the designed fixed width of this component in pixels.
|
IFontInfo |
getFontInfo()
Returns the font information from this component.
|
int |
getForcedAlignX()
Gets the default alignment in X when it is not supported, i.e.
|
int |
getForcedAlignY()
Gets the default alignment in Y when it is not supported, i.e.
|
KString |
getKStringText()
Gets the text from the control as a
KString . |
LayoutProp |
getLayout()
Gets the layout properties of this component.
|
LayoutMgr<?> |
getLayoutMgr()
Gets the layout manager for the component.
|
<LAYOUT_MGR extends LayoutMgr<?>> |
getLayoutMgr(Class<LAYOUT_MGR> layoutMgrClass)
Gets the layout manager for the component.
|
VSComponent |
getMappedVSComponent()
Gets the main component that is used to map the UI component to the VirtualSpace.
|
KTooltip |
getMessage()
Gets the current message for the component.
|
String |
getMessageText()
Gets the current message text for the component as a plain string.
|
int |
getPixelHeight()
Returns the height in pixel units of the component from the layout.
|
int |
getPixelWidth()
Returns the width in pixel units of the component from the layout.
|
void |
getPredefinedProps()
Gets the references to predefined properties.
|
Size |
getSize()
Returns the size of the component in pixels.
|
Styles |
getStyles()
Gets the Styles property.
|
Styles |
getStyles(boolean doCreate)
Gets the Styles property.
|
String |
getText()
Gets the text.
|
String |
getTitle()
Get the title of the component (i.e.
|
KString |
getTitleKS()
Gets the title of the component as a (Plain) KString (i.e.
|
PlainKString |
getTitlePKS()
Gets the title of the component as a PlainKString (i.e.
|
KTooltip |
getTooltip()
Gets the current tooltip for the component.
|
String |
getTooltipText()
Gets the current tooltip text for the component as a plain string.
|
protected GProp<?> |
getTrigger(GEvent event)
Gets the trigger from an event.
|
UIPanelBase |
getUIPanel()
Gets the UIPanel.
|
UIContainer |
getUIParent()
Gets the parent container of this component.
|
Value |
getValue(Atom atom)
Gets the value from a property named
atom . |
Value |
getValue(String name)
Gets the value from a property named
name . |
VirtualSpace |
getVirtualSpace()
Gets the VirtualSpace of the UI component.
|
VSField |
getVSField()
Gets the connected or disconnected VirtualSpace Field.
|
boolean |
hasExplicitHeight()
Verifies if the component has an implicit height.
|
boolean |
hasExplicitWidth()
Verifies if the component has a width.
|
boolean |
hasFocus()
Returns if the component currently has focus.
|
boolean |
hasImplicitAlignFillX()
Returns if the component has implicit component horizontal fill.
|
boolean |
hasImplicitAlignFillY()
Returns if the component has implicit component vertical fill.
|
boolean |
hasImplicitHeight()
Verifies if the component has an implicit height.
|
boolean |
hasImplicitWidth()
Verifies if the component has a width.
|
protected boolean |
hasSelectionChanged()
Checks if the selection has changed since last call to fireSelection.
|
boolean |
isEnabled()
Get the enabled state of the component.
|
boolean |
isMobile()
Checks if the panel is of mobile type.
|
boolean |
isReadOnly()
Get the read-only state of the component.
|
boolean |
isRTL()
Returns if the component is displayed in RTL or not.
|
boolean |
isVisible()
Get the visibility state of the component.
|
boolean |
isVSFieldDisconnected()
Checks if the connection state to the VirtualSpace Field is disconnected.
|
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 |
onBroken(VSRelativeReference<?> reference,
VSField field)
Called when the property reference has been broken, i.e.
|
void |
onComponentSelectedInParent(boolean on)
Called by the parent container to inform that this component has been selected in its container.
|
void |
onEventSelf(GEvent event)
Updates a VirtualSpace Field when a component text changes.
|
void |
onFocusGained(IFocusComp opposite,
IGProp<?> trigger,
boolean isRemoteInduced)
Called to the component when it receives focus.
|
protected void |
onNotifySelectionChanged(GEvent event)
Method called when the selection of the component has changed and has been verified
to be different from a previous selection.
|
void |
onParentStateChanged(IVSComponent parent,
IVSComponentState.State state,
boolean on)
Called when the column changes state.
|
protected void |
onPrepare(ClassReference cr,
List<Throwable> errors)
Called to resolve methods for the component from main "onPrepare" once the ClassReference has been found.
|
protected void |
onPrepare(IAppOwner appOwner,
IModuleOwner moduleOwner,
boolean isPostCall,
List<Throwable> errors)
Called when the application is being prepared.
|
protected void |
onPropDispose()
Called when a property is disposed of by delete/remove in a container,
or by the dispose method.
|
void |
onRemoteEvent(RemoteEvent event)
Called when a remote property event should be processed by this property.
|
void |
onResolved(VSRelativeReference<?> reference,
VSField field)
Called when the property reference has been resolved.
|
protected void |
onSelectionChanged(GEvent event)
Method called when the selection of the component changed due to a property change
(value changed, property added or removed).
|
void |
onStateChanged(VSField field,
IVSComponentState.State state,
boolean on)
Called when the field changes state.
|
void |
onValueChanged(VSField field,
Value value,
GProp<?> trigger,
IPostEventProcessing postProcessing)
Called when the field value is set.
|
protected void |
onVirtualizationCompleted(IAppSessionGyro appGyro,
IClientSessionGyro clientGyro,
VirtualSpace virtualSpace,
PropCnr virtualizedProp,
boolean isPostResolve)
Called when virtualization completed.
|
protected void |
processVSComponentSelection(VSComponent mappedComponent)
Override to process the VS components selection state when Atom.SELECTED BoolProp changes.
|
boolean |
reconnectVSField(boolean update)
Reconnects to a previously disconnected VirtualSpace Field connection.
|
String |
requestFocus()
Requests focus to this component.
|
String |
requestFocus(boolean doAnimate)
Requests focus to this component.
|
String |
requestFocus(IGProp<?> trigger,
boolean isRemoteInduced)
Requests focus to this component.
|
String |
requestFocus(IGProp<?> trigger,
boolean isRemoteInduced,
boolean doAnimate)
Requests focus to this component.
|
boolean |
requestFocusEx()
Requests focus to this component.
|
boolean |
requestFocusEx(boolean doAnimate)
Requests focus to this component.
|
boolean |
requestFocusEx(IGProp<?> trigger,
boolean isRemoteInduced)
Requests focus to this component.
|
boolean |
requestFocusEx(IGProp<?> trigger,
boolean isRemoteInduced,
boolean doAnimate)
Requests focus to this component.
|
boolean |
setBadge(GBadge badge)
Sets or clears the badge of the component.
|
boolean |
setBadge(String text)
Sets a red badge text with default font size for the component as a plain string.
|
int |
setComponentToVSField()
Sets the text or value from this text or value component to its VirtualSpace Field, if any.
|
boolean |
setEnabled(boolean on)
Sets the enabled state of the component.
|
boolean |
setEnabled(boolean on,
IVSComponent trigger)
Sets the enabled state of the component.
|
boolean |
setErrorMessage(KString errorMessage)
Sets (or removes) the ERROR message for the component.
|
void |
setErrorMessage(LocaleInfo localeInfo,
ValueConversionException exception)
Transposes an exception from conversion to the component as an error message.
|
boolean |
setErrorMessage(String errorMessage)
Sets (or removes) the ERROR message for the component.
|
void |
setErrorMessage(ValueConversionException exception)
Transposes an exception from conversion to the component as an error message.
|
boolean |
setHTMLText(String text)
Sets the HTML text property KStringProp without tags processing.
|
LayoutMgr<?> |
setLayoutMgr(LayoutMgr<?> layoutManager)
Sets the layout manager 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 |
setReadOnly(boolean on,
IVSComponent trigger)
Sets the read-only state of the component.
|
boolean |
setText(KString text)
Sets the HTML text property KStringProp Atom.TEXT ($text).
|
boolean |
setText(String text)
Sets the plain text property without tags processing.
|
boolean |
setTitle(KString str)
Get the title of the component (i.e.
|
boolean |
setTitle(PlainKString str)
Get the title of the component (i.e.
|
boolean |
setTitle(String str)
Get the title of the component (i.e.
|
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.
|
String |
setUIContainerFocus(UIComp requestor,
boolean doAnimate)
Sets the focus to the UI container and all its parents.
|
boolean |
setVisible(boolean on)
Sets the visibility state of the component.
|
boolean |
setVisible(boolean on,
IVSComponent trigger)
Sets the visibility state of the component.
|
boolean |
setVSFieldMessageToComponent(VSField field,
boolean clear)
Sets the VirtualSpace Field's message to this component.
|
void |
setVSFieldToComponent(VSField field)
Method called when a VirtualSpace Field is resolved or when reconnection is done.
|
void |
verify(PropVerification verification)
Verifies this property container: component type must match panel type (desktop v/s mobile).
|
protected boolean |
verifyComponentScope(UIContainer scopeContainer,
String what,
PropVerification verification,
VSComponent vsOuter)
Verifies that this component has it's VS references inside the outer VS reference.
|
__transferChildProps, addPredefinedProps, 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, 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
getDeviceType, getFirstUIComponent, getFirstUIComponentNull, getPanelUIComponent, getPanelUIComponentNull, getUIRef
messageBox
addProp, addProp, addProp2, addProp2, containsProp, containsProp, 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, initializeExtendsFramework, insertProp, isChild, isExtendsOverriden, isExtendsRoot, isPropAddRemoveAllowed, isPropExtended, isSibling, removeAllProps, removeProp, removeProp, removeProp, removeProp, removeProp, removeProp, removeProp, removeProp2, removeProp2, removeProp2, removeProp2, removeProp2, removeProp2, reorderProps, 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, 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, verifyHasPropertyItem, warning, warning, warning
messageBox, messageBox
getCustomData, putCustomData, putCustomDataIfAbsent
protected static final int REMOTE_FOCUS_EVENT
public static final UIComp[] EMPTY
protected Styles styles
protected VSField vsField
Note: use thread-safe code when working with this variable as it can become
unresolved, thus null
.
public UIComp()
public UIComp(Atom propertyAtom)
propertyAtom
- the property atom.public UIComp(Atom propertyAtom, GProp<?>[] properties) throws PropException
propertyAtom
- the property atom.properties
- the property array value for the property.PropException
- as structural changes in containers on client is prohibited.public void getPredefinedProps()
getPredefinedProps
in class PropCnr
@Deprecated public Map<String,Object> forbiddenGetCustomDataMap(boolean doCreate)
Do not call this method!
forbiddenGetCustomDataMap
in interface ICustomDataProvider
doCreate
- Creates the map if required.null
if not created.
Note: the map returned is NOT synchronized thus not thread safe. It is up to the caller to synchronize on it to ensure thread safety.
public UIComp 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!
public boolean isMobile()
public final UIContainer getUIParent()
getUIParent
in interface IComponent
public final UIPanelBase getUIPanel()
getUIPanel
in interface IComponent
public VirtualSpace getVirtualSpace()
getVirtualSpace
in interface IUIComp
public static void assignFontInfoResolver(IFontInfo.Resolver resolver)
public IFontInfo getFontInfo()
IllegalStateException
- If called from the Server in runtime (or outside the Designer).public boolean hasImplicitAlignFillX()
public boolean hasImplicitAlignFillY()
public Size getSize()
The method attempts to use the bounds settings if available. If not available, the size is retrieved from the potential settings of the layout data, and if that is not provided, the approximate size is used.
IllegalStateException
- If called outside of the Designer.public abstract Size getApproximateSize() throws IllegalStateException
IllegalStateException
- If called outside of the Designer, e.g. from the Server.public int getPixelWidth()
public int getPixelHeight()
public boolean hasImplicitWidth()
This means a width that is either present due to the component or that the width has explicitly been set, or that it is in a container that sets the outer bounds of the component.
public boolean hasImplicitHeight()
This means a height that is either present due to the component or that the height has explicitly been set, or that it is in a container that sets the outer bounds of the component.
public boolean hasExplicitWidth()
This means a width that is either present due to the component or that the width has explicitly been set, or that it is in a container that sets the outer bounds of the component.
public boolean hasExplicitHeight()
This means a height that is either present due to the component or that the height has explicitly been set, or that it is in a container that sets the outer bounds of the component.
public boolean mustHaveWidth()
public boolean mustHaveHeight()
public boolean mustHaveExplicitWidth()
public boolean mustHaveExplicitHeight()
public boolean canFillX()
public boolean canFillY()
public boolean canAlignX()
public boolean canAlignY()
public int getForcedAlignX()
canAlignX()
returns false.public int getForcedAlignY()
canAlignY()
returns false.public int getFixWidth()
getFixWidth
in interface IUIComp
public int getFixHeight()
getFixHeight
in interface IUIComp
public int getComponentID()
getComponentID
in interface IUIComp
public final Styles getStyles()
getStyles
in interface IComponent
public final Styles getStyles(boolean doCreate)
doCreate
flag.protected Styles createStyles()
public final boolean setEnabled(boolean on)
setEnabled
in interface IComponent
on
- The enabled state.public final boolean setEnabled(boolean on, IVSComponent trigger)
on
- The enabled state.trigger
- The trigger VS component, null for none.public final boolean isEnabled()
isEnabled
in interface IComponent
public final boolean setReadOnly(boolean on)
Note: certain components are always in a "kind of read-only" mode, thus this property doesn't really apply to them.
setReadOnly
in interface IComponent
on
- the read-only state.public final boolean setReadOnly(boolean on, IVSComponent trigger)
Note: certain components are always in a "kind of read-only" mode, thus this property doesn't really apply to them.
on
- The read-only state.trigger
- The trigger VS component, null for none.public final boolean isReadOnly()
Note: certain components are always in a "kind of read-only" mode, thus this property doesn't really apply to them.
isReadOnly
in interface IComponent
public final boolean setVisible(boolean on)
setVisible
in interface IComponent
on
- the visibility state.public final boolean setVisible(boolean on, IVSComponent trigger)
on
- The visibility state.trigger
- The trigger VS component, null for none.public final boolean isVisible()
isVisible
in interface IComponent
public LayoutProp getLayout()
public final LayoutMgr<?> setLayoutMgr(LayoutMgr<?> layoutManager)
layoutManager
parameter passed into this method.setLayoutMgr
in interface IComponent
layoutManager
- the layout manager instance, or null to remove the layout manager.null
if none
was set.public LayoutMgr<?> getLayoutMgr()
getLayoutMgr
in interface IComponent
null
if none is set.public <LAYOUT_MGR extends LayoutMgr<?>> LAYOUT_MGR getLayoutMgr(Class<LAYOUT_MGR> layoutMgrClass)
getLayoutMgr
in interface IUIComp
layoutMgrClass
- The class of the layout manager.null
if none is set.public final void add(UIComp component) throws PropException
component
- the component to add.PropException
- when the container cannot accept the component with the specific
layout property.public final String getText()
StringProp
or KStringProp
.
If it's a KString
, the plain string is returned. It is
recommended to use the more accurate text methods
getPlainText()
or getKStringText()
to have better
control.
getText
in interface IComponent
public KString getKStringText()
KString
. This KString can be
plain or in HTML depending on the input, but KString
provides
methods to get text in different ways.
Components implementing KString support implements the
interface.IUIHTMLTextComponent
getKStringText
in interface IComponent
KString
of the text if available, or null if none is
present or KString is not supported by the component.public final boolean setText(String text)
If the component is connected to a VirtualSpace Field, that text is set instead of the UI component's text.
setText
in interface IComponent
text
- The text to set in plain text (no tags and no HTML tags will be
processed).public final boolean setText(KString text)
Components implementing KString support implements the
interface.IUIHTMLTextComponent
setText
in interface IComponent
text
- The text to set.public final boolean setHTMLText(String text)
The KStringException
is caught in case of invalid HTML text
and logs a warning message.
Components implementing KString support implements the
interface.IUIHTMLTextComponent
setHTMLText
in interface IComponent
text
- The text to set.public Value.Type getBestVSFieldValueType(VSRelativeReference<?> reference)
getBestVSFieldValueType
in interface IVSFieldListener
reference
- The VSRelativeReference instance holding the reference.public VSField getVSField()
getVSField
in interface IUIComp
public boolean isVSFieldDisconnected()
isVSFieldDisconnected
in interface IUIComp
public boolean disconnectVSField()
disconnectVSField
in interface IUIComp
public boolean reconnectVSField(boolean update)
The method setVSFieldToComponent(VSField)
is called if there was
a disconnected field set.
reconnectVSField
in interface IUIComp
update
- Update flag, i.e. if all states, messages and field contents
should be updated to match the field.public void onResolved(VSRelativeReference<?> reference, VSField field)
UIComp
class.
Components must override to provide the implementation for e.g. value contents, styles, etc.
onResolved
in interface IVSFieldListener
reference
- The VSRelativeReference instance holding the reference.field
- The target reference.public VSComponent getMappedVSComponent()
public Set<IVSComponent> getComponentMappings()
getComponentMappings
in interface IUIComp
protected void addMappings(VSMappings mappings)
The default is to find the relative references to VS and add those references. Override to provide other functionality.
mappings
- The mappings instance to fill in.public void setVSFieldToComponent(VSField field)
setVSFieldToComponent
in interface IUIComp
field
- The VS field.public boolean setVSFieldMessageToComponent(VSField field, boolean clear)
setVSFieldMessageToComponent
in interface IUIComp
field
- The VS field.clear
- Flag to clear the component message if the field hasn't got a message.public void onBroken(VSRelativeReference<?> reference, VSField field)
onBroken
in interface IVSFieldListener
reference
- The VSRelativeReference instance holding the reference.field
- The target reference.public void onStateChanged(VSField field, IVSComponentState.State state, boolean on)
onStateChanged
in interface IVSFieldListener
field
- The VS field.state
- The state change.on
- New state.public void onParentStateChanged(IVSComponent parent, IVSComponentState.State state, boolean on)
onParentStateChanged
in interface IVSComponentListener
parent
- The parent who's state was changed.state
- The state change, possible values PARENT_ENABLED, PARENT_READONLY, PARENT_VISIBLE.on
- New state.public void onValueChanged(VSField field, Value value, GProp<?> trigger, IPostEventProcessing postProcessing)
Components must override to provide the implementation when they are not implementing IPlainTextComponent, in this case the default implementation transports the field string value to this text components plain text.
onValueChanged
in interface IVSFieldListener
field
- The VS field.value
- The value, never null, but value.isNull()
could be true.trigger
- The trigger property that may be null.postProcessing
- Post-processing instance.public final boolean enterVSProcessing(VSComponent component)
Programming note: it is IMPERATIVE that the exitVSProcessing()
is
called after any kind of call to this routine: surround e.g. with "try-finally" block.
If this method returns false
the exitVSProcessing()
should
not be called.
component
- The VS component that is used for processing.public final void exitVSProcessing()
enterVSProcessing(VSComponent)
.InternalError
- If the enterVSProcessing(VSComponent)
wasn't called.public void onEventSelf(GEvent event)
onEventSelf
in interface IGProp<GProp<?>[]>
onEventSelf
in class GProp<GProp<?>[]>
event
- The property event.protected GProp<?> getTrigger(GEvent event)
event
- The event, null for none.protected boolean hasSelectionChanged()
public boolean fireSelection()
this.onNotifySelectionChanged()
method, listeners, and the UI component's onUISelection method.protected boolean fireSelection(GEvent event)
event
- The trigger of the event, MUST be non-null.protected void processVSComponentSelection(VSComponent mappedComponent)
Typically, call mappedComponent.setSelected(isSelected(),this);
mappedComponent
- The matching mapped component.protected void onSelectionChanged(GEvent event)
Override the onNotifySelectionChanged()
method if you wish to
know that the selection really has changed.
event
- The event that causes the selection change.protected void onNotifySelectionChanged(GEvent event)
event
- The event that causes the selection change, COULD BE NULL!public int setComponentToVSField()
setComponentToVSField
in interface IUIComp
public KString getErrorMessage(ValueConversionException exception)
getErrorMessage
in interface IUIComp
exception
- The exception.public KString getErrorMessage(LocaleInfo localeInfo, ValueConversionException exception)
getErrorMessage
in interface IUIComp
localeInfo
- The locale information, or null for current session or default.exception
- The exception.public String getErrorMessageString(ValueConversionException exception)
exception
- The exception.public String getErrorMessageString(LocaleInfo localeInfo, ValueConversionException exception)
localeInfo
- The locale information, or null for current session or default.exception
- The exception.public KString getErrorMessageEx(LocaleInfo localeInfo, Exception exception)
localeInfo
- The locale information, or null for current session or default.exception
- The exception.public String getErrorMessageStringEx(LocaleInfo localeInfo, Exception exception)
localeInfo
- The locale information, or null for current session or default.exception
- The exception.public void setErrorMessage(ValueConversionException exception)
setErrorMessage
in interface IUIComp
exception
- The exception.public void setErrorMessage(LocaleInfo localeInfo, ValueConversionException exception)
setErrorMessage
in interface IUIComp
exception
- The exception.localeInfo
- The locale information, or null for current session or default.public void onComponentSelectedInParent(boolean on)
The container processes this method by selecting the VSComponent for state and focus that may be connected.
on
- The selection state.public boolean setTooltip(KTooltip tooltip)
setTooltip
in interface IComponent
tooltip
- The tooltip, or null
to remove it.public boolean setTooltip(String text)
setTooltip
in interface IComponent
text
- The plain tooltip text, or null
to remove it.public KTooltip getTooltip()
getTooltip
in interface IComponent
null
for none.public String getTooltipText()
getTooltipText
in interface IComponent
null
for none.public boolean setErrorMessage(String errorMessage)
setErrorMessage
in interface IComponent
errorMessage
- The ERROR message, or null
to remove it.public boolean setErrorMessage(KString errorMessage)
setErrorMessage
in interface IComponent
errorMessage
- The ERROR message, or null
to remove it.public boolean clearErrorMessage()
clearErrorMessage
in interface IComponent
public boolean setMessage(KTooltip message)
setMessage
in interface IComponent
message
- The message, or null
to remove it.public boolean setMessage(String message, int category)
setMessage
in interface IComponent
message
- The message to set, or null
to clear it.category
- The category of the message: IUIComp.NONE
, IUIComp.INFORMATION
, IUIComp.WARNING
or IUIComp.ERROR
.public KTooltip getMessage()
getMessage
in interface IComponent
null
for none.public String getMessageText()
getMessageText
in interface IComponent
null
for none.public boolean setBadge(String text)
setBadge
in interface IComponent
text
- The plain text string, or null to clear it.public boolean setBadge(GBadge badge)
setBadge
in interface IComponent
badge
- The badge to set, or null to clear it.public GBadge getBadge()
getBadge
in interface IComponent
public boolean isRTL()
public String canAcceptUIContainerFocus()
This method recurses up to the topmost UI container, and all containers must return null for this method to return null.
Typically, a container returns itself as instance if it is disabled or hidden.
canAcceptUIContainerFocus
in interface IUIComp
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
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.public String canRequestFocus()
null
for success,
or other error message.
Default processing is to return "Component not focusable"
if the component doesn't implement the IFocusComp
interface,
"Not virtualized" if the component is not in a virtualized state,
"Component is hidden" if isVisible()
is false
or "Component is disabled" if isEnabled()
is false
.
canRequestFocus
in interface IPropCnr
canRequestFocus
in class PropCnr
null
focus is possible to this component,
or an error message describing why focus cannot be requested.public String couldRequestFocusIfVirtualized(boolean ignoreStates)
null
for success,
or other error message.
Default processing is to return "Component not focusable"
if the component doesn't implement the IFocusComp
interface,
"Component is hidden" if isVisible()
is false
or "Component is disabled" if isEnabled()
is false
.
couldRequestFocusIfVirtualized
in interface IPropCnr
couldRequestFocusIfVirtualized
in class PropCnr
ignoreStates
- Flag indicating that states should be ignored,
such as visible or enabled. If false, hidden or
disabled components return an error message.null
focus is possible to this component,
or an error message describing why focus cannot be requested.public boolean hasFocus()
public String requestFocus()
This method is less precise than requestFocusEx()
, but avoids try-catching.
requestFocus
in interface IComponent
null
for success, otherwise an error message indicating why focus
was not able to be changed.public boolean requestFocusEx() throws FocusException
requestFocusEx
in interface IComponent
FocusException
- If focus could not be changed.public String requestFocus(boolean doAnimate)
This method is less precise than requestFocusEx()
, but avoids try-catching.
requestFocus
in interface IComponent
doAnimate
- Flag to enable animation when selection is changed for e.g.
accordion, swap or tab containers.null
for success, otherwise an error message indicating why focus
was not able to be changed.public boolean requestFocusEx(boolean doAnimate) throws FocusException
requestFocusEx
in interface IComponent
doAnimate
- Flag to enable animation when selection is changed for e.g.
accordion, swap or tab containers.FocusException
- If focus could not be changed.public String requestFocus(IGProp<?> trigger, boolean isRemoteInduced)
This method is less precise than PropCnr.requestFocusEx(IGProp, boolean, IFocusVetoListener)
,
but avoids try-catching.
This method is implemented in PropCnr
, but should only be called
for IFocusComp
implementing property classes. This method will return
"Component not focusable" if called on a non-focus component.
requestFocus
in interface IPropCnr
requestFocus
in class PropCnr
trigger
- The trigger property, null for none.isRemoteInduced
- Flag for remote induced focus.null
for success, otherwise an error message indicating why focus
was not able to be changed.public boolean requestFocusEx(IGProp<?> trigger, boolean isRemoteInduced) throws FocusException
This method is implemented in PropCnr
, but should only be called
for IFocusComp
implementing property classes. This method will throw
FocusException
with message "Component not focusable" if called on a
non-focus component.
requestFocusEx
in interface IPropCnr
requestFocusEx
in class PropCnr
trigger
- The trigger property, null for none.isRemoteInduced
- Flag for remote induced focus.FocusException
- If focus could not be changed.public String requestFocus(IGProp<?> trigger, boolean isRemoteInduced, boolean doAnimate)
This method is less precise than PropCnr.requestFocusEx(IGProp, boolean, IFocusVetoListener)
,
but avoids try-catching.
This method is implemented in PropCnr
, but should only be called
for IFocusComp
implementing property classes. This method will return
"Component not focusable" if called on a non-focus component.
trigger
- The trigger property, null for none.isRemoteInduced
- Flag for remote induced focus.null
for success, otherwise an error message indicating why focus
was not able to be changed.public boolean requestFocusEx(IGProp<?> trigger, boolean isRemoteInduced, boolean doAnimate) throws FocusException
This method is implemented in PropCnr
, but should only be called
for IFocusComp
implementing property classes. This method will throw
FocusException
with message "Component not focusable" if called on a
non-focus component.
trigger
- The trigger property, null for none.isRemoteInduced
- Flag for remote induced focus.FocusException
- If focus could not be changed.public void onFocusGained(IFocusComp opposite, IGProp<?> trigger, boolean isRemoteInduced)
Focus components override this method if they need to process focus lost.
opposite
- Component losing focus, null for none.trigger
- The component triggering the focus, null for none.isRemoteInduced
- Flag indicating this event is due to a remote event.public void onRemoteEvent(RemoteEvent event)
A subclass can override this method to perform appropriate processing and is
not required to call super.onRemoteEvent(e)
.
The onRemoteEvent is NOT called when in a proxied property container, but rather the normal onEventSelf method.
The UIComp implementation processes remote induced focus events.
onRemoteEvent
in interface IGProp<GProp<?>[]>
onRemoteEvent
in class GProp<GProp<?>[]>
event
- The remote event.public void verify(PropVerification verification)
protected boolean verifyComponentScope(UIContainer scopeContainer, String what, PropVerification verification, VSComponent vsOuter)
scopeContainer
- The scope container.what
- What the scope container is.verification
- The property verification class.vsOuter
- The outer VS parent.protected void onPrepare(IAppOwner appOwner, IModuleOwner moduleOwner, boolean isPostCall, List<Throwable> errors) throws PropException
onPrepare
calls
is always parent first, the children. The method is called twice, first time with isPostCall
set to false
, then a second time with true
.onPrepare
in class GProp<GProp<?>[]>
appOwner
- The application owner.moduleOwner
- The Module owner.isPostCall
- Flag indicating this is a post-call.errors
- A list of errors that occurred but did not cause an abort.PropException
- For property errors during the application preparation to need to abort.protected void onPrepare(ClassReference cr, List<Throwable> errors)
Components should override this method to load it's required methods.
cr
- The class reference with a valid reference.errors
- The list of errors that is returned to the caller in case resolving fails.protected void onVirtualizationCompleted(IAppSessionGyro appGyro, IClientSessionGyro clientGyro, VirtualSpace virtualSpace, PropCnr virtualizedProp, boolean isPostResolve)
This method is called to the entire tree of the newly virtualized property container.
onVirtualizationCompleted
in class GProp<GProp<?>[]>
appGyro
- The application gyro instance performing the virtualization.clientGyro
- The client gyro session, can be null
if not
initialized from the client gyro.virtualSpace
- The virtualized VirtualSpace.virtualizedProp
- The property being virtualized.isPostResolve
- Flag indicating this call is done after references are attempted to be resolved.protected void onPropDispose()
The Property Container clears the structure of unsent communication requests to clear memory.
This call is done just at the end of the delete/remove routine in the container, without synchronization.
During this call, whatever components that e.g. the client needs to disposed of is done.
Subclasses needing to perform some intelligent operations upon
deletion should do it by overloading this method and always call the
super.onPropDispose()
method.
onPropDispose
in class PropCnr
public String getTitle()
getTitlePKS()
public KString getTitleKS()
Note: most components uses PlainKString's but e.g. UIChart supports KString with HTML.
getTitle()
public PlainKString getTitlePKS()
getTitle()
protected GProp<?> createTitleProp()
public boolean setTitle(String str)
str
- The title.public boolean setTitle(KString str)
Note: only a few components like UIChart supports KString's with HTML, so this method might fail if you attempt to set a KString with HTML type on e.g. a UILabel.
str
- The KString title.public boolean setTitle(PlainKString str)
str
- The plain KString title.iizi® is a registered trademark of Mindus SARL. © Copyright 2019 Mindus SARL. All rights reserved.