public abstract class VSComponent extends PropCnr implements IVSComponent
IVSComponentState.State
IMessageBox.Icon
Modifier and Type | Field and Description |
---|---|
static IVSGenericComponentListener[] |
EMPTY_LISTENERS
Empty list of listeners.
|
protected static HashMap<Atom,IVSComponentState.State> |
statesMap
Properties that are mapped to listeners.
|
EMPTY, 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, PN_IGNORE_UI_FOCUS, 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
Modifier | Constructor and Description |
---|---|
protected |
VSComponent()
Creates a VirtualSpace Field property with the specified name with a null value.
|
protected |
VSComponent(Atom propertyAtom)
Creates a VirtualSpace Field property with the specified name with a null value.
|
protected |
VSComponent(Atom propertyAtom,
VSComponent[] properties)
Creates a property container with the specified name and properties.
|
Modifier and Type | Method and Description |
---|---|
boolean |
addListener(IVSGenericComponentListener listener)
Adds a new listener to the VS component.
|
boolean |
areFree(Runnable callback,
boolean callbackIfFree,
VSComponent... components)
Verifies if this component and other component(s) are included in a work unit currently in
progress in the VirtualSpace.
|
boolean |
areFree(Runnable callback,
boolean callbackIfFree,
VSComponent component)
Verifies if this component and another are included in a work unit currently in progress
in the VirtualSpace.
|
String |
canRequestFocus()
Returns if this component can receive focus.
|
VSComponent |
clone()
Clones the VirtualSpace component.
|
String |
couldRequestFocusIfVirtualized(boolean ignoreStates)
Returns if this component could receive focus if it would be virtualized.
|
Map<String,Object> |
forbiddenGetCustomDataMap(boolean doCreate)
Deprecated.
|
IClientSessionGyro |
getClientSessionGyro()
Returns the Client Session Gyro instance.
|
abstract String |
getComponentIsDisabled()
Gets the focus message for "Component is disabled" but for the component in question.
|
abstract String |
getComponentIsHidden()
Gets the focus message for "Component is hidden" but for the component in question.
|
IVSGenericComponentListener[] |
getComponentListeners()
Gets the listeners of the VS component events.
|
String |
getDescription()
Gets the description of the component.
|
VSComponent |
getNonVirtualized()
Gets the non-virtualized instance of this component, if it exists.
|
VirtualSpace |
getVirtualSpace()
Gets the VirtualSpace instance.
|
protected void |
initPropCnr()
Initializes the ENABLED property to true if it doesn't exist.
|
boolean |
isFree()
Verifies if this component is included in a work unit currently in progress in the VirtualSpace.
|
boolean |
isFree(Runnable callback,
boolean callbackIfFree)
Verifies if this component is included in a work unit currently in progress in the VirtualSpace.
|
void |
onEventSelf(GEvent event)
Checks for state change events and fires it to listeners.
|
void |
onFocusGained(IFocusComp opposite,
IGProp<?> trigger,
boolean isRemoteInduced)
Called to the component when it receives focus.
|
void |
onFocusLost(IFocusComp focusComp,
IGProp<?> trigger,
boolean isRemoteInduced)
Called to the focused component when it loses focus.
|
protected void |
onListenerChanged(IVSGenericComponentListener listener)
Called when a listener is added or removed.
|
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.
|
protected void |
onVirtualizationCompleted(IAppSessionGyro appGyro,
IClientSessionGyro clientGyro,
VirtualSpace virtualSpace,
PropCnr virtualizedProp,
boolean isPostResolve)
Called when virtualization completed.
|
protected void |
onVirtualized(IAppSessionGyro appGyro,
IClientSessionGyro clientGyro,
VirtualSpace virtualSpace,
PropCnr virtualizedProp,
GProp<?> clonedProp)
Called when this property has been virtualized.
|
boolean |
removeListener(IVSGenericComponentListener listener)
Removes a listener from the VS component.
|
__transferChildProps, addPredefinedProps, addProp, addProp, addProp2, addProp2, appendPropValue, canRequestFocus, completeVirtualize, containsProp, containsProp, convertLoadedProp, couldRequestFocusIfVirtualized, 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, getPredefinedProps, 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, hasFocus, hasSendData, initializeElement, initializeExtendsFramework, initializeProp, initializeValue, insertProp, insertProp2, isChild, isExtendsOverriden, isExtendsPropertyValid, isExtendsRoot, isPropAddRemoveAllowed, isPropCommunicating, isPropExtended, isSibling, list, list, logPropNotFound, maybeAddProp, onInsertProp, onPropRemoved, onPropTreeInitialized, onReferenceEvent, paramString, prepare, removeAllProps, removeProp, removeProp, removeProp, removeProp, removeProp, removeProp, removeProp, removeProp2, removeProp2, removeProp2, removeProp2, removeProp2, removeProp2, reorderProps, replaceProps, requestFocus, requestFocus, requestFocusEx, 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, verify, 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, 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, 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
getAction, getAction2, getActionNull, getActionNull2, getField, getField2, getFieldNull, getFieldNull2, getGroup, getGroup2, getGroupNull, getGroupNull2, getTable, getTable2, getTableNull, getTableNull2, getVirtualizedVirtualSpace, getVSComponent, getVSComponent2, getVSComponentNull, getVSComponentNull2, getVSRef, isEnabled, isEnabledInParent, isReadOnly, isReadOnlyInParent, isSelected, isVisible, isVisibleInParent, messageBox, setEnabled, setEnabled, setIgnoreFocusFromUI, setReadOnly, setReadOnly, setSelected, setSelected, setVirtualizeSupportFocus, setVirtualizeSupportFocus, setVisible, setVisible, shouldIgnoreFocusFromUI
requestFocus, requestFocus, requestFocusEx, requestFocusEx
addProp, addProp, addProp2, addProp2, canRequestFocus, canRequestFocus, containsProp, containsProp, couldRequestFocusIfVirtualized, couldRequestFocusIfVirtualized, createCopyOfAtom, createUniqueAtom, createUniqueAtom, enablePropCommunication, enablePropHashMap, getAllProps, getAllProps, getAllProps, getAllProps, getAllProps, getAllProps, getAllProps, getAllProps, getBool, getBool, getBool, getBool, getChildPropError, getChildPropError, getChildPropErrorSeverity, getChildPropErrorSeverity, getErrorsProp, getExtendsError, getExtendsName, getExtendsPossibleClasses, getFirstProp, getFirstProp, getFocusEngine, getInt, getInt, getInt, getInt, getLong, getLong, getLong, getLong, getNumber, getNumber, getNumber, getNumber, getPossibleChildren, getProp, getProp, getProp, getProp, getProp, getProp, getProp, getProp, getProp, getPropCnr, getPropCount, getPropIndex, getPropIndex, getPropIndexes, getProps, getProps, getPropValue, getPropValue, getPropValue, getPropValue, getPropValue, getPropValue, getPropValue, getString, getString, getString, getString, hasFocus, initializeExtendsFramework, insertProp, insertProp2, isChild, isExtendsOverriden, isExtendsRoot, isPropAddRemoveAllowed, isPropExtended, isSibling, removeAllProps, removeProp, removeProp, removeProp, removeProp, removeProp, removeProp, removeProp, removeProp2, removeProp2, removeProp2, removeProp2, removeProp2, removeProp2, reorderProps, requestFocus, requestFocusEx, setBool, setBool, setBool, setBool, setExtendsName, setExtendsOverride, setInt, setInt, setInt, setLong, setLong, setLong, setLong, setNumber, setNumber, setNumber, setNumber, setProp, setProp, setProp, setProp2, setProp2, setPropValue, setPropValue, setPropValue, setPropValue, setPropValue, setPropValue, setString, setString, setString, setString, usePropHashMap, usesPropIndex, validateClassInstances
addPropError, addPropListener, dispose, equals, fine, fine, finer, finer, finest, finest, fromElementString, getAppSessionGyro, getAtomPath, 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, verify, verifyHasPropertyItem, warning, warning, warning
onParentStateChanged
getCustomData, putCustomData, putCustomDataIfAbsent
messageBox, messageBox
public static final IVSGenericComponentListener[] EMPTY_LISTENERS
protected static final HashMap<Atom,IVSComponentState.State> statesMap
protected VSComponent()
protected VSComponent(Atom propertyAtom)
propertyAtom
- the property atom.protected VSComponent(Atom propertyAtom, VSComponent[] 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 IClientSessionGyro getClientSessionGyro()
This method calls
to retrieve the instance from the current thread.IClientSessionGyro.getSessionInstance()
getClientSessionGyro
in interface IGProp<GProp<?>[]>
getClientSessionGyro
in class GProp<GProp<?>[]>
@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 VSComponent clone()
public String getDescription()
getDescription
in interface IVSComponent
protected final void initPropCnr()
initPropCnr
in class PropCnr
public VirtualSpace getVirtualSpace()
getVirtualSpace
in interface IVSComponent
public void onEventSelf(GEvent event)
onEventSelf
in interface IGProp<GProp<?>[]>
onEventSelf
in class GProp<GProp<?>[]>
event
- The property event.public boolean addListener(IVSGenericComponentListener listener)
listener
- The listener for VS component events.public boolean removeListener(IVSGenericComponentListener listener)
listener
- The existing listener for VS component events.protected void onListenerChanged(IVSGenericComponentListener listener)
public IVSGenericComponentListener[] getComponentListeners()
public boolean isFree()
public boolean isFree(Runnable callback, boolean callbackIfFree)
callback
- The callback to call when work completes, or null for none.callbackIfFree
- Performs a call to the callback if free when true.callback
is non-null, it will be called.
The callback
is called if free and the flag callbackIfFree
is true.public boolean areFree(Runnable callback, boolean callbackIfFree, VSComponent component)
callback
- The callback to call when work completes, or null for none.callbackIfFree
- Performs a call to the callback if free when true.component
- The component to verify.callback
is non-null, it will be called.
The callback
is called if free and the flag callbackIfFree
is true.public boolean areFree(Runnable callback, boolean callbackIfFree, VSComponent... components)
callback
- The callback to call when work completes, or null for none.callbackIfFree
- Performs a call to the callback if free when true.components
- The components to verify.callback
is non-null, it will be called.
The callback
is called if free and the flag callbackIfFree
is true.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 onVirtualized(IAppSessionGyro appGyro, IClientSessionGyro clientGyro, VirtualSpace virtualSpace, PropCnr virtualizedProp, GProp<?> clonedProp)
Override to perform required processing.
onVirtualized
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.clonedProp
- The property that is cloned to produce this virtualized property.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 VSComponent getNonVirtualized()
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.
getNonVirtualized
in interface IVSComponent
public abstract String getComponentIsHidden()
public abstract String getComponentIsDisabled()
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 IVSComponent.isVisible()
is false
or "Component is disabled" if IVSComponent.isEnabled()
is false
.
canRequestFocus
in interface IPropCnr
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 IVSComponent.isVisible()
is false
or "Component is disabled" if IVSComponent.isEnabled()
is false
.
couldRequestFocusIfVirtualized
in interface IPropCnr
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 void onFocusGained(IFocusComp opposite, IGProp<?> trigger, boolean isRemoteInduced)
Focus components override this method if they need to process focus lost.
onFocusGained
in interface IFocusComp
opposite
- Component losing focus, null for none.trigger
- The trigger property, null for none.isRemoteInduced
- Flag indicating this event is due to a remote event.public void onFocusLost(IFocusComp focusComp, IGProp<?> trigger, boolean isRemoteInduced)
Focus components override this method if they need to process focus lost.
onFocusLost
in interface IFocusComp
focusComp
- Component receiving focus, null for none.trigger
- The trigger property, 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.
onRemoteEvent
in interface IGProp<GProp<?>[]>
onRemoteEvent
in class GProp<GProp<?>[]>
event
- The remote event.iizi® is a registered trademark of Mindus SARL. © Copyright Mindus SARL, 2020. All rights reserved.