public abstract class AbstractContentUIContainer<ITEM extends IContentItem,ITEM_CONTENT extends IContentData<ITEM>> extends UIContainer implements IVSTableListener, IVSTableColumnReferenceOwner, IVSColumnBestValueListener, IUISingleIndexedSelectionComp, IUIActionHolder
IMessageBox.Icon
IVSComponentState.State
Modifier and Type | Field and Description |
---|---|
protected static String |
PN_SELECTION_TYPE
The property name: selection type "selType".
|
static String |
TABLE_REF_PROP_NAME
Property name for VSTableReference.
|
static String |
USE_CONTENT_PROVIDER_PROP_NAME
Property name for the setting of "use content provider" (defaults to
"false").
|
UICOMP_CLASS, VS_STATE_FOCUS_PROP_NAME
EMPTY, REMOTE_FOCUS_EVENT, styles, vsField
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
SELECTION_TYPE_MULTIPLE, SELECTION_TYPE_NONE, SELECTION_TYPE_SINGLE
ERROR, INFORMATION, NONE, REMOTE_FOCUS_EVENT, 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 |
---|
AbstractContentUIContainer()
Creates the content property container.
|
AbstractContentUIContainer(Atom atom)
Creates the content property container.
|
Modifier and Type | Method and Description |
---|---|
void |
add(int index,
ITEM_CONTENT item)
Inserts a new item before the specified index.
|
void |
add(ITEM_CONTENT item)
Adds a new item to the end of the list.
|
protected void |
addMappings(VSMappings mappings,
VSComponent vsStateFocus)
Gets the mappings of a VirtualSpace to the panel components.
|
protected void |
addMappingsTable(String uiRef,
VSMappings mappings,
VSComponent vsStateFocus)
Gets the VSTable mappings of a VirtualSpace to the panel components.
|
String |
clearSelection()
Clear the selection.
|
AbstractContentUIContainer<ITEM,ITEM_CONTENT> |
clone()
Clones this instance.
|
protected IContentProvider<ITEM,ITEM_CONTENT> |
createContentProvider()
Creates the content provider.
|
protected abstract IContentProvider<ITEM,ITEM_CONTENT> |
createDefaultContentProvider()
Creates and returns a new instance of a default content provider.
|
protected abstract ITEM |
createItem(Atom atom,
ITEM_CONTENT data)
Creates a new property item from an item data holder and initializes the
property.
|
protected Object |
equalsTree(PropCnr pc2,
int how)
Checks for equality in the whole container structure.
|
ITEM_CONTENT |
get(int index)
Gets an item at the specified index.
|
ITEM_CONTENT[] |
getAll()
Gets all items.
|
IContentProviderAPI<ITEM,ITEM_CONTENT> |
getAPIContentProvider()
Gets the content provider for the API.
|
Value.Type |
getBestVSColumnHeaderValueType(VSRelativeReference<?> reference)
Requests the value type that would best suit the listener.
|
protected abstract Value.Type[] |
getBestVSColumnHeaderValueTypes()
Gets the value type that would best suit the for the columns.
|
protected IContentProvider<ITEM,ITEM_CONTENT> |
getContentProvider()
Gets the or created content provider to use.
|
VSTable |
getContentTable()
Gets the VS table that is associated with the container to provide the items.
|
protected abstract Object[] |
getContentTableColumnReferenceNames()
Gets the atoms of the references that are used to specify the VS column
header connections for the VS table.
|
int[] |
getContentTableColumns()
Gets the connected VS table columns in the table.
|
ITEM |
getItem(int index)
Gets an item at specified index.
|
abstract Class<ITEM> |
getItemClass()
Return the class of items stored in the container.
|
abstract Class<ITEM_CONTENT> |
getItemContentClass()
Return the class of content items stored in the container.
|
int |
getItemCount()
Returns the item count.
|
ITEM[] |
getItems()
Gets the container items.
|
Method |
getOnUIActionMethod()
Gets the method for the OnUIAction event at runtime.
|
Method |
getOnUISelectionMethod()
Returns the method to use for onUISelection notifications that is attached
to this selection component.
|
void |
getPredefinedProps()
Gets potential references to predefined properties for this container.
|
int |
getSelectedIndex()
Gets the first selected index.
|
int[] |
getSelectedIndicies()
Gets the selected indicies.
|
IUISelection |
getSelection()
Gets the current selection of the component.
|
GenericListener<IUISelectionListener> |
getSelectionListenerHandler(boolean doCreate)
Returns the generic selection listener.
|
Atom |
getSelectionPropAtom()
Returns the selection property atom for verification of selection changes.
|
int |
getSelectionType()
Gets the selection type of the component.
|
protected int |
getVSColumnIndex(Object nameOrAtom)
Gets the table column reference property with the String or Atom.
|
VSTable |
getVSTable()
Gets the VSTable.
|
VSTable |
getVSTable(VSTableColumnReference ref)
Gets the VSTable for a VSTableColumnReference instance.
|
VSReferenceOwnerData<VSTable,VSTableReference> |
getVSTableReferenceOwnerData()
Gets the table reference owner data for the table column reference.
|
boolean |
hasDiscreteContentChanges(boolean reset)
Flag for contents changes for API when content provider is using discrete
components added by the user.
|
int |
indexOf(ITEM_CONTENT item)
Returns the index of an item.
|
String |
isBackReferenceValid(AnnotationType annotationType,
String name,
boolean isRefOnly)
Validates if the back-reference specified is referenced in the first place, i.e.
|
boolean |
isEmptyContainerAllowed()
Returns whether the container should have children in a normal conditions,
i.e.
|
boolean |
isSelected()
Returns the selection of state of the component.
|
boolean |
isUpdatingInCurrentThread(boolean refreshVS)
Checks if the current thread is currently in updates mode (with updates from VS).
|
void |
onBroken(VSRelativeReference<?> reference,
VSTable table)
Called when the property reference has been broken, i.e.
|
void |
onCellStateChanged(VSField cell,
IVSComponentState.State state,
boolean on)
Called when the cell changes state.
|
void |
onCellValueChanged(VSField cell,
Value value,
GProp<?> trigger,
IPostEventProcessing postProcessing)
Called when the cell value is set.
|
void |
onEventSelf(GEvent event)
Event checking to clear cache.
|
protected void |
onItemAdded(ITEM item)
Item added event.
|
protected void |
onItemRemoved(ITEM item)
Item removed event.
|
void |
onParentStateChanged(IVSComponent parent,
IVSComponentState.State state,
boolean on)
Called when the parent 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 |
onPropDispose()
Called when disposed of.
|
protected void |
onPropParentChanged(PropCnr oldParent,
PropCnr newParent)
Called when the parent is changed for this class.
|
void |
onResolved(VSRelativeReference<?> reference,
VSTable table)
Called when the property reference has been resolved.
|
void |
onRowAdded(VSRow row,
int index)
Called when a row is added.
|
void |
onRowRemoved(VSRow row,
int index)
Called when a row is removed.
|
void |
onRowStateChanged(VSRow row,
IVSComponentState.State state,
boolean on)
Called when a row selection state changed.
|
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 |
onSelectionChanged(ITEM_CONTENT item,
boolean on)
Callback when an item is selected or unselected.
|
void |
onSingleSelectionChanged(VSTable table,
int index)
Called when the single selection changes.
|
void |
onStateChanged(VSTable table,
IVSComponentState.State state,
boolean on)
Called when the table changes state.
|
protected void |
onVirtualizationCompleted(IAppSessionGyro appGyro,
IClientSessionGyro clientGyro,
VirtualSpace virtualSpace,
PropCnr virtualizedProp,
boolean isPostResolve)
Called when virtualization completed.
|
void |
refresh()
This method is called from any thread to trigger a refresh of the contents
of all the container items.
|
protected void |
refresh(int dirty)
Requests a refresh of the contents depending on the flag.
|
void |
refresh(ITEM_CONTENT item)
This method is called from any thread when an item property container has
been changed.
|
ITEM_CONTENT |
remove(int index)
Removes an item at the specified index.
|
boolean |
remove(ITEM_CONTENT item)
Removes an item.
|
boolean |
removeAll()
Removes all items.
|
boolean |
setContentProvider(IContentProvider<ITEM,ITEM_CONTENT> customContentProvider)
Sets a custom content provider to be used.
|
String |
setSelection(int index)
Sets the selection as a single selected item at specified index.
|
protected void |
update()
Called to update the contents if required with new data.
|
boolean |
useContentProvider()
Returns the flag to use the content provider.
|
void |
verify(PropVerification verification)
Verifies this property container.
|
addPredefinedProps, addPredefinedPropsImpl, canAcceptUIContainerFocus, createCompsCnr, getApproximateSize, getComponentCount, getComponents, getCompsCnr, getDeviceType, getFirstContainerVSStateFocus, getFirstUIComponent, getFirstUIComponentNull, getRadioSelectionComponents, getSelectedRadioComponent, getUIComponent, getUIComponentNull, getVSStateFocus, hasImplicitAlignFillX, hasImplicitAlignFillY, isMobileContextMenuSupported, mustHaveHeight, mustHaveWidth, onBroken, onComponentSelectedInParent, onResolved, onSelectionChanged, onStateChanged, onVSComponentSelectionChanged, setRadioSelectionComponent, setUIContainerFocus, updateUICompsReference, verifyComponentScope
add, assignFontInfoResolver, canAlignX, canAlignY, canFillX, canFillY, canRequestFocus, canRequestFocus, clearErrorMessage, couldRequestFocusIfVirtualized, createStyles, createTitleProp, disconnectVSField, enterVSProcessing, exitVSProcessing, fireSelection, fireSelection, forbiddenGetCustomDataMap, getBadge, getBestVSFieldValueType, getComponentID, getComponentMappings, 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, 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, setEnabled, setEnabled, setErrorMessage, setErrorMessage, setErrorMessage, setErrorMessage, setHTMLText, setLayoutMgr, setMessage, setMessage, setReadOnly, setReadOnly, setText, setText, setTitle, setTitle, setTitle, setTooltip, setTooltip, setVisible, setVisible, setVSFieldMessageToComponent, setVSFieldToComponent
__transferChildProps, addProp, addProp, addProp2, addProp2, appendPropValue, completeVirtualize, containsProp, containsProp, convertLoadedProp, createCopyOfAtom, createUniqueAtom, createUniqueAtom, createUniqueAtom, createVSReference, doPropEqualsArrayValues, doVirtualizePropCnr, 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, 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, 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, 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, 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
getFirstSelectedIndex, setSelection
isSelectionIndexBased, setSelection, setSelection, setSelection, setSelection, setSelection
addSelectionListener, isSelectionBooleanBased, isSelectionCellBased, isSelectionTriStateBased, removeSelectionListener, setSelection
canAcceptUIContainerFocus, disconnectVSField, getComponentID, getComponentMappings, getDeviceType, getErrorMessage, getErrorMessage, getFirstUIComponent, getFirstUIComponentNull, getFixHeight, getFixWidth, getLayout, getLayoutMgr, getPanelUIComponent, getPanelUIComponentNull, getUIRef, getValue, getValue, getVirtualSpace, getVSField, isMobile, isRTL, isVSFieldDisconnected, reconnectVSField, setComponentToVSField, setErrorMessage, setErrorMessage, setUIContainerFocus, setVSFieldMessageToComponent, setVSFieldToComponent
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, setVisible
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, 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, 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, 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, verifyHasPropertyItem, warning, warning, warning
messageBox, messageBox
getBestVSFieldValueType, onBroken, onResolved, onStateChanged, onValueChanged
forbiddenGetCustomDataMap, getCustomData, putCustomData, putCustomDataIfAbsent
getBaseJavaReference
onFocusGained, onFocusLost
requestFocus, requestFocus, requestFocusEx, requestFocusEx
getContainedContextMenu, getContextMenu, getReferencedContextMenu, isContextMenuSupported, onBroken, onResolved
public static final String TABLE_REF_PROP_NAME
public static final String USE_CONTENT_PROVIDER_PROP_NAME
protected static final String PN_SELECTION_TYPE
public AbstractContentUIContainer()
public AbstractContentUIContainer(Atom atom)
atom
- The atom name.public void getPredefinedProps()
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
during addPredefinedProps()
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.
getPredefinedProps
in class UIContainer
protected Object equalsTree(PropCnr pc2, int how)
NOTE: This method should not be overridden except in extreme situations, e.g. for MememtoPropCnr.
equalsTree
in class PropCnr
pc2
- The property value to compare with.how
- Flags EQC_* values for equal checking.protected void onPrepare(ClassReference cr, List<Throwable> errors)
Components should override this method to load it's required methods.
public final Method getOnUISelectionMethod()
@OnUISelection(name = "some/property")
public void onUISelection(UISelectionEvent event)
getOnUISelectionMethod
in interface IUISelectionComp
public final Method getOnUIActionMethod()
getOnUIActionMethod
in interface IUIActionHolder
public String isBackReferenceValid(AnnotationType annotationType, String name, boolean isRefOnly)
isBackReferenceValid
in interface IBackReferenceProvider
annotationType
- The annotation type.name
- The class or method name.isRefOnly
- Flag indicating the back reference is not required, but must be valid otherwise.public AbstractContentUIContainer<ITEM,ITEM_CONTENT> clone()
clone
in class UIContainer
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 UIComp
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 onPropParentChanged(PropCnr oldParent, PropCnr newParent)
onPropParentChanged
in class GProp<GProp<?>[]>
oldParent
- The old parent (or null if none).newParent
- The new parent (or null if none).protected void onPropDispose()
onPropDispose
in class UIComp
public void onEventSelf(GEvent event)
onEventSelf
in interface IGProp<GProp<?>[]>
onEventSelf
in class UIComp
event
- The property event.protected void onItemAdded(ITEM item)
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.
item
- The item added.protected void onItemRemoved(ITEM item)
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.
item
- The item removed.public ITEM[] getItems()
public void refresh()
public void refresh(ITEM_CONTENT item)
item
- The item to refresh.public VSReferenceOwnerData<VSTable,VSTableReference> getVSTableReferenceOwnerData()
getVSTableReferenceOwnerData
in interface IVSTableColumnReferenceOwner
public final VSTable getVSTable()
public final VSTable getVSTable(VSTableColumnReference ref)
getVSTable
in interface IVSTableColumnReferenceOwner
ref
- The reference instance, null when property-editing the reference in the Designer.public VSTable getContentTable()
public int[] getContentTableColumns()
Note: this array is cached AND SHOULD NOT BE MODIFIED.
public void onResolved(VSRelativeReference<?> reference, VSTable table)
onResolved
in interface IVSTableListener
reference
- The VSRelativeReference instance holding the reference.table
- The target reference.public void onBroken(VSRelativeReference<?> reference, VSTable table)
onBroken
in interface IVSTableListener
reference
- The VSRelativeReference instance holding the reference.table
- The target reference.public void onStateChanged(VSTable table, IVSComponentState.State state, boolean on)
onStateChanged
in interface IVSTableListener
table
- The VS table.state
- The state change.on
- New state.public void onSingleSelectionChanged(VSTable table, int index)
onSingleSelectionChanged
in interface IVSTableListener
table
- The table.index
- The row index, -1 if table is unselected.public void onParentStateChanged(IVSComponent parent, IVSComponentState.State state, boolean on)
onParentStateChanged
in interface IVSComponentListener
onParentStateChanged
in class UIComp
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 onRowAdded(VSRow row, int index)
onRowAdded
in interface IVSTableListener
row
- The row.index
- The index.public void onRowRemoved(VSRow row, int index)
onRowRemoved
in interface IVSTableListener
row
- The row.index
- The index.public void onRowStateChanged(VSRow row, IVSComponentState.State state, boolean on)
onRowStateChanged
in interface IVSTableListener
row
- The row.state
- The state change.on
- New state.public void onCellStateChanged(VSField cell, IVSComponentState.State state, boolean on)
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.
onCellStateChanged
in interface IVSTableListener
cell
- The VS cell.state
- The state change.on
- New state.public void onCellValueChanged(VSField cell, Value value, GProp<?> trigger, IPostEventProcessing postProcessing)
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.
onCellValueChanged
in interface IVSTableListener
cell
- 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 Value.Type getBestVSColumnHeaderValueType(VSRelativeReference<?> reference)
getBestVSColumnHeaderValueType
in interface IVSColumnBestValueListener
reference
- The VSRelativeReference instance holding the reference.public boolean useContentProvider()
public boolean setContentProvider(IContentProvider<ITEM,ITEM_CONTENT> customContentProvider)
customContentProvider
- The custom content provider.public int getItemCount()
public ITEM getItem(int index)
index
- The index of the item property.protected IContentProvider<ITEM,ITEM_CONTENT> createContentProvider()
protected IContentProvider<ITEM,ITEM_CONTENT> getContentProvider()
protected int getVSColumnIndex(Object nameOrAtom)
nameOrAtom
- The String name or Atom name.public boolean hasDiscreteContentChanges(boolean reset)
reset
- Flag to reset changes.public IContentProviderAPI<ITEM,ITEM_CONTENT> getAPIContentProvider()
protected final void refresh(int dirty)
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.
dirty
- The dirty flags.protected void update()
refresh(int)
hasn't been called.public boolean isUpdatingInCurrentThread(boolean refreshVS)
refreshVS
- Flag indicating only VS refreshing must be tested, not other changes in e.g. the UI.protected void addMappings(VSMappings mappings, VSComponent vsStateFocus)
The default is to find the relative references to VS and add those references. Override to provide other functionality.
addMappings
in class UIComp
mappings
- The mappings instance to fill in.vsStateFocus
- Do not go past this component when going up in the parent tree, null for none.protected void addMappingsTable(String uiRef, VSMappings mappings, VSComponent vsStateFocus)
The default is to find the relative references to VS and add those references. Override to provide other functionality.
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.public boolean isEmptyContainerAllowed()
isEmptyContainerAllowed
in class UIContainer
public void verify(PropVerification verification)
verify
in interface IGProp<GProp<?>[]>
verify
in class UIContainer
verification
- The property verification class.public abstract Class<ITEM> getItemClass()
public abstract Class<ITEM_CONTENT> getItemContentClass()
protected abstract ITEM createItem(Atom atom, ITEM_CONTENT data)
atom
- The name of the item property.data
- The data to initialize the item property with.protected abstract IContentProvider<ITEM,ITEM_CONTENT> createDefaultContentProvider()
protected abstract Object[] getContentTableColumnReferenceNames()
protected abstract Value.Type[] getBestVSColumnHeaderValueTypes()
public Atom getSelectionPropAtom()
This method is used by the framework in UIComp to fire selection events when the property value changes.
getSelectionPropAtom
in interface IUISelectionComp
public GenericListener<IUISelectionListener> getSelectionListenerHandler(boolean doCreate)
getSelectionListenerHandler
in interface IUISelectionComp
doCreate
- Create the listener handler if it doesn't exist, false not to.public void add(ITEM_CONTENT item)
item
- The item to insert.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.public void add(int index, ITEM_CONTENT item)
index
- The insertion point index, -1 for last.item
- The item to insert.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.public ITEM_CONTENT remove(int index)
index
- The item to remove.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.public boolean remove(ITEM_CONTENT item)
item
- The item to remove.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.public boolean removeAll()
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.public ITEM_CONTENT get(int index)
index
- The index of the item.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.public ITEM_CONTENT[] getAll()
IllegalStateException
- This exception is also thrown if the content provider is not
used.public int indexOf(ITEM_CONTENT item)
item
- The item to look-up.IllegalStateException
- When the VirtualSpace is connected and changes must be done from
there and not by means of API functions.public int getSelectionType()
getSelectionType
in interface IUISelectionComp
protected void onSelectionChanged(GEvent event)
onSelectionChanged
in class UIContainer
event
- The event that causes the selection change.public void onSelectionChanged(ITEM_CONTENT item, boolean on)
This method should not be called! It is intended for the frameworks item
setSelection(boolean)
method.
item
- The item who's selection state changed.public boolean isSelected()
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.
isSelected
in interface IUISelectionComp
public int getSelectedIndex()
getSelectedIndex
in interface IUISingleIndexedSelectionComp
public int[] getSelectedIndicies()
getSelectedIndicies
in interface IUIIndexedSelectionComp
getSelectedIndicies
in interface IUISingleIndexedSelectionComp
public IUISelection getSelection()
getSelection
in interface IUISelectionComp
public String setSelection(int index)
setSelection
in interface IUIIndexedSelectionComp
index
- The single item to select at index, negative value to clear the selection.public String clearSelection()
clearSelection
in interface IUIIndexedSelectionComp
iizi® is a registered trademark of Mindus SARL. © Copyright Mindus SARL, 2020. All rights reserved.