Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1.7.2)

E13403-10


oracle.javatools.controls.nicetable
Class NiceTable

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by javax.swing.JComponent
              extended by javax.swing.JTable
                  extended by oracle.javatools.controls.nicetable.NiceTable

All Implemented Interfaces:
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

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
extends javax.swing.JTable

NiceTable is a subclass of JTable with a number of nice features and a cleaner UI.

Features provided by this table:

See Also:
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

 

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

NiceTable

public NiceTable()
Deprecated. 

NiceTable

public NiceTable(javax.swing.table.TableModel model)
Deprecated. 

Method Detail

setUI

public void setUI(javax.swing.plaf.TableUI ui)
Deprecated. 
Overrides:
setUI in class javax.swing.JTable

setUseTransferHandler

public 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.

The default for this property is false.

Parameters:
useTransferHandler - true if the transfer handler from the L&F will be used.

getUseTransferHandler

public boolean getUseTransferHandler()
Deprecated. 
Get whether the default TransferHandler from the look and feel is associated with this component when the UI is initialized.

The default for this property is false.

Returns:
true if the transfer handler from the L&F will be used.

setSortRetainsSelection

public void setSortRetainsSelection(boolean retainsSelection)
Deprecated. 
Set whether the selection is maintained after a sort. If this property is true, the same model rows in the table will be selected after a sort as were selected before the sort. If this property is false, the view selection remains the same after sort (which will probably mean the model selection will change). In the latter case, note that a selection changed event will probably NOT be fired.

The default for this property is true.

Parameters:
retainsSelection - whether the model selection is retained when the table is sorted.

getSortRetainsSelection

public boolean getSortRetainsSelection()
Deprecated. 
Get whether the selection is maintained after a sort. If this property is true, the same model rows in the table will be selected after a sort as were selected before the sort. If this property is false, the view selection remains the same after sort (which will probably mean the model selection will change). In the latter case, note that a selection changed event will probably NOT be fired.

The default for this property is true.

Returns:
whether the model selection is retained when the table is sorted.

convertRowToModelIndex

public int convertRowToModelIndex(int viewRow)
Deprecated. 
Convert a row index in the view to a row index in the model. The view row index will differ from the model row index if the table is sorted. The index you recieve in the cell renderer is a view index, so you should convert it.
Parameters:
viewRow - a row index in the view
Returns:
the row index in the base model

convertRowToViewIndex

public int convertRowToViewIndex(int modelRow)
Deprecated. 
Convert a row index in the model to a row index in the view. If the table is not sorted, this will just return the model row. For a sorted table, this returns the location of the specified model row in the view.
Parameters:
modelRow - a row index in the model
Returns:
the index of the specified row in the view.

getSortColumnBackgroundColor

public java.awt.Color getSortColumnBackgroundColor()
Deprecated. 
Get the background color of the sorted column. By default, this is a slightly darker shade than the background color of the table. You can change this by calling setSortColumnBackgroundColor().
Returns:
the background color of the sort column

setSortColumnBackgroundColor

public void setSortColumnBackgroundColor(java.awt.Color c)
Deprecated. 
Set the background color used to highlight the sorted column.
Parameters:
c - the color to paint the background of the sorted column

setBackground

public void setBackground(java.awt.Color c)
Deprecated. 
Overridden to make sure the highlighted column is repainted properly.
Overrides:
setBackground in class javax.swing.JComponent
Parameters:
c -

updateUI

public void updateUI()
Deprecated. 
Overridden to make sure look and feel changes cause the highlighted column to be repainted in the right color.
Overrides:
updateUI in class javax.swing.JTable

processKeyBinding

protected boolean processKeyBinding(javax.swing.KeyStroke ks,
                                    java.awt.event.KeyEvent e,
                                    int condition,
                                    boolean pressed)
Deprecated. 
Overrides:
processKeyBinding in class javax.swing.JTable

setSorted

public void setSorted(boolean isSorted)
Deprecated. 
Set whether this NiceTable is sorted. If the table is sorted, its model will be changed to an internal model decorator which sorts the columns. You should avoid using getModel(): instead use getBaseModel() to get the real model of the table.
Parameters:
isSorted - if true, the NiceTable is sorted.

isSorted

public boolean isSorted()
Deprecated. 
Is the table sorted?

getBaseModel

public javax.swing.table.TableModel getBaseModel()
Deprecated. 
Get the "base" model of the table. For unsorted tables, this just returns getModel(). For sorted tables, this returns the "real" model of the table instead of the decorator being used to sort the rows.
Returns:
a table model for the table.

getSelectedRowsInModel

public int[] getSelectedRowsInModel()
Deprecated. 
Get the selected rows as model rows, regardless of whether this table is currently sorted.
Returns:
an array of rows in the model that are selected.

setSelectedRowsInModel

public void setSelectedRowsInModel(int[] selectedRowsInModel)
Deprecated. 
Select the specified model rows, regardless of their position in the (sorted or unsorted) view.
Parameters:
selectedRowsInModel - the model rows to select.

getPersistentSettings

public 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. At the moment, the stored settings are:

setPersistentSettings

public void setPersistentSettings(NiceTablePersistentSettings settings)
Deprecated. 
Set the persistent view settings of this NiceTable.
Parameters:
settings -

getDefaultRenderer

public javax.swing.table.TableCellRenderer getDefaultRenderer(java.lang.Class<?> columnClass)
Deprecated. 
Overrides:
getDefaultRenderer in class javax.swing.JTable

setSortColumn

public void setSortColumn(int modelColumn,
                          boolean isSortAscending)
Deprecated. 
Set the column to sort the view by.
Parameters:
modelColumn - the column to sort by
isSortAscending - if true, the table is sorted in ascending order

getSortColumn

public int getSortColumn()
Deprecated. 
Get the (model) sort column
Returns:
the column in the model that the table view is being sorted by

isSortAscending

public boolean isSortAscending()
Deprecated. 
Is the sorted column being sorted in ascending order?

reSort

public void reSort()
Deprecated. 
Convenience method that reapplies the current sort. You might want to use this after adding items to the table. It's just a shortcut for setSortColumn( getSortColumn(), isSortAscending() )

setHiddenColumns

public void setHiddenColumns(int[] hiddenColumns)
Deprecated. 
Set columns that are hidden. You should only call this after setting the model.
Parameters:
hiddenColumns - columns which are currently hidden

getHiddenColumns

public int[] getHiddenColumns()
Deprecated. 
Get columns that are hidden. You should only call this after setting the model.
Returns:
an array of model column indices

setColumnSelectorAvailable

public 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.
Parameters:
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.

isColumnSelectorAvailable

public boolean isColumnSelectorAvailable()
Deprecated. 
Get whether the context menu for hiding and showing columns is available on this instance of NiceTable
Returns:
whether the context menu is available.

createSelectorMenu

public javax.swing.JPopupMenu createSelectorMenu()
Deprecated. 
Create the selector menu which is used to select and deselect columns.
Returns:
a JPopupMenu with items for each column.

setColumnVisible

protected void setColumnVisible(javax.swing.table.TableColumn column,
                                int modelColumn,
                                boolean isVisible)
Deprecated. 

selectAll

public void selectAll()
Deprecated. 
Overrides:
selectAll in class javax.swing.JTable

getScrollPaneForTable

public javax.swing.JScrollPane getScrollPaneForTable()
Deprecated. 
Get a scroll pane for this table. Use this in preference to new JScrollPane( JTable ) to ensure that the viewport background color is the same as the table background color. no longer necessary to do this. The scrollpane will be configured automatically when you construct a JScrollPane(this).

configureEnclosingScrollPane

protected void configureEnclosingScrollPane()
Deprecated. 
Overrides:
configureEnclosingScrollPane in class javax.swing.JTable

setShowToolTips

public void setShowToolTips(boolean showToolTips)
Deprecated. 
Controls whether this NiceTable will show tooltips for cells that are truncated due to reduced column width.
Parameters:
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.

isShowToolTips

public boolean isShowToolTips()
Deprecated. 
Get whether tooltips are being shown for truncated cells.
Returns:
true if tooltips are being shown for truncated cells.

getToolTipText

public 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. This functionality only really works well for tables where the objects in the cell have a sensible toString() method. If this isn't the case, you may want to switch this behavior off by calling setShowToolTips( false ).
Overrides:
getToolTipText in class javax.swing.JTable
Parameters:
event - mouse event to get tooltip for
Returns:
tooltip

getJTableToolTipText

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)
Parameters:
e -
Returns:
JTable.getToolTipText(MouseEvent)

autoSizeViewportToFit

public final 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.
Parameters:
min - the minimum size. Optional. If null, no minimum is used.
max - the maximum size. Optional. If null, no maximum is used.
Since:
11.1.1

autoSizeColumnsToFit

public void autoSizeColumnsToFit()
Deprecated. 
See Also:
autoSizeColumnsToFit(Object[])

autoSizeColumnsToFit

public 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. This method works best when the column auto-resizing behavior is turned off. You can turn it off using:
   m_table.setAutoResizeMode( NiceTable.AUTO_RESIZE_OFF );
 

setResizeColumnOnDoubleClick

public void setResizeColumnOnDoubleClick(boolean isOn)
Deprecated. 
Set whether the user can resize columns in this table by double clicking the resize divider between two columns. This behavior is ON by default. This property works best if the column auto-resizing behavior is turned off in the table. You can turn it off using:
   m_table.setAutoResizeMode( NiceTable.AUTO_RESIZE_OFF );
 
Parameters:
isOn - if true, the user can resize columns

isResizeColumnOnDoubleClick

public boolean isResizeColumnOnDoubleClick()
Deprecated. 
Get whether the user can resize columns in this table by double clicking the resize divider between two columns. This behavior is ON by default.

scrollToSelection

public void scrollToSelection()
Deprecated. 
Scrolls the table's viewport to the currently selected row and column.

convertValueToText

public 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. This implementation returns value.toString, ignoring all other arguments. To control the conversion, subclass this method and use any of the arguments you need.
Parameters:
value - the Object to convert to text
isSelected - true if cell is selected
hasFocus - true if cell has focus
row - the row of the cell to render
column - the column of the cell to render
Returns:
the String representation of the node's value

getDarker

protected static java.awt.Color getDarker(java.awt.Color c)
Deprecated. 
Get a very slightly darker shade of the specified color.
Parameters:
c - a color
Returns:
a very slightly darker shade of the color

Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1.7.2)

E13403-10


Copyright © 1997, 2013, Oracle. All rights reserved.