Overview | Package | Class | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.smardec.asc.quick
Class JQuickTable

    java.lang.Object
      |
      +--java.awt.Component
            |
            +--java.awt.Container
                  |
                  +--javax.swing.JComponent
                        |
                        +--javax.swing.JTable
                              |
                              +--com.smardec.asc.quick.JQuickTable

All Implemented Interfaces:
  javax.accessibility.Accessible, javax.swing.event.CellEditorListener, java.util.EventListener, java.awt.image.ImageObserver, javax.swing.event.ListSelectionListener, java.awt.MenuContainer, javax.swing.Scrollable, java.io.Serializable, javax.swing.event.TableColumnModelListener, javax.swing.event.TableModelListener

public class JQuickTable
extends javax.swing.JTable

`JQuickTable` is a `JTable` component with quick search capabilities. Start typing when the component has focus to use the quick search (you can also activate quick search on keystroke). You can use masked search ('*' and '?' can be used). While quick search is active you can select next/previuos matched element using up/down arrow keys, Ctrl+A selects all matching elements.

Sample usage:

        // Old code:
        //    JTable jTable = new JTable();
        // New code:
        JTable jTable = new JQuickTable();

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
`JQuickTable()` Constructs a default `JQuickTable` that is initialized with a default data model, a default column model, and a default selection model.
`JQuickTable(int numRows, int numColumns)` Constructs a `JQuickTable` with `numRows` and `numColumns` of empty cells using `DefaultTableModel`.
`JQuickTable(java.lang.Object[][] rowData, java.lang.Object[] columnNames)` Constructs a `JQuickTable` to display the values in the two dimensional array, `rowData`, with column names, `columnNames`.
`JQuickTable(javax.swing.table.TableModel dm)` Constructs a `JQuickTable` that is initialized with `dm` as the data model, a default column model, and a default selection model.
`JQuickTable(javax.swing.table.TableModel dm, javax.swing.table.TableColumnModel cm)` Constructs a `JQuickTable` that is initialized with `dm` as the data model, `cm` as the column model, and a default selection model.
`JQuickTable(javax.swing.table.TableModel dm, javax.swing.table.TableColumnModel cm, javax.swing.ListSelectionModel sm)` Constructs a `JQuickTable` that is initialized with `dm` as the data model, `cm` as the column model, and `sm` as the selection model.
`JQuickTable(java.util.Vector rowData, java.util.Vector columnNames)` Constructs a `JQuickTable` to display the values in the `Vector` of `Vectors`, `rowData`, with column names, `columnNames`.

Method Summary
`QuickSearch` | `getQuickSearch()` Returns `QuickSearch` object associated with this `JQuickTable`.
`boolean` | `isSearchEntireTable()` Returns search entire table property.
`void` | `setSearchEntireTable(boolean searchEntireTable)` Sets search entire table property.

Methods inherited from class javax.swing.JTable
`addColumn, addColumnSelectionInterval, addNotify, addRowSelectionInterval, changeSelection, clearSelection, columnAdded, columnAtPoint, columnMarginChanged, columnMoved, columnRemoved, columnSelectionChanged, configureEnclosingScrollPane, convertColumnIndexToModel, convertColumnIndexToView, createDefaultColumnModel, createDefaultColumnsFromModel, createDefaultDataModel, createDefaultEditors, createDefaultRenderers, createDefaultSelectionModel, createDefaultTableHeader, createScrollPaneForTable, doLayout, editCellAt, editCellAt, editingCanceled, editingStopped, getAccessibleContext, getAutoCreateColumnsFromModel, getAutoResizeMode, getCellEditor, getCellEditor, getCellRect, getCellRenderer, getCellSelectionEnabled, getColumn, getColumnClass, getColumnCount, getColumnModel, getColumnName, getColumnSelectionAllowed, getDefaultEditor, getDefaultRenderer, getDragEnabled, getEditingColumn, getEditingRow, getEditorComponent, getGridColor, getIntercellSpacing, getModel, getPreferredScrollableViewportSize, getRowCount, getRowHeight, getRowHeight, getRowMargin, getRowSelectionAllowed, getScrollableBlockIncrement, getScrollableTracksViewportHeight, getScrollableTracksViewportWidth, getScrollableUnitIncrement, getSelectedColumn, getSelectedColumnCount, getSelectedColumns, getSelectedRow, getSelectedRowCount, getSelectedRows, getSelectionBackground, getSelectionForeground, getSelectionModel, getShowHorizontalLines, getShowVerticalLines, getSurrendersFocusOnKeystroke, getTableHeader, getToolTipText, getUI, getUIClassID, getValueAt, initializeLocalVars, isCellEditable, isCellSelected, isColumnSelected, isEditing, isRowSelected, moveColumn, paramString, prepareEditor, prepareRenderer, processKeyBinding, removeColumn, removeColumnSelectionInterval, removeEditor, removeNotify, removeRowSelectionInterval, resizeAndRepaint, rowAtPoint, selectAll, setAutoCreateColumnsFromModel, setAutoResizeMode, setCellEditor, setCellSelectionEnabled, setColumnModel, setColumnSelectionAllowed, setColumnSelectionInterval, setDefaultEditor, setDefaultRenderer, setDragEnabled, setEditingColumn, setEditingRow, setGridColor, setIntercellSpacing, setModel, setPreferredScrollableViewportSize, setRowHeight, setRowHeight, setRowMargin, setRowSelectionAllowed, setRowSelectionInterval, setSelectionBackground, setSelectionForeground, setSelectionMode, setSelectionModel, setShowGrid, setShowHorizontalLines, setShowVerticalLines, setSurrendersFocusOnKeystroke, setTableHeader, setUI, setValueAt, sizeColumnsToFit, sizeColumnsToFit, tableChanged, unconfigureEnclosingScrollPane, updateUI, valueChanged`

Methods inherited from class javax.swing.JComponent
`addAncestorListener, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getPropertyChangeListeners, getPropertyChangeListeners, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFont, setForeground, 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, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, 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, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, 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, processMouseEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, 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

### JQuickTable

    public JQuickTable()

  Constructs a default `JQuickTable` that is initialized with a default data model, a default column model, and a default selection model.

See Also:
  `JTable.createDefaultDataModel()`, `JTable.createDefaultColumnModel()`, `JTable.createDefaultSelectionModel()`

### JQuickTable

    public JQuickTable(javax.swing.table.TableModel dm)

  Constructs a `JQuickTable` that is initialized with `dm` as the data model, a default column model, and a default selection model.

Parameters:
  `dm` - the data model for the table
See Also:
  `JTable.createDefaultColumnModel()`, `JTable.createDefaultSelectionModel()`

### JQuickTable

    public JQuickTable(javax.swing.table.TableModel dm,
                       javax.swing.table.TableColumnModel cm)

  Constructs a `JQuickTable` that is initialized with `dm` as the data model, `cm` as the column model, and a default selection model.

Parameters:
  `dm` - the data model for the table
  `cm` - the column model for the table
See Also:
  `JTable.createDefaultSelectionModel()`

### JQuickTable

    public JQuickTable(javax.swing.table.TableModel dm,
                       javax.swing.table.TableColumnModel cm,
                       javax.swing.ListSelectionModel sm)

  Constructs a `JQuickTable` that is initialized with `dm` as the data model, `cm` as the column model, and `sm` as the selection model. If any of the parameters are `null` this method will initialize the table with the corresponding default model. The `autoCreateColumnsFromModel` flag is set to false if `cm` is non-null, otherwise it is set to true and the column model is populated with suitable `TableColumns` for the columns in `dm`.

Parameters:
  `dm` - the data model for the table
  `cm` - the column model for the table
  `sm` - the row selection model for the table
See Also:
  `JTable.createDefaultDataModel()`, `JTable.createDefaultColumnModel()`, `JTable.createDefaultSelectionModel()`

### JQuickTable

    public JQuickTable(int numRows,
                       int numColumns)

  Constructs a `JQuickTable` with `numRows` and `numColumns` of empty cells using `DefaultTableModel`. The columns will have names of the form "A", "B", "C", etc.

Parameters:
  `numRows` - the number of rows the table holds
  `numColumns` - the number of columns the table holds
See Also:
  `DefaultTableModel`

### JQuickTable

    public JQuickTable(java.lang.Object[][] rowData,
                       java.lang.Object[] columnNames)

  Constructs a `JQuickTable` to display the values in the two dimensional array, `rowData`, with column names, `columnNames`. `rowData` is an array of rows, so the value of the cell at row 1, column 5 can be obtained with the following code:

       rowData[1][5];

  All rows must be of the same length as `columnNames`.

Parameters:
  `rowData` - the data for the new table
  `columnNames` - names of each column

### JQuickTable

    public JQuickTable(java.util.Vector rowData,
                       java.util.Vector columnNames)

  Constructs a `JQuickTable` to display the values in the `Vector` of `Vectors`, `rowData`, with column names, `columnNames`. The `Vectors` contained in `rowData` should contain the values for that row. In other words, the value of the cell at row 1, column 5 can be obtained with the following code:

      ((Vector)rowData.elementAt(1)).elementAt(5);

Parameters:
  `rowData` - the data for the new table
  `columnNames` - names of each column

Method Detail

### getQuickSearch

    public QuickSearch getQuickSearch()

  Returns `QuickSearch` object associated with this `JQuickTable`.

  Returns:
    `QuickSearch` object associated with this `JQuickTable`.

### isSearchEntireTable

    public boolean isSearchEntireTable()

  Returns search entire table property. If `false` than quick search will search only in selected column. The default is `true`.

  Returns:
    search entire table property.

### setSearchEntireTable

    public void setSearchEntireTable(boolean searchEntireTable)

  Sets search entire table property. If `false` than quick search will search only in selected column. The default is `true`.

  Parameters:
    `searchEntireTable` - search entire table property

Overview | Package | Class | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2003-2006 Smardec. All Rights Reserved.