public class SortableTableHeaderListener extends java.lang.Object implements java.awt.event.MouseListener, java.awt.event.MouseMotionListener
Constructor and Description |
---|
SortableTableHeaderListener(SortableTableModel model,
SortButtonRenderer renderer)
Standard constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
mouseClicked(java.awt.event.MouseEvent e)
This event is ignored (not required).
|
void |
mouseDragged(java.awt.event.MouseEvent e)
If the user is dragging or resizing, then we clear the sort column.
|
void |
mouseEntered(java.awt.event.MouseEvent e)
This event is ignored (not required).
|
void |
mouseExited(java.awt.event.MouseEvent e)
This event is ignored (not required).
|
void |
mouseMoved(java.awt.event.MouseEvent e)
This event is ignored (not required).
|
void |
mousePressed(java.awt.event.MouseEvent e)
Handle a mouse press event - if the user is NOT resizing a column and NOT dragging a column
then give visual feedback that the column header has been pressed.
|
void |
mouseReleased(java.awt.event.MouseEvent e)
When the user releases the mouse button, we attempt to sort the table.
|
void |
setTableModel(SortableTableModel model)
Sets the table model for the listener.
|
public SortableTableHeaderListener(SortableTableModel model, SortButtonRenderer renderer)
model
- the model.renderer
- the renderer.public void setTableModel(SortableTableModel model)
model
- the model.public void mousePressed(java.awt.event.MouseEvent e)
mousePressed
in interface java.awt.event.MouseListener
e
- the mouse event.public void mouseDragged(java.awt.event.MouseEvent e)
mouseDragged
in interface java.awt.event.MouseMotionListener
e
- the mouse event.public void mouseEntered(java.awt.event.MouseEvent e)
mouseEntered
in interface java.awt.event.MouseListener
e
- the mouse event.public void mouseClicked(java.awt.event.MouseEvent e)
mouseClicked
in interface java.awt.event.MouseListener
e
- the mouse event.public void mouseMoved(java.awt.event.MouseEvent e)
mouseMoved
in interface java.awt.event.MouseMotionListener
e
- the mouse event.public void mouseExited(java.awt.event.MouseEvent e)
mouseExited
in interface java.awt.event.MouseListener
e
- the mouse event.public void mouseReleased(java.awt.event.MouseEvent e)
mouseReleased
in interface java.awt.event.MouseListener
e
- the mouse event.