Overview  Package   Class  Tree  Index 

be.lassi.ui.util
Class ScrollHelper

java.lang.Object
  extended by be.lassi.ui.util.ScrollHelper
All Implemented Interfaces:
java.lang.Runnable, java.util.EventListener, javax.swing.event.ChangeListener

public class ScrollHelper
extends java.lang.Object
implements javax.swing.event.ChangeListener, java.lang.Runnable

Helps to keep the vertical scrolling position of the row header view port and the main view port of a JScrollPane in sync. In principle it should not have been necessary to implement this class, but it overcomes a problem with vertical scrolling position of the two views becoming out of sync when using the arrow up and down buttons to scroll through the cells. Perhaps in a future release of Swing, this class should be removed again.


Constructor Summary
ScrollHelper(javax.swing.JScrollPane scrollPane)
          Constructs a new helper.
 
Method Summary
 void dispose()
          Cleans up after use.
 void run()
          Implements the Runable interface to adjust the vertical scrolling position of the main viewport, if it is different from the vertical position of the row header viewport.
 void stateChanged(javax.swing.event.ChangeEvent e)
          Implements the ChangeListener interface to monitor the vertical scrolling position.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ScrollHelper

public ScrollHelper(javax.swing.JScrollPane scrollPane)
Constructs a new helper.

Parameters:
scrollPane - the scroll pane for which vertical scrolling position is monitored, and adjustments are made when necessary
Method Detail

dispose

public void dispose()
Cleans up after use.


run

public void run()
Implements the Runable interface to adjust the vertical scrolling position of the main viewport, if it is different from the vertical position of the row header viewport.

Specified by:
run in interface java.lang.Runnable

stateChanged

public void stateChanged(javax.swing.event.ChangeEvent e)
Implements the ChangeListener interface to monitor the vertical scrolling position.

Specified by:
stateChanged in interface javax.swing.event.ChangeListener

Overview  Package   Class  Tree  Index 
Lighting Assistant 1.2