|
Groovy Documentation | |||||||
| FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectcom.wordpress.tipsforjava.swing.ScrollBarToolTip
com.wordpress.tipsforjava.swing.JumpScrollBarToolTip
public class JumpScrollBarToolTip extends ScrollBarToolTip
This class extends Rob Camick's ScrollBarToolTip to provide support for a scroll bar that has a JumpScrollBarModel. The sole difference is that the tool tip text is computed on the basis of the model's true value as returned by the getTrueValue() method instead of the value returned by getValue().
An attempt to use this class with a scroll bar that does not have an appropriate model will result in a ClassCastException.
| Field Summary |
|---|
| Fields inherited from class ScrollBarToolTip | |
|---|---|
| ADJUSTMENT, GAP, popup, position, pressedPoint, scrollBar, style, toolTip |
| Constructor Summary | |
JumpScrollBarToolTip(JScrollPane scrollPane)
Creates a |
|
JumpScrollBarToolTip(JScrollBar scrollBar)
Creates a |
|
JumpScrollBarToolTip(JScrollBar scrollBar, Style style, Position position)
Creates a |
|
| Method Summary | |
|---|---|
protected String
|
getToolTipText(MouseEvent event)
Determine the tooltip text for the every MouseEvent. |
| Methods inherited from class ScrollBarToolTip | |
|---|---|
| getHorizontalX, getHorizontalY, getPosition, getStyle, getToolTipLocation, getToolTipText, getVerticalX, getVerticalY, mouseClicked, mouseDragged, mouseEntered, mouseExited, mouseMoved, mousePressed, mouseReleased, setPosition, setStyle, showToolTip, valueOf, valueOf, values, values |
| Methods inherited from class Object | |
|---|---|
| wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll |
| Constructor Detail |
|---|
public JumpScrollBarToolTip(JScrollPane scrollPane)
JumpScrollBarToolTip for a JScrollPane's vertical
scroll bar, which must have a JumpScrollBarModel, with
the default Style (FIXED_PRESSED) and Position
(INSIDE).
scrollPane - the scroll pane
public JumpScrollBarToolTip(JScrollBar scrollBar)
JumpScrollBarToolTip for a scroll bar that has a
JumpScrollBarModel, with the default Style
(FIXED_PRESSED,) and Position (INSIDE).
scrollBar - the scroll bar
public JumpScrollBarToolTip(JScrollBar scrollBar, Style style, Position position)
JumpScrollBarToolTip for a scroll bar that has a
JumpScrollBarModel, with the specified Style and Position.
scrollBar - the scroll barstyle - the style of the tooltip (see ScrollBarToolTip.setStyle()
for values)position - the position of the tooltip (see
ScrollBarToolTip.setPosition() for values)
| Method Detail |
|---|
@Override protected String getToolTipText(MouseEvent event)
Subclasses should override this method to return the desired tooltip text, for example the row number of a JList or JTable in a scroll pane.
event - the MouseEvent
Groovy Documentation