Class ModuleApp
- java.lang.Object
- com.iizix.prop.GProp<GProp<?>[]>
- com.iizix.prop.PropCnr
- com.iizix.prop.ModuleApp
- All Implemented Interfaces:
EventListener
,IClassInstantiationAtResolve
,IGProp<GProp<?>[]>
,IPropCnr
,java.lang.Cloneable
public class ModuleApp extends PropCnr implements IClassInstantiationAtResolve
This Module Applications settings that defines the behavior of the application and contains its settings.- Author:
- Christopher Mindus
Field Summary
Fields inherited from class com.iizix.prop.PropCnr
EMPTY, EMPTY_CLASSES, EMPTY_CNRS, EXTENDS_FRAMEWORK_ERROR_ID
Fields inherited from class com.iizix.prop.GProp
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
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_PRIVATE, EQC_SAVE_FILE, EXT_CONTAINER_EXTENDS, EXT_CONTAINER_EXTENDS_VALID, EXT_EXTENDED, EXT_FINAL, EXT_OVERRIDES, EXT_OVERRIDES_FINAL_ERR, EXT_PRIVATE
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
addPredefinedProps()
Adds the predefined properties for this container.ModuleApp
clone()
Clones the ModuleApp.GThemes
computePossibleThemes()
Lengthy helper function to compute the possible themes for a module application.VSReference
createVSReference(Atom refAtom, PropCnr[] returnParent)
Creates a VSReference instance from the container or any parent containers.GThemes
getApplicationThemes()
Gets the application themes to use for desktop and mobile that are supported.IAppSessionFocusProvider
getAppSessionFocusProvider()
Gets the class implementing the interface for application focus provider.AppLanguages
getConfiguredLanguages()
Gets the configured languages for the Module application.GThemes
getDefaultThemes()
Gets the default themes to use for desktop and mobile.java.lang.String
getDescription()
Gets the description of the application.VSComponent
getInitialVSComponent()
Gets the component that initially should have focus, or be called (if VSAction is returned).protected void
getPredefinedProps()
Gets potential references to predefined properties for this container.SelectorReference
getSelectorReference()
Gets the selector reference.TextTable
getTextTable()
Gets the text table that is assigned to the app.TextTable
getTextTable(java.lang.String languageCode)
Gets the text table used for a particular language code defined in the app.VSReference
getVSReference(Atom refAtom)
Gets the VSReference that is initially used as start-up for the application.void
invalidatePossibleThemes()
Method to invalidate the computed possible themes.boolean
isAppLocalized()
Gets the setting if this is a localized application, i.e.boolean
isSelectorSelected(EnvProps envProps)
Verifies if the Module Application (project) is selected or not.boolean
verify(PropVerification verification)
Verifies this property container.Methods inherited from class com.iizix.prop.PropCnr
__transferChildProps, addProp, addProp, addProp2, addProp2, appendPropValue, canRequestFocus, completeVirtualize, containsProp, containsProp, convertLoadedProp, couldRequestFocusIfVirtualized, createCopyOfAtom, createUniqueAtom, createUniqueAtom, createUniqueAtom, 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, getProp, getProp, getPropBaseReference, getPropCnr, getPropCount, getPropCount, getPropIndex, getPropIndex, getPropIndexes, getProps, getProps, getPropValue, getPropValue, getPropValue, getPropValue, getPropValue, getPropValue, getPropValue, getPropValue0, getReferences, getRetargetedVerifyContainer, getString, getString, getString, getString, getValueClasses, hasFocus, hasSendData, initializeElement, initializeExtendsFramework, initializeProp, initializeValue, initPropCnr, insertProp, insertProp2, isChild, isExtendsOverriden, isExtendsPropertyValid, isExtendsRoot, isPropAddRemoveAllowed, isPropCommunicating, isPropExtended, isSibling, list, list, logPropNotFound, maybeAddProp, onInsertProp, onPropDispose, onPropRemoved, onPropTreeInitialized, onReferenceEvent, paramString, prepare, removeAllProps, removeAllProps2, removeProp, removeProp, removeProp, removeProp, removeProp, removeProp, removeProp, removeProp2, 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, shouldSerializeToXML, toElementString, toNativeValue0, usePropHashMap, usesPropIndex, validateChildPropInValue, validateClassInstances, validatePropType, validatePropValue, verifyInternalUseOnly, verifyTree, virtualize
Methods inherited from class com.iizix.prop.GProp
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, getModuleFolder, getModuleFolder, 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, onEventSelf, onPrepare, onPropInvalidateCache, onPropParentChanged, onPropValueSet, onRemoteEvent, onVirtualizationCompleted, 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
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.iizix.prop.IClassInstantiationAtResolve
shouldInstantiateAtResolve
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, getPropError, getPropError, getPropErrorSeverity, getPropExtendsFlags, getPropFromPath, getPropFromReference, getPropIndex, getPropName, getPropPath, getPropPath, getPropRootPropMgr, getPropTreeErrorSeverity, getPropValue, getPropValue, getReferencePropName, getRelativePropName, getRootParent, getTreeLock, hasChanged, hasPrivateChangeEventProp, hasPropError, hasPropTreeError, info, info, initializeGElement, initializeGProp, isDisposed, isPropChildOf, isPropClientCreated, isPropCreateRequired, isPropExtended, isPropExtendsFinal, isPropExtendsPrivate, isPropExtendsPrivateInRoot, isPropExtendsPrivateInRoot, isPropFile, isPropFolder, isPropNullable, isPropPrivate, isPropReadOnly, isPropReferenceTreeValid, isPropRoot, isPropVirtualized, list, list, list, mapAliasToReference, mapReferenceToAlias, mapReferenceToProjectRelative, moveProp, moveProp, moveProp, onEvent, onEventSelf, onRemoteEvent, removePropError, removePropListener, renameProp, setChanged, setConstraints, setConstraints, setParent, setPrivateChangeEventProp, setPropError, setPropExtendsFinal, setPropExtendsPrivate, setPropNullable, setPropPrivate, setPropReadOnly, setPropValue, setPropValue, severe, severe, severe, toNativeValue, triggerRemoteEvent, triggerRemoteEvent, validateProp, verifyHasPropertyItem, warning, warning, warning
Methods inherited from interface com.iizix.prop.IPropCnr
canRequestFocus, canRequestFocus, couldRequestFocusIfVirtualized, couldRequestFocusIfVirtualized
Constructor Detail
ModuleApp
public ModuleApp()
Creates the applications properties without a name. The name must be set in all cases using thesetPropertyAtom
call.
ModuleApp
public ModuleApp(Atom propertyAtom)
Creates the applications properties with the specified name.- Parameters:
propertyAtom
- the name of the component, unique within it's parent.
Method Detail
addPredefinedProps
protected void addPredefinedProps() throws PropException
Adds the predefined properties for this container. This method is called once just after construction of the property container and sometimes population of it.The method should add properties to create or get reference to using the
maybeAddProp
method. When the PropCnr instance is cloned, the methodgetPredefinedProps()
is called in order for the subclass to be able to retrieve the new instances to these properties, if stored in instance variables.Subclasses must override this method to do the appropriate initialization, as this method does nothing for the PropCnr class implementation.
- Overrides:
addPredefinedProps
in classPropCnr
- Throws:
PropException
- for property exceptions.
getPredefinedProps
protected void getPredefinedProps()
Gets potential references to predefined properties for this container. This method is called once just after cloning of the property container.The method should get reference to using the
getProp(...)
methods. This allows the subclass to be able to retrieve the new instances to the properties created duringaddPredefinedProps()
if stored in instance variables.Subclasses must override this method to do the appropriate initialization, as this method does nothing for the PropCnr class implementation.
- Overrides:
getPredefinedProps
in classPropCnr
getDescription
public java.lang.String getDescription()
Gets the description of the application.- Returns:
- The application description, or null if not defined.
getTextTable
public TextTable getTextTable()
Gets the text table that is assigned to the app. In case the application is localized, then you can get text tables for a particular language code, or all, from this instance.- Returns:
- The text table for the application, or
null
if none is set.
getTextTable
public TextTable getTextTable(java.lang.String languageCode) throws LanguageException
Gets the text table used for a particular language code defined in the app. In the case the language code is mapped to another language, that text table will be returned.- Parameters:
languageCode
- The language code, ornull
for the default language.- Returns:
- The text table for the application, or
null
if none is set. - Throws:
LanguageException
- If the languageCode is unknown.
isAppLocalized
public boolean isAppLocalized()
Gets the setting if this is a localized application, i.e. has support to be displayed in different languages, thus has support uses multiple text tables. This is known by checking the text tables derived text tables and their language codes, and so on. But this is not an optimal solution because it requires computation.- Returns:
- The configured setting by the app developer if this app supports localization. If so, the text table should have derived text tables for all defined language codes. Errors and warnings will be displayed to the app developer if there is a mismatch of the localization settings and defined language codes.
getVSReference
public VSReference getVSReference(Atom refAtom)
Gets the VSReference that is initially used as start-up for the application.- Specified by:
getVSReference
in interfaceIGProp<GProp<?>[]>
- Overrides:
getVSReference
in classPropCnr
- Parameters:
refAtom
- The property asking for the VSReference.- Returns:
- The instance of the
VSReference
ornull
if unassigned. The returned instance could also be a VSParticipant and should therefore be processed accordingly.
createVSReference
public VSReference createVSReference(Atom refAtom, PropCnr[] returnParent)
Creates a VSReference instance from the container or any parent containers. The method is used in the Designer to create a VirtualSpace connection forVSRelativeReference
to look up theVSReference
instance in order to resolve the relative path to the target property.This method needs to be overridden by subclasses of
PropCnr
that has a VSReference as property, and *SHOULD* matchgetVSReference(Atom)
.The default is to re-target the call to the parent container, and if the root, a folder or a file property is reached,
null
is returned.- Overrides:
createVSReference
in classPropCnr
- Parameters:
refAtom
- The property asking for the VSReference.returnParent
- An array of PropCnr [1] that will be filled in with the parent property of the VSRefernce.- Returns:
- The instance of the
VSReference
ornull
if unassigned. The returned instance could also be a VSParticipant and should therefore be processed accordingly.For this method, it's a VSReference.
getInitialVSComponent
public VSComponent getInitialVSComponent()
Gets the component that initially should have focus, or be called (if VSAction is returned).- Returns:
- The initial focus or action to call, null for none.
getAppSessionFocusProvider
public IAppSessionFocusProvider getAppSessionFocusProvider()
Gets the class implementing the interface for application focus provider.- Returns:
- The instance providing custom focus processing, or null for none (i.e. only default processing).
getSelectorReference
public SelectorReference getSelectorReference()
Gets the selector reference.
isSelectorSelected
public boolean isSelectorSelected(EnvProps envProps)
Verifies if the Module Application (project) is selected or not.- Parameters:
envProps
- The Client Properties for the Client connections.- Returns:
- true if selected or no selector is defined, false if unselected or the reference is not resolved.
getConfiguredLanguages
public AppLanguages getConfiguredLanguages()
Gets the configured languages for the Module application.- Returns:
- The application languages to use.
invalidatePossibleThemes
public void invalidatePossibleThemes()
Method to invalidate the computed possible themes.
computePossibleThemes
public GThemes computePossibleThemes()
Lengthy helper function to compute the possible themes for a module application.Once calculated in the server, the value never changes. In the designer, it needs recomputing only when a new panels are added, moved, removed, has theme changes or folders changed/removed with theme masks.
- Returns:
- The return value is a mask of the possible themes.
getDefaultThemes
public GThemes getDefaultThemes()
Gets the default themes to use for desktop and mobile.- Returns:
- The theme mask, potentially excluding desktop or mobile!
getApplicationThemes
public GThemes getApplicationThemes()
Gets the application themes to use for desktop and mobile that are supported.- Returns:
- The theme mask, generally both desktop and mobile, never null.
verify
public boolean verify(PropVerification verification)
Verifies this property container. The check performed is the extension of classes and that no circular reference is present.