ElegantJ Tables Java API Specification v1.1

com.elegantj.jfc.table
Class JFCTable

java.lang.Object
  extended byjava.awt.Component
      extended byjava.awt.Container
          extended byjavax.swing.JComponent
              extended byjavax.swing.JTable
                  extended bycom.elegantj.jfc.table.JFCTable
All Implemented Interfaces:
javax.accessibility.Accessible, javax.swing.event.CellEditorListener, java.util.EventListener, java.io.Externalizable, 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 JFCTable
extends javax.swing.JTable
implements java.io.Externalizable

This bean component allows the user to get the look and feel of JTable.

This bean provides powerful designing aspects by providing following user friendly properties
ColumnNames the vector containing the column names of this table
Data the double dimension vector containing the data of this table
AutoResizeMode determines whether the table automatically resizes the width of the table's columns to take up the entire width of the table, and how it does the resizing
ColumnCount the total number of columns
ColumnMargin the width in pixels of the margin between the cells in each column
ColumnSelectionAllowed determines whether column selection is allowed in this table
RowCount the total number of rows
RowHeight the height in pixels of each row in the table
RowMargin the height in pixels of the margin between the cells in each row
RowSelectionAllowed determines whether row selection is allowed in this table
SelectionMode the selection mode for the table
SelectedColumns the selected columns indices
SelectedRows the selected rows indices
ShowHorizontalLines determines whether the table draws horizontal lines between cells
ShowVerticalLines determines whether the table draws vertical lines between cells
GridColor the color of the grid
ManagingFocus determines whether tab traversal on/off once focus gained
AddRowOnEnterKey determines whether row is added on enter key stroke
removeRowOnDeleteKey determines whether row is removed on delete key stroke
InsertOnInsertKey determines whether row is inserted on insert key stroke
PopupVisible determines the visibility of the popup menu
SortColumnOnClick determines whether column data is sorted by clicking the column header
SearchMode the search criteria
TableColumnsAttributes the cell attributes of the each column
TableRowsAttributes the cell attributes of the each row
DefaultTableAttributes the default cell attributes
AdjustColumnOnClick determines whether the column can be adjustable by clicking
ColumnReorderingAllowed determines whether reordering of columns are allowed
ColumnResizingAllowed determines whether resizing of columns are allowed
ColumnHeaderBackground the background color of the column header
ColumnHeaderForeground the foreground color of the column header
ColumnHeaderFont the font of the column header
ColumnHeaderHeight the height of the column header
ColumnHeaderVisible the visibility of the column header
AdjustRowOnClick determines whether the row can be adjustable by clicking
RowResizingAllowed determines whether resizing of rows are allowed
RowHeaderBackground the background color of the row header
RowHeaderForeground the foreground color of the row header
RowHeaderFont the font of the row header
RowHeaderHeight the height of the row header
RowHeaderVisible the visibility of the row header

See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class javax.swing.JTable
javax.swing.JTable.AccessibleJTable
 
Nested classes inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
 
Nested classes inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
 
Nested classes inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
 
Field Summary
 com.elegantj.editors.C1 c1
           
protected  DefaultJFCTableColumnModel columnModel
          Specifies the column model of the table.
static int COMPARE_CONTAINS
          Specifies the compare mode as compare the cell which contains with specified string
static int COMPARE_ENDS_WITH
          Specifies the compare mode as compare the cell which ends with specified string
static int COMPARE_EQUALS
          Specifies the compare mode as compare the cell which equals to string
static int COMPARE_STARTS_WITH
          Specifies the compare mode as compare the cell which starts with specified string
protected  DefaultJFCTableModel dataModel
          Specifies the data model of the table
static int MULTIPLE_INTERVAL_SELECTION
          Specifies a value for the selectionMode property: select one or more contiguous ranges of indices at a time.
protected  TablePopupMenu popupMenu
          Specifies the data model of the table
static int SEARCH_FROM_FIRST_CELL
          Specifies the search mode as search downwards
static int SEARCH_FROM_LAST_CELL
          Specifies the search mode as search upwards
static int SEARCH_FROM_SELECTED_CELL_TO_DOWN
          Specifies the search mode as search downwards from last selected cell
static int SEARCH_FROM_SELECTED_CELL_TO_UP
          Specifies the search mode as search upwards from last selected cell
static int SINGLE_INTERVAL_SELECTION
          Specifies a value for the selectionMode property: select one contiguous range of indices at a time.
static int SINGLE_SELECTION
          Specifies a value for the selectionMode property: select one list index at a time.
protected  JTableColumnHeader tableColumnHeader
          The TableRowHeader working with the table.
protected  JTableRowHeader tableRowHeader
          The TableRowHeader working with the table.
 
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, 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
JFCTable()
          Creates a JFCTable with 20 rows and 5 columns of empty cells using DefaultJFCTableModel.
JFCTable(int numRows, int numColumns)
          Creates a JFCTable with numRows and numColumns of empty cells using DefaultJFCTableModel.
JFCTable(java.lang.Object[][] rowData, java.lang.Object[] columnNames)
          Creates a JFCTable to display the values in the two dimensional array, rowData, with column names, columnNames
JFCTable(javax.swing.table.TableModel dm)
           
JFCTable(javax.swing.table.TableModel dm, javax.swing.table.TableColumnModel cm)
           
JFCTable(javax.swing.table.TableModel dm, javax.swing.table.TableColumnModel cm, javax.swing.ListSelectionModel sm)
          Creates a JFCTable with specified data model, column model and row selection model
JFCTable(java.util.Vector rowData, java.util.Vector columnNames)
          Creates a JFCTable to display the values in the Vector of Vectors, rowData, with column names, columnNames
 
Method Summary
 void addColumn()
           
 void addColumn(java.lang.Object[] columnData)
           
 void addColumn(java.lang.String columnName)
           
 void addColumn(java.lang.String columnName, java.lang.Object[] columnData)
          Adds a column to the model.
 void addColumn(java.lang.String columnName, java.util.Vector columnData)
          Adds a column to the model.
 void addColumn(javax.swing.table.TableColumn aColumn)
          Appends aColumn to the end of the array of columns held by this JFCTable's column model.
 void addColumn(java.util.Vector columnData)
           
 void addColumnAboveSelection()
          Adds a column to the model above the selected column, The new column will have the default identifier
 void addColumnModelListener(javax.swing.event.TableColumnModelListener l)
          Adds a listener for table column model events.
 void addColumnSelectionInterval(int index0, int index1)
          Adds the columns from index0 to index1, inclusive, to the current selection.
 void addColumnSelectionListener(javax.swing.event.ListSelectionListener l)
          Adds a listener to the list that's notified each time a change to the column selection occurs.
 void addPropertyChangeListener(java.beans.PropertyChangeListener l)
          Adds a PropertyChangeListener to the listener list.
 void addRow()
           
 void addRow(java.lang.Object[] rowData)
          Adds a row to the end of the model.
 void addRow(java.util.Vector rowData)
          Adds a row to the end of the model.
 void addRowAboveSelection()
          Adds a row to the model above the selected row,
 void addRowSelectionInterval(int index0, int index1)
          Adds the rows from index0 to index1, inclusive, to the current selection.
 void addRowSelectionListener(javax.swing.event.ListSelectionListener l)
          Adds a listener to the list that's notified each time a change to the row selection occurs.
 void addTableModelListener(javax.swing.event.TableModelListener l)
          Adds a listener to the list that's notified each time a change to the data model occurs
 TableCell cellAtPoint(java.awt.Point point)
          Returns the table cell that point lies in, or null if the result is not in the table range.
 void changeSelection(int rowIndex, int columnIndex, boolean toggle, boolean extend)
          Updates the selection models of the table, depending on the state of the two flags: toggle and extend.
 void clearTableColumnsAttributes()
          Clears the cell attributes at each column.
 void clearTableRowsAttributes()
          Clears the cell attributes at each row.
 void columnAdded(javax.swing.event.TableColumnModelEvent e)
          Invoked when a column is added to the table column model.
 void columnSelectionChanged(javax.swing.event.ListSelectionEvent e)
          Invoked when the selection model of the TableColumnModel is changed.
protected  void configureEnclosingScrollPane()
          If this JFCTable is the viewportView of an enclosing JScrollPane (the usual situation), configure this ScrollPane by, amongst other things, installing the table's tableColumnHeader as the columnHeaderView and tableRowHeader as the rowHeaderView of the scroll pane.
static java.util.Hashtable convertAttributesArrayToTable(java.lang.Object[][] attributesArray)
          Converts the Object array contains the cell attributes into Hashtable.
static java.lang.Object[][] convertAttributesTableToArray(java.util.Hashtable attributesTable)
          Converts the Hashtable contains the cell attributes into Object array.
static java.lang.Object[] convertToArray(java.util.Vector theVector)
          Returns an array that contains the same objects as the vector.
static java.util.Vector convertToVector(java.lang.Object[] anArray)
          Returns a vector of vectors that contains the same objects as the array.
protected  javax.swing.table.TableColumnModel createDefaultColumnModel()
          Returns the default column model object, which is a DefaultJFCTableColumnModel.
protected  java.util.Hashtable createDefaultColumnsAttributes()
          Returns the default table cell attributes for each column, which is a Hashtable.
 void createDefaultColumnsFromModel()
          Creates default columns for the table from the data model using the getColumnCount method defined in the TableModel interface.
protected  javax.swing.table.TableModel createDefaultDataModel()
          Returns the default table model object, which is a DefaultJFCTableModel.
protected  void createDefaultEditors()
          Creates default cell editors for objects, numbers, and boolean values.
protected  TablePopupMenu createDefaultPopupMenu()
          Creates the default popup menu for the JFCTable
protected  void createDefaultRenderers()
          Creates default cell renderers for objects, numbers, doubles, dates, booleans, and icons.
protected  java.util.Hashtable createDefaultRowsAttributes()
          Returns the default table cell attributes for each row, which is a Hashtable.
protected  TableCellAttributes createDefaultTableAttributes()
          Returns the default table cell attributes object, which is a TableCellAttributes.
protected  javax.swing.table.JTableHeader createDefaultTableHeader()
          Returns the default table header object, which is a JColumnTableHeader.
protected  JTableRowHeader createDefaultTableRowHeader()
          Returns the default table row header object, which is a JTableRowHeader.
 boolean editTableCell(TableCell tableCell)
           
 boolean editTableCell(TableCell tableCell, java.util.EventObject e)
          Programmatically starts editing the table cell, if the cell is editable.
 java.awt.Color getCellBackgroundNonSelectionColor(int row, int column)
          Returns the cell background non selection color at given row and column
 java.awt.Color getCellBackgroundSelectionColor(int row, int column)
          Returns the cell background selection color at given row and column
 java.awt.Color getCellBorderSelectionColor(int row, int column)
          Returns the cell border selection color at given row and column
 javax.swing.table.TableCellEditor getCellEditor(int row, int column)
          Returns an appropriate editor for the cell specified by row and column.
 java.awt.Font getCellFont(int row, int column)
          Returns the cell font at given row and column
 javax.swing.Icon getCellIcon(int row, int column)
          Returns the cell icon at given row and column
 java.lang.String getCellIconPath(int row, int column)
          Returns the cell icon path at given row and column
 javax.swing.table.TableCellRenderer getCellRenderer(int row, int column)
          Returns an appropriate renderer for the cell specified by this row and column.
 java.awt.Color getCellTextNonSelectionColor(int row, int column)
          Returns the cell text non selection color at given row and column
 java.awt.Color getCellTextSelectionColor(int row, int column)
          Returns the cell text selection color at given row and column
 javax.swing.table.TableColumn getColumn(int column)
          Returns the TableColumn object for the column at column index
 java.awt.Color getColumnBackgroundNonSelectionColor(int column)
          Gets the deselected background color at column
 java.awt.Color getColumnBackgroundSelectionColor(int column)
          Gets the selected background color at column
 java.awt.Color getColumnBorderSelectionColor(int column)
          Gets the selected border color at column
 javax.swing.table.TableCellEditor getColumnCellEditor(int column)
          Gets the cell editor at column
 javax.swing.table.TableCellRenderer getColumnCellRenderer(int column)
          Gets the cell renderer at column
 java.lang.Object[] getColumnData(int index)
          Returns an array containing the column data at specified index
 java.lang.Boolean getColumnEditable(int column)
          Gets the cell editable at column
 java.awt.Color getColumnFocusCellBackground(int column)
          Gets the focus cell background at column
 java.awt.Color getColumnFocusCellForeground(int column)
          Gets the focus cell foreground at column
 java.awt.Font getColumnFont(int column)
          Gets the cell font at column
 java.awt.Color getColumnHeaderBackground()
          Gets the background color of the column header
 java.awt.Font getColumnHeaderFont()
          Gets the font of the column header
 java.awt.Color getColumnHeaderForeground()
          Gets the foreground color of the column header
 int getColumnHeaderHeight()
          Gets the column header height
 javax.swing.Icon getColumnIcon(int column)
          Gets the icon at column
 java.lang.String getColumnIconPath(int column)
          Gets the icon path at column
 int getColumnIndex(java.lang.Object identifier)
          Returns the index of the first column in the tableColumns array whose identifier is equal to identifier, when compared using equals.
 int getColumnMargin()
          Returns the width margin for TableColumn.
 java.util.Vector getColumnNames()
          Gets the column names in the data model
 java.util.Enumeration getColumns()
          Returns an Enumeration of all the columns in the model.
 java.awt.Color getColumnTextNonSelectionColor(int column)
          Gets the deselected text color at column
 java.awt.Color getColumnTextSelectionColor(int column)
          Gets the selected text color at column
 java.util.Vector getData()
          Gets the Vector of Vectors that contains the table's data values.
 java.awt.Color getDefaultBackgroundNonSelectionColor()
          Gets the default deselected background color
 java.awt.Color getDefaultBackgroundSelectionColor()
          Gets the default selected background color
 java.awt.Color getDefaultBorderSelectionColor()
          Gets the default selected border color
 javax.swing.table.TableCellEditor getDefaultCellEditor()
          Gets the default cell editor
 javax.swing.table.TableCellRenderer getDefaultCellRenderer()
          Gets the default cell renderer
 java.lang.Boolean getDefaultEditable()
          Gets the default cell editable
 java.awt.Color getDefaultFocusCellBackground()
          Gets the default focus cell background
 java.awt.Color getDefaultFocusCellForeground()
          Gets the default focus cell foreground
 java.awt.Font getDefaultFont()
          Gets the default cell font
 javax.swing.Icon getDefaultIcon()
          Gets the default icon
 java.lang.String getDefaultIconPath()
          Gets the default icon path
 TableCellAttributes getDefaultTableAttributes()
          Gets the default table cell attributes for each cell in the table,
 java.awt.Color getDefaultTextNonSelectionColor()
          Gets the default deselected text color
 java.awt.Color getDefaultTextSelectionColor()
          Gets the default selected text color
 java.awt.Color getFocusCellBackground(int row, int column)
          Returns the cell focus background color at given row and column
 java.awt.Color getFocusCellForeground(int row, int column)
          Returns the cell focus foreground color at given row and column
 java.lang.String getLicenseKey()
          Gets the license key
 java.util.Locale getLocale()
          Returns the value of locale.
 TablePopupMenu getPopupMenu()
          Returns the TablePopupMenu used by JFCTable.
 java.awt.Color getRowBackgroundNonSelectionColor(int row)
          Gets the deselected background color at row
 java.awt.Color getRowBackgroundSelectionColor(int row)
          Gets the selected background color at row
 java.awt.Color getRowBorderSelectionColor(int row)
          Gets the selected border color at row
 javax.swing.table.TableCellEditor getRowCellEditor(int row)
          Gets the cell editor at row
 javax.swing.table.TableCellRenderer getRowCellRenderer(int row)
          Gets the cell renderer at row
 java.lang.Object[] getRowData(int index)
          Returns an array containing the row data at specified index
 java.lang.Boolean getRowEditable(int row)
          Gets the cell editable at row
 java.awt.Color getRowFocusCellBackground(int row)
          Gets the focus cell background at row
 java.awt.Color getRowFocusCellForeground(int row)
          Gets the focus cell foreground at row
 java.awt.Font getRowFont(int row)
          Gets the cell font at row
 java.awt.Color getRowHeaderBackground()
          Gets the background color of the row header
 java.awt.Font getRowHeaderFont()
          Gets the font of the row header
 java.awt.Color getRowHeaderForeground()
          Gets the foreground color of the row header
 int getRowHeaderWidth()
          Gets the row header height
 int getRowHeight(int row)
          Returns the height, in pixels, of the cells in row.
 javax.swing.Icon getRowIcon(int row)
          Gets the icon at row
 java.lang.String getRowIconPath(int row)
          Gets the icon path at row
 java.awt.Color getRowTextNonSelectionColor(int row)
          Gets the deselected text color at row
 java.awt.Color getRowTextSelectionColor(int row)
          Gets the selected text color at row
 int getSearchMode()
          Gets the table's search mode
protected  java.lang.Object getSearchValueAt(int row, int column)
          Returns the searching object at given row and column A subclass can override this method to return a different searching object.
 java.lang.Object getSelectedCellObject()
          Returns the object of the selected table cell
 TableCell getSelectedTableCell()
          Gets the selected table cell
 int getSelectionMode()
          Gets the current table selection mode
 TableCellAttributes getTableColumnAttributes(int column)
          Gets the cell attributes at specified column of the table
 java.util.Hashtable getTableColumnsAttributes()
          Gets the cell attributes at each column of the table
 TableCellAttributes getTableRowAttributes(int row)
          Gets the cell attributes at specified row of the table
 JTableRowHeader getTableRowHeader()
          Returns the TableRowHeader used by JFCTable.
 java.util.Hashtable getTableRowsAttributes()
          Gets the cell attributes at each row of the table
 int getVisibleFirstColumn()
          Returns the first visible column index
 int getVisibleFirstRow()
          Returns the first visible row index
 int getVisibleLastColumn()
          Returns the last visible column index
 int getVisibleLastRow()
          Returns the last visible row index
protected  void initializeLocalVars()
          Initializes table properties to their default values.
 void insertColumn(int column)
           
 void insertColumn(int column, java.lang.Object[] columnData)
           
 void insertColumn(int column, java.lang.String columnName)
           
 void insertColumn(int column, java.lang.String columnName, java.lang.Object[] columnData)
          Inserts a column to the model.
 void insertColumn(int column, java.lang.String columnName, java.util.Vector columnData)
          Inserts a column to the model.
 void insertColumn(int column, java.util.Vector columnData)
           
 void insertColumn(javax.swing.table.TableColumn aColumn, int column)
          Inserts aColumn to the column index of the array of columns held by this JFCTable's column model.
 void insertRow(int row)
           
 void insertRow(int row, java.lang.Object[] rowData)
          Inserts a row at specified index in the model.
 void insertRow(int row, java.util.Vector rowData)
          Inserts a row at specified index in the model.
 boolean isAddRowOnEnterKey()
          Gets the enter key stroke's enability
 boolean isAdjustColumnOnClick()
          Gets whether the column can be adjustable by clicking on it.
 boolean isAdjustRowOnClick()
          Gets whether the row can be adjustable by clicking on it.
 boolean isCellEditable(int row, int column)
          Returns true if the cell at row and column is editable.
 boolean isCellSelected(TableCell tableCell)
          Returns true if the specified table cell is selected
 boolean isColumnCellsSelected(int column)
          Returns true if the all column cells at the specified index is selected
 boolean isColumnHeaderVisible()
          Gets the column header visibility
 boolean isColumnReorderingAllowed()
          Gets whether the user is allowed to rearrange columns by dragging their column headers
 boolean isColumnResizingAllowed()
          Gets whether the user is allowed to resize columns by dragging between their column headers
 boolean isInsertRowOnInsertKey()
          Gets the insert key stroke's enability
 boolean isLightweight()
          Returns whether this component has a lightweight peer, native peer or no peer.
 boolean isManagingFocus()
          Gets tab traversal on/off once focus gained.
 boolean isPopupVisible()
          Gets the popup menu visibility
 boolean isRemoveRowOnDeleteKey()
          Gets the delete key stroke's enability
 boolean isRowCellsSelected(int row)
          Returns true if the all row cells at the specified index is selected
 boolean isRowHeaderVisible()
          Gets the row header visibility
 boolean isRowResizingAllowed()
          Gets whether the user is allowed to resize rows by dragging between their row headers
 boolean isSortColumnOnClick()
          Gets the enability to sort the column data by clicking the column header
 void moveColumn(int columnIndex, int newIndex)
          Moves the column column to the position currently occupied by the column targetColumn in the view.
 void moveRow(int startIndex, int endIndex, int toIndex)
          Moves one or more rows starting at startIndex to endIndex in the model to the toIndex
 java.awt.Component prepareRenderer(javax.swing.table.TableCellRenderer renderer, int row, int column)
          Prepares the renderer by querying the data model for the value and selection state of the cell at row, column.
protected  void processKeyEvent(java.awt.event.KeyEvent e)
          Processes key events occurring on this component by dispatching them to any registered KeyListener objects.
protected  void processMouseEvent(java.awt.event.MouseEvent e)
          Processes mouse events occurring on this component by dispatching them to any registered MouseListener objects.
 void readExternal(java.io.ObjectInput in)
          Externalizable interface implementation to save and retrieve the state of this bean
 void removeColumn(int column)
          Removes the column at column index from the model
 void removeColumn(java.lang.String columnName)
          Removes the column columnName from the model
 void removeColumn(javax.swing.table.TableColumn aColumn)
          Removes aColumn from this JFCTable's array of columns and also removes the column from the data model.
 void removeColumnModelListener(javax.swing.event.TableColumnModelListener l)
          Removes a listener for table column model events.
 void removeColumns(int[] colIndices)
          Removes the columns at specified column indexes from the model
 void removeColumns(java.lang.String[] columnNames)
          Removes the columns with specified column names from the model
 void removeColumnSelectionInterval(int index0, int index1)
          Deselects the columns from index0 to index1, inclusive.
 void removeColumnSelectionListener(javax.swing.event.ListSelectionListener l)
          Removes a listener from the list that's notified each time a change to the column selection occurs.
 void removePropertyChangeListener(java.beans.PropertyChangeListener l)
          Removes a PropertyChangeListener from the listener list.
 void removeRow(int row)
          Removes the row at specified index from the model
 void removeRows(int[] indices)
          Removes the rows at specified indexes from the model
 void removeRowSelectionInterval(int index0, int index1)
          Deselects the rows from index0 to index1, inclusive.
 void removeRowSelectionListener(javax.swing.event.ListSelectionListener l)
          Removes a listener from the list that's notified each time a change to the row selection occurs.
 void removeSelectedColumns()
          Removes the selected columns from the model
 void removeSelectedRows()
          Removes the selected rows from the model.
 void removeTableModelListener(javax.swing.event.TableModelListener l)
          Removes a listener from the list that's notified each time a change to the data model occurs
 void repaint()
          Repaints this component.
protected  void resizeAndRepaint()
          Equivalent to revalidate followed by repaint.
 void scrollCellToVisible(int row, int column)
          Scrolls the table to visible the cell at specified row and column.
 void scrollCellToVisible(TableCell tableCell)
          Scrolls the table to visible the specified table cell.
 void scrollColumnToVisible(int column)
          Scrolls the table to visible the column at specified column index.
 void scrollRowToVisible(int row)
          Scrolls the table to visible the row at specified row index.
 TableCell searchTableCell(java.lang.Object value)
           
 TableCell searchTableCell(java.lang.Object value, int nColumn)
          Searches the table cell by given object at specified column index
 TableCell searchTableCell(java.lang.Object value, int[] nColumns)
          Searches the table cell by given object at one of the specified column indexes
 TableCell searchTableCell(java.lang.String sCell, int[] nSearchColumns, int nCompareMode, boolean bCaseSensitive)
           
 TableCell searchTableCell(java.lang.String sCell, int[] nSearchColumns, int nSearchMode, int nCompareMode, boolean bCaseSensitive)
          Seraches the table cell by specifying cell string, and search options.
 TableCell searchTableCell(java.lang.String sCell, int nSearchColumn, int nCompareMode, boolean bCaseSensitive)
           
 TableCell searchTableCell(java.lang.String sCell, int nSearchColumn, int nSearchMode, int nCompareMode, boolean bCaseSensitive)
          Seraches the table cell by specifying cell string, and search options.
 void selectColumnCells(int column)
          Selects the all column cells at specified column index
 void selectRowCells(int row)
          Selects the all row cells at specified row index
 void setAddRowOnEnterKey(boolean b)
          Sets the enter key stroke's enability to add the row at last index in the data model
 void setAdjustColumnOnClick(boolean b)
          Sets whether the column can be adjustable by clicking on it.
 void setAdjustRowOnClick(boolean b)
          Sets whether the row can be adjustable by clicking on it.
 void setAutoCreateColumnsFromModel(boolean b)
          Sets this table's autoCreateColumnsFromModel flag.
 void setAutoResizeMode(int n)
          Sets the table's auto resize mode when the table is resized.
 void setAutoscrolls(boolean b)
          Sets whether this component will automatically scroll its contents when dragged, if contained in a component that supports scrolling
 void setBackground(java.awt.Color c)
          Sets the Background color.
 void setBorder(javax.swing.border.Border b)
          Sets the border of this component.
 void setBounds(int x, int y, int width, int height)
          Moves and resizes this bean.
 void setColumnBackgroundNonSelectionColor(java.awt.Color color, int column)
          Sets the deselected background color at column
 void setColumnBackgroundSelectionColor(java.awt.Color color, int column)
          Sets the selected background color at column
 void setColumnBorderSelectionColor(java.awt.Color color, int column)
          Sets the selected border color at column
 void setColumnCellEditor(javax.swing.table.TableCellEditor editor, int column)
          Sets the cell editor at column
 void setColumnCellRenderer(javax.swing.table.TableCellRenderer renderer, int column)
          Sets the cell renderer at column
 void setColumnCount(int n)
          Sets the number of columns in the model.
 void setColumnEditable(java.lang.Boolean editable, int column)
          Sets the cell editable at column
 void setColumnFocusCellBackground(java.awt.Color color, int column)
          Sets the focus cell background at column
 void setColumnFocusCellForeground(java.awt.Color color, int column)
          Sets the focus cell foreground at column
 void setColumnFont(java.awt.Font font, int column)
          Sets the cell font at column
 void setColumnHeaderBackground(java.awt.Color color)
          Sets the background color of the column header
 void setColumnHeaderFont(java.awt.Font font)
          Sets the font of the column header
 void setColumnHeaderForeground(java.awt.Color color)
          Sets the foreground color of the column header
 void setColumnHeaderHeight(int n)
          Sets the column header height
 void setColumnHeaderVisible(boolean b)
          Sets the column header visibility
 void setColumnIcon(javax.swing.Icon icon, int column)
          Sets the icon at column
 void setColumnIconPath(java.lang.String path, int column)
          Sets the icon path at column
 void setColumnMargin(int n)
          Sets the column margin for TableColumn.
 void setColumnModel(javax.swing.table.TableColumnModel columnModel)
          Sets the column model for this table to newModel and registers for listener notifications from the new column model.
 void setColumnName(java.lang.String name, int column)
          Sets the name of the column appearing in the view at column position column.
 void setColumnNames(java.util.Vector columnNames)
          Sets the column names in the data model.
 void setColumnReorderingAllowed(boolean b)
          Sets whether the user can drag column headers to reorder columns
 void setColumnResizingAllowed(boolean b)
          Sets whether the user can resize columns by dragging between column headers.
 void setColumnSelectionAllowed(boolean b)
          Sets whether the columns in this model can be selected.
 void setColumnSelectionInterval(int index0, int index1)
          Selects the columns from index0 to index1, inclusive.
 void setColumnTextNonSelectionColor(java.awt.Color color, int column)
          Sets the deselected text color at column
 void setColumnTextSelectionColor(java.awt.Color color, int column)
          Sets the selected text color at column
 void setColumnWidth(int width)
           
 void setColumnWidth(int column, int width)
           
 void setCursor(java.awt.Cursor c)
          Sets value of the cursor.
 void setData(java.util.Vector dataVector)
          Sets the current dataVector instance variable with the new Vector of rows, newData.
 void setDefaultBackgroundNonSelectionColor(java.awt.Color color)
          Sets the default deselected background color
 void setDefaultBackgroundSelectionColor(java.awt.Color color)
          Sets the default selected background color
 void setDefaultBorderSelectionColor(java.awt.Color color)
          Sets the default selected border color
 void setDefaultCellEditor(javax.swing.table.TableCellEditor editor)
          Sets the default cell editor
 void setDefaultCellRenderer(javax.swing.table.TableCellRenderer renderer)
          Sets the default cell renderer
 void setDefaultEditable(java.lang.Boolean editable)
          Sets the default cell editable
 void setDefaultFocusCellBackground(java.awt.Color color)
          Sets the default focus cell background
 void setDefaultFocusCellForeground(java.awt.Color color)
          Sets the default focus cell foreground
 void setDefaultFont(java.awt.Font font)
          Sets the default cell font
 void setDefaultIcon(javax.swing.Icon icon)
          Sets default the icon
 void setDefaultIconPath(java.lang.String path)
          Sets the default icon path
 void setDefaultTableAttributes(TableCellAttributes tableAttributes)
          Sets the default table cell attributes for each cell in the table, it can be applicable if the row cell attributes and column cell attributes are not set.
 void setDefaultTextNonSelectionColor(java.awt.Color color)
          Sets the default deselected text color
 void setDefaultTextSelectionColor(java.awt.Color color)
          Sets the deafult selected text color
 void setDoubleBuffered(boolean b)
          Sets whether the receiving component should use a buffer to paint.
 void setEnabled(boolean b)
          sets Enablity.
 void setFont(java.awt.Font f)
          Sets the font.
 void setForeground(java.awt.Color c)
          Sets the Foreground color.
 void setGridColor(java.awt.Color color)
          Sets the color used to draw grid lines and redisplays.
 void setInsertRowOnInsertKey(boolean b)
          Sets the insert key stroke's enability to insert the row in the data model
 void setLayout(java.awt.LayoutManager mgr)
          Sets the layout manager for this component.
 void setLicenseKey(java.lang.String key)
          Sets the license key
 void setLightweight(boolean b)
          Sets whether this component has a lightweight peer, native peer or no peer.
 void setLocale(java.util.Locale l)
          Sets value of the locale.
 void setManagingFocus(boolean b)
          Sets tab traversal on/off once focus gained.
 void setModel(javax.swing.table.TableModel model)
          Sets the data model for this table to newModel and registers with it for listener notifications from the new data model.
 void setOpaque(boolean b)
          Sets whether this component paints every pixel within its bounds.
 void setPopupMenu(TablePopupMenu popupMenu)
          Sets the TablePopupMenu working with JFCTable to newHeader.
 void setPopupVisible(boolean b)
          Sets the popup menu visibility
 void setRemoveRowOnDeleteKey(boolean b)
          Sets the delete key stroke's enability to remove the row from the data model
 void setRequestFocusEnabled(boolean b)
          Sets whether the receiving component can obtain the focus by calling requestFocus.
 void setRowBackgroundNonSelectionColor(java.awt.Color color, int row)
          Sets the deselected background color at row
 void setRowBackgroundSelectionColor(java.awt.Color color, int row)
          Sets the selected background color at row
 void setRowBorderSelectionColor(java.awt.Color color, int row)
          Sets the selected border color at row
 void setRowCellEditor(javax.swing.table.TableCellEditor editor, int row)
          Sets the cell editor at row
 void setRowCellRenderer(javax.swing.table.TableCellRenderer renderer, int row)
          Sets the cell renderer at row
 void setRowCount(int n)
           
 void setRowEditable(java.lang.Boolean editable, int row)
          Sets the cell editable at row
 void setRowFocusCellBackground(java.awt.Color color, int row)
          Sets the focus cell background at row
 void setRowFocusCellForeground(java.awt.Color color, int row)
          Sets the focus cell foreground at row
 void setRowFont(java.awt.Font font, int row)
          Sets the cell font at row
 void setRowHeaderBackground(java.awt.Color color)
          Sets the background color of the row header
 void setRowHeaderFont(java.awt.Font font)
          Sets the font of the row header
 void setRowHeaderForeground(java.awt.Color color)
          Sets the foreground color of the row header
 void setRowHeaderVisible(boolean b)
          Sets the row header visibility
 void setRowHeaderWidth(int n)
          Sets the row header height
 void setRowHeight(int n)
          Sets the height, in pixels, of all cells, revalidates, and repaints.
 void setRowHeight(int row, int rowHeight)
          Sets the height for row to rowHeight, revalidates, and repaints.
 void setRowIcon(javax.swing.Icon icon, int row)
          Sets the icon at row
 void setRowIconPath(java.lang.String path, int row)
          Sets the icon path at row
 void setRowMargin(int n)
          Sets the amount of empty space between cells in adjacent rows.
 void setRowResizingAllowed(boolean b)
          Sets whether the user can resize rows by dragging between row headers.
 void setRowSelectionAllowed(boolean b)
          Sets whether the rows in this model can be selected.
 void setRowSelectionInterval(int index0, int index1)
          Selects the rows from index0 to index1, inclusive.
 void setRowTextNonSelectionColor(java.awt.Color color, int row)
          Sets the deselected text color at row
 void setRowTextSelectionColor(java.awt.Color color, int row)
          Sets the selected text color at row
 void setSearchMode(int n)
          Sets the table's search mode to allow search from first cell, from last cell, from selected cell to down or from selected cell to up.
 void setSelectedCellObject(java.lang.Object value)
           
 void setSelectedCellObject(java.lang.Object value, int nColumn)
          Sets the table cell to be selected with given object at specified column index
 void setSelectedCellObject(java.lang.Object value, int[] nColumns)
          Sets the table cell to be selected with given object at one of the specified column indexes
 void setSelectedColumn(int n)
          Sets the column to be selected at given column index
 void setSelectedColumns(int[] nArray)
          Sets the columns to be selected at given indexes
 void setSelectedRow(int n)
          Sets the row to be selected at given row index
 void setSelectedRows(int[] nArray)
          Sets the rows to be selected at given row indexes
 void setSelectedTableCell(TableCell tableCell)
          Sets the table cell to be selected
 void setSelectionMode(int n)
          Sets the table's selection mode to allow only single selections, a single contiguous interval, or multiple intervals.
 void setShowHorizontalLines(boolean b)
          Sets whether the table draws horizontal lines between cells.
 void setShowVerticalLines(boolean b)
          Sets whether the table draws vertical lines between cells.
 void setSortColumnOnClick(boolean b)
          Sets the enability to sort the column data by clicking the column header
 void setTableColumnAttributes(TableCellAttributes columnAttributes, int column)
          Sets the cell attributes at specified column of the table
 void setTableColumnsAttributes(java.util.Hashtable attributesTable)
          Sets the cell attributes at each column of the table, It can be applicable if the row attributes are not set.
 void setTableHeader(javax.swing.table.JTableHeader tableColumnHeader)
          Sets the tableColumnHeader working with JFCTable to newHeader.
 void setTableRowAttributes(TableCellAttributes rowAttributes, int row)
          Sets the cell attributes at specified row of the table
 void setTableRowHeader(JTableRowHeader tableRowHeader)
          Sets the TableRowHeader working with JFCTable to newHeader.
 void setTableRowsAttributes(java.util.Hashtable attributesTable)
          Sets the cell attributes at each row of the table, It has the maximum priority.
 void setToolTipText(java.lang.String s)
          Sets the text to display in a tool tip.
 void setVisible(boolean b)
          sets Visiblity.
 void sortColumn(int index)
          Sorts the column data at specified index Sorting criteria (ascending or descending) is determined by x-or logic (ascending-descending-ascending-descending....)
 void sortColumn(int index, boolean flag)
          Sorts the column data at specified index
 void sortColumns(int[] indices)
          Sorts the columns data at specified indices Sorting criteria (ascending or descending) is determined by x-or logic (ascending-descending-ascending-descending....)
 void sortColumns(int[] indices, boolean[] flags)
          Sorts the columns data at specified indices
 void tableChanged(javax.swing.event.TableModelEvent e)
          Invoked when this table's TableModel generates a TableModelEvent.
protected  void unconfigureEnclosingScrollPane()
          Reverses the effect of configureEnclosingScrollPane by replacing the columnHeaderView and rowHeaderView of the enclosing scroll pane with null.
 void valueChanged(javax.swing.event.ListSelectionEvent e)
          Invoked when the row selection changes -- repaints to show the new selection.
 void writeExternal(java.io.ObjectOutput out)
           
 
Methods inherited from class javax.swing.JTable
addNotify, clearSelection, columnAtPoint, columnMarginChanged, columnMoved, columnRemoved, convertColumnIndexToModel, convertColumnIndexToView, createDefaultSelectionModel, createScrollPaneForTable, doLayout, editCellAt, editCellAt, editingCanceled, editingStopped, getAccessibleContext, getAutoCreateColumnsFromModel, getAutoResizeMode, getCellEditor, getCellRect, getCellSelectionEnabled, getColumn, getColumnClass, getColumnCount, getColumnModel, getColumnName, getColumnSelectionAllowed, getDefaultEditor, getDefaultRenderer, getDragEnabled, getEditingColumn, getEditingRow, getEditorComponent, getGridColor, getIntercellSpacing, getModel, getPreferredScrollableViewportSize, getRowCount, getRowHeight, getRowMargin, getRowSelectionAllowed, getScrollableBlockIncrement, getScrollableTracksViewportHeight, getScrollableTracksViewportWidth, getScrollableUnitIncrement, getSelectedColumn, getSelectedColumnCount, getSelectedColumns, getSelectedRow, getSelectedRowCount, getSelectedRows, getSelectionBackground, getSelectionForeground, getSelectionModel, getShowHorizontalLines, getShowVerticalLines, getSurrendersFocusOnKeystroke, getTableHeader, getToolTipText, getUI, getUIClassID, getValueAt, isCellSelected, isColumnSelected, isEditing, isRowSelected, paramString, prepareEditor, processKeyBinding, removeEditor, removeNotify, rowAtPoint, selectAll, setCellEditor, setCellSelectionEnabled, setDefaultEditor, setDefaultRenderer, setDragEnabled, setEditingColumn, setEditingRow, setIntercellSpacing, setPreferredScrollableViewportSize, setSelectionBackground, setSelectionForeground, setSelectionModel, setShowGrid, setSurrendersFocusOnKeystroke, setUI, setValueAt, sizeColumnsToFit, sizeColumnsToFit, updateUI
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, 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, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setDebugGraphicsOptions, setDefaultLocale, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setPreferredSize, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, 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, 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, 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, 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, repaint, repaint, resize, resize, setBounds, setComponentOrientation, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, 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
 

Field Detail

SINGLE_SELECTION

public static final int SINGLE_SELECTION
Specifies a value for the selectionMode property: select one list index at a time.

See Also:
Constant Field Values

SINGLE_INTERVAL_SELECTION

public static final int SINGLE_INTERVAL_SELECTION
Specifies a value for the selectionMode property: select one contiguous range of indices at a time.

See Also:
Constant Field Values

MULTIPLE_INTERVAL_SELECTION

public static final int MULTIPLE_INTERVAL_SELECTION
Specifies a value for the selectionMode property: select one or more contiguous ranges of indices at a time.

See Also:
Constant Field Values

SEARCH_FROM_FIRST_CELL

public static final int SEARCH_FROM_FIRST_CELL
Specifies the search mode as search downwards

See Also:
Constant Field Values

SEARCH_FROM_LAST_CELL

public static final int SEARCH_FROM_LAST_CELL
Specifies the search mode as search upwards

See Also:
Constant Field Values

SEARCH_FROM_SELECTED_CELL_TO_DOWN

public static final int SEARCH_FROM_SELECTED_CELL_TO_DOWN
Specifies the search mode as search downwards from last selected cell

See Also:
Constant Field Values

SEARCH_FROM_SELECTED_CELL_TO_UP

public static final int SEARCH_FROM_SELECTED_CELL_TO_UP
Specifies the search mode as search upwards from last selected cell

See Also:
Constant Field Values

COMPARE_STARTS_WITH

public static final int COMPARE_STARTS_WITH
Specifies the compare mode as compare the cell which starts with specified string

See Also:
Constant Field Values

COMPARE_ENDS_WITH

public static final int COMPARE_ENDS_WITH
Specifies the compare mode as compare the cell which ends with specified string

See Also:
Constant Field Values

COMPARE_CONTAINS

public static final int COMPARE_CONTAINS
Specifies the compare mode as compare the cell which contains with specified string

See Also:
Constant Field Values

COMPARE_EQUALS

public static final int COMPARE_EQUALS
Specifies the compare mode as compare the cell which equals to string

See Also:
Constant Field Values

popupMenu

protected transient TablePopupMenu popupMenu
Specifies the data model of the table


dataModel

protected transient DefaultJFCTableModel dataModel
Specifies the data model of the table


columnModel

protected transient DefaultJFCTableColumnModel columnModel
Specifies the column model of the table.


tableColumnHeader

protected transient JTableColumnHeader tableColumnHeader
The TableRowHeader working with the table.


tableRowHeader

protected transient JTableRowHeader tableRowHeader
The TableRowHeader working with the table.


c1

public transient com.elegantj.editors.C1 c1
Constructor Detail

JFCTable

public JFCTable()
Creates a JFCTable with 20 rows and 5 columns of empty cells using DefaultJFCTableModel. The columns will have names of the form "A", "B", "C", etc.


JFCTable

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

JFCTable

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

JFCTable

public JFCTable(javax.swing.table.TableModel dm,
                javax.swing.table.TableColumnModel cm,
                javax.swing.ListSelectionModel sm)
Creates a JFCTable with specified data model, column model and row selection model

Parameters:
dm - the data model for the table
cm - the column model for the table
sm - the row selection model for the table

JFCTable

public JFCTable(int numRows,
                int numColumns)
Creates a JFCTable with numRows and numColumns of empty cells using DefaultJFCTableModel. 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

JFCTable

public JFCTable(java.lang.Object[][] rowData,
                java.lang.Object[] columnNames)
Creates a JFCTable to display the values in the two dimensional array, rowData, with column names, columnNames

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

JFCTable

public JFCTable(java.util.Vector rowData,
                java.util.Vector columnNames)
Creates a JFCTable to display the values in the Vector of Vectors, rowData, with column names, columnNames

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

setLicenseKey

public void setLicenseKey(java.lang.String key)
Sets the license key

Parameters:
key - the license key

getLicenseKey

public java.lang.String getLicenseKey()
Gets the license key

Returns:
the license key

createDefaultTableRowHeader

protected JTableRowHeader createDefaultTableRowHeader()
Returns the default table row header object, which is a JTableRowHeader. A subclass can override this method to return a different table header object.

Returns:
the default table header object

setTableRowHeader

public void setTableRowHeader(JTableRowHeader tableRowHeader)
Sets the TableRowHeader working with JFCTable to newHeader. It is legal to have a null TableRowHeader.

Parameters:
tableRowHeader - new TableRowHeader

getTableRowHeader

public JTableRowHeader getTableRowHeader()
Returns the TableRowHeader used by JFCTable.

Returns:
the TableRowHeader used by this table

createDefaultPopupMenu

protected TablePopupMenu createDefaultPopupMenu()
Creates the default popup menu for the JFCTable

Returns:
the JPopupMenu object

setPopupMenu

public void setPopupMenu(TablePopupMenu popupMenu)
Sets the TablePopupMenu working with JFCTable to newHeader. It is legal to have a null TablePopupMenu.

Parameters:
popupMenu - new TablePopupMenu

getPopupMenu

public TablePopupMenu getPopupMenu()
Returns the TablePopupMenu used by JFCTable.

Returns:
the TablePopupMenu used by this table

setPopupVisible

public void setPopupVisible(boolean b)
Sets the popup menu visibility

Parameters:
b - the popup menu visibility

isPopupVisible

public boolean isPopupVisible()
Gets the popup menu visibility

Returns:
the popup menu visibility

createDefaultTableAttributes

protected TableCellAttributes createDefaultTableAttributes()
Returns the default table cell attributes object, which is a TableCellAttributes. A subclass can override this method to return a different table cell attributes object.

Returns:
the default table cell attributes object

setDefaultTableAttributes

public void setDefaultTableAttributes(TableCellAttributes tableAttributes)
Sets the default table cell attributes for each cell in the table, it can be applicable if the row cell attributes and column cell attributes are not set.

Parameters:
tableAttributes - the default table cell attributes

getDefaultTableAttributes

public TableCellAttributes getDefaultTableAttributes()
Gets the default table cell attributes for each cell in the table,

Returns:
the default table cell attributes

setDefaultTextSelectionColor

public void setDefaultTextSelectionColor(java.awt.Color color)
Sets the deafult selected text color

Parameters:
color - the default selected text color

getDefaultTextSelectionColor

public java.awt.Color getDefaultTextSelectionColor()
Gets the default selected text color

Returns:
the default selected text color

setDefaultTextNonSelectionColor

public void setDefaultTextNonSelectionColor(java.awt.Color color)
Sets the default deselected text color

Parameters:
color - the default deselected text color

getDefaultTextNonSelectionColor

public java.awt.Color getDefaultTextNonSelectionColor()
Gets the default deselected text color

Returns:
the default deselected text color

setDefaultBackgroundSelectionColor

public void setDefaultBackgroundSelectionColor(java.awt.Color color)
Sets the default selected background color

Parameters:
color - the default selected background color

getDefaultBackgroundSelectionColor

public java.awt.Color getDefaultBackgroundSelectionColor()
Gets the default selected background color

Returns:
the default selected background color

setDefaultBackgroundNonSelectionColor

public void setDefaultBackgroundNonSelectionColor(java.awt.Color color)
Sets the default deselected background color

Parameters:
color - the default deselected background color

getDefaultBackgroundNonSelectionColor

public java.awt.Color getDefaultBackgroundNonSelectionColor()
Gets the default deselected background color

Returns:
the deselected background color

setDefaultBorderSelectionColor

public void setDefaultBorderSelectionColor(java.awt.Color color)
Sets the default selected border color

Parameters:
color - the default selected border color

getDefaultBorderSelectionColor

public java.awt.Color getDefaultBorderSelectionColor()
Gets the default selected border color

Returns:
the default selected border color

setDefaultFocusCellBackground

public void setDefaultFocusCellBackground(java.awt.Color color)
Sets the default focus cell background

Parameters:
color - the default focus cell background

getDefaultFocusCellBackground

public java.awt.Color getDefaultFocusCellBackground()
Gets the default focus cell background

Returns:
the default focus cell background

setDefaultFocusCellForeground

public void setDefaultFocusCellForeground(java.awt.Color color)
Sets the default focus cell foreground

Parameters:
color - the default focus cell foreground

getDefaultFocusCellForeground

public java.awt.Color getDefaultFocusCellForeground()
Gets the default focus cell foreground

Returns:
the default focus cell foreground

setDefaultFont

public void setDefaultFont(java.awt.Font font)
Sets the default cell font

Parameters:
font - default the cell font

getDefaultFont

public java.awt.Font getDefaultFont()
Gets the default cell font

Returns:
the default cell font

setDefaultIcon

public void setDefaultIcon(javax.swing.Icon icon)
Sets default the icon

Parameters:
icon - the default icon

getDefaultIcon

public javax.swing.Icon getDefaultIcon()
Gets the default icon

Returns:
the default icon

setDefaultIconPath

public void setDefaultIconPath(java.lang.String path)
Sets the default icon path

Parameters:
path - the default icon path

getDefaultIconPath

public java.lang.String getDefaultIconPath()
Gets the default icon path

Returns:
the default icon path

setDefaultCellRenderer

public void setDefaultCellRenderer(javax.swing.table.TableCellRenderer renderer)
Sets the default cell renderer

Parameters:
renderer - the default cell renderer

getDefaultCellRenderer

public javax.swing.table.TableCellRenderer getDefaultCellRenderer()
Gets the default cell renderer

Returns:
the default cell renderer

setDefaultCellEditor

public void setDefaultCellEditor(javax.swing.table.TableCellEditor editor)
Sets the default cell editor

Parameters:
editor - the default cell editor

getDefaultCellEditor

public javax.swing.table.TableCellEditor getDefaultCellEditor()
Gets the default cell editor

Returns:
the default cell editor

setDefaultEditable

public void setDefaultEditable(java.lang.Boolean editable)
Sets the default cell editable

Parameters:
editable - true to set the table editable

getDefaultEditable

public java.lang.Boolean getDefaultEditable()
Gets the default cell editable

Returns:
true if the cell editable

createDefaultColumnsAttributes

protected java.util.Hashtable createDefaultColumnsAttributes()
Returns the default table cell attributes for each column, which is a Hashtable. A subclass can override this method to return a different table cell attributes for each column.

Returns:
the default table cell attributes for each column

setTableColumnsAttributes

public void setTableColumnsAttributes(java.util.Hashtable attributesTable)
Sets the cell attributes at each column of the table, It can be applicable if the row attributes are not set. A Hashtable contains the column index as a key and that column cell attributes as a value.

Parameters:
attributesTable - the cell attributes at each column

getTableColumnsAttributes

public java.util.Hashtable getTableColumnsAttributes()
Gets the cell attributes at each column of the table

Returns:
the cell attributes at each column

clearTableColumnsAttributes

public void clearTableColumnsAttributes()
Clears the cell attributes at each column.


setTableColumnAttributes

public void setTableColumnAttributes(TableCellAttributes columnAttributes,
                                     int column)
Sets the cell attributes at specified column of the table

Parameters:
columnAttributes - the cell attributes at specified column

getTableColumnAttributes

public TableCellAttributes getTableColumnAttributes(int column)
Gets the cell attributes at specified column of the table

Returns:
the cell attributes at specified column

setColumnTextSelectionColor

public void setColumnTextSelectionColor(java.awt.Color color,
                                        int column)
Sets the selected text color at column

Parameters:
color - the selected text color
column - the column

getColumnTextSelectionColor

public java.awt.Color getColumnTextSelectionColor(int column)
Gets the selected text color at column

Parameters:
column - the column
Returns:
the selected text color

setColumnTextNonSelectionColor

public void setColumnTextNonSelectionColor(java.awt.Color color,
                                           int column)
Sets the deselected text color at column

Parameters:
color - the deselected text color
column - the column

getColumnTextNonSelectionColor

public java.awt.Color getColumnTextNonSelectionColor(int column)
Gets the deselected text color at column

Parameters:
column - the column
Returns:
the deselected text color

setColumnBackgroundSelectionColor

public void setColumnBackgroundSelectionColor(java.awt.Color color,
                                              int column)
Sets the selected background color at column

Parameters:
color - the selected background color
column - the column

getColumnBackgroundSelectionColor

public java.awt.Color getColumnBackgroundSelectionColor(int column)
Gets the selected background color at column

Parameters:
column - the column
Returns:
the selected background color

setColumnBackgroundNonSelectionColor

public void setColumnBackgroundNonSelectionColor(java.awt.Color color,
                                                 int column)
Sets the deselected background color at column

Parameters:
color - the deselected background color
column - the column

getColumnBackgroundNonSelectionColor

public java.awt.Color getColumnBackgroundNonSelectionColor(int column)
Gets the deselected background color at column

Parameters:
column - the column
Returns:
the deselected background color

setColumnBorderSelectionColor

public void setColumnBorderSelectionColor(java.awt.Color color,
                                          int column)
Sets the selected border color at column

Parameters:
color - the selected border color
column - the column

getColumnBorderSelectionColor

public java.awt.Color getColumnBorderSelectionColor(int column)
Gets the selected border color at column

Parameters:
column - the column
Returns:
the selected border color

setColumnFocusCellBackground

public void setColumnFocusCellBackground(java.awt.Color color,
                                         int column)
Sets the focus cell background at column

Parameters:
color - the focus cell background
column - the column index

getColumnFocusCellBackground

public java.awt.Color getColumnFocusCellBackground(int column)
Gets the focus cell background at column

Parameters:
column - the column index
Returns:
the focus cell background

setColumnFocusCellForeground

public void setColumnFocusCellForeground(java.awt.Color color,
                                         int column)
Sets the focus cell foreground at column

Parameters:
color - the focus cell foreground
column - the column index

getColumnFocusCellForeground

public java.awt.Color getColumnFocusCellForeground(int column)
Gets the focus cell foreground at column

Parameters:
column - the column index
Returns:
the focus cell foreground

setColumnFont

public void setColumnFont(java.awt.Font font,
                          int column)
Sets the cell font at column

Parameters:
font - the cell font
column - the column index

getColumnFont

public java.awt.Font getColumnFont(int column)
Gets the cell font at column

Parameters:
column - the column index
Returns:
the cell font

setColumnIcon

public void setColumnIcon(javax.swing.Icon icon,
                          int column)
Sets the icon at column

Parameters:
icon - the icon
column - the column

getColumnIcon

public javax.swing.Icon getColumnIcon(int column)
Gets the icon at column

Parameters:
column - the column
Returns:
the icon

setColumnIconPath

public void setColumnIconPath(java.lang.String path,
                              int column)
Sets the icon path at column

Parameters:
path - the icon path
column - the column

getColumnIconPath

public java.lang.String getColumnIconPath(int column)
Gets the icon path at column

Parameters:
column - the column
Returns:
the icon path

setColumnCellRenderer

public void setColumnCellRenderer(javax.swing.table.TableCellRenderer renderer,
                                  int column)
Sets the cell renderer at column

Parameters:
renderer - the cell renderer
column - the column

getColumnCellRenderer

public javax.swing.table.TableCellRenderer getColumnCellRenderer(int column)
Gets the cell renderer at column

Parameters:
column - the column
Returns:
the cell renderer

setColumnCellEditor

public void setColumnCellEditor(javax.swing.table.TableCellEditor editor,
                                int column)
Sets the cell editor at column

Parameters:
editor - the cell editor
column - the column

getColumnCellEditor

public javax.swing.table.TableCellEditor getColumnCellEditor(int column)
Gets the cell editor at column

Parameters:
column - the column
Returns:
the cell editor

setColumnEditable

public void setColumnEditable(java.lang.Boolean editable,
                              int column)
Sets the cell editable at column

Parameters:
editable - true to set the column editable
column - the column

getColumnEditable

public java.lang.Boolean getColumnEditable(int column)
Gets the cell editable at column

Parameters:
column - the column
Returns:
true if the cell editable

createDefaultRowsAttributes

protected java.util.Hashtable createDefaultRowsAttributes()
Returns the default table cell attributes for each row, which is a Hashtable. A subclass can override this method to return a different table cell attributes for each row.

Returns:
the default table cell attributes for each row

setTableRowsAttributes

public void setTableRowsAttributes(java.util.Hashtable attributesTable)
Sets the cell attributes at each row of the table, It has the maximum priority. If default cell attributes, column cell attributes and row cell attributes are set, the row cell attributes are applied to the table cell. A Hashtable contains the row index as a key and that row cell attributes as a value.

Parameters:
attributesTable - the cell attributes at each row

getTableRowsAttributes

public java.util.Hashtable getTableRowsAttributes()
Gets the cell attributes at each row of the table

Returns:
the cell attributes at each row

clearTableRowsAttributes

public void clearTableRowsAttributes()
Clears the cell attributes at each row.


setTableRowAttributes

public void setTableRowAttributes(TableCellAttributes rowAttributes,
                                  int row)
Sets the cell attributes at specified row of the table

Parameters:
rowAttributes - the cell attributes at specified row

getTableRowAttributes

public TableCellAttributes getTableRowAttributes(int row)
Gets the cell attributes at specified row of the table

Returns:
the cell attributes at specified row

setRowTextSelectionColor

public void setRowTextSelectionColor(java.awt.Color color,
                                     int row)
Sets the selected text color at row

Parameters:
color - the selected text color
row - the row

getRowTextSelectionColor

public java.awt.Color getRowTextSelectionColor(int row)
Gets the selected text color at row

Parameters:
row - the row
Returns:
the selected text color

setRowTextNonSelectionColor

public void setRowTextNonSelectionColor(java.awt.Color color,
                                        int row)
Sets the deselected text color at row

Parameters:
color - the deselected text color
row - the row

getRowTextNonSelectionColor

public java.awt.Color getRowTextNonSelectionColor(int row)
Gets the deselected text color at row

Parameters:
row - the row
Returns:
the deselected text color

setRowBackgroundSelectionColor

public void setRowBackgroundSelectionColor(java.awt.Color color,
                                           int row)
Sets the selected background color at row

Parameters:
color - the selected background color
row - the row

getRowBackgroundSelectionColor

public java.awt.Color getRowBackgroundSelectionColor(int row)
Gets the selected background color at row

Parameters:
row - the row
Returns:
the selected background color

setRowBackgroundNonSelectionColor

public void setRowBackgroundNonSelectionColor(java.awt.Color color,
                                              int row)
Sets the deselected background color at row

Parameters:
color - the deselected background color
row - the row

getRowBackgroundNonSelectionColor

public java.awt.Color getRowBackgroundNonSelectionColor(int row)
Gets the deselected background color at row

Parameters:
row - the row
Returns:
the deselected background color

setRowBorderSelectionColor

public void setRowBorderSelectionColor(java.awt.Color color,
                                       int row)
Sets the selected border color at row

Parameters:
color - the selected border color
row - the row

getRowBorderSelectionColor

public java.awt.Color getRowBorderSelectionColor(int row)
Gets the selected border color at row

Parameters:
row - the row
Returns:
the selected border color

setRowFocusCellBackground

public void setRowFocusCellBackground(java.awt.Color color,
                                      int row)
Sets the focus cell background at row

Parameters:
color - the focus cell background
row - the row index

getRowFocusCellBackground

public java.awt.Color getRowFocusCellBackground(int row)
Gets the focus cell background at row

Parameters:
row - the row index
Returns:
the focus cell background

setRowFocusCellForeground

public void setRowFocusCellForeground(java.awt.Color color,
                                      int row)
Sets the focus cell foreground at row

Parameters:
color - the focus cell foreground
row - the row index

getRowFocusCellForeground

public java.awt.Color getRowFocusCellForeground(int row)
Gets the focus cell foreground at row

Parameters:
row - the row index
Returns:
the focus cell foreground

setRowFont

public void setRowFont(java.awt.Font font,
                       int row)
Sets the cell font at row

Parameters:
font - the cell font
row - the row index

getRowFont

public java.awt.Font getRowFont(int row)
Gets the cell font at row

Parameters:
row - the row index
Returns:
the cell font

setRowIcon

public void setRowIcon(javax.swing.Icon icon,
                       int row)
Sets the icon at row

Parameters:
icon - the icon
row - the row

getRowIcon

public javax.swing.Icon getRowIcon(int row)
Gets the icon at row

Parameters:
row - the row
Returns:
the icon

setRowIconPath

public void setRowIconPath(java.lang.String path,
                           int row)
Sets the icon path at row

Parameters:
path - the icon path
row - the row

getRowIconPath

public java.lang.String getRowIconPath(int row)
Gets the icon path at row

Parameters:
row - the row
Returns:
the icon path

setRowCellRenderer

public void setRowCellRenderer(javax.swing.table.TableCellRenderer renderer,
                               int row)
Sets the cell renderer at row

Parameters:
renderer - the cell renderer
row - the row

getRowCellRenderer

public javax.swing.table.TableCellRenderer getRowCellRenderer(int row)
Gets the cell renderer at row

Parameters:
row - the row
Returns:
the cell renderer

setRowCellEditor

public void setRowCellEditor(javax.swing.table.TableCellEditor editor,
                             int row)
Sets the cell editor at row

Parameters:
editor - the cell editor
row - the row

getRowCellEditor

public javax.swing.table.TableCellEditor getRowCellEditor(int row)
Gets the cell editor at row

Parameters:
row - the row
Returns:
the cell editor

setRowEditable

public void setRowEditable(java.lang.Boolean editable,
                           int row)
Sets the cell editable at row

Parameters:
editable - true to set the row editable
row - the row

getRowEditable

public java.lang.Boolean getRowEditable(int row)
Gets the cell editable at row

Parameters:
row - the row
Returns:
true if the cell editable

getCellBackgroundSelectionColor

public java.awt.Color getCellBackgroundSelectionColor(int row,
                                                      int column)
Returns the cell background selection color at given row and column

Parameters:
row - the row index
column - the column index
Returns:
the cell background selection color

getCellBackgroundNonSelectionColor

public java.awt.Color getCellBackgroundNonSelectionColor(int row,
                                                         int column)
Returns the cell background non selection color at given row and column

Parameters:
row - the row index
column - the column index
Returns:
the cell background non selectioncolor

getCellTextSelectionColor

public java.awt.Color getCellTextSelectionColor(int row,
                                                int column)
Returns the cell text selection color at given row and column

Parameters:
row - the row index
column - the column index
Returns:
the cell text selection color

getCellTextNonSelectionColor

public java.awt.Color getCellTextNonSelectionColor(int row,
                                                   int column)
Returns the cell text non selection color at given row and column

Parameters:
row - the row index
column - the column index
Returns:
the cell text non selection color

getCellBorderSelectionColor

public java.awt.Color getCellBorderSelectionColor(int row,
                                                  int column)
Returns the cell border selection color at given row and column

Parameters:
row - the row index
column - the column index
Returns:
the cell border selection color

getFocusCellBackground

public java.awt.Color getFocusCellBackground(int row,
                                             int column)
Returns the cell focus background color at given row and column

Parameters:
row - the row index
column - the column index
Returns:
the cell focus background color

getFocusCellForeground

public java.awt.Color getFocusCellForeground(int row,
                                             int column)
Returns the cell focus foreground color at given row and column

Parameters:
row - the row index
column - the column index
Returns:
the cell focus foreground color

getCellFont

public java.awt.Font getCellFont(int row,
                                 int column)
Returns the cell font at given row and column

Parameters:
row - the row index
column - the column index
Returns:
the cell font

getCellIcon

public javax.swing.Icon getCellIcon(int row,
                                    int column)
Returns the cell icon at given row and column

Parameters:
row - the row index
column - the column index
Returns:
the cell icon

getCellIconPath

public java.lang.String getCellIconPath(int row,
                                        int column)
Returns the cell icon path at given row and column

Parameters:
row - the row index
column - the column index
Returns:
the cell icon path

addRowSelectionListener

public void addRowSelectionListener(javax.swing.event.ListSelectionListener l)
Adds a listener to the list that's notified each time a change to the row selection occurs.

Returns:
l the ListSelectionListener

removeRowSelectionListener

public void removeRowSelectionListener(javax.swing.event.ListSelectionListener l)
Removes a listener from the list that's notified each time a change to the row selection occurs.

Returns:
l the ListSelectionListener

setSelectedColumn

public void setSelectedColumn(int n)
Sets the column to be selected at given column index

Parameters:
n - the column index to be selected

setSelectedColumns

public void setSelectedColumns(int[] nArray)
Sets the columns to be selected at given indexes

Parameters:
nArray - the column indexes to be selected

setSelectedRow

public void setSelectedRow(int n)
Sets the row to be selected at given row index

Parameters:
n - the row index to be selected

setSelectedRows

public void setSelectedRows(int[] nArray)
Sets the rows to be selected at given row indexes

Parameters:
nArray - the row indexes to be selected

getSelectionMode

public int getSelectionMode()
Gets the current table selection mode

Returns:
an integer specifying the type of selections that are permissible

setColumnNames

public void setColumnNames(java.util.Vector columnNames)
Sets the column names in the data model. If the number of columnNames is greater than the current number of columns, new columns are added to the end of each row in the data model. If the number of columnNames is less than the current number of columns, all the extra columns at the end of a row are discarded.

Parameters:
columnNames - the vector of column names. If null, set the data model to zero columns

getColumnNames

public java.util.Vector getColumnNames()
Gets the column names in the data model

Returns:
the vector containing column names

setColumnName

public void setColumnName(java.lang.String name,
                          int column)
Sets the name of the column appearing in the view at column position column.

Parameters:
name - the name of the column at position column in the view where the first column is column 0
column - the column in the view being queried

setData

public void setData(java.util.Vector dataVector)
Sets the current dataVector instance variable with the new Vector of rows, newData. Each row in dataVector is adjusted to match the number of columns in columnNames either by truncating the Vector if it is too long, or adding null values if it is too short.

Parameters:
dataVector - the new data vector

getData

public java.util.Vector getData()
Gets the Vector of Vectors that contains the table's data values. The vectors contained in the outer vector are each a single row of values

Returns:
the vector of vectors containing the tables data values

setAddRowOnEnterKey

public void setAddRowOnEnterKey(boolean b)
Sets the enter key stroke's enability to add the row at last index in the data model

Parameters:
b - true, if enter key stroke is enable

isAddRowOnEnterKey

public boolean isAddRowOnEnterKey()
Gets the enter key stroke's enability

Returns:
true, if enter key stroke is enable

setRemoveRowOnDeleteKey

public void setRemoveRowOnDeleteKey(boolean b)
Sets the delete key stroke's enability to remove the row from the data model

Parameters:
b - true, if delete key stroke is enable

isRemoveRowOnDeleteKey

public boolean isRemoveRowOnDeleteKey()
Gets the delete key stroke's enability

Returns:
true, if delete key stroke is enable

setInsertRowOnInsertKey

public void setInsertRowOnInsertKey(boolean b)
Sets the insert key stroke's enability to insert the row in the data model

Parameters:
b - true, if insert key stroke is enable

isInsertRowOnInsertKey

public boolean isInsertRowOnInsertKey()
Gets the insert key stroke's enability

Returns:
true, if insert key stroke is enable

setSortColumnOnClick

public void setSortColumnOnClick(boolean b)
Sets the enability to sort the column data by clicking the column header

Parameters:
b - true, if column data is sorted by clicking the column header

isSortColumnOnClick

public boolean isSortColumnOnClick()
Gets the enability to sort the column data by clicking the column header

Returns:
true, if column data is sorted by clicking the column header

setSearchMode

public void setSearchMode(int n)
Sets the table's search mode to allow search from first cell, from last cell, from selected cell to down or from selected cell to up. It may one of the constants : SEARCH_FROM_FIRST_CELL, SEARCH_FROM_LAST_CELL, SEARCH_FROM_SELECTED_CELL_TO_UP, SEARCH_FROM_SELECTED_CELL_TO_DOWN

Parameters:
n - an integer specifying the type of searching that are permissible

getSearchMode

public int getSearchMode()
Gets the table's search mode

Returns:
an integer specifying the type of searching that are permissible

setManagingFocus

public void setManagingFocus(boolean b)
Sets tab traversal on/off once focus gained.

Parameters:
b - true, to indicate that the focus is being managed

getColumnData

public java.lang.Object[] getColumnData(int index)
Returns an array containing the column data at specified index

Parameters:
index - the index of the column
Returns:
an array of objects containig column data

getRowData

public java.lang.Object[] getRowData(int index)
Returns an array containing the row data at specified index

Parameters:
index - the index of the row
Returns:
an array of objects containig row data

sortColumn

public void sortColumn(int index)
Sorts the column data at specified index Sorting criteria (ascending or descending) is determined by x-or logic (ascending-descending-ascending-descending....)

Parameters:
index - the column index to be sorted

sortColumn

public void sortColumn(int index,
                       boolean flag)
Sorts the column data at specified index

Parameters:
index - the column index to be sorted
flag - true if ascending sort is applied

sortColumns

public void sortColumns(int[] indices)
Sorts the columns data at specified indices Sorting criteria (ascending or descending) is determined by x-or logic (ascending-descending-ascending-descending....)

Parameters:
indices - an array of the column indices to be sorted

sortColumns

public void sortColumns(int[] indices,
                        boolean[] flags)
Sorts the columns data at specified indices

Parameters:
indices - an array of the column indices to be sorted
flags - an array of the ordering criteria, true if ascending

getSearchValueAt

protected java.lang.Object getSearchValueAt(int row,
                                            int column)
Returns the searching object at given row and column A subclass can override this method to return a different searching object.

Returns:
the searching object

searchTableCell

public TableCell searchTableCell(java.lang.String sCell,
                                 int nSearchColumn,
                                 int nCompareMode,
                                 boolean bCaseSensitive)

searchTableCell

public TableCell searchTableCell(java.lang.String sCell,
                                 int nSearchColumn,
                                 int nSearchMode,
                                 int nCompareMode,
                                 boolean bCaseSensitive)
Seraches the table cell by specifying cell string, and search options.

Parameters:
sCell - the searched string
nSearchColumn - the column index of the searched cell, -1 if searching on all columns
nSearchMode - the searching mode to be used
nCompareMode - the comparing mode to be used
bCaseSensitive - the case sensitivity of the searched string
Returns:
the table cell which satisfy the search options

searchTableCell

public TableCell searchTableCell(java.lang.String sCell,
                                 int[] nSearchColumns,
                                 int nCompareMode,
                                 boolean bCaseSensitive)

searchTableCell

public TableCell searchTableCell(java.lang.String sCell,
                                 int[] nSearchColumns,
                                 int nSearchMode,
                                 int nCompareMode,
                                 boolean bCaseSensitive)
Seraches the table cell by specifying cell string, and search options.

Parameters:
sCell - the searched string
nSearchColumns - the column indexes of the searched cell, null if searching on all columns
nSearchMode - the searching mode to be used
nCompareMode - the comparing mode to be used
bCaseSensitive - the case sensitivity of the searched string
Returns:
the table cell which satisfy the search options

searchTableCell

public TableCell searchTableCell(java.lang.Object value)

searchTableCell

public TableCell searchTableCell(java.lang.Object value,
                                 int nColumn)
Searches the table cell by given object at specified column index

Parameters:
value - a object of the table cell to be searched
nColumn - a column index of the cell object, -1 if searching on all columns, default -1
Returns:
a table cell which has object value at specified column index; returns null, if not found

searchTableCell

public TableCell searchTableCell(java.lang.Object value,
                                 int[] nColumns)
Searches the table cell by given object at one of the specified column indexes

Parameters:
value - a object of the table cell to be searched
nColumns - a column indexes of the cell object, null if searching on all columns
Returns:
a table cell which has object value at one of the specified column indexes; returns null, if not found

setSelectedTableCell

public void setSelectedTableCell(TableCell tableCell)
Sets the table cell to be selected


getSelectedTableCell

public TableCell getSelectedTableCell()
Gets the selected table cell


setSelectedCellObject

public void setSelectedCellObject(java.lang.Object value)

setSelectedCellObject

public void setSelectedCellObject(java.lang.Object value,
                                  int nColumn)
Sets the table cell to be selected with given object at specified column index

Parameters:
value - a object of the table cell to be searched
nColumn - a column index of the cell object, -1 if cell on any columns, default -1

setSelectedCellObject

public void setSelectedCellObject(java.lang.Object value,
                                  int[] nColumns)
Sets the table cell to be selected with given object at one of the specified column indexes

Parameters:
value - a object of the table cell to be searched
nColumns - a column indexes of the cell object, null if cell on all columns

getSelectedCellObject

public java.lang.Object getSelectedCellObject()
Returns the object of the selected table cell

Returns:
the object of the selected table cell

setColumnWidth

public void setColumnWidth(int width)

setColumnWidth

public void setColumnWidth(int column,
                           int width)

editTableCell

public boolean editTableCell(TableCell tableCell)

editTableCell

public boolean editTableCell(TableCell tableCell,
                             java.util.EventObject e)
Programmatically starts editing the table cell, if the cell is editable.

Parameters:
tableCell - the table cell to be edited
e - an event to pass into shouldSelectCell, default null
Returns:
false if for any reason the cell cannot be edited

isCellSelected

public boolean isCellSelected(TableCell tableCell)
Returns true if the specified table cell is selected

Parameters:
tableCell - the TableCell
Returns:
true if the specified table cell is selected

cellAtPoint

public TableCell cellAtPoint(java.awt.Point point)
Returns the table cell that point lies in, or null if the result is not in the table range.

Parameters:
point - the location of interest
Returns:
the table cell that point lies in, or null if the result is not in the table range

selectColumnCells

public void selectColumnCells(int column)
Selects the all column cells at specified column index

Parameters:
column - the column index

isColumnCellsSelected

public boolean isColumnCellsSelected(int column)
Returns true if the all column cells at the specified index is selected

Parameters:
column - the column index
Returns:
true if the column cells at index column is selected

selectRowCells

public void selectRowCells(int row)
Selects the all row cells at specified row index

Parameters:
row - the row index

isRowCellsSelected

public boolean isRowCellsSelected(int row)
Returns true if the all row cells at the specified index is selected

Parameters:
row - the row index
Returns:
true if the row cells at index row is selected

scrollColumnToVisible

public void scrollColumnToVisible(int column)
Scrolls the table to visible the column at specified column index.

Parameters:
column - the column index

scrollRowToVisible

public void scrollRowToVisible(int row)
Scrolls the table to visible the row at specified row index.

Parameters:
row - the row index

scrollCellToVisible

public void scrollCellToVisible(int row,
                                int column)
Scrolls the table to visible the cell at specified row and column.

Parameters:
row - the row index
column - the column index

scrollCellToVisible

public void scrollCellToVisible(TableCell tableCell)
Scrolls the table to visible the specified table cell.

Parameters:
tableCell - the table cell to be visible

getVisibleFirstColumn

public int getVisibleFirstColumn()
Returns the first visible column index

Returns:
the first visible column index

getVisibleLastColumn

public int getVisibleLastColumn()
Returns the last visible column index

Returns:
the last visible column index

getVisibleFirstRow

public int getVisibleFirstRow()
Returns the first visible row index

Returns:
the first visible row index

getVisibleLastRow

public int getVisibleLastRow()
Returns the last visible row index

Returns:
the last visible row index

convertToArray

public static java.lang.Object[] convertToArray(java.util.Vector theVector)
Returns an array that contains the same objects as the vector. Each of the vector elements which is vector type, are converted to an array.

Parameters:
theVector - the vector to be converted
Returns:
an array; if theVector is null returns null

convertToVector

public static java.util.Vector convertToVector(java.lang.Object[] anArray)
Returns a vector of vectors that contains the same objects as the array. Each of the array elements which is array type, are converted to a vector.

Parameters:
anArray - the array to be converted
Returns:
the new vector ; if anArray is null, returns null

convertAttributesTableToArray

public static java.lang.Object[][] convertAttributesTableToArray(java.util.Hashtable attributesTable)
Converts the Hashtable contains the cell attributes into Object array.

Parameters:
attributesTable - the Hashtable containing the cell attributes
Returns:
the Object array

convertAttributesArrayToTable

public static java.util.Hashtable convertAttributesArrayToTable(java.lang.Object[][] attributesArray)
Converts the Object array contains the cell attributes into Hashtable.

Parameters:
attributesArray - the Object array containing the cell attributes
Returns:
the Hashtable

setColumnMargin

public void setColumnMargin(int n)
Sets the column margin for TableColumn.

Parameters:
n - the new margin width, in pixels

getColumnMargin

public int getColumnMargin()
Returns the width margin for TableColumn.

Returns:
the maximum width for the TableColumn

addColumnSelectionListener

public void addColumnSelectionListener(javax.swing.event.ListSelectionListener l)
Adds a listener to the list that's notified each time a change to the column selection occurs.

Returns:
l the ListSelectionListener

removeColumnSelectionListener

public void removeColumnSelectionListener(javax.swing.event.ListSelectionListener l)
Removes a listener from the list that's notified each time a change to the column selection occurs.

Returns:
l the ListSelectionListener

addColumnModelListener

public void addColumnModelListener(javax.swing.event.TableColumnModelListener l)
Adds a listener for table column model events.

Parameters:
l - the TableColumnModelListener

removeColumnModelListener

public void removeColumnModelListener(javax.swing.event.TableColumnModelListener l)
Removes a listener for table column model events.

Parameters:
l - the TableColumnModelListener

insertColumn

public void insertColumn(javax.swing.table.TableColumn aColumn,
                         int column)
Inserts aColumn to the column index of the array of columns held by this JFCTable's column model. If the column name of aColumn is null, sets the column name of aColumn to the name returned by getModel().getColumnName().

To insert a column to this JFCTable to display the modelColumn'th column of data in the model with a given width, cellRenderer, and cellEditor you can use:

				insertColumn(new TableColumn(modelColumn, width, cellRenderer, cellEditor));
  
[Any of the TableColumn constructors can be used instead of this one.] The model column number is stored inside the TableColumn and is used during rendering and editing to locate the appropriates data values in the model. The model column number does not change when columns are reordered in the view.

Parameters:
aColumn - the TableColumn to be inserted
column - the TableColumn position in the array of columns

getColumns

public java.util.Enumeration getColumns()
Returns an Enumeration of all the columns in the model.

Returns:
an Enumeration of the columns in the model

getColumn

public javax.swing.table.TableColumn getColumn(int column)
Returns the TableColumn object for the column at column index

Parameters:
column - the index of the column desired

getColumnIndex

public int getColumnIndex(java.lang.Object identifier)
Returns the index of the first column in the tableColumns array whose identifier is equal to identifier, when compared using equals.

Parameters:
identifier - the identifier object
Returns:
the index of the first column in the tableColumns array whose identifier is equal to identifier

setAdjustColumnOnClick

public void setAdjustColumnOnClick(boolean b)
Sets whether the column can be adjustable by clicking on it. A column is resized to it's maximum cell prefferred width.

Parameters:
b - true if the column can be adjustable

isAdjustColumnOnClick

public boolean isAdjustColumnOnClick()
Gets whether the column can be adjustable by clicking on it.

Returns:
true if the column can be adjustable

setColumnReorderingAllowed

public void setColumnReorderingAllowed(boolean b)
Sets whether the user can drag column headers to reorder columns

Parameters:
b - true if the table view should allow reordering; otherwise false

isColumnReorderingAllowed

public boolean isColumnReorderingAllowed()
Gets whether the user is allowed to rearrange columns by dragging their column headers

Returns:
true if the table view should allow reordering; otherwise false

setColumnResizingAllowed

public void setColumnResizingAllowed(boolean b)
Sets whether the user can resize columns by dragging between column headers.

Parameters:
b - true if table view should allow resizing

isColumnResizingAllowed

public boolean isColumnResizingAllowed()
Gets whether the user is allowed to resize columns by dragging between their column headers

Returns:
true if table view should allow resizing

setColumnHeaderBackground

public void setColumnHeaderBackground(java.awt.Color color)
Sets the background color of the column header

Parameters:
color - the background color of the column header

getColumnHeaderBackground

public java.awt.Color getColumnHeaderBackground()
Gets the background color of the column header

Returns:
the background color of the column header

setColumnHeaderForeground

public void setColumnHeaderForeground(java.awt.Color color)
Sets the foreground color of the column header

Parameters:
color - the foreground color of the column header

getColumnHeaderForeground

public java.awt.Color getColumnHeaderForeground()
Gets the foreground color of the column header

Returns:
the foreground color of the column header

setColumnHeaderFont

public void setColumnHeaderFont(java.awt.Font font)
Sets the font of the column header

Parameters:
font - the font of the column header

getColumnHeaderFont

public java.awt.Font getColumnHeaderFont()
Gets the font of the column header

Returns:
the font of the column header

setColumnHeaderHeight

public void setColumnHeaderHeight(int n)
Sets the column header height

Parameters:
n - the height of the column header

getColumnHeaderHeight

public int getColumnHeaderHeight()
Gets the column header height

Returns:
the height of the column header

setColumnHeaderVisible

public void setColumnHeaderVisible(boolean b)
Sets the column header visibility

Parameters:
b - true if the column header is visible

isColumnHeaderVisible

public boolean isColumnHeaderVisible()
Gets the column header visibility

Returns:
true if the column header is visible

setAdjustRowOnClick

public void setAdjustRowOnClick(boolean b)
Sets whether the row can be adjustable by clicking on it. A row is resized to it's maximum cell prefferred height.

Parameters:
b - true if the row can be adjustable

isAdjustRowOnClick

public boolean isAdjustRowOnClick()
Gets whether the row can be adjustable by clicking on it.

Returns:
true if the row can be adjustable

setRowResizingAllowed

public void setRowResizingAllowed(boolean b)
Sets whether the user can resize rows by dragging between row headers.

Parameters:
b - true if table view should allow resizing

isRowResizingAllowed

public boolean isRowResizingAllowed()
Gets whether the user is allowed to resize rows by dragging between their row headers

Returns:
true if table view should allow resizing

setRowHeaderBackground

public void setRowHeaderBackground(java.awt.Color color)
Sets the background color of the row header

Parameters:
color - the background color of the row header

getRowHeaderBackground

public java.awt.Color getRowHeaderBackground()
Gets the background color of the row header

Returns:
the background color of the row header

setRowHeaderForeground

public void setRowHeaderForeground(java.awt.Color color)
Sets the foreground color of the row header

Parameters:
color - the foreground color of the row header

getRowHeaderForeground

public java.awt.Color getRowHeaderForeground()
Gets the foreground color of the row header

Returns:
the foreground color of the row header

setRowHeaderFont

public void setRowHeaderFont(java.awt.Font font)
Sets the font of the row header

Parameters:
font - the font of the row header

getRowHeaderFont

public java.awt.Font getRowHeaderFont()
Gets the font of the row header

Returns:
the font of the row header

setRowHeaderWidth

public void setRowHeaderWidth(int n)
Sets the row header height

Parameters:
n - the height of the row header

getRowHeaderWidth

public int getRowHeaderWidth()
Gets the row header height

Returns:
the height of the row header

setRowHeaderVisible

public void setRowHeaderVisible(boolean b)
Sets the row header visibility

Parameters:
b - true if the row header is visible

isRowHeaderVisible

public boolean isRowHeaderVisible()
Gets the row header visibility

Returns:
true if the row header is visible

setColumnCount

public void setColumnCount(int n)
Sets the number of columns in the model. If the new size is greater than the current size, new columns are added to the end of the model with null cell values. If the new size is less than the current size, all columns at index and greater are discarded.

Parameters:
n - the new number of columns in the model

setRowCount

public void setRowCount(int n)

addColumnAboveSelection

public void addColumnAboveSelection()
Adds a column to the model above the selected column, The new column will have the default identifier


addColumn

public void addColumn()

addColumn

public void addColumn(java.lang.String columnName)

addColumn

public void addColumn(java.lang.Object[] columnData)

addColumn

public void addColumn(java.util.Vector columnData)

addColumn

public void addColumn(java.lang.String columnName,
                      java.lang.Object[] columnData)
Adds a column to the model. The new column will have the identifier columnName. columnName is the optional identifier for the column. columnData is the optional array of data for the column. If it is not specified or null, the column is filled with null values

Parameters:
columnName - the identifier of the column being added
columnData - optional array of data for the column being added

addColumn

public void addColumn(java.lang.String columnName,
                      java.util.Vector columnData)
Adds a column to the model. The new column will have the identifier columnName. columnName is the optional identifier for the column. If it not specified or null, the new column will have the default identifier. columnData is the optional vector of data for the column. If it is not specified or null, the column is filled with null values

Parameters:
columnName - the identifier of the column being added
columnData - optional data of the column being added

insertColumn

public void insertColumn(int column)

insertColumn

public void insertColumn(int column,
                         java.lang.Object[] columnData)

insertColumn

public void insertColumn(int column,
                         java.util.Vector columnData)

insertColumn

public void insertColumn(int column,
                         java.lang.String columnName)

insertColumn

public void insertColumn(int column,
                         java.lang.String columnName,
                         java.lang.Object[] columnData)
Inserts a column to the model. The new column will have the identifier columnName. columnName is the optional identifier for the column. If it not specified or null, the new column will have the default identifier. columnData is the optional array of data for the column. If it is not specified or null, the column is filled with null values

Parameters:
column - the index of the column being inserted
columnName - the identifier of the column being inserted
columnData - optional array of data for the column being inserted

insertColumn

public void insertColumn(int column,
                         java.lang.String columnName,
                         java.util.Vector columnData)
Inserts a column to the model. The new column will have the identifier columnName. columnName is the optional identifier for the column. If it not specified or null, the new column will have the default identifier. columnData is the optional vector of data for the column. If it is not specified or null, the column is filled with null values

Parameters:
column - the index of the column being inserted
columnName - the identifier of the column being inserted
columnData - optional data of the column being inserted

removeSelectedColumns

public void removeSelectedColumns()
Removes the selected columns from the model


removeColumn

public void removeColumn(java.lang.String columnName)
Removes the column columnName from the model

Parameters:
columnName - the column name of the column to be removed

removeColumn

public void removeColumn(int column)
Removes the column at column index from the model

Parameters:
column - the column index of the column to be removed

removeColumns

public void removeColumns(java.lang.String[] columnNames)
Removes the columns with specified column names from the model

Parameters:
columnNames - the names of the columns to be removed

removeColumns

public void removeColumns(int[] colIndices)
Removes the columns at specified column indexes from the model

Parameters:
colIndices - the indexes of the columns to be removed

addRowAboveSelection

public void addRowAboveSelection()
Adds a row to the model above the selected row,


addRow

public void addRow()

addRow

public void addRow(java.lang.Object[] rowData)
Adds a row to the end of the model. The new row will contain null values unless rowData is specified

Parameters:
rowData - optional array of data for the row being added

addRow

public void addRow(java.util.Vector rowData)
Adds a row to the end of the model. The new row will contain null values unless rowData is specified

Parameters:
rowData - optional data of the row being added

insertRow

public void insertRow(int row)

insertRow

public void insertRow(int row,
                      java.lang.Object[] rowData)
Inserts a row at specified index in the model. The new row will contain null values unless rowData is specified

Parameters:
row - the index of the row to be inserted
rowData - optional array of data for the row being inserted

insertRow

public void insertRow(int row,
                      java.util.Vector rowData)
Inserts a row at specified index in the model. The new row will contain null values unless rowData is specified

Parameters:
row - the index of the row to be inserted
rowData - optional data of the row being inserted

removeSelectedRows

public void removeSelectedRows()
Removes the selected rows from the model.


removeRow

public void removeRow(int row)
Removes the row at specified index from the model

Parameters:
row - the index of the row to be removed

removeRows

public void removeRows(int[] indices)
Removes the rows at specified indexes from the model

Parameters:
indices - the indexes of the rows to be removed

moveRow

public void moveRow(int startIndex,
                    int endIndex,
                    int toIndex)
Moves one or more rows starting at startIndex to endIndex in the model to the toIndex

Parameters:
startIndex - the starting row index to be moved
endIndex - the ending row index to be moved
toIndex - the destination of the rows to be moved

addTableModelListener

public void addTableModelListener(javax.swing.event.TableModelListener l)
Adds a listener to the list that's notified each time a change to the data model occurs

Parameters:
l - the TableModelListener

removeTableModelListener

public void removeTableModelListener(javax.swing.event.TableModelListener l)
Removes a listener from the list that's notified each time a change to the data model occurs

Parameters:
l - the TableModelListener

initializeLocalVars

protected void initializeLocalVars()
Initializes table properties to their default values.


configureEnclosingScrollPane

protected void configureEnclosingScrollPane()
If this JFCTable is the viewportView of an enclosing JScrollPane (the usual situation), configure this ScrollPane by, amongst other things, installing the table's tableColumnHeader as the columnHeaderView and tableRowHeader as the rowHeaderView of the scroll pane. When a JFCTable is added to a JScrollPane in the usual way, using new JScrollPane(myTable), addNotify is called in the JFCTable (when the table is added to the viewport). JFCTable's addNotify method in turn calls this method, which is protected so that this default installation procedure can be overridden by a subclass.


unconfigureEnclosingScrollPane

protected void unconfigureEnclosingScrollPane()
Reverses the effect of configureEnclosingScrollPane by replacing the columnHeaderView and rowHeaderView of the enclosing scroll pane with null. JTable's removeNotify method calls this method, which is protected so that this default uninstallation procedure can be overridden by a subclass.


createDefaultDataModel

protected javax.swing.table.TableModel createDefaultDataModel()
Returns the default table model object, which is a DefaultJFCTableModel. A subclass can override this method to return a different table model object.

Returns:
the default table model object

createDefaultColumnModel

protected javax.swing.table.TableColumnModel createDefaultColumnModel()
Returns the default column model object, which is a DefaultJFCTableColumnModel. A subclass can override this method to return a different column model object.

Returns:
the default column model object

createDefaultTableHeader

protected javax.swing.table.JTableHeader createDefaultTableHeader()
Returns the default table header object, which is a JColumnTableHeader. A subclass can override this method to return a different table header object.

Returns:
the default table header object

createDefaultRenderers

protected void createDefaultRenderers()
Creates default cell renderers for objects, numbers, doubles, dates, booleans, and icons.


createDefaultEditors

protected void createDefaultEditors()
Creates default cell editors for objects, numbers, and boolean values.


createDefaultColumnsFromModel

public void createDefaultColumnsFromModel()
Creates default columns for the table from the data model using the getColumnCount method defined in the TableModel interface. Clears any existing columns before creating the new columns based on information from the model.


addColumn

public void addColumn(javax.swing.table.TableColumn aColumn)
Appends aColumn to the end of the array of columns held by this JFCTable's column model. If the column name of aColumn is null, sets the column name of aColumn to the name returned by getModel().getColumnName().

To add a column to this JFCTable to display the modelColumn'th column of data in the model with a given width, cellRenderer, and cellEditor you can use:

				addColumn(new TableColumn(modelColumn, width, cellRenderer, cellEditor));
  
[Any of the TableColumn constructors can be used instead of this one.] The model column number is stored inside the TableColumn and is used during rendering and editing to locate the appropriates data values in the model. The model column number does not change when columns are reordered in the view.

Parameters:
aColumn - the TableColumn to be added

removeColumn

public void removeColumn(javax.swing.table.TableColumn aColumn)
Removes aColumn from this JFCTable's array of columns and also removes the column from the data model.

Parameters:
aColumn - the TableColumn to be removed

moveColumn

public void moveColumn(int columnIndex,
                       int newIndex)
Moves the column column to the position currently occupied by the column targetColumn in the view. The old column at targetColumn is shifted left or right to make room.


setRowSelectionInterval

public void setRowSelectionInterval(int index0,
                                    int index1)
Selects the rows from index0 to index1, inclusive.

Parameters:
index0 - one end of the interval
index1 - the other end of the interval

setColumnSelectionInterval

public void setColumnSelectionInterval(int index0,
                                       int index1)
Selects the columns from index0 to index1, inclusive.

Parameters:
index0 - one end of the interval
index1 - the other end of the interval

addRowSelectionInterval

public void addRowSelectionInterval(int index0,
                                    int index1)
Adds the rows from index0 to index1, inclusive, to the current selection.

Parameters:
index0 - one end of the interval
index1 - the other end of the interval

addColumnSelectionInterval

public void addColumnSelectionInterval(int index0,
                                       int index1)
Adds the columns from index0 to index1, inclusive, to the current selection.

Parameters:
index0 - one end of the interval
index1 - the other end of the interval

removeRowSelectionInterval

public void removeRowSelectionInterval(int index0,
                                       int index1)
Deselects the rows from index0 to index1, inclusive.

Parameters:
index0 - one end of the interval
index1 - the other end of the interval

removeColumnSelectionInterval

public void removeColumnSelectionInterval(int index0,
                                          int index1)
Deselects the columns from index0 to index1, inclusive.

Parameters:
index0 - one end of the interval
index1 - the other end of the interval

setColumnModel

public void setColumnModel(javax.swing.table.TableColumnModel columnModel)
Sets the column model for this table to newModel and registers for listener notifications from the new column model. Also sets the column model of the JTableHeader to columnModel.

Parameters:
columnModel - the new data source for this table

setModel

public void setModel(javax.swing.table.TableModel model)
Sets the data model for this table to newModel and registers with it for listener notifications from the new data model.


setTableHeader

public void setTableHeader(javax.swing.table.JTableHeader tableColumnHeader)
Sets the tableColumnHeader working with JFCTable to newHeader. It is legal to have a null tableColumnHeader.

Parameters:
tableColumnHeader - new tableColumnHeader

setAutoCreateColumnsFromModel

public void setAutoCreateColumnsFromModel(boolean b)
Sets this table's autoCreateColumnsFromModel flag. It always sets to true. This method calls createDefaultColumnsFromModel if autoCreateColumnsFromModel changes from false to true

Parameters:
b - true if table should automatically create columns

setAutoResizeMode

public void setAutoResizeMode(int n)
Sets the table's auto resize mode when the table is resized.

Parameters:
n - One of the following values: AUTO_RESIZE_OFF, AUTO_RESIZE_NEXT_COLUMN, AUTO_RESIZE_SUBSEQUENT_COLUMNS, AUTO_RESIZE_LAST_COLUMN, AUTO_RESIZE_ALL_COLUMNS

setColumnSelectionAllowed

public void setColumnSelectionAllowed(boolean b)
Sets whether the columns in this model can be selected.

Parameters:
b - true if this model will allow column selection

setGridColor

public void setGridColor(java.awt.Color color)
Sets the color used to draw grid lines and redisplays.

Parameters:
color - the new color of the grid lines

setRowHeight

public void setRowHeight(int n)
Sets the height, in pixels, of all cells, revalidates, and repaints. The height of the cells in this row will be equal to the row height minus the row margin.

Parameters:
n - new row height

setRowHeight

public void setRowHeight(int row,
                         int rowHeight)
Sets the height for row to rowHeight, revalidates, and repaints. The height of the cells in this row will be equal to the row height minus the row margin.

Parameters:
row - the row whose height is being changed
rowHeight - new row height, in pixels

getRowHeight

public int getRowHeight(int row)
Returns the height, in pixels, of the cells in row.

Parameters:
row - the row whose height is to be returned
Returns:
the height, in pixels, of the cells in the row

setRowMargin

public void setRowMargin(int n)
Sets the amount of empty space between cells in adjacent rows.

Parameters:
n - the number of pixels between cells in a row

setRowSelectionAllowed

public void setRowSelectionAllowed(boolean b)
Sets whether the rows in this model can be selected.

Parameters:
b - true if this model will allow row selection

setSelectionMode

public void setSelectionMode(int n)
Sets the table's selection mode to allow only single selections, a single contiguous interval, or multiple intervals.

Parameters:
n - an integer specifying the type of selections that are permissible

setShowHorizontalLines

public void setShowHorizontalLines(boolean b)
Sets whether the table draws horizontal lines between cells. If true it does; if it is false it doesn't.

Parameters:
b - true if table view should draw horizontal lines

setShowVerticalLines

public void setShowVerticalLines(boolean b)
Sets whether the table draws vertical lines between cells. If true it does; if it is false it doesn't.

Parameters:
b - true if table view should draw vertical lines

isCellEditable

public boolean isCellEditable(int row,
                              int column)
Returns true if the cell at row and column is editable. Otherwise, invoking setValueAt on the cell will have no effect.

Parameters:
row - the row whose value is to be queried
column - the column whose value is to be queried

getCellRenderer

public javax.swing.table.TableCellRenderer getCellRenderer(int row,
                                                           int column)
Returns an appropriate renderer for the cell specified by this row and column.

Parameters:
row - the row of the cell to render
column - the column of the cell to render
Returns:
the assigned renderer; if null returns the default renderer for this type of object

getCellEditor

public javax.swing.table.TableCellEditor getCellEditor(int row,
                                                       int column)
Returns an appropriate editor for the cell specified by row and column.

Parameters:
row - the row of the cell to edit
column - the column of the cell to edit
Returns:
the editor for this cell; if null returns the default editor for this type of object

prepareRenderer

public java.awt.Component prepareRenderer(javax.swing.table.TableCellRenderer renderer,
                                          int row,
                                          int column)
Prepares the renderer by querying the data model for the value and selection state of the cell at row, column.

Parameters:
renderer - the TableCellRenderer to prepare
row - the row of the cell to render
column - the column of the cell to render

resizeAndRepaint

protected void resizeAndRepaint()
Equivalent to revalidate followed by repaint.


valueChanged

public void valueChanged(javax.swing.event.ListSelectionEvent e)
Invoked when the row selection changes -- repaints to show the new selection. Application code will not use these methods explicitly, they are used internally by JTable.

Specified by:
valueChanged in interface javax.swing.event.ListSelectionListener
Parameters:
e - the event received

columnSelectionChanged

public void columnSelectionChanged(javax.swing.event.ListSelectionEvent e)
Invoked when the selection model of the TableColumnModel is changed. Application code will not use these methods explicitly, they are used internally by JTable.

Specified by:
columnSelectionChanged in interface javax.swing.event.TableColumnModelListener
Parameters:
e - the event received

tableChanged

public void tableChanged(javax.swing.event.TableModelEvent e)
Invoked when this table's TableModel generates a TableModelEvent.

Specified by:
tableChanged in interface javax.swing.event.TableModelListener
Parameters:
e - the tablemodel event

columnAdded

public void columnAdded(javax.swing.event.TableColumnModelEvent e)
Invoked when a column is added to the table column model. Application code will not use these methods explicitly, they are used internally by JTable.

Specified by:
columnAdded in interface javax.swing.event.TableColumnModelListener

changeSelection

public void changeSelection(int rowIndex,
                            int columnIndex,
                            boolean toggle,
                            boolean extend)
Updates the selection models of the table, depending on the state of the two flags: toggle and extend. All changes to the selection that are the result of keyboard or mouse events received by the UI are channeled through this method so that the behavior may be overridden by a subclass.

This implementation uses the following conventions:

Parameters:
rowIndex - affects the selection at row
columnIndex - affects the selection at column
toggle - see description above
extend - if true, extend the current selection

isManagingFocus

public boolean isManagingFocus()
Gets tab traversal on/off once focus gained.

Returns:
true, to indicate that the focus is being managed

setLightweight

public void setLightweight(boolean b)
Sets whether this component has a lightweight peer, native peer or no peer.

Parameters:
b - true if this component has a lightweight peer; false if it has a native peer or no peer.

isLightweight

public boolean isLightweight()
Returns whether this component has a lightweight peer, native peer or no peer.

Returns:
true if this component has a lightweight peer; false if it has a native peer or no peer.

setOpaque

public void setOpaque(boolean b)
Sets whether this component paints every pixel within its bounds. or the component does not paint some or all of its pixels, allowing the underlying pixels to show through.

Parameters:
b - true if this component paints every pixel within its bounds.

setToolTipText

public void setToolTipText(java.lang.String s)
Sets the text to display in a tool tip. The text displays when the cursor lingers over the component.


setDoubleBuffered

public void setDoubleBuffered(boolean b)
Sets whether the receiving component should use a buffer to paint.

Parameters:
b - if true, all the drawing from this component will be done in an offscreen painting buffer. The offscreen painting buffer will the be copied onto the screen.

setBorder

public void setBorder(javax.swing.border.Border b)
Sets the border of this component.

Parameters:
b - the border to be rendered for this component

setAutoscrolls

public void setAutoscrolls(boolean b)
Sets whether this component will automatically scroll its contents when dragged, if contained in a component that supports scrolling

Parameters:
b - if true, this component will automatically scroll its contents when dragged

setRequestFocusEnabled

public void setRequestFocusEnabled(boolean b)
Sets whether the receiving component can obtain the focus by calling requestFocus.

Parameters:
b - if true the receiving component can obtain the focus by calling requestFocus

addPropertyChangeListener

public void addPropertyChangeListener(java.beans.PropertyChangeListener l)
Adds a PropertyChangeListener to the listener list. The listener is registered for all properties.

Parameters:
l - the PropertyChangeListener to be added

removePropertyChangeListener

public void removePropertyChangeListener(java.beans.PropertyChangeListener l)
Removes a PropertyChangeListener from the listener list. This removes a PropertyChangeListener that was registered for all properties.

Parameters:
l - the PropertyChangeListener to be removed

setLayout

public void setLayout(java.awt.LayoutManager mgr)
Sets the layout manager for this component.

Parameters:
mgr - the specified layout manager

repaint

public void repaint()
Repaints this component. This method causes a call to this component's update method as soon as possible.


processMouseEvent

protected void processMouseEvent(java.awt.event.MouseEvent e)
Processes mouse events occurring on this component by dispatching them to any registered MouseListener objects.

Parameters:
e - the mouse event

processKeyEvent

protected void processKeyEvent(java.awt.event.KeyEvent e)
Processes key events occurring on this component by dispatching them to any registered KeyListener objects.

Parameters:
e - the key event

setBounds

public void setBounds(int x,
                      int y,
                      int width,
                      int height)
Moves and resizes this bean. The new location of the top-left corner is specified by x and y, and the new size is specified by width and height.

Parameters:
x - x-coordinate of this bean.
y - y-coordinate of this bean.
width - the new width of this bean.
height - the new height of this bean.

setForeground

public void setForeground(java.awt.Color c)
Sets the Foreground color.


setBackground

public void setBackground(java.awt.Color c)
Sets the Background color.


setFont

public void setFont(java.awt.Font f)
Sets the font.


setVisible

public void setVisible(boolean b)
sets Visiblity.

Parameters:
b - flag representing visibility of bean.

setEnabled

public void setEnabled(boolean b)
sets Enablity.

Parameters:
b - flag representing enability of bean.

setLocale

public void setLocale(java.util.Locale l)
Sets value of the locale.

Parameters:
l - current value of the locale.

getLocale

public java.util.Locale getLocale()
Returns the value of locale.

Returns:
the current value of locale

setCursor

public void setCursor(java.awt.Cursor c)
Sets value of the cursor.

Parameters:
c - current value of the cursor.

readExternal

public void readExternal(java.io.ObjectInput in)
                  throws java.lang.ClassNotFoundException,
                         java.io.IOException
Externalizable interface implementation to save and retrieve the state of this bean

Specified by:
readExternal in interface java.io.Externalizable
Throws:
java.lang.ClassNotFoundException
java.io.IOException

writeExternal

public void writeExternal(java.io.ObjectOutput out)
                   throws java.io.IOException
Specified by:
writeExternal in interface java.io.Externalizable
Throws:
java.io.IOException

ElegantJ Tables Java API Specification v1.1

Submit a bug or feature

Copyright(c)
Elegant Microweb Technologies Pvt. Ltd.
www.elegantmicroweb.com
www.elegantjbeans.com
All Rights Reserved.