All Packages Class Hierarchy This Package Previous Next Index
Class benno.awt.TableLabel
java.lang.Object
|
+----java.awt.Component
|
+----java.awt.Container
|
+----java.awt.Panel
|
+----benno.awt.TableLabel
- public final class TableLabel
- extends Panel
- implements MouseListener, AdjustmentListener, ItemSelectable
This Component presents a horizontally scrollable table component.
The user may select a row.
A row may have an associated Object. The associated Object of the
currently selected row can be determined using getCurrentObject().
The ItemSelectable interface is implemented to allow allow an ItemListener
to detect when the selected row is changed.
This is based on ColumnLabel, and indeed much of the code of ColumnLabel
is included at the end - some of this will be reused and the rest will
be eventually tidied.
- Version:
- $Revision: 1.16 $
- Author:
- Ben Clifford
-
TableLabel(int[])
-
-
addActionListener(ActionListener)
-
-
addItemListener(ItemListener)
-
-
adjustmentValueChanged(AdjustmentEvent)
- public Dimension getPreferredSize() { return getMinimumSize(); }
-
appendRow(String[])
- Appends a row to the end of the table, without associating an object
with that row.
-
appendRow(String[], Object)
- Appends a row to the end of the table, associating an object with that
row.
-
clearRows()
- removes all the rows from the table
-
getCurrentObject()
-
-
getMaximumSize()
-
-
getMinimumSize()
-
-
getPreferredSize()
-
-
getSelectedObjects()
- This thunks getCurrentObject into the appropriate format for
ItemSelectable.
-
mouseClicked(MouseEvent)
-
-
mouseEntered(MouseEvent)
-
-
mouseExited(MouseEvent)
-
-
mousePressed(MouseEvent)
-
-
mouseReleased(MouseEvent)
-
-
old_getPreferredSize()
-
-
old_paint(Graphics)
-
-
paint(Graphics)
-
-
removeItemListener(ItemListener)
-
-
set(int, int, String)
-
-
setOutline(boolean)
-
-
setSize(Dimension)
-
-
setSize(int, int)
-
TableLabel
public TableLabel(int c[])
setSize
public void setSize(int w,
int h)
- Overrides:
- setSize in class Component
setSize
public void setSize(Dimension d)
- Overrides:
- setSize in class Component
clearRows
public void clearRows()
- removes all the rows from the table
appendRow
public void appendRow(String s[])
- Appends a row to the end of the table, without associating an object
with that row.
- Parameters:
- s - The column entries for the row
appendRow
public void appendRow(String s[],
Object o)
- Appends a row to the end of the table, associating an object with that
row.
- Parameters:
- s - The column entries for the row
- o - The object to associate with the row
paint
public void paint(Graphics g)
- Overrides:
- paint in class Container
getMinimumSize
public Dimension getMinimumSize()
- Overrides:
- getMinimumSize in class Container
getMaximumSize
public Dimension getMaximumSize()
- Overrides:
- getMaximumSize in class Container
getPreferredSize
public Dimension getPreferredSize()
- Overrides:
- getPreferredSize in class Container
adjustmentValueChanged
public void adjustmentValueChanged(AdjustmentEvent e)
- public Dimension getPreferredSize() { return getMinimumSize(); }
getCurrentObject
public Object getCurrentObject()
getSelectedObjects
public Object[] getSelectedObjects()
- This thunks getCurrentObject into the appropriate format for
ItemSelectable.
mouseClicked
public void mouseClicked(MouseEvent e)
mouseEntered
public void mouseEntered(MouseEvent e)
mouseExited
public void mouseExited(MouseEvent e)
mousePressed
public void mousePressed(MouseEvent e)
mouseReleased
public void mouseReleased(MouseEvent e)
set
public void set(int r,
int c,
String s)
addActionListener
public void addActionListener(ActionListener a)
addItemListener
public void addItemListener(ItemListener i)
removeItemListener
public void removeItemListener(ItemListener i)
setOutline
public void setOutline(boolean b)
old_paint
public void old_paint(Graphics g)
old_getPreferredSize
public Dimension old_getPreferredSize()
All Packages Class Hierarchy This Package Previous Next Index