Class GTable
- java.lang.Object
-
- java.awt.Component
-
- java.awt.Container
-
- javax.swing.JComponent
-
- javax.swing.JTable
-
- docking.widgets.table.GTable
-
- All Implemented Interfaces:
KeyStrokeConsumer
,java.awt.image.ImageObserver
,java.awt.MenuContainer
,java.io.Serializable
,java.util.EventListener
,javax.accessibility.Accessible
,javax.swing.event.CellEditorListener
,javax.swing.event.ListSelectionListener
,javax.swing.event.RowSorterListener
,javax.swing.event.TableColumnModelListener
,javax.swing.event.TableModelListener
,javax.swing.Scrollable
- Direct Known Subclasses:
FVTable
,GhidraTable
public class GTable extends javax.swing.JTable implements KeyStrokeConsumer
A sub-class ofJTable
that provides navigation and auto-lookup. By default, both of these features are disabled.Auto-lookup is only supported on one column and must be specified using the
setAutoLookupColumn()
method.Auto-lookup allows a user to begin typing the first few letters of a desired row. The table will attempt to locate the first row that contains the letters typed up to that point. There is an 800ms timeout between typed letters, at which point the list of typed letters will be flushed.
Auto-lookup is much faster if the underlying table model implements
SortedTableModel
, because a binary search can used to locate the desired row. A linear search is used if the model is not sorted.Other features provided:
- Column hiding/showing
- Multi-column sorting
- Column settings
- Column state saving (visibility, size, positioning, sort values)
- Selection management (saving/restoring selection when used with a filter panel)
- See Also:
GTableFilterPanel
, Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class javax.swing.JTable
javax.swing.JTable.AccessibleJTable, javax.swing.JTable.DropLocation, javax.swing.JTable.PrintMode
-
Nested classes/interfaces inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.List<javax.swing.table.TableCellRenderer>
defaultGTableRendererList
A list of default renderers created by this tablestatic long
KEY_TIMEOUT
-
Fields inherited from class javax.swing.JTable
AUTO_RESIZE_ALL_COLUMNS, AUTO_RESIZE_LAST_COLUMN, AUTO_RESIZE_NEXT_COLUMN, AUTO_RESIZE_OFF, AUTO_RESIZE_SUBSEQUENT_COLUMNS, autoCreateColumnsFromModel, autoResizeMode, cellEditor, cellSelectionEnabled, columnModel, dataModel, defaultEditorsByColumnClass, defaultRenderersByColumnClass, editingColumn, editingRow, editorComp, gridColor, preferredViewportSize, rowHeight, rowMargin, rowSelectionAllowed, selectionBackground, selectionForeground, selectionModel, showHorizontalLines, showVerticalLines, tableHeader
-
Fields inherited from class javax.swing.JComponent
listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
columnAdded(javax.swing.event.TableColumnModelEvent e)
void
columnRemoved(javax.swing.event.TableColumnModelEvent e)
protected javax.swing.table.TableColumnModel
createDefaultColumnModel()
void
createDefaultColumnsFromModel()
Overridden in order to set the column header renderer on newly created columns.protected <T> SelectionManager
createSelectionManager(javax.swing.table.TableModel model)
static void
createSharedActions(DockingTool tool, ToolActions toolActions, java.lang.String owner)
void
dispose()
Call this when the table will no longer be usedboolean
editCellAt(int row, int column)
If you just begin typing into an editable cell in a JTable, then the cell editor will be displayed.javax.swing.table.TableCellRenderer
getCellRenderer(int row, int col)
javax.swing.table.TableCellRenderer
getCellRendererOverride(int row, int col)
Performs custom work to locate renderers for special table model types.ConfigurableColumnTableModel
getConfigurableColumnTableModel()
Returns the underlying ConfigurableColumnTableModel if one is in-usejavax.swing.table.TableCellRenderer
getDefaultRenderer(java.lang.Class<?> columnClass)
java.lang.String
getPreferenceKey()
java.awt.Dimension
getPreferredScrollableViewportSize()
SelectionManager
getSelectionManager()
Returns theSelectionManager
in use by this GTable.javax.swing.JPopupMenu
getTableColumnPopupMenu(int columnIndex)
java.lang.String
getToolTipText(java.awt.event.MouseEvent e)
protected javax.swing.table.TableModel
getUnwrappedTableModel()
Unrolls the current model by checking if the current model is inside of a wrapper table model.java.lang.Object
getValueAt(int row, int column)
protected void
initDefaultRenderers()
Installs the defaultTableCellRenderer
s for known Ghidra table cell data classes.boolean
isColumnHeaderPopupEnabled()
boolean
isKeyConsumed(javax.swing.KeyStroke keyStroke)
This method is implemented to signal interest in any typed text that may help the user change the row in the table.void
notifyTableChanged(javax.swing.event.TableModelEvent event)
A method that allows clients to signal to this GTable and its internals that the table model has changed.protected boolean
processKeyBinding(javax.swing.KeyStroke ks, java.awt.event.KeyEvent e, int condition, boolean pressed)
void
savePreferences()
Signals that the preferences of this table (visible columns, sort order, etc.) should be saved.void
scrollToSelectedRow()
void
selectRow(int row)
Selects the given row.boolean
selectRow(java.awt.event.MouseEvent event)
Selects the row under the given mouse point.void
setActionsEnabled(boolean b)
Enables the keyboard actions to pass through this table and up the component hierarchy.void
setAutoEditEnabled(boolean allowAutoEdit)
Enables or disables auto-edit.void
setAutoLookupColumn(int lookupColumn)
Sets the column in which auto-lookup will be enabled.void
setColumnHeaderPopupEnabled(boolean enabled)
void
setColumnModel(javax.swing.table.TableColumnModel columnModel)
void
setHTMLRenderingEnabled(boolean enable)
Enables and disables the rendering of HTML content in this table.void
setModel(javax.swing.table.TableModel dataModel)
void
setPreferenceKey(java.lang.String preferenceKey)
Sets the key for saving and restoring column configuration state.void
setRowHeight(int height)
void
setSelectionModel(javax.swing.ListSelectionModel newModel)
void
setUserSortingEnabled(boolean enabled)
Allows for the disabling of the user's ability to sort an instance ofAbstractSortedTableModel
by clicking the table's headers.void
setVisibleRowCount(int visibleRowCount)
protected boolean
supportsPopupActions()
A method that subclasses can override to signal that they wish not to have this table's built-in popup actions.void
tableChanged(javax.swing.event.TableModelEvent e)
protected javax.swing.table.TableCellRenderer
wrapDefaultTableCellRenderer(javax.swing.table.TableCellRenderer renderer, java.lang.Class<?> columnClass)
-
Methods inherited from class javax.swing.JTable
addColumn, addColumnSelectionInterval, addNotify, addRowSelectionInterval, changeSelection, clearSelection, columnAtPoint, columnMarginChanged, columnMoved, columnSelectionChanged, configureEnclosingScrollPane, convertColumnIndexToModel, convertColumnIndexToView, convertRowIndexToModel, convertRowIndexToView, createDefaultDataModel, createDefaultEditors, createDefaultRenderers, createDefaultSelectionModel, createDefaultTableHeader, createScrollPaneForTable, doLayout, editCellAt, editingCanceled, editingStopped, getAccessibleContext, getAutoCreateColumnsFromModel, getAutoCreateRowSorter, getAutoResizeMode, getCellEditor, getCellEditor, getCellRect, getCellSelectionEnabled, getColumn, getColumnClass, getColumnCount, getColumnModel, getColumnName, getColumnSelectionAllowed, getDefaultEditor, getDragEnabled, getDropLocation, getDropMode, getEditingColumn, getEditingRow, getEditorComponent, getFillsViewportHeight, getGridColor, getIntercellSpacing, getModel, getPrintable, getRowCount, getRowHeight, getRowHeight, getRowMargin, getRowSelectionAllowed, getRowSorter, getScrollableBlockIncrement, getScrollableTracksViewportHeight, getScrollableTracksViewportWidth, getScrollableUnitIncrement, getSelectedColumn, getSelectedColumnCount, getSelectedColumns, getSelectedRow, getSelectedRowCount, getSelectedRows, getSelectionBackground, getSelectionForeground, getSelectionModel, getShowHorizontalLines, getShowVerticalLines, getSurrendersFocusOnKeystroke, getTableHeader, getUI, getUIClassID, getUpdateSelectionOnSort, initializeLocalVars, isCellEditable, isCellSelected, isColumnSelected, isEditing, isRowSelected, moveColumn, paramString, prepareEditor, prepareRenderer, print, print, print, print, print, removeColumn, removeColumnSelectionInterval, removeEditor, removeNotify, removeRowSelectionInterval, resizeAndRepaint, rowAtPoint, selectAll, setAutoCreateColumnsFromModel, setAutoCreateRowSorter, setAutoResizeMode, setCellEditor, setCellSelectionEnabled, setColumnSelectionAllowed, setColumnSelectionInterval, setDefaultEditor, setDefaultRenderer, setDragEnabled, setDropMode, setEditingColumn, setEditingRow, setFillsViewportHeight, setGridColor, setIntercellSpacing, setPreferredScrollableViewportSize, setRowHeight, setRowMargin, setRowSelectionAllowed, setRowSelectionInterval, setRowSorter, setSelectionBackground, setSelectionForeground, setSelectionMode, setShowGrid, setShowHorizontalLines, setShowVerticalLines, setSurrendersFocusOnKeystroke, setTableHeader, setUI, setUpdateSelectionOnSort, setValueAt, sizeColumnsToFit, sizeColumnsToFit, sorterChanged, unconfigureEnclosingScrollPane, updateUI, valueChanged
-
Methods inherited from class javax.swing.JComponent
addAncestorListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, 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, 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, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, 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, update
-
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate, validateTree
-
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, 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, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, 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, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setMixingCutoutShape, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
-
-
-
-
Field Detail
-
defaultGTableRendererList
protected java.util.List<javax.swing.table.TableCellRenderer> defaultGTableRendererList
A list of default renderers created by this table
-
KEY_TIMEOUT
public static final long KEY_TIMEOUT
- See Also:
- Constant Field Values
-
-
Method Detail
-
setVisibleRowCount
public void setVisibleRowCount(int visibleRowCount)
-
getPreferredScrollableViewportSize
public java.awt.Dimension getPreferredScrollableViewportSize()
- Specified by:
getPreferredScrollableViewportSize
in interfacejavax.swing.Scrollable
- Overrides:
getPreferredScrollableViewportSize
in classjavax.swing.JTable
-
tableChanged
public void tableChanged(javax.swing.event.TableModelEvent e)
- Specified by:
tableChanged
in interfacejavax.swing.event.TableModelListener
- Overrides:
tableChanged
in classjavax.swing.JTable
-
selectRow
public void selectRow(int row)
Selects the given row. This is a convenience method forJTable.setRowSelectionInterval(int, int)
.- Parameters:
row
- The row to select
-
selectRow
public boolean selectRow(java.awt.event.MouseEvent event)
Selects the row under the given mouse point. This method is useful when the user triggers a popup mouse action and you would like to have the table select that row if it is not already selected. This allows you to guarantee that there is always a selection when the user triggers a popup menu.- Parameters:
event
- The event that triggered the popup menu- Returns:
- true if the row is selected or was already selected.
-
createDefaultColumnModel
protected javax.swing.table.TableColumnModel createDefaultColumnModel()
- Overrides:
createDefaultColumnModel
in classjavax.swing.JTable
-
setColumnModel
public void setColumnModel(javax.swing.table.TableColumnModel columnModel)
- Overrides:
setColumnModel
in classjavax.swing.JTable
-
setSelectionModel
public void setSelectionModel(javax.swing.ListSelectionModel newModel)
- Overrides:
setSelectionModel
in classjavax.swing.JTable
-
setModel
public void setModel(javax.swing.table.TableModel dataModel)
- Overrides:
setModel
in classjavax.swing.JTable
-
createSelectionManager
protected <T> SelectionManager createSelectionManager(javax.swing.table.TableModel model)
-
getSelectionManager
public SelectionManager getSelectionManager()
Returns theSelectionManager
in use by this GTable. null is returned if the user has installed their ownListSelectionModel
.- Returns:
- the selection manager
-
notifyTableChanged
public void notifyTableChanged(javax.swing.event.TableModelEvent event)
A method that allows clients to signal to this GTable and its internals that the table model has changed. Usually,tableChanged(TableModelEvent)
is called, but clients alter the table, but do not do so through the model. In this case, they need a way to signal to the table that the model has been updated.- Parameters:
event
- the event for the change
-
dispose
public void dispose()
Call this when the table will no longer be used
-
setAutoLookupColumn
public void setAutoLookupColumn(int lookupColumn)
Sets the column in which auto-lookup will be enabled.- Parameters:
lookupColumn
- the column in which auto-lookup will be enabled
-
setActionsEnabled
public void setActionsEnabled(boolean b)
Enables the keyboard actions to pass through this table and up the component hierarchy. Specifically, passing true to this method allows unmodified keystrokes to work in the tool when this table is focused. Modified keystrokes, likeCtrl-C
, will work at all times. Finally, if true is passed to this method, then theauto lookup
feature is disabled.The default state is for actions to be disabled.
- Parameters:
b
- true allows keyboard actions to pass up the component hierarchy.
-
isKeyConsumed
public boolean isKeyConsumed(javax.swing.KeyStroke keyStroke)
This method is implemented to signal interest in any typed text that may help the user change the row in the table. For example, if the user types 'a', then the table will move to the first symbol that begins with the letter 'a'. This method also wants to handle text when the 'shift' key is down. This method will return false if the control key is pressed.- Specified by:
isKeyConsumed
in interfaceKeyStrokeConsumer
- Parameters:
keyStroke
- key stroke- See Also:
KeyStrokeConsumer.isKeyConsumed(javax.swing.KeyStroke)
-
setAutoEditEnabled
public void setAutoEditEnabled(boolean allowAutoEdit)
Enables or disables auto-edit. When enabled, the user can start typing to trigger an edit of an editable table cell.- Parameters:
allowAutoEdit
- true for auto-editing
-
setRowHeight
public void setRowHeight(int height)
- Overrides:
setRowHeight
in classjavax.swing.JTable
-
columnAdded
public void columnAdded(javax.swing.event.TableColumnModelEvent e)
- Specified by:
columnAdded
in interfacejavax.swing.event.TableColumnModelListener
- Overrides:
columnAdded
in classjavax.swing.JTable
-
columnRemoved
public void columnRemoved(javax.swing.event.TableColumnModelEvent e)
- Specified by:
columnRemoved
in interfacejavax.swing.event.TableColumnModelListener
- Overrides:
columnRemoved
in classjavax.swing.JTable
-
getConfigurableColumnTableModel
public ConfigurableColumnTableModel getConfigurableColumnTableModel()
Returns the underlying ConfigurableColumnTableModel if one is in-use- Returns:
- the underlying ConfigurableColumnTableModel if one is in-use
-
getUnwrappedTableModel
protected javax.swing.table.TableModel getUnwrappedTableModel()
Unrolls the current model by checking if the current model is inside of a wrapper table model.- Returns:
- this class's table model, unwrapped as needed
-
processKeyBinding
protected boolean processKeyBinding(javax.swing.KeyStroke ks, java.awt.event.KeyEvent e, int condition, boolean pressed)
- Overrides:
processKeyBinding
in classjavax.swing.JTable
-
getDefaultRenderer
public javax.swing.table.TableCellRenderer getDefaultRenderer(java.lang.Class<?> columnClass)
- Overrides:
getDefaultRenderer
in classjavax.swing.JTable
- See Also:
JTable.getDefaultRenderer(java.lang.Class)
-
wrapDefaultTableCellRenderer
protected javax.swing.table.TableCellRenderer wrapDefaultTableCellRenderer(javax.swing.table.TableCellRenderer renderer, java.lang.Class<?> columnClass)
-
initDefaultRenderers
protected void initDefaultRenderers()
Installs the defaultTableCellRenderer
s for known Ghidra table cell data classes. Subclasses can override this method to add additional types or to change the default associations.
-
createDefaultColumnsFromModel
public void createDefaultColumnsFromModel()
Overridden in order to set the column header renderer on newly created columns.- Overrides:
createDefaultColumnsFromModel
in classjavax.swing.JTable
- See Also:
JTable.createDefaultColumnsFromModel()
-
getToolTipText
public java.lang.String getToolTipText(java.awt.event.MouseEvent e)
- Overrides:
getToolTipText
in classjavax.swing.JTable
- See Also:
JComponent.getToolTipText(java.awt.event.MouseEvent)
-
setHTMLRenderingEnabled
public void setHTMLRenderingEnabled(boolean enable)
Enables and disables the rendering of HTML content in this table. If enabled, this table will:- Wrap tooltip text content with an <html> tag so that it is possible for the content to be formatted in a manner that is easier for the user read, and
- Enable any default
GTableCellRenderer
instances to render HTML content, which they do not do by default.
As mentioned above, this class only enables/disables the HTML rendering on
GTableCellRenderer
instances that were created by this class (or subclasses) during initialization ininitDefaultRenderers()
and that have been added to thedefaultGTableRendererList
. If users of this class have changed or added new renderers, then those renderers will not be changed by calling this method. Typically, this method should be called just after created an instance of this class, which will work as described by this method.HTML rendering is disabled by default.
- Parameters:
enable
- true to enable HTML rendering; false to disable it
-
setPreferenceKey
public void setPreferenceKey(java.lang.String preferenceKey)
Sets the key for saving and restoring column configuration state. Use this if you have multiple instances of a table and you want different column settings for each instance.- Parameters:
preferenceKey
- the unique string to use a key for this instance.
-
getPreferenceKey
public java.lang.String getPreferenceKey()
- Returns:
- the preference key
- See Also:
setPreferenceKey(String)
-
savePreferences
public void savePreferences()
Signals that the preferences of this table (visible columns, sort order, etc.) should be saved. Most clients never need to call this method, as changes are saved for free when the user manipulates columns. However, sometimes the client can change the state of the columns programmatically, which is not guaranteed to get saved; for example, setting the sort state of a sorted table model programmatically will not get saved.
-
setUserSortingEnabled
public void setUserSortingEnabled(boolean enabled)
Allows for the disabling of the user's ability to sort an instance ofAbstractSortedTableModel
by clicking the table's headers. The default setting is enabled.- Parameters:
enabled
- true to enable; false to disable
-
setColumnHeaderPopupEnabled
public void setColumnHeaderPopupEnabled(boolean enabled)
-
isColumnHeaderPopupEnabled
public boolean isColumnHeaderPopupEnabled()
-
getTableColumnPopupMenu
public javax.swing.JPopupMenu getTableColumnPopupMenu(int columnIndex)
-
getCellRenderer
public javax.swing.table.TableCellRenderer getCellRenderer(int row, int col)
- Overrides:
getCellRenderer
in classjavax.swing.JTable
-
getCellRendererOverride
public final javax.swing.table.TableCellRenderer getCellRendererOverride(int row, int col)
Performs custom work to locate renderers for special table model types. This method allows clients to bypass thegetCellRenderer(int, int)
, which is sometimes overridden by subclasses to return a hard-coded renderer. In that case, some clients still want a way to perform normal cell renderer lookup.- Parameters:
row
- the rowcol
- the column- Returns:
- the cell renderer
-
editCellAt
public boolean editCellAt(int row, int column)
If you just begin typing into an editable cell in a JTable, then the cell editor will be displayed. However, the editor component will not have a focus. This method has been overridden to request focus on the editor component.- Overrides:
editCellAt
in classjavax.swing.JTable
- See Also:
JTable.editCellAt(int, int)
-
scrollToSelectedRow
public void scrollToSelectedRow()
-
getValueAt
public java.lang.Object getValueAt(int row, int column)
- Overrides:
getValueAt
in classjavax.swing.JTable
-
supportsPopupActions
protected boolean supportsPopupActions()
A method that subclasses can override to signal that they wish not to have this table's built-in popup actions. Subclasses will almost never need to override this method.- Returns:
- true if popup actions are supported
-
createSharedActions
public static void createSharedActions(DockingTool tool, ToolActions toolActions, java.lang.String owner)
-
-