JClass DesktopViews 6.3.0 API
Documentation

com.klg.jclass.table
Class TableMouseWheelListener

java.lang.Object
  |
  +--com.klg.jclass.table.TableMouseWheelListener
All Implemented Interfaces:
EventListener, MouseWheelListener, Serializable

public class TableMouseWheelListener
extends Object
implements MouseWheelListener, Serializable

TableMouseWheelListener responds to MouseWheelEvents and passes adjust the scrollbars appropriately.

See Also:
Serialized Form

Field Summary
protected  com.klg.jclass.table.JCTable table
           
 
Constructor Summary
TableMouseWheelListener(com.klg.jclass.table.JCTable table)
          Note the table code to add a mouse wheel listener expects exactly one constructor.
 
Method Summary
 com.klg.jclass.table.JCTable getTable()
          Get the table to which this listener will change in response to MouseWheelEvents
 void mouseWheelMoved(MouseWheelEvent e)
          Respond to mouse wheel being moved
protected  void scrollByBlock(JScrollBar scrollbar, int direction)
          Scroll by block
protected  void scrollByUnits(JScrollBar scrollbar, int direction, int units)
          Scroll by units
 void setTable(com.klg.jclass.table.JCTable table)
          Set the table to which this listener will change in response to MouseWheelEvents
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

table

protected com.klg.jclass.table.JCTable table
Constructor Detail

TableMouseWheelListener

public TableMouseWheelListener(com.klg.jclass.table.JCTable table)
Note the table code to add a mouse wheel listener expects exactly one constructor. If you need to add a constructor, you must change the corresponding code to deal with this.

Parameters:
table - The table to which the listener is added
Method Detail

setTable

public void setTable(com.klg.jclass.table.JCTable table)
Set the table to which this listener will change in response to MouseWheelEvents

Parameters:
table - The new table

getTable

public com.klg.jclass.table.JCTable getTable()
Get the table to which this listener will change in response to MouseWheelEvents

Returns:
The current table

mouseWheelMoved

public void mouseWheelMoved(MouseWheelEvent e)
Respond to mouse wheel being moved

Specified by:
mouseWheelMoved in interface MouseWheelListener
Parameters:
e - The event generated by the mouse wheel movement

scrollByBlock

protected void scrollByBlock(JScrollBar scrollbar,
                             int direction)
Scroll by block

Parameters:
scrollbar - The scroll bar to change
direction - The direction of change

scrollByUnits

protected void scrollByUnits(JScrollBar scrollbar,
                             int direction,
                             int units)
Scroll by units

Parameters:
scrollbar - The scroll bar to change
direction - The direction of change
units - The number of units to scroll

Copyright © 2004 Quest Software Inc..
All rights reserved.