|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.swing.table.AbstractTableModel
org.jcreme.swing.table.TransposableTableModel
This TableModel implementation enables to transpose another TableModel. It is to be used in conjunction with a JTransposableTable to ensure the cells are correctly rendered and edited.
Nested Class Summary | |
static interface |
TransposableTableModel.TransposedValue
A Place holder class to enable to define special renderers in the transposed tables. |
Field Summary | |
static int |
FIRST_ROW_COLUMN_NAMES
When this policy is used, the first row provides the column names in the transposition. |
static int |
IGNORE_COLUMN_NAMES
When this policy is used, the column names disappear in the transposition. |
protected static char[] |
LETTERS
An array of letters used to generate letter column names. |
static int |
LETTERS_COLUMN_NAMES
When this policy is used, letters are used for column names in the transposition. |
static int |
NUMBERS_COLUMN_NAMES
When this policy is used, numbers are used for column names in the transposition. |
static int |
USE_COLUMN_NAMES
When this policy is used, the column names form the first column in the transposition. |
Fields inherited from class javax.swing.table.AbstractTableModel |
listenerList |
Constructor Summary | |
TransposableTableModel()
|
Method Summary | |
java.lang.Class |
getColumnClass(int columnIndex)
|
int |
getColumnCount()
|
protected java.lang.String |
getColumnLetters(int column)
|
java.lang.String |
getColumnName(int column)
|
int |
getColumnNamesPolicy()
Gives access to the current column names' policy. |
int |
getRowCount()
|
boolean |
getTranspose()
Gives access to the current status of the TransposableTableModel. |
int |
getTransposedColumnNamesPolicy()
|
javax.swing.table.TableModel |
getUnderlyingModel()
Gives access to the TableModel that is transposed by this TransposableTableModel. |
java.lang.Object |
getValueAt(int rowIndex,
int columnIndex)
|
boolean |
isCellEditable(int rowIndex,
int columnIndex)
|
void |
setColumnNamesPolicy(int policy)
Enables to change the policy regarding the transposition of the column names. |
void |
setTranspose(boolean b)
Enables to transpose or untranspose the underlyingModel. |
void |
setTransposedColumnNamesPolicy(int policy)
|
void |
setUnderlyingModel(javax.swing.table.TableModel model)
Enables to change the underlyingModel that is transposed by this TransposableTableModel. |
void |
setValueAt(java.lang.Object aValue,
int rowIndex,
int columnIndex)
|
Methods inherited from class javax.swing.table.AbstractTableModel |
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getListeners, getTableModelListeners, removeTableModelListener |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int IGNORE_COLUMN_NAMES
public static final int USE_COLUMN_NAMES
public static final int FIRST_ROW_COLUMN_NAMES
public static final int LETTERS_COLUMN_NAMES
public static final int NUMBERS_COLUMN_NAMES
protected static final char[] LETTERS
Constructor Detail |
public TransposableTableModel()
Method Detail |
public void setTranspose(boolean b)
b
- true to transpose the underlyingModel. false otherwise.public boolean getTranspose()
public void setColumnNamesPolicy(int policy)
policy
- the new policy.public int getColumnNamesPolicy()
public void setTransposedColumnNamesPolicy(int policy)
policy
- public int getTransposedColumnNamesPolicy()
public void setUnderlyingModel(javax.swing.table.TableModel model)
model
- the TableModel to transpose.public javax.swing.table.TableModel getUnderlyingModel()
public int getRowCount()
TableModel.getRowCount()
public int getColumnCount()
TableModel.getColumnCount()
public java.lang.Object getValueAt(int rowIndex, int columnIndex)
TableModel.getValueAt(int, int)
public java.lang.Class getColumnClass(int columnIndex)
TableModel.getColumnClass(int)
public java.lang.String getColumnName(int column)
TableModel.getColumnName(int)
public boolean isCellEditable(int rowIndex, int columnIndex)
TableModel.isCellEditable(int, int)
public void setValueAt(java.lang.Object aValue, int rowIndex, int columnIndex)
TableModel.setValueAt(java.lang.Object, int, int)
protected java.lang.String getColumnLetters(int column)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |