public class IlpJTable extends JTable
JTable to delegate selection management to the
IlpTableView which contains this JTable.
This class also uses a specific UI class.JTable.AccessibleJTable, JTable.DropLocation, JTable.PrintModeJComponent.AccessibleJComponentContainer.AccessibleAWTContainerComponent.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategyAUTO_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, tableHeaderlistenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOWaccessibleContext, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENTABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH| Constructor and Description |
|---|
IlpJTable(IlpTableView tableView)
Constructs an IlpJTable.
|
| Modifier and Type | Method and Description |
|---|---|
void |
changeSelection(int rowIndex,
int columnIndex,
boolean toggle,
boolean extend)
Redefined here to forward selection to the
IlpTableView
containing this JTable. |
void |
columnAdded(TableColumnModelEvent e)
Invoked when a column is added to the table column model.
|
void |
columnMarginChanged(ChangeEvent e)
Invoked when a column is moved due to a margin change.
|
void |
columnRemoved(TableColumnModelEvent tableColumnModelEvent)
Invoked when a column is removed from the table column model.
|
TableCellEditor |
getCellEditor(int row,
int column)
Redefined here to delegate to the table view.
|
TableCellRenderer |
getCellRenderer(int row,
int column)
Redefined here to delegate to the table view.
|
int |
getColumnIndexInView(int columnIndex)
Returns the column index in the table view column system.
|
IlpTableView |
getIlpTableView()
Returns the
IlpTableView which uses this IlpJTable. |
boolean |
isCellSelected(int row,
int column)
Redefined here to delegate the selection management to the
IlpTableView containing this JTable. |
boolean |
isRowHeaderTable()
Returns true is this table is a row header table.
|
Component |
prepareRenderer(TableCellRenderer renderer,
int row,
int column)
Redefined here to delegate the selection management to the
IlpTableView containing this JTable. |
protected void |
processMouseEvent(MouseEvent e)
Processes mouse events occurring on this component by
dispatching them to any registered
MouseListener objects. |
protected void |
processMouseMotionEvent(MouseEvent e)
Processes mouse motion events, such as
MouseEvent.MOUSE_DRAGGED. |
void |
scrollRectToVisible(Rectangle aRect)
Forwards the
scrollRectToVisible() message to the
table if it is a row header table. |
void |
setRowHeaderTable(boolean flag)
Tell the table if it is a row header table or not.
|
void |
setUI(TableUI ui)
Sets the L&F object that renders this component and repaints.
|
void |
sizeColumnsToFit(int resizingColumn)
Resizes one or more of the columns in the table
so that the total width of all of this
JTable's
columns is equal to the width of the table. |
void |
valueChanged(ListSelectionEvent e)
Redefined here to delegate the selection management to the
IlpTableView containing this JTable. |
addColumn, addColumnSelectionInterval, addNotify, addRowSelectionInterval, clearSelection, columnAtPoint, columnMoved, columnSelectionChanged, configureEnclosingScrollPane, convertColumnIndexToModel, convertColumnIndexToView, convertRowIndexToModel, convertRowIndexToView, createDefaultColumnModel, createDefaultColumnsFromModel, createDefaultDataModel, createDefaultEditors, createDefaultRenderers, createDefaultSelectionModel, createDefaultTableHeader, createScrollPaneForTable, doLayout, editCellAt, editCellAt, editingCanceled, editingStopped, getAccessibleContext, getAutoCreateColumnsFromModel, getAutoCreateRowSorter, getAutoResizeMode, getCellEditor, getCellRect, getCellSelectionEnabled, getColumn, getColumnClass, getColumnCount, getColumnModel, getColumnName, getColumnSelectionAllowed, getDefaultEditor, getDefaultRenderer, getDragEnabled, getDropLocation, getDropMode, getEditingColumn, getEditingRow, getEditorComponent, getFillsViewportHeight, getGridColor, getIntercellSpacing, getModel, getPreferredScrollableViewportSize, getPrintable, getRowCount, getRowHeight, getRowHeight, getRowMargin, getRowSelectionAllowed, getRowSorter, getScrollableBlockIncrement, getScrollableTracksViewportHeight, getScrollableTracksViewportWidth, getScrollableUnitIncrement, getSelectedColumn, getSelectedColumnCount, getSelectedColumns, getSelectedRow, getSelectedRowCount, getSelectedRows, getSelectionBackground, getSelectionForeground, getSelectionModel, getShowHorizontalLines, getShowVerticalLines, getSurrendersFocusOnKeystroke, getTableHeader, getToolTipText, getUI, getUIClassID, getUpdateSelectionOnSort, getValueAt, initializeLocalVars, isCellEditable, isColumnSelected, isEditing, isRowSelected, moveColumn, paramString, prepareEditor, print, print, print, print, print, processKeyBinding, removeColumn, removeColumnSelectionInterval, removeEditor, removeNotify, removeRowSelectionInterval, resizeAndRepaint, rowAtPoint, selectAll, setAutoCreateColumnsFromModel, setAutoCreateRowSorter, setAutoResizeMode, setCellEditor, setCellSelectionEnabled, setColumnModel, setColumnSelectionAllowed, setColumnSelectionInterval, setDefaultEditor, setDefaultRenderer, setDragEnabled, setDropMode, setEditingColumn, setEditingRow, setFillsViewportHeight, setGridColor, setIntercellSpacing, setModel, setPreferredScrollableViewportSize, setRowHeight, setRowHeight, setRowMargin, setRowSelectionAllowed, setRowSelectionInterval, setRowSorter, setSelectionBackground, setSelectionForeground, setSelectionMode, setSelectionModel, setShowGrid, setShowHorizontalLines, setShowVerticalLines, setSurrendersFocusOnKeystroke, setTableHeader, setUpdateSelectionOnSort, setValueAt, sizeColumnsToFit, sorterChanged, tableChanged, unconfigureEnclosingScrollPane, updateUIaddAncestorListener, 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, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, 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, updateadd, 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, validateTreeaction, 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, 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, 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, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCyclepublic IlpJTable(IlpTableView tableView)
public IlpTableView getIlpTableView()
IlpTableView which uses this IlpJTable.IlpTableView using this IlpJTable.public boolean isRowHeaderTable()
public void setRowHeaderTable(boolean flag)
columnMarginChanged(javax.swing.event.ChangeEvent)public void columnMarginChanged(ChangeEvent e)
columnMarginChanged in interface TableColumnModelListenercolumnMarginChanged in class JTablepublic int getColumnIndexInView(int columnIndex)
public void changeSelection(int rowIndex,
int columnIndex,
boolean toggle,
boolean extend)
IlpTableView
containing this JTable.changeSelection in class JTableJTable.changeSelection(int, int, boolean, boolean)public boolean isCellSelected(int row,
int column)
IlpTableView containing this JTable.isCellSelected in class JTableJTable.isCellSelected(int, int)public TableCellRenderer getCellRenderer(int row, int column)
getCellRenderer in class JTablepublic TableCellEditor getCellEditor(int row, int column)
getCellEditor in class JTablepublic Component prepareRenderer(TableCellRenderer renderer, int row, int column)
IlpTableView containing this JTable.prepareRenderer in class JTableJTable.isCellSelected(int, int)public void valueChanged(ListSelectionEvent e)
IlpTableView containing this JTable.
This method is invoked when the row selection changes -- repaints to show
the new selection.
The application code does not use these methods explicitly, they
are used internally by JTable.
valueChanged in interface ListSelectionListenervalueChanged in class JTablee - The event received.JTable.valueChanged(javax.swing.event.ListSelectionEvent)public void columnAdded(TableColumnModelEvent e)
Application code will not use these methods explicitly, they
are used internally by JTable.
Redefined here to make a little space for the new column inserted
at the end of the table when auto resize mode is
AUTO_RESIZE_LAST_COLUMN.
columnAdded in interface TableColumnModelListenercolumnAdded in class JTableTableColumnModelListenerpublic void columnRemoved(TableColumnModelEvent tableColumnModelEvent)
Application code will not use these methods explicitly, they are used internally by JTable. Redefined to resize the fixed column table if necessary
columnRemoved in interface TableColumnModelListenercolumnRemoved in class JTableTableColumnModelListenerpublic void sizeColumnsToFit(int resizingColumn)
JTable's
columns is equal to the width of the table.
See JTable.sizeColumnsToFit(boolean) for more information.
The method is redefined here to resize only the last column if auto
resize mode is AUTO_RESIZE_LAST_COLUMN even when
resizeColumn is equal to -1.
sizeColumnsToFit in class JTableresizingColumn - the column whose resizing made this adjustment
necessary or -1 if there is no such columnTableColumn.setWidth(int)public void scrollRectToVisible(Rectangle aRect)
scrollRectToVisible() message to the
table if it is a row header table. This fixes Sun's bug 4202002 :
JScrollPane: row header autoscrolling not reflected in content.scrollRectToVisible in class JComponentaRect - the visible Rectanglepublic void setUI(TableUI ui)
protected void processMouseEvent(MouseEvent e)
MouseListener objects.processMouseEvent in class JComponente - The mouse eventprotected void processMouseMotionEvent(MouseEvent e)
MouseEvent.MOUSE_DRAGGED.processMouseMotionEvent in class JComponente - the mouse event© Copyright 2024 Rogue Wave Software, Inc., a Perforce company.. All Rights Reserved.