Class AbstractContentUIContainer<ITEM extends IContentItem,ITEM_CONTENT extends IContentData<ITEM>>
- All Implemented Interfaces:
IBackReferenceProvider,EventListener,IFocusComp,IMessageBox,IComponent,ICustomDataProvider,IGProp<GProp<?>[]>,IPropCnr,IUIActionHolder,IUIComp,IUIContainer,IUIContextMenuOwner,IUIFocusComp,IUIIndexedSelectionComp,IUISelectionComp,IUISingleIndexedSelectionComp,IVSColumnBestValueListener,IVSComponentListener,IVSComponentState,IVSFieldListener,IVSGenericComponentListener,IVSTableColumnReferenceOwner,IVSTableListener,Cloneable
- Direct Known Subclasses:
MapMarkers,MLGroup
- Author:
- Christopher Mindus
Nested Class Summary
Nested classes/interfaces inherited from interface com.iizix.gyro.IMessageBox
IMessageBox.IconNested classes/interfaces inherited from interface com.iizix.prop.vs.IVSComponentState
IVSComponentState.StateField Summary
FieldsModifier and TypeFieldDescriptionprotected static final StringThe property name: selection type "selType".static final StringProperty name for VSTableReference.static final StringProperty name for the setting of "use content provider" (defaults to "false").Fields inherited from class com.iizix.prop.ui.UIContainer
UICOMP_CLASS, VS_STATE_FOCUS_PROP_NAME, WARN_EMPTY_PROP_NAMEFields inherited from class com.iizix.prop.ui.UIComp
EMPTY, REMOTE_FOCUS_EVENT, styles, vsFieldFields inherited from class com.iizix.prop.PropCnr
EMPTY_CLASSES, EMPTY_CNRS, EXTENDS_FRAMEWORK_ERROR_IDFields 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_2Fields inherited from interface com.iizix.prop.IGProp
EQC_ERROR_IGNORE_ALL, EQC_ERROR_IGNORE_REFERENCES, EQC_IGNORE_ARRAY, EQC_IGNORE_VOLATILE_OR_EDITOR, EQC_INCLUDE_PRIVATE, EQC_SAVE_FILE, EXT_CONTAINER_EXTENDS, EXT_CONTAINER_EXTENDS_VALID, EXT_EXTENDED, EXT_FINAL, EXT_OVERRIDES, EXT_OVERRIDES_FINAL_ERR, EXT_PRIVATEFields inherited from interface com.iizix.gyro.IMessageBox
ICON_ERROR, ICON_INFORMATION, ICON_MAP, ICON_NONE, ICON_QUESTION, ICON_WARNINGFields inherited from interface com.iizix.prop.ui.IUIComp
ERROR, INFORMATION, NONE, REMOTE_FOCUS_EVENT, WARNINGFields inherited from interface com.iizix.prop.ui.selection.IUISelectionComp
SELECTION_TYPE_MULTIPLE, SELECTION_TYPE_NONE, SELECTION_TYPE_SINGLEConstructor Summary
ConstructorsConstructorDescriptionCreates the content property container.Creates the content property container.Method Summary
Modifier and TypeMethodDescriptionvoidadd(int index, ITEM_CONTENT item) Inserts a new item before the specified index.voidadd(ITEM_CONTENT item) Adds a new item to the end of the list.protected voidaddMappings(VSMappings mappings, VSComponent vsStateFocus) Gets the mappings of a VirtualSpace to the panel components.protected voidaddMappingsTable(String uiRef, VSMappings mappings, VSComponent vsStateFocus) Gets the VSTable mappings of a VirtualSpace to the panel components.Clear the selection.clone()Clones this instance.protected IContentProvider<ITEM,ITEM_CONTENT> Creates the content provider.protected abstract IContentProvider<ITEM,ITEM_CONTENT> Creates and returns a new instance of a default content provider.protected abstract ITEMcreateItem(Atom atom, ITEM_CONTENT data) Creates a new property item from an item data holder and initializes the property.protected ObjectequalsTree(PropCnr pc2, int how) Checks for equality in the whole container structure.get(int index) Gets an item at the specified index.getAll()Gets all items.Gets the content provider for the API.getBestVSColumnHeaderValueType(VSRelativeReference<?> reference) Requests the value type that would best suit the listener.protected abstract Value.Type[]Gets the value type that would best suit the for the columns.protected IContentProvider<ITEM,ITEM_CONTENT> Gets the or created content provider to use.Gets the VS table that is associated with the container to provide the items.protected abstract Object[]Gets the atoms of the references that are used to specify the VS column header connections for the VS table.int[]Gets the connected VS table columns in the table.getItem(int index) Gets an item at specified index.Return the class of items stored in the container.abstract Class<ITEM_CONTENT>Return the class of content items stored in the container.intReturns the item count.ITEM[]getItems()Gets the container items.final MethodGets the method for the OnUIAction event at runtime.final MethodReturns the method to use for onUISelection notifications that is attached to this selection component.voidGets potential references to predefined properties for this container.intGets the first selected index.int[]Gets the selected indicies.Gets the current selection of the component.getSelectionListenerHandler(boolean doCreate) Returns the generic selection listener.Returns the selection property atom for verification of selection changes.intGets the selection type of the component.protected intgetVSColumnIndex(Object nameOrAtom) Gets the table column reference property with the String or Atom.final VSTableGets the VSTable.final VSTableGets the VSTable for a VSTableColumnReference instance.Gets the table reference owner data for the table column reference.booleanhasDiscreteContentChanges(boolean reset) Flag for contents changes for API when content provider is using discrete components added by the user.intindexOf(ITEM_CONTENT item) Returns the index of an item.isBackReferenceValid(AnnotationType annotationType, String name, boolean isRefOnly) Validates if the back-reference specified is referenced in the first place, i.e.booleanReturns whether the container should have children in a normal conditions, i.e.booleanReturns the selection of state of the component.booleanisUpdatingInCurrentThread(boolean refreshVS) Checks if the current thread is currently in updates mode (with updates from VS).voidonBroken(VSRelativeReference<?> reference, VSTable table) Called when the property reference has been broken, i.e.voidonCellStateChanged(VSField cell, IVSComponentState.State state, boolean on) Called when the cell changes state.voidonCellValueChanged(VSField cell, Value value, GProp<?> trigger, IPostEventProcessing postProcessing) Called when the cell value is set.voidonEventSelf(GEvent event) Event checking to clear cache.protected voidonItemAdded(ITEM item) Item added event.protected voidonItemRemoved(ITEM item) Item removed event.voidonParentStateChanged(IVSComponent parent, IVSComponentState.State state, boolean on) Called when the parent changes state.protected voidonPrepare(ClassReference cr, List<Throwable> errors) Called to resolve methods for the component from main "onPrepare" once the ClassReference has been found.protected voidCalled when disposed of.protected voidonPropParentChanged(PropCnr oldParent, PropCnr newParent) Called when the parent is changed for this class.voidonResolved(VSRelativeReference<?> reference, VSTable table) Called when the property reference has been resolved.voidonRowAdded(VSRow row, int index) Called when a row is added.voidonRowRemoved(VSRow row, int index) Called when a row is removed.voidonRowStateChanged(VSRow row, IVSComponentState.State state, boolean on) Called when a row selection state changed.protected voidonSelectionChanged(GEvent event) Method called when the selection of the component changed due to a property change (value changed, property added or removed).voidonSelectionChanged(ITEM_CONTENT item, boolean on) Callback when an item is selected or unselected.voidonSingleSelectionChanged(VSTable table, int index) Called when the single selection changes.voidonStateChanged(VSTable table, IVSComponentState.State state, boolean on) Called when the table changes state.protected voidonVirtualizationCompleted(IAppSessionGyro appGyro, IClientSessionGyro clientGyro, VirtualSpace virtualSpace, boolean isPostResolve) Called when virtualization completed.voidrefresh()This method is called from any thread to trigger a refresh of the contents of all the container items.protected final voidrefresh(int dirty) Requests a refresh of the contents depending on the flag.voidrefresh(ITEM_CONTENT item) This method is called from any thread when an item property container has been changed.remove(int index) Removes an item at the specified index.booleanremove(ITEM_CONTENT item) Removes an item.booleanRemoves all items.booleansetContentProvider(IContentProvider<ITEM, ITEM_CONTENT> customContentProvider) Sets a custom content provider to be used.setSelection(int index) Sets the selection as a single selected item at specified index.protected voidupdate()Called to update the contents if required with new data.booleanReturns the flag to use the content provider.booleanverify(PropVerification verification) Verifies this property container.Methods inherited from class com.iizix.prop.ui.UIContainer
addPredefinedProps, addPredefinedPropsImpl, canAcceptUIContainerFocus, createCompsCnr, doIssueEmptyContainerWarning, getApproximateSize, getComponentCount, getComponents, getCompsCnr, getDeviceType, getFirstContainerVSStateFocus, getFirstUIComponent, getFirstUIComponentNull, getRadioSelectionComponents, getSelectedRadioComponent, getUIComponent, getUIComponentNull, getVSStateFocus, hasImplicitAlignFillX, hasImplicitAlignFillY, invokeOnUICreateTree, isMobileContextMenuSupported, mustHaveHeight, mustHaveWidth, onBroken, onComponentSelectedInParent, onResolved, onSelectionChanged, onStateChanged, onVirtualContainerCreated, onVSComponentSelectionChanged, resetComponentID, setRadioSelectionComponent, setUIContainerFocus, updateUICompsReference, verifyComponentScopeMethods inherited from class com.iizix.prop.ui.UIComp
add, assignFontInfoResolver, canAlignX, canAlignY, canFillX, canFillY, canRequestFocus, canRequestFocus, clearErrorMessage, couldRequestFocusIfVirtualized, createStyles, createTitleProp, disconnectVSField, doUpdateVSFieldFromUIComponent, enterVSProcessing, exitVSProcessing, fireSelection, fireSelection, forbiddenGetCustomDataMap, getBadge, getBestVSFieldValueType, getComponentID, getComponentMappings, getCSSClassNames, getErrorMessage, getErrorMessage, getErrorMessageEx, getErrorMessageString, getErrorMessageString, getErrorMessageStringEx, getFixHeight, getFixWidth, getFontInfo, getForcedAlignX, getForcedAlignY, getKStringText, getLayout, getLayoutMgr, getLayoutMgr, getMappedVSComponent, getMessage, getMessageText, getPixelHeight, getPixelWidth, getSize, getStyles, getStyles, getText, getTitle, getTitleKS, getTitlePKS, getTooltip, getTooltipText, getTrigger, getUIPanel, getUIParent, getValue, getValue, getVirtualSpace, getVSField, hasExplicitHeight, hasExplicitWidth, hasFocus, hasImplicitHeight, hasImplicitWidth, hasSelectionChanged, initPropCnr, isEnabled, isMobile, isReadOnly, isRTL, isVisible, isVSFieldDisconnected, mustHaveExplicitHeight, mustHaveExplicitWidth, onBroken, onFocusGained, onNotifySelectionChanged, onPrepare, onRemoteEvent, onResolved, onStateChanged, onValueChanged, processVSComponentSelection, reconnectVSField, requestFocus, requestFocus, requestFocus, requestFocus, requestFocusEx, requestFocusEx, requestFocusEx, requestFocusEx, setBadge, setBadge, setComponentToVSField, setCSSClassNames, setCSSClassNames2, setEnabled, setEnabled, setErrorMessage, setErrorMessage, setErrorMessage, setErrorMessage, setHTMLText, setLayoutMgr, setMessage, setMessage, setReadOnly, setReadOnly, setText, setText, setTitle, setTitle, setTitle, setTooltip, setTooltip, setVisible, setVisible, setVSFieldMessageToComponent, setVSFieldToComponentMethods inherited from class com.iizix.prop.PropCnr
__transferChildProps, addProp, addProp, addProp2, addProp2, appendPropValue, completeVirtualize, containsProp, containsProp, convertLoadedProp, createCopyOfAtom, createUniqueAtom, createUniqueAtom, createUniqueAtom, createVSReference, doPropEqualsArrayValues, enablePropCommunication, enablePropHashMap, 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, getRetargetedVerifyContainer, getString, getString, getString, getString, getValueClasses, getVSReference, hasSendData, initializeElement, initializeExtendsFramework, initializeProp, initializeValue, insertProp, insertProp2, isChild, isExtendsOverriden, isExtendsPropertyValid, isExtendsRoot, isPropAddRemoveAllowed, isPropCommunicating, isPropExtended, list, list, logPropNotFound, maybeAddProp, onInsertProp, onPropRemoved, onPropTreeInitialized, onReferenceEvent, paramString, prepare, removeAllProps, removeAllProps2, removeProp, removeProp, removeProp, removeProp, removeProp, removeProp, removeProp, removeProp2, 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, shouldSerializeToXML, toElementString, toNativeValue0, usePropHashMap, usesPropIndex, validateChildPropInValue, validateClassInstances, validatePropType, validatePropValue, verifyInternalUseOnly, verifyTree, virtualizeMethods inherited from class com.iizix.prop.GProp
addPropError, addPropListener, appendProp, convertPropError, dispose, equals, equals, equalsErrors, equalsObj, equalsPropValue, equalValues, 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, getReferencePropNameNoAssert, getRelativePropName, getRootFromName, getRootName, getRootParent, getRootParentNoAssert, getTreeLock, hasChanged, hasCircularReferencesError, 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, isPropRootLoading, isPropRootTreeModificationsAllowed, isPropUSER, isPropValueTreeLockNeeded, isPropVirtualized, isPropVirtualizing, isPropVolatile, isPropVolatileOrEditorOnly, isProxied, isSibling, list, list, list, mapAliasToReference, mapAliasToReference, mapReferenceToAlias, mapReferenceToAlias, mapReferenceToProjectRelative, modifyPropValue, moveProp, moveProp, moveProp, onEvent, onPropInvalidateCache, onPropValueSet, paramString, 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, warning, warning, warningMethods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.iizix.IComponent
clearErrorMessage, getBadge, getKStringText, getLayoutMgr, getMessage, getMessageText, getStyles, getText, getTooltip, getTooltipText, getUIPanel, getUIParent, isEnabled, isReadOnly, isVisible, messageBox, requestFocus, requestFocus, requestFocusEx, requestFocusEx, setBadge, setBadge, setEnabled, setErrorMessage, setErrorMessage, setHTMLText, setLayoutMgr, setMessage, setMessage, setReadOnly, setText, setText, setTooltip, setTooltip, setVisibleMethods inherited from interface com.iizix.prop.ICustomDataProvider
forbiddenGetCustomDataMap, getCustomData, putCustomData, putCustomDataIfAbsentMethods inherited from interface com.iizix.gyro.IFocusComp
requestFocus, requestFocus, requestFocusEx, requestFocusExMethods inherited from interface com.iizix.prop.IGProp
addPropError, addPropListener, dispose, equals, fine, fine, finer, finer, finest, finest, fromElementString, getAppSessionGyro, getAtomPath, getClientSessionGyro, getConstraints, getEnvironment, getErroredPropItems, getErroredProps, getErrorsProp, getExtendsRootContainer, getFullPropName, getFullPropNameDebug, getModuleFolder, getModuleFolder, getParent, getParent, getPropAtom, getPropBaseReference, getPropError, getPropError, getPropErrorSeverity, getPropExtendsFlags, getPropFromPath, getPropFromReference, getPropIndex, getPropName, getPropPath, getPropPath, getPropRootPropMgr, getPropTreeErrorSeverity, getPropValue, getPropValue, getReferencePropName, getRelativePropName, getRootParent, getTreeLock, getValueClasses, getVSReference, hasChanged, hasCircularReferencesError, hasPrivateChangeEventProp, hasPropError, hasPropTreeError, info, info, initializeGElement, initializeGProp, isDisposed, isPropChildOf, isPropClientCreated, isPropCommunicating, isPropCreateRequired, isPropExtended, isPropExtendsFinal, isPropExtendsPrivate, isPropExtendsPrivateInRoot, isPropExtendsPrivateInRoot, isPropFile, isPropFolder, isPropNullable, isPropPrivate, isPropReadOnly, isPropReferenceTreeValid, isPropRoot, isPropVirtualized, isSibling, list, list, list, list, list, mapAliasToReference, mapReferenceToAlias, mapReferenceToProjectRelative, moveProp, moveProp, moveProp, onEvent, 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, warning, warning, warningMethods inherited from interface com.iizix.gyro.IMessageBox
messageBox, messageBox, messageBoxMethods inherited from interface com.iizix.prop.IPropCnr
addProp, addProp, addProp2, addProp2, canRequestFocus, canRequestFocus, canRequestFocus, containsProp, containsProp, couldRequestFocusIfVirtualized, couldRequestFocusIfVirtualized, couldRequestFocusIfVirtualized, createCopyOfAtom, createUniqueAtom, createUniqueAtom, enablePropCommunication, enablePropHashMap, getAllProps, getAllProps, getAllProps, getAllProps, getAllProps, getAllProps, getAllProps, getAllProps, getBool, getBool, getBool, getBool, getChildPropError, getChildPropError, getChildPropErrorSeverity, getChildPropErrorSeverity, getErrorsProp, getExtendsError, getExtendsName, getExtendsPossibleClasses, getFirstProp, getFirstProp, getFocusEngine, getInt, getInt, getInt, getInt, getLong, getLong, getLong, getLong, getNumber, getNumber, getNumber, getNumber, getPossibleChildren, getProp, getProp, getProp, getProp, getProp, getProp, getProp, getProp, getProp, getProp, getProp, getPropCnr, getPropCount, getPropIndex, getPropIndex, getPropIndexes, getProps, getProps, getPropValue, getPropValue, getPropValue, getPropValue, getPropValue, getPropValue, getPropValue, getString, getString, getString, getString, hasFocus, initializeExtendsFramework, insertProp, insertProp2, isChild, isExtendsOverriden, isExtendsRoot, isPropAddRemoveAllowed, isPropExtended, removeAllProps, removeAllProps2, removeProp, removeProp, removeProp, removeProp, removeProp, removeProp, removeProp, removeProp2, removeProp2, removeProp2, removeProp2, removeProp2, removeProp2, removeProp2, reorderProps, requestFocus, requestFocusEx, setBool, setBool, setBool, setBool, setExtendsName, setExtendsOverride, setInt, setInt, setInt, setLong, setLong, setLong, setLong, setNumber, setNumber, setNumber, setNumber, setProp, setProp, setProp, setProp2, setProp2, setPropValue, setPropValue, setPropValue, setPropValue, setPropValue, setPropValue, setString, setString, setString, setString, usePropHashMap, usesPropIndex, validateClassInstancesMethods inherited from interface com.iizix.prop.ui.IUIActionHolder
getBaseJavaReferenceMethods inherited from interface com.iizix.prop.ui.IUIComp
canAcceptUIContainerFocus, disconnectVSField, getComponentID, getComponentMappings, getContainerFirstUIComponent, getContainerFirstUIComponentNull, getCSSClassNames, getDeviceType, getErrorMessage, getErrorMessage, getFirstUIComponent, getFirstUIComponentNull, getFixHeight, getFixWidth, getLayout, getLayoutMgr, getPanelUIComponent, getPanelUIComponentNull, getUIRef, getValue, getValue, getVirtualSpace, getVSField, isMobile, isRTL, isVSFieldDisconnected, reconnectVSField, setComponentToVSField, setCSSClassNames, setCSSClassNames2, setErrorMessage, setErrorMessage, setUIContainerFocus, setVSFieldMessageToComponent, setVSFieldToComponentMethods inherited from interface com.iizix.prop.ui.IUIContextMenuOwner
getContainedContextMenu, getContextMenu, getReferencedContextMenu, isContextMenuSupported, onBroken, onResolvedMethods inherited from interface com.iizix.prop.ui.IUIFocusComp
onFocusGained, onFocusLostMethods inherited from interface com.iizix.prop.ui.selection.IUIIndexedSelectionComp
isSelectionIndexBased, setSelection, setSelection, setSelection, setSelection, setSelectionMethods inherited from interface com.iizix.prop.ui.selection.IUISelectionComp
addSelectionListener, isSelectionBooleanBased, isSelectionCellBased, isSelectionTriStateBased, removeSelectionListener, setSelectionMethods inherited from interface com.iizix.prop.ui.selection.IUISingleIndexedSelectionComp
getFirstSelectedIndex, setSelectionMethods inherited from interface com.iizix.prop.vs.IVSFieldListener
getBestVSFieldValueType, onBroken, onResolved, onStateChanged, onValueChanged
Field Details
TABLE_REF_PROP_NAME
Property name for VSTableReference.- See Also:
USE_CONTENT_PROVIDER_PROP_NAME
Property name for the setting of "use content provider" (defaults to "false").- See Also:
PN_SELECTION_TYPE
The property name: selection type "selType".- See Also:
Constructor Details
AbstractContentUIContainer
public AbstractContentUIContainer()Creates the content property container.AbstractContentUIContainer
Creates the content property container.- Parameters:
atom- The atom name.
Method Details
getPredefinedProps
public 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:
getPredefinedPropsin classUIContainer
equalsTree
Checks for equality in the whole container structure.NOTE: This method should not be overridden except in extreme situations, e.g. for MememtoPropCnr.
- Overrides:
equalsTreein classPropCnr- Parameters:
pc2- The property value to compare with.how- Flags EQC_* values for equal checking.- Returns:
- Both atom and value are equal on all levels.
onPrepare
Called to resolve methods for the component from main "onPrepare" once the ClassReference has been found.Components should override this method to load it's required methods.
getOnUISelectionMethod
Returns the method to use for onUISelection notifications that is attached to this selection component. The method name is not important, but must have the annotation and signature:@OnUISelection(name = "some/property")
public void onUISelection(UISelectionEvent event)- Specified by:
getOnUISelectionMethodin interfaceIUISelectionComp- Returns:
- The method, or null if none is registered.
getOnUIActionMethod
Gets the method for the OnUIAction event at runtime. The method can be stored in another instance, e.g. a group holding multiple action items.- Specified by:
getOnUIActionMethodin interfaceIUIActionHolder- Returns:
- The method for OnUIAction event, null for none.
isBackReferenceValid
Validates if the back-reference specified is referenced in the first place, i.e. is valid or not.- Specified by:
isBackReferenceValidin interfaceIBackReferenceProvider- Parameters:
annotationType- The annotation type.name- The class or method name.isRefOnly- Flag indicating the back reference is not required, but must be valid otherwise.- Returns:
- null for valid, otherwise an error message.
clone
Clones this instance.- Overrides:
clonein classUIContainer- Returns:
- The new cloned instance.
onVirtualizationCompleted
protected void onVirtualizationCompleted(IAppSessionGyro appGyro, IClientSessionGyro clientGyro, VirtualSpace virtualSpace, boolean isPostResolve) Called when virtualization completed.Overriding classes must call
super.onVirtualizationCompleted(IAppSessionGyro appGyro,IClientSessionGyro clientGyro,VirtualSpace virtualSpace,boolean isPostResolve)if they override this method.This method is called to the entire tree of the newly virtualized property container.
- Overrides:
onVirtualizationCompletedin classPropCnr- Parameters:
appGyro- The application gyro instance performing the virtualization.clientGyro- The client gyro session, can benullif not initialized from the client gyro.virtualSpace- The virtualized VirtualSpace.isPostResolve- Flag indicating this call is done after references are attempted to be resolved.
onPropParentChanged
Called when the parent is changed for this class. The default implementation does nothing and must be overridden by subclasses.- Overrides:
onPropParentChangedin classGProp<GProp<?>[]>- Parameters:
oldParent- The old parent (or null if none).newParent- The new parent (or null if none).
onPropDispose
protected void onPropDispose()Called when disposed of.- Overrides:
onPropDisposein classUIComp
onEventSelf
Event checking to clear cache.- Specified by:
onEventSelfin interfaceIGProp<ITEM extends IContentItem>- Overrides:
onEventSelfin classUIComp- Parameters:
event- The property event.
onItemAdded
Item added event.Subclasses can implements its routine to initialize the required object that governs the API behavior of the property.
Do not forget to FIRST call the
super.onItemAdded(item)if overridden.- Parameters:
item- The item added.
onItemRemoved
Item removed event.Subclasses can implements its routine to clean-up a potentially required object that governs the API behavior of the property.
Do not forget to FIRST call the
super.onItemRemoved(item)if overridden.- Parameters:
item- The item removed.
getItems
Gets the container items.- Returns:
- A cached array of items, DO NOT MODIFY the array.
refresh
public void refresh()This method is called from any thread to trigger a refresh of the contents of all the container items. This method should be also be called when the item count has changed.refresh
This method is called from any thread when an item property container has been changed.- Parameters:
item- The item to refresh.
getVSTableReferenceOwnerData
Gets the table reference owner data for the table column reference.- Specified by:
getVSTableReferenceOwnerDatain interfaceIVSTableColumnReferenceOwner- Returns:
- The VSReferenceOwnerData instance, always non-null.
getVSTable
Gets the VSTable.- Returns:
- The table for the reference, or null if not found.
getVSTable
Gets the VSTable for a VSTableColumnReference instance.- Specified by:
getVSTablein interfaceIVSTableColumnReferenceOwner- Parameters:
ref- The reference instance, null when property-editing the reference in the Designer.- Returns:
- The table for the reference, or null if not found.
getContentTable
Gets the VS table that is associated with the container to provide the items.- Returns:
- The table connected, or null for none.
getContentTableColumns
public int[] getContentTableColumns()Gets the connected VS table columns in the table.- Returns:
- The array of VS table column indicies, or null if a content provider is not used. Note that an instance in the array may be -1 if not connected.
Note: this array is cached AND SHOULD NOT BE MODIFIED.
onResolved
Called when the property reference has been resolved. UI components use this method to set its state according to the field.- Specified by:
onResolvedin interfaceIVSTableListener- Parameters:
reference- The VSRelativeReference instance holding the reference.table- The target reference.
onBroken
Called when the property reference has been broken, i.e. unresolved.- Specified by:
onBrokenin interfaceIVSTableListener- Parameters:
reference- The VSRelativeReference instance holding the reference.table- The target reference.
onStateChanged
Called when the table changes state.- Specified by:
onStateChangedin interfaceIVSTableListener- Parameters:
table- The VS table.state- The state change.on- New state.
onSingleSelectionChanged
Called when the single selection changes.- Specified by:
onSingleSelectionChangedin interfaceIVSTableListener- Parameters:
table- The table.index- The row index, -1 if table is unselected.
onParentStateChanged
Called when the parent changes state.- Specified by:
onParentStateChangedin interfaceIVSComponentListener- Overrides:
onParentStateChangedin classUIComp- Parameters:
parent- The parent who's state was changed.state- The state change, possible values PARENT_ENABLED, PARENT_READONLY, PARENT_VISIBLE.on- New state.
onRowAdded
Called when a row is added.- Specified by:
onRowAddedin interfaceIVSTableListener- Parameters:
row- The row.index- The index.
onRowRemoved
Called when a row is removed.- Specified by:
onRowRemovedin interfaceIVSTableListener- Parameters:
row- The row.index- The index.
onRowStateChanged
Called when a row selection state changed.- Specified by:
onRowStateChangedin interfaceIVSTableListener- Parameters:
row- The row.state- The state change.on- New state.
onCellStateChanged
Called when the cell changes state.Subclasses may override this method to not perform the default action, i.e. to call
refresh(REFRESH_CONTENTS)and perform a more efficient update of the VSField updated cell state.- Specified by:
onCellStateChangedin interfaceIVSTableListener- Parameters:
cell- The VS cell.state- The state change.on- New state.
onCellValueChanged
public void onCellValueChanged(VSField cell, Value value, GProp<?> trigger, IPostEventProcessing postProcessing) Called when the cell value is set.Subclasses may override this method to not perform the default action, i.e. to call
refresh(REFRESH_CONTENTS)and perform a more efficient update of the VSField cell updated.- Specified by:
onCellValueChangedin interfaceIVSTableListener- Parameters:
cell- The VS field.value- The value, never null, butvalue.isNull()could be true.trigger- The trigger property that may be null.postProcessing- Post-processing instance.
getBestVSColumnHeaderValueType
Requests the value type that would best suit the listener.- Specified by:
getBestVSColumnHeaderValueTypein interfaceIVSColumnBestValueListener- Parameters:
reference- The VSRelativeReference instance holding the reference.- Returns:
- null if none is available.
useContentProvider
public boolean useContentProvider()Returns the flag to use the content provider.- Returns:
- true if the content provider is used with API or VirtualSpace support, false if items are as defined in the Designer.
setContentProvider
Sets a custom content provider to be used. A full refresh will automatically be done.- Parameters:
customContentProvider- The custom content provider.- Returns:
- true for success, false if content provider support is not enabled for the container due to the settings, or the same content provider is set twice.
getItemCount
public int getItemCount()Returns the item count.- Returns:
- The current count of items.
getItem
Gets an item at specified index.- Parameters:
index- The index of the item property.- Returns:
- The property at specified index, null if not found.
createContentProvider
Creates the content provider.- Returns:
- The created content provider.
getContentProvider
Gets the or created content provider to use.- Returns:
- A content provider, custom if defined and successfully created.
getVSColumnIndex
Gets the table column reference property with the String or Atom. This call makes it possible to redirect the reference into another container, e.g. for the MList default item. By default, the property is taken from this container.- Parameters:
nameOrAtom- The String name or Atom name.- Returns:
- The VS table column index found, or -1 for none.
hasDiscreteContentChanges
public boolean hasDiscreteContentChanges(boolean reset) Flag for contents changes for API when content provider is using discrete components added by the user.- Parameters:
reset- Flag to reset changes.- Returns:
- true if the contents array is changes since last call (that was reset), false otherwise.
getAPIContentProvider
Gets the content provider for the API.- Returns:
- The content provider, or null if API is not supported or none is set.
refresh
protected final void refresh(int dirty) Requests a refresh of the contents depending on the flag.This method is called e.g. when a new column is added to rebuild the table contents. Be careful when calling this method as it may cause a lot of processing at a later stage, triggering new contents to be sent to the client side. The content is not refreshed upon returning from the call, it is done at a later stage.
- Parameters:
dirty- The dirty flags.
update
protected void update()Called to update the contents if required with new data. The method does nothing if e.g. a call torefresh(int)hasn't been called.isUpdatingInCurrentThread
public boolean isUpdatingInCurrentThread(boolean refreshVS) Checks if the current thread is currently in updates mode (with updates from VS).- Parameters:
refreshVS- Flag indicating only VS refreshing must be tested, not other changes in e.g. the UI.- Returns:
- true If updates are currently being done, false otherwise.
addMappings
Gets the mappings of a VirtualSpace to the panel components.The default is to find the relative references to VS and add those references. Override to provide other functionality.
- Overrides:
addMappingsin classUIComp- Parameters:
mappings- The mappings instance to fill in.vsStateFocus- Do not go past this component when going up in the parent tree, null for none.
addMappingsTable
Gets the VSTable mappings of a VirtualSpace to the panel components. Override this method to add mappings when the contents is connected to a table and the items are perhaps not yet created.The default is to find the relative references to VS and add those references. Override to provide other functionality.
- Parameters:
uiRef- The reference property name of "uiComp", null if not yet retrieved.mappings- The mappings instance to fill in.vsStateFocus- Do not go past this component when going up in the parent tree, null for none.
isEmptyContainerAllowed
public boolean isEmptyContainerAllowed()Returns whether the container should have children in a normal conditions, i.e. a warning message should be displayed in the Designer when it is empty. This is intended to be used to avoid use of empty containers. Some containers, e.g. the mobile heading is allowed to be empty.- Overrides:
isEmptyContainerAllowedin classUIContainer- Returns:
- true if a VS table is connected and the content provider is set, false otherwise.
verify
Verifies this property container. The check performed is the extension of classes and that no circular reference is present.- Specified by:
verifyin interfaceIGProp<ITEM extends IContentItem>- Overrides:
verifyin classUIContainer- Parameters:
verification- The property verification class.- Returns:
- true if verification should proceed, false if disposed of and verification should not take place.
getItemClass
Return the class of items stored in the container.- Returns:
- The property container class for items.
getItemContentClass
Return the class of content items stored in the container.- Returns:
- The property container class for content items.
createItem
Creates a new property item from an item data holder and initializes the property.- Parameters:
atom- The name of the item property.data- The data to initialize the item property with.- Returns:
- The item property.
createDefaultContentProvider
Creates and returns a new instance of a default content provider.- Returns:
- The default content provider to use.
getContentTableColumnReferenceNames
Gets the atoms of the references that are used to specify the VS column header connections for the VS table.- Returns:
- The array of atoms or Strings.
getBestVSColumnHeaderValueTypes
Gets the value type that would best suit the for the columns.- Returns:
- null if none is available.
getSelectionPropAtom
Returns the selection property atom for verification of selection changes.This method is used by the framework in UIComp to fire selection events when the property value changes.
- Specified by:
getSelectionPropAtomin interfaceIUISelectionComp- Returns:
- null, as the selection property is not property based.
getSelectionListenerHandler
Returns the generic selection listener.- Specified by:
getSelectionListenerHandlerin interfaceIUISelectionComp- Parameters:
doCreate- Create the listener handler if it doesn't exist, false not to.- Returns:
- The selection listener handler, or null if not created.
add
Adds a new item to the end of the list. Duplicates are not allowed.- Parameters:
item- The item to insert.- Throws:
IllegalStateException- When the VirtualSpace is connected and changes must be done from there and not by means of API functions, or if the item already is present in the list. This exception is also thrown if the content provider is not used or does not support API usage.
add
Inserts a new item before the specified index. Duplicates are not allowed.- Parameters:
index- The insertion point index, -1 for last.item- The item to insert.- Throws:
IndexOutOfBoundsException- If the index is not valid.IllegalStateException- When the VirtualSpace is connected and changes must be done from there and not by means of API functions, or if the item already is present in the list. This exception is also thrown if the content provider is not used or does not support API usage.
remove
Removes an item at the specified index.- Parameters:
index- The item to remove.- Returns:
- The removed item, null if a content provider is not present.
- Throws:
IndexOutOfBoundsException- If the index is not valid.IllegalStateException- When the VirtualSpace is connected and changes must be done from there and not by means of API functions. This exception is also thrown if the content provider is not used or does not support API usage.
remove
Removes an item.- Parameters:
item- The item to remove.- Returns:
- true for success, false if not found.
- Throws:
IllegalStateException- When the VirtualSpace is connected and changes must be done from there and not by means of API functions. This exception is also thrown if the content provider is not used or does not support API usage.
removeAll
public boolean removeAll()Removes all items.- Returns:
- true for changed, false when no items were present.
- Throws:
IllegalStateException- When the VirtualSpace is connected and changes must be done from there and not by means of API functions. This exception is also thrown if the content provider is not used or does not support API usage.
get
Gets an item at the specified index.- Parameters:
index- The index of the item.- Returns:
- The item.
- Throws:
IndexOutOfBoundsException- If the index is not valid.IllegalStateException- When the VirtualSpace is connected and changes must be done from there and not by means of API functions. This exception is also thrown if the content provider is not used or does not support API usage.
getAll
Gets all items.- Returns:
- The array of items.
- Throws:
IllegalStateException- This exception is also thrown if the content provider is not used.
indexOf
Returns the index of an item.- Parameters:
item- The item to look-up.- Returns:
- The index of the item, or -1 if not found.
- Throws:
IllegalStateException- When the VirtualSpace is connected and changes must be done from there and not by means of API functions.
getSelectionType
public int getSelectionType()Gets the selection type of the component.- Specified by:
getSelectionTypein interfaceIUISelectionComp- Returns:
- A value indicating the selection capability as the SELECTION_TYPE_* values define.
onSelectionChanged
Method called when the selection of the component changed due to a property change (value changed, property added or removed).- Overrides:
onSelectionChangedin classUIContainer- Parameters:
event- The event that causes the selection change.
onSelectionChanged
Callback when an item is selected or unselected.This method should not be called! It is intended for the frameworks item
setSelection(boolean)method.- Parameters:
item- The item who's selection state changed.
isSelected
public boolean isSelected()Returns the selection of state of the component.For a multiple-selection capable component, this indicates any selection, i.e. true is returned as soon as at least one element is selected, false for none.
The checkbox for example has two "selected states": checked and third state: in this case, true is returned for the third state as well as the checked state.
- Specified by:
isSelectedin interfaceIUISelectionComp- Returns:
- true if the component is selected, false otherwise.
getSelectedIndex
public int getSelectedIndex()Gets the first selected index.- Specified by:
getSelectedIndexin interfaceIUISingleIndexedSelectionComp- Returns:
- The first index in the current selection, or -1 for none.
getSelectedIndicies
public int[] getSelectedIndicies()Gets the selected indicies.- Specified by:
getSelectedIndiciesin interfaceIUIIndexedSelectionComp- Specified by:
getSelectedIndiciesin interfaceIUISingleIndexedSelectionComp- Returns:
- A new array of the selected indices (that may be modified to your liking), or a static zero in length array for no selection.
getSelection
Gets the current selection of the component.- Specified by:
getSelectionin interfaceIUISelectionComp- Returns:
- The current selection of the component.
setSelection
Sets the selection as a single selected item at specified index.- Specified by:
setSelectionin interfaceIUIIndexedSelectionComp- Parameters:
index- The single item to select at index, negative value to clear the selection.- Returns:
- null for success, otherwise an error message why the selection failed.
clearSelection
Clear the selection.- Specified by:
clearSelectionin interfaceIUIIndexedSelectionComp- Returns:
- null for OK.