|
Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference 11g Release 1 (11.1.1.7.2) E13403-10 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
java.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JTable
oracle.javatools.controls.nicetable.NiceTable
Deprecated. GenericTable (uic:oracle.javatools.ui.table) is the standard component for new table implementations. Existing uses of NiceTable should not be transitioned to GenericTable until this class is obsoleted. GenericTable currently has a different API and feature set, but will be made equivalent in an upcoming release.
@Deprecated
public class NiceTable
NiceTable is a subclass of JTable with a number of nice features and a cleaner UI.
Features provided by this table:
setSortColumnBackgroundColor(Color)
method. By default a slightly darker shade of the table's natural background color is used. You should retrieve a JScrollPane for this NiceTable using the getScrollPaneForTable()
method to ensure the highlight extends to the bottom of the viewport even if there are only a small number of rows in the table.scrollToSelection()
method.setSortRetainsSelection(boolean)
method.convertValueToText(java.lang.Object, boolean, boolean, int, int)
. If values in the data model do not have a human-readable toString() representation which is suitable for the clipboard, they may be handled there. NiceTable's clipboard support can also be switched off by calling setUseTransferHandler(boolean)
with false
before the UI is initialized through the L&F.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 |
Nested classes/interfaces inherited from class java.awt.Container |
---|
java.awt.Container.AccessibleAWTContainer |
Nested classes/interfaces inherited from class java.awt.Component |
---|
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
Field Summary |
---|
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 |
---|
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
Fields inherited from class java.awt.Component |
---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface java.awt.image.ImageObserver |
---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
---|---|
NiceTable() Deprecated. |
|
NiceTable(javax.swing.table.TableModel model) Deprecated. |
Method Summary | |
---|---|
void |
autoSizeColumnsToFit() Deprecated. |
void |
autoSizeColumnsToFit(java.lang.Object[] prototypeValues) Deprecated. Utility method that will set the preferred size of all columns in this table so that they are just big enough to display their contents. |
void |
autoSizeViewportToFit(java.awt.Dimension min, java.awt.Dimension max) Deprecated. Automatically sizes the viewport to fix the current data in the table, given a minimum and maximum size. |
protected void |
configureEnclosingScrollPane() Deprecated. |
int |
convertRowToModelIndex(int viewRow) Deprecated. Convert a row index in the view to a row index in the model. |
int |
convertRowToViewIndex(int modelRow) Deprecated. Convert a row index in the model to a row index in the view. |
java.lang.String |
convertValueToText(java.lang.Object value, boolean isSelected, boolean hasFocus, int row, int column) Deprecated. Called by the renderers to convert the specified value to text. |
javax.swing.JPopupMenu |
createSelectorMenu() Deprecated. Create the selector menu which is used to select and deselect columns. |
javax.swing.table.TableModel |
getBaseModel() Deprecated. Get the "base" model of the table. |
protected static java.awt.Color |
getDarker(java.awt.Color c) Deprecated. Get a very slightly darker shade of the specified color. |
javax.swing.table.TableCellRenderer |
getDefaultRenderer(java.lang.Class<?> columnClass) Deprecated. |
int[] |
getHiddenColumns() Deprecated. Get columns that are hidden. |
protected java.lang.String |
getJTableToolTipText(java.awt.event.MouseEvent e) Deprecated. Method for subclasses to call which want to avoid NiceTable functionality in getToolTipText(MouseEvent) |
NiceTablePersistentSettings |
getPersistentSettings() Deprecated. Get a javabean storing persistent settings of this NiceTable which you can serialize in order to restore the visible appearance of the table next time it is used. |
javax.swing.JScrollPane |
getScrollPaneForTable() Deprecated. Get a scroll pane for this table. |
int[] |
getSelectedRowsInModel() Deprecated. Get the selected rows as model rows, regardless of whether this table is currently sorted. |
int |
getSortColumn() Deprecated. Get the (model) sort column |
java.awt.Color |
getSortColumnBackgroundColor() Deprecated. Get the background color of the sorted column. |
boolean |
getSortRetainsSelection() Deprecated. Get whether the selection is maintained after a sort. |
java.lang.String |
getToolTipText(java.awt.event.MouseEvent event) Deprecated. Override to provide a tooltip for cells that are obscured because they are too small to display their renderer properly. |
boolean |
getUseTransferHandler() Deprecated. Get whether the default TransferHandler from the look and feel is associated with this component when the UI is initialized. |
boolean |
isColumnSelectorAvailable() Deprecated. Get whether the context menu for hiding and showing columns is available on this instance of NiceTable |
boolean |
isResizeColumnOnDoubleClick() Deprecated. Get whether the user can resize columns in this table by double clicking the resize divider between two columns. |
boolean |
isShowToolTips() Deprecated. Get whether tooltips are being shown for truncated cells. |
boolean |
isSortAscending() Deprecated. Is the sorted column being sorted in ascending order? |
boolean |
isSorted() Deprecated. Is the table sorted? |
protected boolean |
processKeyBinding(javax.swing.KeyStroke ks, java.awt.event.KeyEvent e, int condition, boolean pressed) Deprecated. |
void |
reSort() Deprecated. Convenience method that reapplies the current sort. |
void |
scrollToSelection() Deprecated. Scrolls the table's viewport to the currently selected row and column. |
void |
selectAll() Deprecated. |
void |
setBackground(java.awt.Color c) Deprecated. Overridden to make sure the highlighted column is repainted properly. |
void |
setColumnSelectorAvailable(boolean isAvailable) Deprecated. Set whether this NiceTable will display a context menu on the table headers allowing the user to hide and show columns. |
protected void |
setColumnVisible(javax.swing.table.TableColumn column, int modelColumn, boolean isVisible) Deprecated. |
void |
setHiddenColumns(int[] hiddenColumns) Deprecated. Set columns that are hidden. |
void |
setPersistentSettings(NiceTablePersistentSettings settings) Deprecated. Set the persistent view settings of this NiceTable. |
void |
setResizeColumnOnDoubleClick(boolean isOn) Deprecated. Set whether the user can resize columns in this table by double clicking the resize divider between two columns. |
void |
setSelectedRowsInModel(int[] selectedRowsInModel) Deprecated. Select the specified model rows, regardless of their position in the (sorted or unsorted) view. |
void |
setShowToolTips(boolean showToolTips) Deprecated. Controls whether this NiceTable will show tooltips for cells that are truncated due to reduced column width. |
void |
setSortColumn(int modelColumn, boolean isSortAscending) Deprecated. Set the column to sort the view by. |
void |
setSortColumnBackgroundColor(java.awt.Color c) Deprecated. Set the background color used to highlight the sorted column. |
void |
setSorted(boolean isSorted) Deprecated. Set whether this NiceTable is sorted. |
void |
setSortRetainsSelection(boolean retainsSelection) Deprecated. Set whether the selection is maintained after a sort. |
void |
setUI(javax.swing.plaf.TableUI ui) Deprecated. |
void |
setUseTransferHandler(boolean useTransferHandler) Deprecated. Set whether the default TransferHandler from the look and feel is associated with this component when the UI is initialized. |
void |
updateUI() Deprecated. Overridden to make sure look and feel changes cause the highlighted column to be repainted in the right color. |
Methods inherited from class javax.swing.JTable |
---|
addColumn, addColumnSelectionInterval, addNotify, addRowSelectionInterval, changeSelection, clearSelection, columnAdded, columnAtPoint, columnMarginChanged, columnMoved, columnRemoved, columnSelectionChanged, convertColumnIndexToModel, convertColumnIndexToView, convertRowIndexToModel, convertRowIndexToView, createDefaultColumnModel, createDefaultColumnsFromModel, createDefaultDataModel, createDefaultEditors, createDefaultRenderers, createDefaultSelectionModel, createDefaultTableHeader, createScrollPaneForTable, doLayout, editCellAt, editCellAt, editingCanceled, editingStopped, getAccessibleContext, getAutoCreateColumnsFromModel, getAutoCreateRowSorter, getAutoResizeMode, getCellEditor, getCellEditor, getCellRect, getCellRenderer, getCellSelectionEnabled, getColumn, getColumnClass, getColumnCount, getColumnModel, getColumnName, getColumnSelectionAllowed, getDefaultEditor, 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, getUI, getUIClassID, getUpdateSelectionOnSort, getValueAt, initializeLocalVars, isCellEditable, isCellSelected, isColumnSelected, isEditing, isRowSelected, moveColumn, paramString, prepareEditor, prepareRenderer, print, print, print, print, print, removeColumn, removeColumnSelectionInterval, removeEditor, removeNotify, removeRowSelectionInterval, resizeAndRepaint, rowAtPoint, 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, sizeColumnsToFit, sorterChanged, tableChanged, unconfigureEnclosingScrollPane, 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, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, 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, 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, transferFocusBackward, 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, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, 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, transferFocusUpCycle |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public NiceTable()
public NiceTable(javax.swing.table.TableModel model)
Method Detail |
---|
public void setUI(javax.swing.plaf.TableUI ui)
setUI
in class javax.swing.JTable
public void setUseTransferHandler(boolean useTransferHandler)
TransferHandler
from the look and feel is associated with this component when the UI is initialized.
The default for this property is false.
useTransferHandler
- true if the transfer handler from the L&F will be used.public boolean getUseTransferHandler()
TransferHandler
from the look and feel is associated with this component when the UI is initialized.
The default for this property is false.
public void setSortRetainsSelection(boolean retainsSelection)
The default for this property is true.
retainsSelection
- whether the model selection is retained when the table is sorted.public boolean getSortRetainsSelection()
The default for this property is true.
public int convertRowToModelIndex(int viewRow)
viewRow
- a row index in the viewpublic int convertRowToViewIndex(int modelRow)
modelRow
- a row index in the modelpublic java.awt.Color getSortColumnBackgroundColor()
public void setSortColumnBackgroundColor(java.awt.Color c)
c
- the color to paint the background of the sorted columnpublic void setBackground(java.awt.Color c)
setBackground
in class javax.swing.JComponent
c
-public void updateUI()
updateUI
in class javax.swing.JTable
protected boolean processKeyBinding(javax.swing.KeyStroke ks, java.awt.event.KeyEvent e, int condition, boolean pressed)
processKeyBinding
in class javax.swing.JTable
public void setSorted(boolean isSorted)
isSorted
- if true, the NiceTable is sorted.public boolean isSorted()
public javax.swing.table.TableModel getBaseModel()
public int[] getSelectedRowsInModel()
public void setSelectedRowsInModel(int[] selectedRowsInModel)
selectedRowsInModel
- the model rows to select.public NiceTablePersistentSettings getPersistentSettings()
public void setPersistentSettings(NiceTablePersistentSettings settings)
settings
-public javax.swing.table.TableCellRenderer getDefaultRenderer(java.lang.Class<?> columnClass)
getDefaultRenderer
in class javax.swing.JTable
public void setSortColumn(int modelColumn, boolean isSortAscending)
modelColumn
- the column to sort byisSortAscending
- if true, the table is sorted in ascending orderpublic int getSortColumn()
public boolean isSortAscending()
public void reSort()
public void setHiddenColumns(int[] hiddenColumns)
hiddenColumns
- columns which are currently hiddenpublic int[] getHiddenColumns()
public void setColumnSelectorAvailable(boolean isAvailable)
isAvailable
- if true, a context menu will be provided on the header of this table with checkbox menu items for each column. The user can use these to hide and show columns.public boolean isColumnSelectorAvailable()
public javax.swing.JPopupMenu createSelectorMenu()
protected void setColumnVisible(javax.swing.table.TableColumn column, int modelColumn, boolean isVisible)
public void selectAll()
selectAll
in class javax.swing.JTable
public javax.swing.JScrollPane getScrollPaneForTable()
protected void configureEnclosingScrollPane()
configureEnclosingScrollPane
in class javax.swing.JTable
public void setShowToolTips(boolean showToolTips)
showToolTips
- if true, a tooltip will be displayed for any cell which is truncated because the column is not wide enough to display its full value.public boolean isShowToolTips()
public java.lang.String getToolTipText(java.awt.event.MouseEvent event)
getToolTipText
in class javax.swing.JTable
event
- mouse event to get tooltip forprotected java.lang.String getJTableToolTipText(java.awt.event.MouseEvent e)
e
-public final void autoSizeViewportToFit(java.awt.Dimension min, java.awt.Dimension max)
min
- the minimum size. Optional. If null, no minimum is used.max
- the maximum size. Optional. If null, no maximum is used.public void autoSizeColumnsToFit()
autoSizeColumnsToFit(Object[])
public void autoSizeColumnsToFit(java.lang.Object[] prototypeValues)
m_table.setAutoResizeMode( NiceTable.AUTO_RESIZE_OFF );
public void setResizeColumnOnDoubleClick(boolean isOn)
m_table.setAutoResizeMode( NiceTable.AUTO_RESIZE_OFF );
isOn
- if true, the user can resize columnspublic boolean isResizeColumnOnDoubleClick()
public void scrollToSelection()
public java.lang.String convertValueToText(java.lang.Object value, boolean isSelected, boolean hasFocus, int row, int column)
value.toString
, ignoring all other arguments. To control the conversion, subclass this method and use any of the arguments you need.value
- the Object
to convert to textisSelected
- true if cell is selectedhasFocus
- true if cell has focusrow
- the row of the cell to rendercolumn
- the column of the cell to renderString
representation of the node's valueprotected static java.awt.Color getDarker(java.awt.Color c)
c
- a color
|
Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference 11g Release 1 (11.1.1.7.2) E13403-10 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |