Method Summary |
|
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 . |
public void | clearSelection() Clears any row or column selection.
Calls ListSelectionModel.clearSelection() method
of both, row and column, selection models. |
public TableModel | createDefaultTableModel() Creates a data model instance appropriated to this component. |
public ListSelectionModel | getColumnSelectionModel() Returns the current column selection model.
the current column selection model. |
public int | getEditingColumn() Returns the column of the cell being edited.
the column of the cell being edited. |
public int | getEditingRow() Returns the row of the cell being edited.
the row of the cell being edited. |
public String | getEditorActivatorEvent() Returns the event type used to activate the table cell edition process by the user.
the event type used to activate the edition. |
public ItsNatTableCellEditor | getItsNatTableCellEditor() Returns the current table cell editor. |
public ItsNatTableCellRenderer | getItsNatTableCellRenderer() Returns the current component renderer. |
public ItsNatTableHeader | getItsNatTableHeader() Returns the table header sub-component.
the table header. |
public ItsNatTableStructure | getItsNatTableStructure() Returns the component structure. |
public ItsNatTableUI | getItsNatTableUI() Returns the user interface manager of this component. |
public ListSelectionModel | getRowSelectionModel() Returns the current row selection model.
the current row selection model. |
public int | getSelectedColumn() Returns the index of the first selected column. |
public int[] | getSelectedColumns() Returns an array with indices of the current selected columns. |
public int | getSelectedRow() Returns the index of the first selected row. |
public int[] | getSelectedRows() Returns an array with indices of the current selected rows. |
public TableModel | getTableModel() Returns the current data model of this component. |
public boolean | isCellSelected(int row, int column) Informs whether the specified cell is selected.
A cell is selected if cell selection is enabled (
ItsNatTable.isCellSelectionEnabled() returns true)
and row selection OR column selection is enabled (not both) and the cell is
part of a selected row or column. |
public boolean | isCellSelectionEnabled() Informs whether cell selection is enabled. |
public boolean | isColumnSelected(int column) Informs whether the specified column contains almost a cell selected.
This method simply delegates to getColumnSelectionModel().isSelectedIndex(column) .
Parameters: column - the column index. |
public boolean | isColumnSelectionAllowed() Informs whether column selection is allowed. |
public boolean | isEditing() Informs whether a table cell value is being edited. |
public boolean | isRowSelected(int row) Informs whether the specified row contains almost a cell selected.
This method simply delegates to getRowSelectionModel().isSelectedIndex(row) .
Parameters: row - the row index. |
public boolean | isRowSelectionAllowed() Informs whether row selection is allowed. |
public void | selectAll() Selects all cells in the table. |
public void | setCellSelectionEnabled(boolean cellSelectionEnabled) Enables/disables cell selection. |
public void | setColumnSelectionAllowed(boolean columnSelectionAllowed) Sets whether column selection is allowed. |
public void | setColumnSelectionInterval(int index0, int index1) Sets a new column selection interval specifying an index range. |
public void | setColumnSelectionModel(ListSelectionModel selectionModel) Sets the new column selection model.
If the new selection model is the current defined then is "reset",
component listener is removed and added again. |
public void | setEditorActivatorEvent(String eventType) Sets the event type used to activate the table cell edition process by the user. |
public void | setItsNatTableCellEditor(ItsNatTableCellEditor editor) Sets the table cell editor.
Table cell edition works very much the same as label edition
(see
ItsNatLabel.setItsNatLabelEditor(ItsNatLabelEditor) ).
Some differences:
The edition process starts programmatically by calling
ItsNatTable.startEditingAt(int,int) .
The edition takes place inside the cell content element
as returned by
ItsNatTableStructure.getCellContentElement(ItsNatTableintintorg.w3c.dom.Element) .
The new cell value is set to the data model
calling javax.swing.table.TableModel.setValueAt(Object,int,int) .
Parameters: editor - the new editor. |
public void | setItsNatTableCellRenderer(ItsNatTableCellRenderer renderer) Sets the component renderer. |
public void | setRowSelectionAllowed(boolean rowSelectionAllowed) Sets whether row selection is allowed. |
public void | setRowSelectionInterval(int index0, int index1) Sets a new row selection interval specifying an index range. |
public void | setRowSelectionModel(ListSelectionModel selectionModel) Sets the new row selection model.
If the new selection model is the current defined then is "reset",
component listener is removed and added again. |
public void | setSelectedColumns(int[] indices) Sets the current selected columns. |
public void | setSelectedRows(int[] indices) Sets the current selected rows. |
public void | setSelectionMode(int selectionMode) Sets a new selection mode to the row and column selection models.
Calls ListSelectionModel.setSelectionMode() method
of both, row and column, selection models. |
public void | setTableModel(TableModel dataModel) Changes the data model of this component.
Current data model is disconnected from this component, and the new
data model is bound to this component, every change is tracked and
updates the user interfaces accordingly.
If the specified data model is the same instance as the current data model,
then is reset, component listener is removed and added again. |
public void | startEditingAt(int row, int column) Used to start programmatically a table cell edition process "in place". |