Class JTable
- All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, EventListener, Accessible, CellEditorListener, ListSelectionListener, RowSorterListener, TableModelListener, Scrollable, FieldReconciler.Reconcilable, TableColumnModelListener
JTable, over an SJTable peer;
R_leaf_peer_lockdown-locked-down (JDK leaf — private peer ctor).
Two-layer column model with bridge listeners; per-class TableCellRenderer
registry on the emulator, dynamic Vaadin renderers on the surrogate.- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classDrop location for a JTable drop (D_drag_and_drop — emulator forjavax.swing.JTable.DropLocation). -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intstatic final intstatic final intprotected booleanprotected intprotected TableCellEditorThe cell editor in flight during editing (JDKcellEditor);nullwhen not editing.protected booleanprotected TableColumnModelUser-facing column model (ported types).protected TableModelprotected final Map<Class<?>, TableCellEditor> Per-column-class default cell-editor registry (ported types).protected final Map<Class<?>, TableCellRenderer> Per-column-class fallback renderer registry (ported types).protected intprotected intView row/column being edited;-1when not editing.protected Colorprotected Dimensionprotected intprotected intprotected booleanNo-Vaadin-counterpart JDK knobs round-trip on the emulator only (R_swing_is_truth-faithful) + fire PCE.protected Colorprotected Colorprotected ListSelectionModelprotected booleanprotected booleanprotected JTableHeaderLazyJTableHeaderholder.Fields inherited from class JComponent
TOOL_TIP_TEXT_KEY, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOWFields inherited from class Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, FILL_CHROME, FILL_DEFAULT, LEFT_ALIGNMENT, listenerList, RIGHT_ALIGNMENT, TOP_ALIGNMENTFields inherited from interface ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH -
Constructor Summary
ConstructorsConstructorDescriptionJTable()JTable(int numRows, int numCols) JTable(TableModel dm) JTable(TableModel dm, TableColumnModel cm) JTable(TableModel dm, TableColumnModel cm, ListSelectionModel sm) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddColumn(TableColumn aColumn) voidaddRowSelectionInterval(int index0, int index1) voidvoidintcolumnAtPoint(Point point) The clicked view column during a mouse handler's dispatch,-1otherwise (or for a row-only click) — seerowAtPoint(Point).voidvoidvoidvoidintconvertColumnIndexToModel(int viewColumnIndex) intconvertColumnIndexToView(int modelColumnIndex) intconvertRowIndexToModel(int viewRowIndex) intconvertRowIndexToView(int modelRowIndex) protected ListSelectionModelReturns the default selection model object, which is aDefaultListSelectionModel.protected JTableHeadervoiddoLayout()voideditCellAt(int row, int column) booleaneditCellAt(int row, int column, EventObject e) Starts single-column editing (D_jtable_cell_editing): resolves the cell's editor, seeds its component, sets it as the editor component on only the clicked column, and opens the inherited Grid.Editor.voidEditing abandoned — tear down without writing back.voidEditing finished — commit the value.booleanbooleanintThe editor in flight during editing (JDKcellEditor);nullwhen not editing.getCellEditor(int row, int column) JDK contract: the column's ownTableColumn.getCellEditor()when set, else thegetDefaultEditor(Class)for the column class.getCellRect(int row, int column, boolean includeSpacing) The JDK's geometry over this table's nominal state:getRowHeight()and the column model's widths and margins.getCellRenderer(int row, int column) JDK contract: column-specific renderer when theTableColumn.getCellRenderer()is non-null, else fallback to thegetDefaultRenderer(Class)for the column's class.booleanClass<?> getColumnClass(int column) intgetColumnName(int column) booleangetDefaultEditor(Class<?> columnClass) JDK contract: default editor for a column class, walking the superclass chain then falling back to theObject.classeditor.getDefaultRenderer(Class<?> columnClass) booleanfinal DropModeintintThe row being edited as a view row (JDK contract), or-1(D_jtable_cell_editing).booleangetModel()intThe number of rows the table shows — the sorter's view count when one is installed (JDK contract).intintgetRowHeight(int row) intbooleanRowSorter<? extends TableModel> intgetScrollableBlockIncrement(Rectangle visibleRect, int orientation, int direction) booleanbooleanintgetScrollableUnitIncrement(Rectangle visibleRect, int orientation, int direction) intintint[]The row selection model, in view rows (JDK contract, D_jtable_selection).booleanbooleanbooleangetUI()booleangetValueAt(int row, int column) booleanisCellEditable(int row, int column) booleanbooleanisRowSelected(int row) voidmoveColumn(int columnIndex, int newIndex) prepareEditor(TableCellEditor editor, int row, int column) Prepares the editor's component for a cell, seeded with the cell value (JDK contract).prepareRenderer(TableCellRenderer renderer, int row, int column) Prepares the renderer's component for a cell, seeded with the cell value and selection state (JDK contract).booleanprint()booleanprint(JTable.PrintMode printMode) final voidD_field_write_reconcile repair hook — seeJSlider.reconcileFields().voidremoveColumn(TableColumn aColumn) voidTears down the in-flight edit without writing back (JDK contract: no commit).voidremoveRowSelectionInterval(int index0, int index1) introwAtPoint(Point point) The clicked view row during a mouse handler's dispatch,-1otherwise, whatever the coordinates.voidvoidsetAutoCreateColumnsFromModel(boolean autoCreate) voidsetAutoCreateRowSorter(boolean autoCreateRowSorter) voidsetAutoResizeMode(int mode) voidsetCellEditor(TableCellEditor anEditor) voidsetCellSelectionEnabled(boolean v) Vaadin Grid has no per-cell selection — WARN, but round-trip the two backing flags per JDK so getCellSelectionEnabled stays honest, and fire"cellSelectionEnabled"(D_owed_events).voidsetColumnModel(TableColumnModel newModel) voidsetColumnSelectionAllowed(boolean v) voidsetDefaultEditor(Class<?> columnClass, TableCellEditor editor) voidsetDefaultRenderer(Class<?> columnClass, TableCellRenderer renderer) voidsetDragEnabled(boolean v) final voidsetDropMode(DropMode dropMode) voidsetFillsViewportHeight(boolean v) voidsetGridColor(Color gridColor) voidsetIntercellSpacing(Dimension intercellSpacing) Splits the pair the way the JDK does — height tosetRowMargin(int), width to the column model'scolumnMargin— so the notification is the"rowMargin"PCE plus the column model'sCOLUMN_MARGIN_CHANGEDChangeEvent.voidsetModel(TableModel newModel) voidvoidsetRowHeight(int rowHeight) voidsetRowHeight(int row, int rowHeight) voidsetRowMargin(int rowMargin) voidsetRowSelectionAllowed(boolean v) voidsetRowSelectionInterval(int index0, int index1) voidsetRowSorter(RowSorter<? extends TableModel> sorter) Installssorterand clears the selection.voidvoidvoidsetSelectionMode(int selectionMode) voidsetSelectionModel(ListSelectionModel newModel) Installs the row selection model.voidsetShowGrid(boolean v) voidsetShowHorizontalLines(boolean v) voidsetShowVerticalLines(boolean v) voidsetTableHeader(JTableHeader tableHeader) voidvoidsetUpdateSelectionOnSort(boolean update) voidsetValueAt(Object aValue, int row, int column) voidsizeColumnsToFit(boolean lastColumnOnly) voidsizeColumnsToFit(int resizingColumn) voidThe current sorter re-sorted, or re-filtered.voidInvoked when this table'sTableModelgenerates aTableModelEvent, which is in model coordinates.voidupdateUI()voidInvoked when the row selection changes.Methods inherited from class JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, paramString, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, updateMethods inherited from class Container
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, addSlotChild, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, findComponentAt, findComponentAt, fireHierarchyEvent, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, peerContentElement, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, removeSlotChild, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate, validateTreeMethods inherited from class Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, applyBackgroundToPeer, applyVisibleToPeer, awtListeners, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, defaultFillCssClass, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, fireComponentEvent, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isThemeDefault, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setMixingCutoutShape, setName, setSize, setSize, show, show, size, suppressMouseBridge, toString, transferFocus, transferFocusBackward, transferFocusUpCycle, withPeer, withPeerOnLiveUI
-
Field Details
-
AUTO_RESIZE_OFF
public static final int AUTO_RESIZE_OFF- See Also:
-
AUTO_RESIZE_NEXT_COLUMN
public static final int AUTO_RESIZE_NEXT_COLUMN- See Also:
-
AUTO_RESIZE_SUBSEQUENT_COLUMNS
public static final int AUTO_RESIZE_SUBSEQUENT_COLUMNS- See Also:
-
AUTO_RESIZE_LAST_COLUMN
public static final int AUTO_RESIZE_LAST_COLUMN- See Also:
-
AUTO_RESIZE_ALL_COLUMNS
public static final int AUTO_RESIZE_ALL_COLUMNS- See Also:
-
columnModel
User-facing column model (ported types). Mirror of the surrogate's JDK column model; bridge listeners keep them in sync. -
defaultRenderersByColumnClass
Per-column-class fallback renderer registry (ported types). Walks superclass chain on lookup. -
defaultEditorsByColumnClass
Per-column-class default cell-editor registry (ported types). Walks superclass chain on lookup. MirrorsdefaultRenderersByColumnClass. -
cellEditor
The cell editor in flight during editing (JDKcellEditor);nullwhen not editing. -
editingRow
protected int editingRowView row/column being edited;-1when not editing. -
editingColumn
protected int editingColumn -
tableHeader
LazyJTableHeaderholder. -
rowSelectionAllowed
protected boolean rowSelectionAllowedNo-Vaadin-counterpart JDK knobs round-trip on the emulator only (R_swing_is_truth-faithful) + fire PCE. The surrogate drops them per R_vaadin_first (SD_sjtable) — the asymmetric R_swing_is_truth-shadow split SJToolBar (D_jtoolbar) / JSplitPane (D_jsplitpane) / JList (D_jlist) established. Defaults match JDK JTable. `dragEnabled(true)` and `setCellSelectionEnabled` WARN (real gaps); the rest round-trip silently (R_layouts_close_enough sizing/chrome). -
rowHeight
protected int rowHeight -
rowMargin
protected int rowMargin -
gridColor
-
showHorizontalLines
protected boolean showHorizontalLines -
showVerticalLines
protected boolean showVerticalLines -
autoResizeMode
protected int autoResizeMode -
selectionForeground
-
selectionBackground
-
preferredViewportSize
-
dataModel
-
selectionModel
-
autoCreateColumnsFromModel
protected boolean autoCreateColumnsFromModel -
cellSelectionEnabled
protected boolean cellSelectionEnabled
-
-
Constructor Details
-
JTable
public JTable() -
JTable
-
JTable
-
JTable
-
JTable
public JTable(int numRows, int numCols) -
JTable
-
JTable
-
-
Method Details
-
createDefaultSelectionModel
Returns the default selection model object, which is aDefaultListSelectionModel. A subclass can override this to return a different selection model object. -
reconcileFields
public final void reconcileFields()D_field_write_reconcile repair hook — seeJSlider.reconcileFields().- Specified by:
reconcileFieldsin interfaceFieldReconciler.Reconcilable
-
getModel
-
setModel
-
getColumnModel
-
setColumnModel
-
getSelectionModel
The row selection model, in view rows (JDK contract, D_jtable_selection). -
setSelectionModel
Installs the row selection model. It holds view rows, as the JDK's does; the table re-maps it through the sorter when rows re-sort or the model changes, and mirrors it onto the surrogate's model-row selection that drives the Grid (D_jtable_selection). -
getRowCount
public int getRowCount()The number of rows the table shows — the sorter's view count when one is installed (JDK contract). -
getColumnCount
public int getColumnCount() -
getColumnName
-
getColumnClass
-
getValueAt
-
setValueAt
-
isCellEditable
public boolean isCellEditable(int row, int column) -
convertColumnIndexToView
public int convertColumnIndexToView(int modelColumnIndex) -
convertColumnIndexToModel
public int convertColumnIndexToModel(int viewColumnIndex) -
convertRowIndexToView
public int convertRowIndexToView(int modelRowIndex) -
convertRowIndexToModel
public int convertRowIndexToModel(int viewRowIndex) -
getDefaultRenderer
-
setDefaultRenderer
-
getCellRenderer
JDK contract: column-specific renderer when theTableColumn.getCellRenderer()is non-null, else fallback to thegetDefaultRenderer(Class)for the column's class. -
prepareRenderer
Prepares the renderer's component for a cell, seeded with the cell value and selection state (JDK contract). Symmetric withprepareEditor(TableCellEditor, int, int).Returns an emulator component per R_no_vaadin_in_api — the renderer's own output, unsnapshotted, so a migrated subclass override receives the same thing
java.awt.Component-typed JDK code expects and can post-tweak it. The render path calls through here (D_r12_provenance) rather than reaching for the renderer directly, so such an override actually runs. -
getTableHeader
-
setTableHeader
-
createDefaultTableHeader
-
setRowSelectionInterval
public void setRowSelectionInterval(int index0, int index1) -
addRowSelectionInterval
public void addRowSelectionInterval(int index0, int index1) -
removeRowSelectionInterval
public void removeRowSelectionInterval(int index0, int index1) -
clearSelection
public void clearSelection() -
getSelectedRow
public int getSelectedRow() -
getSelectedRows
public int[] getSelectedRows() -
getSelectedRowCount
public int getSelectedRowCount() -
isRowSelected
public boolean isRowSelected(int row) -
selectAll
public void selectAll() -
setSelectionMode
public void setSelectionMode(int selectionMode) -
getRowSelectionAllowed
public boolean getRowSelectionAllowed() -
setRowSelectionAllowed
public void setRowSelectionAllowed(boolean v) -
getColumnSelectionAllowed
public boolean getColumnSelectionAllowed() -
setColumnSelectionAllowed
public void setColumnSelectionAllowed(boolean v) -
getCellSelectionEnabled
public boolean getCellSelectionEnabled() -
setCellSelectionEnabled
public void setCellSelectionEnabled(boolean v) Vaadin Grid has no per-cell selection — WARN, but round-trip the two backing flags per JDK so getCellSelectionEnabled stays honest, and fire"cellSelectionEnabled"(D_owed_events).The JDK keeps a
cellSelectionEnabledfield thatgetCellSelectionEnabled()never reads — that getter derives from the two allowed-flags — so its only purpose is to supply this event's old value, and it can drift from the derived answer. Reproduced as the JDK has it rather than as it reads. -
addColumn
-
removeColumn
-
moveColumn
public void moveColumn(int columnIndex, int newIndex) -
getColumn
-
getAutoCreateColumnsFromModel
public boolean getAutoCreateColumnsFromModel() -
setAutoCreateColumnsFromModel
public void setAutoCreateColumnsFromModel(boolean autoCreate) -
getAutoCreateRowSorter
public boolean getAutoCreateRowSorter() -
setAutoCreateRowSorter
public void setAutoCreateRowSorter(boolean autoCreateRowSorter) -
getRowSorter
-
setRowSorter
Installssorterand clears the selection. The table listens to it through aJTable.SortManager, as the JDK's does, sosorterChangedruns for every sorter however it was installed (R_no_vaadin_in_api limb 2); the surrogate drives the Grid off the same instance (SD_sjtable_sorting). -
sorterChanged
The current sorter re-sorted, or re-filtered. Re-maps the selection and the editing row through the sort, as the JDK does (D_jtable_selection); the Grid follows on its own, since the surrogate listens to the same sorter.A browser header click reaches here from inside the Grid's data fetch, which runs while the response is written and outside
EHelper.callSwing— so aListSelectionListenerfired by that re-map cannot open a modal dialog.- Specified by:
sorterChangedin interfaceRowSorterListener
-
getUpdateSelectionOnSort
public boolean getUpdateSelectionOnSort() -
setUpdateSelectionOnSort
public void setUpdateSelectionOnSort(boolean update) -
getRowHeight
public int getRowHeight() -
setRowHeight
public void setRowHeight(int rowHeight) -
getRowHeight
public int getRowHeight(int row) -
setRowHeight
public void setRowHeight(int row, int rowHeight) -
getRowMargin
public int getRowMargin() -
setRowMargin
public void setRowMargin(int rowMargin) -
getIntercellSpacing
-
setIntercellSpacing
Splits the pair the way the JDK does — height tosetRowMargin(int), width to the column model'scolumnMargin— so the notification is the"rowMargin"PCE plus the column model'sCOLUMN_MARGIN_CHANGEDChangeEvent."intercellSpacing"is not a bound property (D_property_fanout_audit), and there is no field behind it: the getter recomposes the Dimension from the two margins, as the JDK's does. -
getGridColor
-
setGridColor
-
getShowHorizontalLines
public boolean getShowHorizontalLines() -
setShowHorizontalLines
public void setShowHorizontalLines(boolean v) -
getShowVerticalLines
public boolean getShowVerticalLines() -
setShowVerticalLines
public void setShowVerticalLines(boolean v) -
getShowGrid
public boolean getShowGrid() -
setShowGrid
public void setShowGrid(boolean v) -
getAutoResizeMode
public int getAutoResizeMode() -
setAutoResizeMode
public void setAutoResizeMode(int mode) -
getSelectionForeground
-
setSelectionForeground
-
getSelectionBackground
-
setSelectionBackground
-
getCellRect
The JDK's geometry over this table's nominal state:getRowHeight()and the column model's widths and margins. It is not where the browser drew the cell (R_layouts_close_enough), and a row or column out of range readsgetWidth()/getHeight(), which are unimplemented and answer 0. -
getDragEnabled
public boolean getDragEnabled() -
setDragEnabled
public void setDragEnabled(boolean v) -
getDropMode
-
setDropMode
-
getFillsViewportHeight
public boolean getFillsViewportHeight() -
setFillsViewportHeight
public void setFillsViewportHeight(boolean v) -
getPreferredScrollableViewportSize
- Specified by:
getPreferredScrollableViewportSizein interfaceScrollable
-
setPreferredScrollableViewportSize
-
editCellAt
public void editCellAt(int row, int column) -
editCellAt
Starts single-column editing (D_jtable_cell_editing): resolves the cell's editor, seeds its component, sets it as the editor component on only the clicked column, and opens the inherited Grid.Editor. Value flows through the Swing editor lifecycle — commit (editingStopped) writes back viasetValueAt(Object, int, int); cancel (editingCanceled) discards.rowis a view row (JDK contract). All model access here goes through the view-indexed public accessors (getValueAt(int, int)/isCellEditable(int, int)/setValueAt(Object, int, int)), andeditingRowis stored as the view row; onlyitemForRowand the editor-row snapshot loop convert to the model row the Grid item carries (D_jtable_cell_editing). -
isEditing
public boolean isEditing() -
getEditingRow
public int getEditingRow()The row being edited as a view row (JDK contract), or-1(D_jtable_cell_editing). -
getEditingColumn
public int getEditingColumn() -
getEditorComponent
-
removeEditor
public void removeEditor()Tears down the in-flight edit without writing back (JDK contract: no commit). -
editingStopped
Editing finished — commit the value.- Specified by:
editingStoppedin interfaceCellEditorListener
-
editingCanceled
Editing abandoned — tear down without writing back.- Specified by:
editingCanceledin interfaceCellEditorListener
-
getDefaultEditor
JDK contract: default editor for a column class, walking the superclass chain then falling back to theObject.classeditor. MirrorsgetDefaultRenderer(Class). -
setDefaultEditor
-
getCellEditor
JDK contract: the column's ownTableColumn.getCellEditor()when set, else thegetDefaultEditor(Class)for the column class. MirrorsgetCellRenderer(int, int). -
getCellEditor
The editor in flight during editing (JDKcellEditor);nullwhen not editing. -
setCellEditor
-
prepareEditor
Prepares the editor's component for a cell, seeded with the cell value (JDK contract). The interactive open path (editCellAt / isEditing / …) lands with the Grid.Editor bridge (D_jtable_cell_editing, Slice 2); resolution + prepare are wired now. -
tableChanged
Invoked when this table'sTableModelgenerates aTableModelEvent, which is in model coordinates. The table is the model's listener, as the JDK's is: it adjusts the view selection and the editing row — through the sort bookkeeping when a sorter is installed — and hands the change to the surrogate, which tells the sorter and refreshes the Grid. A subclass overriding this without callingsuperstops the table following its model, as it would in the JDK.- Specified by:
tableChangedin interfaceTableModelListener
-
valueChanged
Invoked when the row selection changes. Keeps the sort bookkeeping's cached selection honest and mirrors the change onto the surrogate's model-row selection, which is what the Grid shows — the JDK's repaint, in this table's terms.- Specified by:
valueChangedin interfaceListSelectionListener
-
columnAdded
- Specified by:
columnAddedin interfaceTableColumnModelListener
-
columnRemoved
- Specified by:
columnRemovedin interfaceTableColumnModelListener
-
columnMoved
- Specified by:
columnMovedin interfaceTableColumnModelListener
-
columnMarginChanged
- Specified by:
columnMarginChangedin interfaceTableColumnModelListener
-
columnSelectionChanged
- Specified by:
columnSelectionChangedin interfaceTableColumnModelListener
-
getScrollableUnitIncrement
- Specified by:
getScrollableUnitIncrementin interfaceScrollable
-
getScrollableBlockIncrement
- Specified by:
getScrollableBlockIncrementin interfaceScrollable
-
getScrollableTracksViewportWidth
public boolean getScrollableTracksViewportWidth()- Specified by:
getScrollableTracksViewportWidthin interfaceScrollable
-
getScrollableTracksViewportHeight
public boolean getScrollableTracksViewportHeight()- Specified by:
getScrollableTracksViewportHeightin interfaceScrollable
-
doLayout
-
sizeColumnsToFit
public void sizeColumnsToFit(int resizingColumn) -
sizeColumnsToFit
public void sizeColumnsToFit(boolean lastColumnOnly) -
rowAtPoint
The clicked view row during a mouse handler's dispatch,-1otherwise, whatever the coordinates. The rest is the JDK's body, so a table shrunk while the handler was parked answers-1. -
columnAtPoint
The clicked view column during a mouse handler's dispatch,-1otherwise (or for a row-only click) — seerowAtPoint(Point). -
print
public boolean print() -
print
-
getUIClassID
- Overrides:
getUIClassIDin classJComponent
-
updateUI
public void updateUI()- Overrides:
updateUIin classJComponent
-
getUI
- Overrides:
getUIin classJComponent
-
setUI
-
getAccessibleContext
- Specified by:
getAccessibleContextin interfaceAccessible- Overrides:
getAccessibleContextin classComponent
-