public class JUTableBinding extends JUCtrlHierBinding implements javax.swing.table.TableModel, JUPanelStopEditingListener, java.awt.event.HierarchyListener
javax.swing.JTable to a RowIterator for a BC4J ViewObject.
 Applications should subclass this binding and return a subclass of JUTableModel that can:
This class creates a runtime instance of JUTableModel to interact with a JTable instance. It is responsible for:
RowIterator, 
ViewObject, 
JTable, 
TableModel, 
AbstractTableModel| Modifier and Type | Class and Description | 
|---|---|
| protected class  | JUTableBinding.JUTableModelThis TableModel is used by JUTableBinding to perform updates of the JTable
 control to which it is bound. | 
| Modifier and Type | Field and Description | 
|---|---|
| static int | CS_FULL | 
| static int | CS_NONE | 
| static int | CS_RANGE | 
| boolean | mSortAscending | 
| int | mSortColumn | 
| static int | TBL_SCROLL_ACTIVE | 
| static int | TBL_SCROLL_PASSIVE | 
ATTR_CHILDREN, ATTR_ROOTNODE, mRootBinding, mTypeBindingsATTR_ATTRIBUTE, ATTR_ATTRIBUTE_DEF, ATTR_ATTRIBUTE_DEFS, ATTR_ATTRIBUTE_VALUE, ATTR_ATTRIBUTE_VALUES, ATTR_ATTRIBUTES, ATTR_AUTOSUBMIT, ATTR_CATEGORY, ATTR_DISPLAY_HEIGHT, ATTR_DISPLAY_HINT, ATTR_DISPLAY_WIDTH, ATTR_FIELD_ORDER, ATTR_FORMAT, ATTR_FORMATS, ATTR_HINTS, ATTR_INPUT_VALUE, ATTR_LABEL, ATTR_LABELS, ATTR_LABELSET, ATTR_MANDATORY, ATTR_PATH, ATTR_TOOLTIP, ATTR_UPDATEABLE, ATTR_VIEWABLE, DATACHANGE_EVENT_POLICY, EMPTY_STRING, GET_ALLOWS, mAttrs, mHasInputVal, mInputVal, SEP_LIST_DISPLAYATTR_CURRENTROW, ATTR_DEF, ATTR_ERROR, ATTR_ERRORS, ATTR_FULLNAME, ATTR_ITER, ATTR_NAME, DC_BINDING_ERROR, mAttributeListener, mInternalGet_KeyResolved, mPermission, mPermissionInfo, ROW_KEY_STRMAP_NULL_VALUE| Modifier | Constructor and Description | 
|---|---|
|   | JUTableBinding(javax.swing.JTable control,
              JUIteratorBinding iterBinding,
              java.lang.String[] attrNames)Creates an instance of JUTableModel that performs the binding of a BC4J ViewObject with
 a JTable. | 
| protected  | JUTableBinding(javax.swing.JTable control,
              JUIteratorBinding iterBinding,
              java.lang.String[] attrNames,
              JUCtrlHierTypeBinding[] typeBindings) | 
| Modifier and Type | Method and Description | 
|---|---|
| void | addControlToPanel(java.lang.Object panel,
                 java.lang.Object layoutObject,
                 java.lang.Object layoutCons)*** For internal framework use only *** | 
| void | addTableModelListener(javax.swing.event.TableModelListener l) | 
| static javax.swing.table.TableModel | createAttributeListBinding(JUPanelBinding formBinding,
                          javax.swing.JTable control,
                          java.lang.String voInstanceName,
                          java.lang.String voIterName,
                          java.lang.String voIterBindingName,
                          java.lang.String[] attrNames)Creates an instance of JUTableBinding to return. | 
| static javax.swing.table.TableModel | createAttributeListBinding(JUPanelBinding formBinding,
                          javax.swing.JTable control,
                          java.lang.String voInstanceName,
                          java.lang.String voIterName,
                          java.lang.String voIterBindingName,
                          java.lang.String[] attrNames,
                          boolean columnSort,
                          JUTableSortModel sorter)Creates an instance of JUTableBinding to return. | 
| java.lang.Class | getColumnClass(int columnIndex) | 
| int | getColumnCount() | 
| java.lang.String | getColumnName(int columnIndex) | 
| protected int | getColumnSortMode() | 
| java.lang.Object | getControlModel(java.lang.Object control)Gets the associated View's model object. | 
| protected int | getDefaultVisibleRowCount()Subclasses may override this to provide a default visible row count
 for a table binding where the table is not in a scrollpane or
 the table has not been appropriately sized yet and table
 needs to know the visible row count. | 
| static javax.swing.table.TableModel | getInstance(JUPanelBinding formBinding,
           javax.swing.JTable control,
           java.lang.String voInstanceName,
           java.lang.String voIterName,
           java.lang.String voIterBindingName,
           java.lang.String[] attrNames)Deprecated. 
 since 9.0.2 | 
| java.lang.Object | getLayoutObject()*** For internal framework use only *** | 
| JUTableBinding.JUTableModel | getModel() | 
| protected JUTableBinding.JUTableModel | getModelImpl(javax.swing.JTable control)Returns an instance of JUTableModel that this binding works with and is
 applied as the JTableModel to the given JTable control. | 
| int | getRowCount() | 
| int | getScrolMode() | 
| java.lang.Object | getValueAt(int rowIndex,
          int columnIndex) | 
| void | hierarchyChanged(java.awt.event.HierarchyEvent e) | 
| boolean | isCellEditable(int rowIndex,
              int columnIndex) | 
| protected boolean | isControlQueriable()Returns true by default to imply that this binding supports Find mode. | 
| void | release(int flags) | 
| void | removeTableModelListener(javax.swing.event.TableModelListener l) | 
| int | rowIndexToRangeIndex(int rowIndex) | 
| void | setColumnProperties(java.util.HashMap columnProperties) | 
| void | setControl(java.lang.Object ctrl)Bind this binding to a control. | 
| void | setLayoutObject(javax.swing.JScrollPane scrollPane)*** For internal framework use only *** | 
| void | setScrollMode(int x) | 
| void | setValueAt(java.lang.Object aValue,
          int rowIndex,
          int columnIndex) | 
| void | stopEditing()Notified by NavigationBar to stop any edits on the current control. | 
| protected void | updateColumnModel(javax.swing.JTable control) | 
| void | updateNavigated(NavigationEvent event)Adjusts the display to move the current row selection to the new current row. | 
| void | updateRangeScrolled(ScrollEvent event)Adjusts the scrollbar of the associated JTable and also refreshes the display
 with the current set of rows in range in the associated RowIterator. | 
| void | updateRowDeleted(DeleteEvent event)When a row is deleted in the associated iterator, this method gets invoked by
 the framework, so that this binding can update the displayed rows in the JTable
 after stopping the edit function on the current cell (if a cell was being edited). | 
| void | updateRowInserted(InsertEvent event)When a new row is inserted into the associated Iterator, this method gets invoked
 by the framework. | 
| void | updateValuesFromRow(Row row)On change of row, refresh the model. | 
| void | updateValuesFromRows(Row[] rows,
                    boolean clear)Updates the JTable's display with the given set of rows after optionally
 clearing out the current rows (if clear is true). | 
bringNodeToRangeKeyPath, clearAttrDefs, clearRootBinding, createNodeBinding, createRootBinding, findNodeByDCEPath, findNodeByKeyPath, getChildren, getFormats, getHintMap, getHints, getLabels, getMasterNodeForDCE, getRootNodeBinding, getTypeBindings, internalGet, internalGetRootNodeBinding, reinitializeForAllNodes, restoreTreeAndExpand, setAttributeNames, setAttributes, setDef, setTypeBindingscreateValueBindingRef, findOrCreateSelectionAttributeDef, getCurrentRowIndex, getDeferredEstimatedRowCount, getEstimatedRowCount, getInputErrorsForRowKey, getInputValueInRow, getRangeSet, getRangeSize, getRangeStart, isSelectionEnabled, needsEstimatedRowCount, refreshControl, setCurrentRowAtIndex, setInputValueInRow, setRangeStart, useRowSpecificHintsaddBindingContainerChangeListenerForCtxEvent, addDataChangeListener, clearEventsCache, compareAndSetAttribute, createAndNotifyDCE, createEventProducer, displayInShortForm, ensureVariableManager, eventForMyRow, fetchAttrDefs, findAttributeDef, generateDCE, getAttribute, getAttribute, getAttribute, getAttributeCount, getAttributeDef, getAttributeDef, getAttributeDefs, getAttributeDefsForRow, getAttributeFromRow, getAttributeFromRow, getAttributeFromRow, getAttributeFromRow, getAttributeFromRow, getAttributeIndexOf, getAttributeNames, getAttributes, getAttributes, getAttributeUIHelper, getAttributeValidators, getAttributeValidators, getAttributeValue, getAttributeValue, getAttributeValueFromRow, getAttributeValues, getAttributeValues, getAttrViewExpressions, getBindingHint, getCachedEvents, getCategory, getChangeEventPolicy, getColumnNameForQuery, getControlType, getDataChangeEventPolicy, getDataChangeListener, getDisplayHeight, getDisplayHint, getDisplayWidth, getError, getErrors, getEventProducer, getFieldOrder, getFormat, getFormattedAttributeValue, getHint, getHint, getInputValue, getInputValue, getInputValueHandler, getInputValueOnError, getIteratorBindingForDCE, getIteratorRenderHint, getLabel, getLabel, getLabelSet, getLastEventId, getLocaleContext, getMasterKeyPathForDCE, getMergedAttributeValues, getNullValueString, getPath, getPermissionDef, getPermissionHolder, getPermissionInfo, getSelectionDef, getState, getTooltip, getTooltip, hasEventProducer, hasFormatInformation, hasServerBindingChanged, hasVariables, initResources, internalGetDataControlReference, internalGetRow, internalHasPermission, internalHasPermission, isArrayIteratorType, isAttributeMandatory, isAttributeUpdateable, isAttributeUpdateable, isAttributeUpdateable, isAttributeUpdateable, isAutoSubmit, isEventsCachingEnabled, isMandatory, isNewInputValue, isNullInsertKeyPathForDCE, isPushDataChangeEvents, isPushOrPollDataChangeEvents, isUpdateable, isViewable, lookupAttributeDef, notifyDataChangeEvent, notifyDataExceptionEvent, notifyDCE, pinDataControl, processInputException, processNewInputValue, put, removeAttrName, removeDataChangeListener, removeFromDCExceptions, resetAttributeDefs, resetInputState, resolvePath, restoreFromState, setArrayIteratorType, setAttribute, setAttribute, setAttributeInRow, setAttributeInRow, setAttributeInRow, setAttributeInRow, setAttributeInRow, setAttributeInRow, setAttributeValue, setAttributeValuesInRow, setAttrViewExpressions, setError, setEventProducer, setEventsCaching, setInputValue, setInputValue, setInputValueHandler, setIteratorBinding, setListener, setNullValueString, startEvents, stopEvents, updateRow, validateInputValuegetCurrentRow, getFormBinding, getIteratorBinding, reportException, setFormBindingaddToDCExceptions, evaluateBooleanExpression, executeQuery, executeQueryIfNeeded, get, getAllRowsInRange, getApplicationModule, getAttributeListener, getBindingContainer, getControl, getDCIteratorBinding, getDef, getDefFullName, getDefName, getFullName, getName, getPermission, getPermissionTargetName, getRowAtRangeIndex, getRowIterator, getTransaction, getViewableExpr, getViewObject, hasAttributeListener, hashCode, internalGetDataControl, internalSetName, isAssociatedWithDataControl, isControlViewable, isReleased, release, reportException, resetAttributeExceptionInRow, setBindingContainer, setDataControlPinned, setListener, setName, setViewableExpr, toStringentrySet, equals, internalPut, setThrowIfPropertyNotFoundOnGetclear, clone, containsKey, containsValue, isEmpty, keySet, putAll, remove, size, valuesfinalize, getClass, notify, notifyAll, wait, wait, waitgetLabelSetsetListenergetName, getPath, release, resolvePath, setListenergetDefFullName, getDefName, getFullName, getNamepublic static final int TBL_SCROLL_ACTIVE
public static final int TBL_SCROLL_PASSIVE
public static final int CS_FULL
public static final int CS_NONE
public static final int CS_RANGE
public boolean mSortAscending
public int mSortColumn
public JUTableBinding(javax.swing.JTable control,
              JUIteratorBinding iterBinding,
              java.lang.String[] attrNames)
This class is responsible for:
protected JUTableBinding(javax.swing.JTable control,
              JUIteratorBinding iterBinding,
              java.lang.String[] attrNames,
              JUCtrlHierTypeBinding[] typeBindings)
public java.lang.Object getControlModel(java.lang.Object control)
getControlModel in class DCControlBindingprotected int getColumnSortMode()
public static javax.swing.table.TableModel createAttributeListBinding(JUPanelBinding formBinding, javax.swing.JTable control, java.lang.String voInstanceName, java.lang.String voIterName, java.lang.String voIterBindingName, java.lang.String[] attrNames)
public static javax.swing.table.TableModel createAttributeListBinding(JUPanelBinding formBinding, javax.swing.JTable control, java.lang.String voInstanceName, java.lang.String voIterName, java.lang.String voIterBindingName, java.lang.String[] attrNames, boolean columnSort, JUTableSortModel sorter)
public static javax.swing.table.TableModel getInstance(JUPanelBinding formBinding, javax.swing.JTable control, java.lang.String voInstanceName, java.lang.String voIterName, java.lang.String voIterBindingName, java.lang.String[] attrNames)
public void setControl(java.lang.Object ctrl)
setControl in class DCControlBindingpublic void setColumnProperties(java.util.HashMap columnProperties)
protected void updateColumnModel(javax.swing.JTable control)
public void stopEditing()
JUCtrlValueBindingstopEditing in interface JUPanelStopEditingListenerstopEditing in class JUCtrlValueBindingpublic JUTableBinding.JUTableModel getModel()
protected JUTableBinding.JUTableModel getModelImpl(javax.swing.JTable control)
Override this method to return a subclass of JUTableModel to perform customizations on the table model like:
protected boolean isControlQueriable()
isControlQueriable in class DCControlBindingpublic void addControlToPanel(java.lang.Object panel,
                     java.lang.Object layoutObject,
                     java.lang.Object layoutCons)
addControlToPanel in class JUCtrlRangeBindingpublic java.lang.Object getLayoutObject()
Returns the scrollpane object in which the JTable control is displayed. If JTable is not displayed in a scrollpane, then this method returns the JTable control instance.
getLayoutObject in class DCControlBindingpublic void setLayoutObject(javax.swing.JScrollPane scrollPane)
protected int getDefaultVisibleRowCount()
public void updateValuesFromRow(Row row)
updateValuesFromRow in class JUCtrlHierBindingpublic void updateValuesFromRows(Row[] rows, boolean clear)
updateValuesFromRows in class JUCtrlHierBindingpublic void updateRangeScrolled(ScrollEvent event)
updateRangeScrolled in class JUCtrlRangeBindingScrollEventpublic void updateRowInserted(InsertEvent event)
updateRowInserted in class JUCtrlValueBindingpublic void updateRowDeleted(DeleteEvent event)
updateRowDeleted in class JUCtrlValueBindingpublic void updateNavigated(NavigationEvent event)
updateNavigated in class JUCtrlRangeBindingpublic void hierarchyChanged(java.awt.event.HierarchyEvent e)
hierarchyChanged in interface java.awt.event.HierarchyListenerpublic int getRowCount()
getRowCount in interface javax.swing.table.TableModelpublic int getColumnCount()
getColumnCount in interface javax.swing.table.TableModelpublic java.lang.String getColumnName(int columnIndex)
getColumnName in interface javax.swing.table.TableModelpublic java.lang.Class getColumnClass(int columnIndex)
getColumnClass in interface javax.swing.table.TableModelpublic boolean isCellEditable(int rowIndex,
                     int columnIndex)
isCellEditable in interface javax.swing.table.TableModelpublic java.lang.Object getValueAt(int rowIndex,
                          int columnIndex)
getValueAt in interface javax.swing.table.TableModelgetValueAt in class JUCtrlRangeBindingpublic void setValueAt(java.lang.Object aValue,
              int rowIndex,
              int columnIndex)
setValueAt in interface javax.swing.table.TableModelsetValueAt in class JUCtrlRangeBindingpublic void addTableModelListener(javax.swing.event.TableModelListener l)
addTableModelListener in interface javax.swing.table.TableModelpublic void removeTableModelListener(javax.swing.event.TableModelListener l)
removeTableModelListener in interface javax.swing.table.TableModelpublic void release(int flags)
release in class JUCtrlHierBindingpublic int rowIndexToRangeIndex(int rowIndex)
public int getScrolMode()
public void setScrollMode(int x)