Class VSTable
- All Implemented Interfaces:
- EventListener,- IFocusComp,- IMessageBox,- ICustomDataProvider,- IGProp<GProp<?>[]>,- IPropCnr,- IVSComponent,- IVSComponentListener,- IVSComponentState,- IVSMessageComponent,- Cloneable
- Direct Known Subclasses:
- EditorVSTable
It is used to hold a table with a column count with a variable number of rows. It has an optional header row.
- Author:
- Christopher Mindus
- Nested Class Summary- Nested classes/interfaces inherited from interface com.iizix.gyro.IMessageBox- IMessageBox.Icon- Nested classes/interfaces inherited from interface com.iizix.prop.vs.IVSComponentState- IVSComponentState.State
- Field SummaryFieldsModifier and TypeFieldDescription- static final IVSTableListener[]Empty list of listeners.- protected VSRowThe header property.- protected VSRowsThe rows property.- Fields inherited from class com.iizix.prop.vs.VSComponent- statesMap- 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_INCLUDE_PRIVATE, EQC_SAVE_FILE, EXT_CONTAINER_EXTENDS, EXT_CONTAINER_EXTENDS_VALID, EXT_EXTENDED, EXT_FINAL, EXT_OVERRIDES, EXT_OVERRIDES_FINAL_ERR, EXT_PRIVATE- Fields inherited from interface com.iizix.gyro.IMessageBox- ICON_ERROR, ICON_INFORMATION, ICON_MAP, ICON_NONE, ICON_QUESTION, ICON_WARNING- Fields inherited from interface com.iizix.prop.vs.IVSComponent- ATOM_IGNORE_UI_FOCUS, ERROR, INFORMATION, NONE, WARNING
- Constructor SummaryConstructors
- Method SummaryModifier and TypeMethodDescription- boolean- addListener- (IVSTableListener listener) Adds a new listener to the VS table.- boolean- addListener- (IVSTableRowSelectionListener listener) Adds a new table row selection listener.- protected voidAdds the predefined containers for identifications, fields and actions.Adds a row of VSField's.Adds a row of Value's.- boolean- clear()Clears the table, i.e.- booleanClears the selection without trigger component.- boolean- clearSelection- (IGProp<?> trigger) Clears the selection with optional trigger component.- clone()Clones the VirtualSpace Table.- protected VSRowCreates the header property container.- protected VSRow- createRow- (Atom a, VSColumnHeader[] columns) Creates a row property with column headers.- protected VSRowCreates a row property with fields.- protected VSRowCreates a row property with values.- protected VSRowsCreates the rows property container.- voidFires the current row selection to listeners if the table is of single or multiple selection.- intGets the column count.- getColumnHeader- (int columnIndex) Gets the headers columns for the row.- getColumnHeader- (String columnName) Gets the header column by name.Gets the headers columns for the table.Gets the focus message for "Component is disabled" but for the component in question.Gets the focus message for "Component is hidden" but for the component in question.Gets the first selected row in the table if the selection type is single or multiple.Gets the header.- protected voidAdds the predefined containers for identifications, fields and actions.- getRow- (int row) Gets the row of a certain index.- intGets the row count.- VSField[]- getRowFields- (int row) Gets the fields for a row of a certain index.- VSRow[]- getRows()Gets the rows in this table.Gets the rows property container.- Value[]- getRowValues- (int row) Gets the values for a row of a certain index.- intGets the first selected row index in the table if the selection type is single or multiple.- int[]Gets the selected row indicies in the table if the selection type is single or multiple.- VSRow[]Gets the rows that are selected.- intGets the selection type.Gets the listeners of the VS table events.Inserts a row of VSField's.Inserts a row of Value's.- protected final voidInvokes the onVSCreate method for the component if a VirtualSpace is present.- void- invokeVSChange- (GProp<?> trigger) Invokes the VSChange method on the table.- booleanReturns the selection required flag.- void- onEventSelf- (GEvent event) Checks for state change events and fires it to listeners.- protected void- onListenerChanged- (IVSTableListener listener) Called when a listener is added or removed.- void- onParentStateChanged- (IVSComponent parent, IVSComponentState.State state, boolean stateValue) Invokes the parent state notification function for the component.- intRefreshes all connected content providers.- boolean- removeListener- (IVSTableListener listener) Removes a listener from the VS table.- boolean- removeListener- (IVSTableRowSelectionListener listener) Removes a table row selection listener.- boolean- removeRow- (int row) Removes a row.- boolean- setHeader- (VSColumnHeader[] columns) Sets the header.- booleanSets a row's all fields without affecting the state of the row.- boolean- setSelection- (int index) Sets the single selection index without trigger component.- boolean- setSelection- (int[] indicies) Sets the selection indicies without trigger component.- boolean- setSelection- (int[] indicies, IGProp<?> trigger) Sets the selection indicies with optional trigger component.- boolean- setSelection- (int index, IGProp<?> trigger) Sets the single selection index with optional trigger component.- Methods inherited from class com.iizix.prop.vs.VSComponent- addListener, areFree, areFree, canRequestFocus, convertLoadedProp, couldRequestFocusIfVirtualized, forbiddenGetCustomDataMap, getClientSessionGyro, getComponentListeners, getDescription, getNonVirtualized, getVirtualSpace, initPropCnr, isFree, isFree, onFocusGained, onFocusLost, onListenerChanged, onPrepare, onPropDispose, onRemoteEvent, onVirtualContainerCreated, paramString, removeListener, virtualize- Methods inherited from class com.iizix.prop.PropCnr- __transferChildProps, addProp, addProp, addProp2, addProp2, appendPropValue, canRequestFocus, completeVirtualize, containsProp, containsProp, couldRequestFocusIfVirtualized, createCopyOfAtom, createUniqueAtom, createUniqueAtom, createUniqueAtom, createVSReference, doPropEqualsArrayValues, 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, getRetargetedVerifyContainer, getString, getString, getString, getString, getValueClasses, getVSReference, hasFocus, hasSendData, initializeElement, initializeExtendsFramework, initializeProp, initializeValue, insertProp, insertProp2, isChild, isExtendsOverriden, isExtendsPropertyValid, isExtendsRoot, isPropAddRemoveAllowed, isPropCommunicating, isPropExtended, list, list, logPropNotFound, maybeAddProp, onInsertProp, onPropRemoved, onPropTreeInitialized, onReferenceEvent, onVirtualizationCompleted, 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, verify, verifyInternalUseOnly, verifyTree- Methods 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, 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, onPropParentChanged, 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, warning- Methods inherited from class java.lang.Object- getClass, hashCode, notify, notifyAll, wait, wait, wait- Methods inherited from interface com.iizix.prop.ICustomDataProvider- forbiddenGetCustomDataMap, getCustomData, putCustomData, putCustomDataIfAbsent- Methods inherited from interface com.iizix.gyro.IFocusComp- onFocusGained, onFocusLost, requestFocus, requestFocus, requestFocusEx, requestFocusEx- 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, 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, verify, warning, warning, warning- Methods inherited from interface com.iizix.gyro.IMessageBox- messageBox, messageBox, messageBox- Methods 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, validateClassInstances- Methods inherited from interface com.iizix.prop.vs.IVSComponent- getAction, getAction2, getActionNull, getActionNull2, getDescription, getField, getField2, getFieldNull, getFieldNull2, getGroup, getGroup2, getGroupNull, getGroupNull2, getNonVirtualized, getTable, getTable2, getTableNull, getTableNull2, getVirtualizedVirtualSpace, getVirtualSpace, getVSComponent, getVSComponent2, getVSComponentNull, getVSComponentNull2, getVSRef, isEnabled, isEnabledInParent, isReadOnly, isReadOnlyInParent, isSelected, isVisible, isVisibleInParent, messageBox, setEnabled, setEnabled, setIgnoreFocusFromUI, setReadOnly, setReadOnly, setSelected, setSelected, setVirtualizeSupportFocus, setVirtualizeSupportFocus, setVisible, setVisible, shouldIgnoreFocusFromUI- Methods inherited from interface com.iizix.prop.vs.IVSMessageComponent- clearMessage, getMessage, getMessageCategory, getMessageString, isValid, setErrorMessage, setMessage, setMessage
- Field Details- EMPTY_LISTENERSEmpty list of listeners.
- headerThe header property.
- rowsThe rows property.
 
- Constructor Details- VSTablepublic VSTable()Creates a VirtualSpace Table property with the specified name with a null value.
- VSTableCreates a VirtualSpace Table property with the specified name with a null value.- Parameters:
- propertyAtom- the property atom.
 
 
- Method Details- cloneClones the VirtualSpace Table.- Overrides:
- clonein class- VSComponent
 
- addPredefinedPropsAdds the predefined containers for identifications, fields and actions.- Overrides:
- addPredefinedPropsin class- PropCnr
- Throws:
- PropException- for property exceptions.
 
- getPredefinedPropsprotected void getPredefinedProps()Adds the predefined containers for identifications, fields and actions. This method is overridden fully by the Editor versions of the class.- Overrides:
- getPredefinedPropsin class- PropCnr
 
- getComponentIsHiddenGets the focus message for "Component is hidden" but for the component in question.- Specified by:
- getComponentIsHiddenin class- VSComponent
 
- getComponentIsDisabledGets the focus message for "Component is disabled" but for the component in question.- Specified by:
- getComponentIsDisabledin class- VSComponent
 
- invokeOnVSCreateTreeInvokes the onVSCreate method for the component if a VirtualSpace is present. This method should only be invoked when a component is resolved during the post-resolve virtualization process, or when a component is added into an already virtualized VS component tree.- The OnVSCreate method is called first for the table, then the column headers, then for all rows. - Overrides:
- invokeOnVSCreateTreein class- VSComponent
- Parameters:
- vs- The VirtualSpace instance.
- Throws:
- NullPointerException- If the- vsis- null.
 
- onEventSelfChecks for state change events and fires it to listeners.- Specified by:
- onEventSelfin interface- IGProp<GProp<?>[]>
- Overrides:
- onEventSelfin class- VSComponent
- Parameters:
- event- The property event.
 
- onParentStateChangedpublic void onParentStateChanged- (IVSComponent parent, IVSComponentState.State state, boolean stateValue) Invokes the parent state notification function for the component.- Specified by:
- onParentStateChangedin interface- IVSComponentListener
- Parameters:
- parent- The parent who's state was changed.
- state- The state that changed.
- stateValue- The new state value.
 
- addListenerAdds a new listener to the VS table.- Parameters:
- listener- The listener for VS table events.
- Returns:
- true for success, false if the listener already is added.
 
- removeListenerRemoves a listener from the VS table.- Parameters:
- listener- The existing listener for VS table events.
- Returns:
- true for success, false if the listener has not been added.
 
- onListenerChangedCalled when a listener is added or removed. This method is overridden by the Designer to update connections.
- getTableListenersGets the listeners of the VS table events.- Returns:
- A cached array of listeners for the value, retrieved without synchronization if possible.
 
- createRowsCreates the rows property container.
- createRowCreates a row property with column headers.- Throws:
- PropException- For creation error.
 
- createRowCreates a row property with fields.- Throws:
- PropException- For creation error.
 
- createRowCreates a row property with values.- Throws:
- PropException- For creation error.
 
- getRowCountpublic int getRowCount()Gets the row count.
- getRowsGets the rows in this table.- Returns:
- The array of rows.
 
- getRowGets the row of a certain index.- Note: a warning message is logged if the operation fails. - Parameters:
- row- The row index to get, must be zero to count of rows - 1 inclusive.
- Returns:
- The VSRowProp of VSFields, null if row is invalid.
 
- getRowFieldsGets the fields for a row of a certain index.- Parameters:
- row- The row index to get, must be zero to count of rows - 1 inclusive.
- Returns:
- The array of VSFields, null if row is invalid.
 
- getRowValuesGets the values for a row of a certain index.- Parameters:
- row- The row index to get, must be zero to count of rows - 1 inclusive.
- Returns:
- The array of VSFields, null if row is invalid.
 
- addRowAdds a row of VSField's.- Note: a warning message is logged if the operation fails. - Note 2: the operation will fail if any of the fields in the array are not new instances from a "new" or "clone" operation. This means that they cannot have been attached to a VS container previously. - Parameters:
- fields- The row of fields to add as an array.
- Returns:
- The VSRowinserted if successful,nullfor failure.
 
- addRowAdds a row of Value's.- Note: a warning message is logged if the operation fails. - Note 2: the operation will fail if the values do not correspond to the column header field settings, i.e. null allowed and the value type of the column. - Parameters:
- values- The row of values to add as an array.
- Returns:
- The VSRowinserted if successful,nullfor failure.
 
- insertRowInserts a row of VSField's.- A selection event is not fired, even if the selection changes, e.g. if the row inserted caused the selection index or indicies to change. If you need to fire a selection change, you may do so by calling the method - fireRowSelection()- Note: a warning message is logged if the operation fails. - Note 2: the operation will fail if any of the fields in the array are not new instances from a "new" or "clone" operation. This means that they cannot have been attached to a VS container previously. - Parameters:
- fields- The row of fields to add as an array.
- before- The row index that will these fields will be inserted before, -1 to add last in table.
- Returns:
- The VSRowinserted if successful,nullfor failure.
 
- insertRowInserts a row of Value's.- A selection event is not fired, even if the selection changes, e.g. if the row inserted caused the selection index or indicies to change. If you need to fire a selection change, you may do so by calling the method - fireRowSelection()- Note: a warning message is logged if the operation fails. - Note 2: the operation will fail if the values do not correspond to the column header field settings, i.e. null allowed and the value type of the column. - Parameters:
- values- The row of values to add as an array.
- before- The row index that will these fields will be inserted before, -1 to add last in table.
- Returns:
- The VSRowinserted if successful,nullfor failure.
 
- setRowSets a row's all fields without affecting the state of the row.- Note: a warning message is logged if the operation fails. - Parameters:
- fields- The row of fields to set as an array.
- row- The row index to set, must be zero to count of rows - 1 inclusive.
- Returns:
- true if this changed successfully the table, false otherwise.
 
- removeRowpublic boolean removeRow- (int row) Removes a row.- A selection event is not fired, even if the selection changes, e.g. if the row deleted was selected. If you need to fire a selection change, you may do so by calling the method - fireRowSelection()- Note: a warning message is logged if the operation fails. - Parameters:
- row- The row index to remove, must be zero to count of rows - 1 inclusive.
- Returns:
- true if this changed successfully the table, false otherwise.
 
- clearpublic boolean clear()Clears the table, i.e. removes all rows.- A selection event is not fired. If you need to fire a selection change, you may do so by calling the method - fireRowSelection()- Note: a warning message is logged if the operation fails. - Returns:
- true if this changed successfully the table, false otherwise.
 
- getRowsContainerGets the rows property container.- Returns:
- The VSRows container.
 
- invokeVSChangeInvokes the VSChange method on the table.- Parameters:
- trigger- The trigger property, e.g. row added, etc.
 
- createHeaderCreates the header property container.
- getHeaderGets the header.- Returns:
- The row of VSColumnHeader properties of the header.
 
- getColumnHeadersGets the headers columns for the table.- Returns:
- The array of VSColumnHeader for the table.
 
- getColumnHeaderGets the headers columns for the row.- Parameters:
- columnIndex- The index of the column.
- Returns:
- The column of requested index, null if the column index is out of range.
 
- getColumnHeaderGets the header column by name.- Parameters:
- columnName- The column name.
- Returns:
- The column header, or null if the column name is not found.
 
- getColumnCountpublic int getColumnCount()Gets the column count.- Returns:
- The count of columns.
 
- setHeaderSets the header.- Note: a warning message is logged if the operation fails. - Parameters:
- columns- The header columns to set as an array.
- Returns:
- true if this changed successfully the table, false otherwise.
 
- getSelectionTypepublic int getSelectionType()Gets the selection type.- Returns:
- The table selection type: 0=none, 1=single (default), 2=multiple.
 
- isSelectionRequiredpublic boolean isSelectionRequired()Returns the selection required flag.- Returns:
- true if selection is required, false otherwise (default).
 
- getFirstSelectedRowGets the first selected row in the table if the selection type is single or multiple.- Returns:
- The selected row, null for none.
 
- getSelectedRowsGets the rows that are selected.- Returns:
- An array with the selected rows, never null.
 
- getSelectedIndexpublic int getSelectedIndex()Gets the first selected row index in the table if the selection type is single or multiple.- Returns:
- The selected row index, or -1 for none.
 
- getSelectedIndiciespublic int[] getSelectedIndicies()Gets the selected row indicies in the table if the selection type is single or multiple.- Returns:
- An array of the selected row indicies, or an empty array for no selection present.
 
- clearSelectionpublic boolean clearSelection()Clears the selection without trigger component.- Returns:
- true for success, false if the table is not of single or multiple selection type. In case of false return code, no unselection is performed.
 
- clearSelectionClears the selection with optional trigger component.- Parameters:
- trigger- The trigger of the selection, null for none.
- Returns:
- true for success, false if the table is not of single or multiple selection type. In case of false return code, no unselection is performed.
 
- setSelectionpublic boolean setSelection- (int index) Sets the single selection index without trigger component.- Selection processing is done in the following way: 
 - select the new row index,
 - unselect the other rows, starting with the first to last row.- This makes it possible to know if there are no selections remaining at an "unselection event". - Parameters:
- index- The selected row index, or any negative value (e.g. -1) to clear the selection.
- Returns:
- true for success, false if the table is not of single or multiple selection type. In case of false return code, no selection or unselection is performed.
 
- setSelectionSets the single selection index with optional trigger component.- Selection processing is done in the following way: 
 - select the new row index,
 - unselect the other rows, starting with the first to last row.- This makes it possible to know if there are no selections remaining at an "unselection event". - Parameters:
- index- The selected row index, or any negative value (e.g. -1) to clear the selection.
- trigger- The trigger of the selection, null for none.
- Returns:
- true for success, false if the table is not of single or multiple selection type. In case of false return code, no selection or unselection is performed.
 
- setSelectionpublic boolean setSelection- (int[] indicies) Sets the selection indicies without trigger component.- Selection processing is done in the following way: 
 - select the new row indicies,
 - unselect the other rows, starting with the first to last row.- This makes it possible to know if there are no selections remaining at an "unselection event". - Parameters:
- indicies- The selected row indicies.
- Returns:
- true for success, false if the table is not of single or multiple selection type. false is also returned if the length of the indicies is longer than one and the table is of single selection type (regardless if the same index is specified twice). In case of false return code, no selection or unselection is performed.
 
- setSelectionSets the selection indicies with optional trigger component.- Selection processing is done in the following way: 
 - select the new row indicies,
 - unselect the other rows, starting with the first to last row.- This makes it possible to know if there are no selections remaining at an "unselection event". - Parameters:
- indicies- The selected row indicies.
- trigger- The trigger of the selection, null for none.
- Returns:
- true for success, false if the table is not of single or multiple selection type. false is also returned if the length of the indicies is longer than one and the table is of single selection type (regardless if the same index is specified twice). In case of false return code, no selection or unselection is performed.
 
- addListenerAdds a new table row selection listener. Calling this method multiple times with the same listener will have no effect (but to return false).- Parameters:
- listener- The listener to add.
- Returns:
- true if the listener was added, false otherwise.
- Throws:
- NullPointerException- If the listener is- null.
 
- removeListenerRemoves a table row selection listener.- Parameters:
- listener- The listener to remove.
- Returns:
- true if listener is successfully removed, false otherwise.
 
- fireRowSelectionpublic void fireRowSelection()Fires the current row selection to listeners if the table is of single or multiple selection. If no change of selection is present, nothing will be done.
- refreshContentProviderspublic int refreshContentProviders()Refreshes all connected content providers. Use this method typically when a content provider that is connected to the VS table needs to be refreshed because it e.g. would produce a different result due to values or states outside of the VS table scope or that there are items not connected to VS fields or rows in the table.- The method fires the - onStateChanged(this,State.CONTENT_PROVIDER_REFRESH,false)event to all table listeners.- Returns:
- The number of table listeners that have been notified.