| org.columba.mail.gui.table.TableView
TableView | public class TableView extends TreeTable (Code) | | This widget is a mix between a JTable and a JTree ( we need the JTree for the
Threaded viewing of mailing lists )
version: 0.9.1 author: fdietz |
Method Summary | |
public void | clearSelection() Yes, this was overwritten on purpose. | public TableColumn | createTableColumn(String name, int size) Create table column using plugin extension point
org.columba.mail.tablerenderer . | public void | enableThreadedView(boolean b) Enable/Disable tree renderer for the subject column.
Note, that this works because
TreeTable sets its
CustomTreeTableCellRenderer as default renderer for this class.
When calling TableModel.getColumnClass(column), the model returns
CustomTreeTableCellRenderer.class, if the threaded- view is enabled.
JTable automatically falls back to the default renderers, if no custom
renderer is applied. | public MessageNode | getMessagNode(Object uid) | public boolean | getScrollableTracksViewportHeight() | public MessageNode | getSelectedNode() Get selected message node. | public MessageNode[] | getSelectedNodes() Get array of selected message nodes. | public void | makeRowVisible(int row) Scroll table to row and request focus. | protected void | registerRenderer(TableColumn tc, String name, TableCellRenderer cell, TableCellRenderer header, int size, boolean lockSize) Set properties of this column. | public void | resetRowHeight() | public void | selectAll() Overwritten, because selectAll doesn't also select the nodes of the
underlying JTree, which aren't expanded and therefore not visible.
Go through all nodes and expand them. | public Object | selectFirstRow() Select first row and make it visible. | public Object | selectLastRow() | public void | selectRow(int row) |
clearSelection | public void clearSelection()(Code) | | Yes, this was overwritten on purpose. Updating the table-model (swing's
internals - not Columba related ) always triggers an additional call to
clearSelection. This was the easiest place to circumvent this behaviour.
See Also: javax.swing.JTable.clearSelection |
createTableColumn | public TableColumn createTableColumn(String name, int size)(Code) | | Create table column using plugin extension point
org.columba.mail.tablerenderer .
Parameters: name - name of plugin ID Parameters: size - size of table column table column object |
enableThreadedView | public void enableThreadedView(boolean b)(Code) | | Enable/Disable tree renderer for the subject column.
Note, that this works because
TreeTable sets its
CustomTreeTableCellRenderer as default renderer for this class.
When calling TableModel.getColumnClass(column), the model returns
CustomTreeTableCellRenderer.class, if the threaded- view is enabled.
JTable automatically falls back to the default renderers, if no custom
renderer is applied.
For this reason, we just remove the custom cell renderer for the
"Subject" column.
Parameters: b - if true, enable tree renderer. False, otherwise |
getMessagNode | public MessageNode getMessagNode(Object uid)(Code) | | Get message node with UID
Parameters: uid - UID of message node message node |
getScrollableTracksViewportHeight | public boolean getScrollableTracksViewportHeight()(Code) | | |
getSelectedNode | public MessageNode getSelectedNode()(Code) | | Get selected message node.
selected message node |
getSelectedNodes | public MessageNode[] getSelectedNodes()(Code) | | Get array of selected message nodes.
arrary of selected message nodes |
makeRowVisible | public void makeRowVisible(int row)(Code) | | Scroll table to row and request focus.
Parameters: row - selected row |
registerRenderer | protected void registerRenderer(TableColumn tc, String name, TableCellRenderer cell, TableCellRenderer header, int size, boolean lockSize)(Code) | | Set properties of this column.
Parameters: tc - table column Parameters: name - name of table column Parameters: cell - cell renderer Parameters: header - header renderer Parameters: size - width of column Parameters: lockSize - is this a fixed size column? |
resetRowHeight | public void resetRowHeight()(Code) | | |
selectAll | public void selectAll()(Code) | | Overwritten, because selectAll doesn't also select the nodes of the
underlying JTree, which aren't expanded and therefore not visible.
Go through all nodes and expand them. Afterwards select all rows in the
JTable.
See Also: javax.swing.JTable.selectAll |
selectFirstRow | public Object selectFirstRow()(Code) | | Select first row and make it visible.
uid of selected row |
selectLastRow | public Object selectLastRow()(Code) | | Select last row and make it visible
uid of selected row |
selectRow | public void selectRow(int row)(Code) | | Change the selection to the specified row
Parameters: row - row to selected |
|
|