Package gov.nih.mipav.view
Class ScrollCorrector
java.lang.Object
gov.nih.mipav.view.ScrollCorrector
- All Implemented Interfaces:
AdjustmentListener,EventListener
Corrects a strange behaviour with JScrollPane when lines are appended from another thread. Moves the vertical slider
to the last position.
usage: add as an adjustment listener to the VerticalScrollBar, eg.,
scrollPane.getVerticalScrollBar().addAdjustmentListener(new ScrollCorrector());
Taken as a modified version from traiton , on Sun's bug parade. See: JTextArea's don't automatically scoll when appending() to them. 20 February 2001 entry.
Modified as needed.
- Author:
- traiton
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
atLastPos
private boolean atLastPosDOCUMENT ME! -
lastMax
private int lastMaxDOCUMENT ME!
-
-
Constructor Details
-
ScrollCorrector
public ScrollCorrector()Does nothing.
-
-
Method Details
-
adjustmentValueChanged
DOCUMENT ME!- Specified by:
adjustmentValueChangedin interfaceAdjustmentListener- Parameters:
ae- DOCUMENT ME!
-