Java Tips Weblog

  • Blog Stats

    • 1,759,909 hits
  • Categories

  • Archives

Jump Scrollbar Tooltip

Posted by Darryl Burke on April 22, 2009

Since a JumpScrollBarModel’s functionality relies on not returning the current value while adjusting, a ScrollBarToolTip cannot correctly reflect the position of the scroll thumb.  JumpScrollBarToolTip extends ScrollBarToolTip and overrides the method getToolTipText(…) to utilize the value returned by the model’s getTrueValue() instead of getValue().

The model of the scrollbar to which a JumpScrollBarToolTip is applied must be an instance of JumpScrollBarModel.  Any attempt to use this class with a scrollbar that does not have an appropriate model will result in a ClassCastException.

Get The Code

See Also

Jump Scrollbar Model
Scrollbar Tooltip

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: