csheets.ui.grid
Class RowHeader.RowResizer

java.lang.Object
  extended by javax.swing.event.MouseInputAdapter
      extended by csheets.ui.grid.RowHeader.RowResizer
All Implemented Interfaces:
MouseListener, MouseMotionListener, EventListener, MouseInputListener
Enclosing class:
RowHeader

protected class RowHeader.RowResizer
extends MouseInputAdapter

A mouse input listener that enables resizing of rows


Constructor Summary
protected RowHeader.RowResizer()
           
 
Method Summary
 void mouseClicked(MouseEvent e)
          Auto-resizes a column whose border was double-clicked.
 void mouseDragged(MouseEvent e)
          Resizes the row that is dragged
 void mouseMoved(MouseEvent e)
          Sets the appropriate cursor depending on whether the mouse is on a row that can be resized.
 void mousePressed(MouseEvent e)
          Selects the clicked row, unless resizing is intended.
 
Methods inherited from class javax.swing.event.MouseInputAdapter
mouseEntered, mouseExited, mouseReleased
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RowHeader.RowResizer

protected RowHeader.RowResizer()
Method Detail

mousePressed

public void mousePressed(MouseEvent e)
Selects the clicked row, unless resizing is intended.

Specified by:
mousePressed in interface MouseListener
Overrides:
mousePressed in class MouseInputAdapter
Parameters:
e - the event that was fired

mouseClicked

public void mouseClicked(MouseEvent e)
Auto-resizes a column whose border was double-clicked.

Specified by:
mouseClicked in interface MouseListener
Overrides:
mouseClicked in class MouseInputAdapter
Parameters:
e - the event that was fired

mouseMoved

public void mouseMoved(MouseEvent e)
Sets the appropriate cursor depending on whether the mouse is on a row that can be resized.

Specified by:
mouseMoved in interface MouseMotionListener
Overrides:
mouseMoved in class MouseInputAdapter
Parameters:
e - the event that was fired

mouseDragged

public void mouseDragged(MouseEvent e)
Resizes the row that is dragged

Specified by:
mouseDragged in interface MouseMotionListener
Overrides:
mouseDragged in class MouseInputAdapter
Parameters:
e - the event that was fired