adalogo.gui.varmonitor
Class JTreeTable.TreeTableCellRenderer
JTree
adalogo.gui.varmonitor.JTreeTable.TreeTableCellRenderer
- JTreeTable
- TableCellRenderer
public class JTreeTable.TreeTableCellRenderer
extends JTree
implements TableCellRenderer
A TreeCellRenderer that displays a JTree.
protected int | visibleRow - Last table/tree row asked to renderer.
|
Component | getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) - TreeCellRenderer method.
|
void | paint(Graphics g) - Sublcassed to translate the graphics such that the last visible
row will be drawn at 0,0.
|
void | setBounds(int x, int y, int w, int h) - This is overridden to set the height to match that of the JTable.
|
void | setRowHeight(int rowHeight) - Sets the row height of the tree, and forwards the row height to
the table.
|
void | updateUI() - updateUI is overridden to set the colors of the Tree's renderer
to match that of the table.
|
visibleRow
protected int visibleRow
Last table/tree row asked to renderer.
TreeTableCellRenderer
public TreeTableCellRenderer(TreeModel model)
getTableCellRendererComponent
public Component getTableCellRendererComponent(JTable table,
Object value,
boolean isSelected,
boolean hasFocus,
int row,
int column)
TreeCellRenderer method. Overridden to update the visible row.
paint
public void paint(Graphics g)
Sublcassed to translate the graphics such that the last visible
row will be drawn at 0,0.
setBounds
public void setBounds(int x,
int y,
int w,
int h)
This is overridden to set the height to match that of the JTable.
setRowHeight
public void setRowHeight(int rowHeight)
Sets the row height of the tree, and forwards the row height to
the table.
updateUI
public void updateUI()
updateUI is overridden to set the colors of the Tree's renderer
to match that of the table.