Save This Page
Home » jcommon-1.0.13 » org.jfree.ui » [javadoc | source]
org.jfree.ui
public class: SortableTableHeaderListener [javadoc | source]
java.lang.Object
   org.jfree.ui.SortableTableHeaderListener

All Implemented Interfaces:
    MouseListener, MouseMotionListener

Captures mouse clicks on a table header, with the intention of triggering a sort. Adapted from code by Nabuo Tamemasa posted on http://www.codeguru.com.
Constructor:
 public SortableTableHeaderListener(SortableTableModel model,
    SortButtonRenderer renderer) 
    Standard constructor.
    Parameters:
    model - the model.
    renderer - the renderer.
Method from org.jfree.ui.SortableTableHeaderListener Summary:
mouseClicked,   mouseDragged,   mouseEntered,   mouseExited,   mouseMoved,   mousePressed,   mouseReleased,   setTableModel
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.jfree.ui.SortableTableHeaderListener Detail:
 public  void mouseClicked(MouseEvent e) 
    This event is ignored (not required).
 public  void mouseDragged(MouseEvent e) 
    If the user is dragging or resizing, then we clear the sort column.
 public  void mouseEntered(MouseEvent e) 
    This event is ignored (not required).
 public  void mouseExited(MouseEvent e) 
    This event is ignored (not required).
 public  void mouseMoved(MouseEvent e) 
    This event is ignored (not required).
 public  void mousePressed(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.
 public  void mouseReleased(MouseEvent e) 
    When the user releases the mouse button, we attempt to sort the table.
 public  void setTableModel(SortableTableModel model) 
    Sets the table model for the listener.