All Packages Class Hierarchy This Package Previous Next Index
Class com.sgi.sysadm.ui.ComponentTable
java.lang.Object
|
+----java.awt.Component
|
+----java.awt.Container
|
+----javax.swing.JComponent
|
+----javax.swing.JTable
|
+----com.sgi.sysadm.ui.ComponentTable
- public class ComponentTable
- extends JTable
- implements MouseListener, MouseMotionListener
A subclass of JTable that supports embedding JComponents into the
table and sorting the table by clicking on a column header.
All the constructors are the same as JTable's.
-
ComponentTable()
-
-
ComponentTable(int, int)
-
-
ComponentTable(Object[][], Object[])
-
-
ComponentTable(TableModel)
-
-
ComponentTable(TableModel, TableColumnModel)
-
-
ComponentTable(TableModel, TableColumnModel, ListSelectionModel)
-
-
ComponentTable(Vector, Vector)
-
-
addNotify()
- Override addNotify() in order to initialize table headers.
-
addTableSortRequestListener(TableSortRequestListener)
- Adds a listener that will be notified when the user requests
that a table be sorted on a particular column.
-
mouseClicked(MouseEvent)
-
-
mouseDragged(MouseEvent)
-
Called when the mouse is dragged over the table.
-
mouseEntered(MouseEvent)
-
Called when the mouse enters the table.
-
mouseExited(MouseEvent)
-
Called when the mouse leaves the table.
-
mouseMoved(MouseEvent)
-
Called when the mouse is moved over the table.
-
mousePressed(MouseEvent)
-
Called if the mouse is pressed over the table.
-
mouseReleased(MouseEvent)
-
Called if the mouse is released over the table.
-
removeTableSortRequestListener(TableSortRequestListener)
- Removes a sort request listener
-
sizeColumnsToFit(boolean)
- Called when we're resized to set the sizes of the columns to
fit the table.
ComponentTable
public ComponentTable()
- See Also:
- JTable
ComponentTable
public ComponentTable(int numColumns,
int numRows)
- See Also:
- JTable
ComponentTable
public ComponentTable(Object data[][],
Object columnNames[])
- See Also:
- JTable
ComponentTable
public ComponentTable(TableModel dm)
- See Also:
- JTable
ComponentTable
public ComponentTable(TableModel dm,
TableColumnModel cm)
- See Also:
- JTable
ComponentTable
public ComponentTable(TableModel dm,
TableColumnModel cm,
ListSelectionModel sm)
- See Also:
- JTable
ComponentTable
public ComponentTable(Vector data,
Vector columnNames)
- See Also:
- JTable
addNotify
public void addNotify()
- Override addNotify() in order to initialize table headers. The
goal is to align the headers with the columns underneath.
- Overrides:
- addNotify in class JTable
addTableSortRequestListener
public void addTableSortRequestListener(TableSortRequestListener listener)
- Adds a listener that will be notified when the user requests
that a table be sorted on a particular column.
- Parameters:
- listener - The listener to add
removeTableSortRequestListener
public void removeTableSortRequestListener(TableSortRequestListener listener)
- Removes a sort request listener
- Parameters:
- listener - The listener to remove
mouseClicked
public void mouseClicked(MouseEvent event)
- See Also:
- mouseClicked
mousePressed
public void mousePressed(MouseEvent event)
- Called if the mouse is pressed over the table.
Finds the component (if any) over which the mouse was pressed
and sends the event to that component.
- See Also:
- mousePressed
mouseReleased
public void mouseReleased(MouseEvent event)
- Called if the mouse is released over the table.
Finds the component (if any) over which the mouse was released
and sends the event to that component.
- See Also:
- mouseReleased
mouseEntered
public void mouseEntered(MouseEvent event)
- Called when the mouse enters the table. Currently ignored.
- See Also:
- mouseEntered
mouseExited
public void mouseExited(MouseEvent event)
- Called when the mouse leaves the table. Currently ignored.
- See Also:
- mouseExited
sizeColumnsToFit
public void sizeColumnsToFit(boolean lastColumnOnly)
- Called when we're resized to set the sizes of the columns to
fit the table. Overridden to do nothing if width is less than
1 to avoid botched columns at initialization.
- Overrides:
- sizeColumnsToFit in class JTable
- See Also:
- sizeColumnsToFit
mouseDragged
public void mouseDragged(MouseEvent event)
- Called when the mouse is dragged over the table. Generates
entered, exited, and dragged mouse events and sends them to the
embedded components.
- See Also:
- mouseDragged
mouseMoved
public void mouseMoved(MouseEvent event)
- Called when the mouse is moved over the table. Generates
entered, exited, and moved mouse events and sends them to the
embedded components.
- See Also:
- mouseMoved
All Packages Class Hierarchy This Package Previous Next Index