|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface ScrollBarSkin
An interface that allows implementors to control the appearance of a JScrollBar.
| Method Summary | |
|---|---|
Dimension |
getMinimumThumbSize()
The smallest size that the scroll thumb can be. |
Dimension |
getPreferredSize()
The preferred size of the painter, which will control the preferred size of the associated JScrollBar. |
Rectangle |
getScrollThumbBounds()
Gets the current bounds of the scroll thumb, which are controlled by the layout provided by this skin. |
Rectangle |
getTrackBounds()
Gets the current bounds of the track, which are controlled by the layout provided by this skin. |
void |
installComponents(JScrollBar scrollBar)
Called once at the begining of the skin's life cycle. |
void |
installMouseListenersOnButtons(MouseListener decrementMoustListener,
MouseListener incrementMouseListener)
Called once at the begining of the skin's life cycle. |
void |
layoutEverything(JScrollBar scrollBar,
ScrollBarOrientation orientation)
Called when scroll bar should be laid out by the skin. |
void |
layoutTrackOnly(JScrollBar scrollBar,
ScrollBarOrientation orientation)
Called when only the track should be laid out by the skin. |
void |
setScrollThumbBounds(Rectangle bounds)
Sets the bounds of the scroll thumb. |
| Method Detail |
|---|
void installComponents(JScrollBar scrollBar)
layoutTrackOnly(JScrollBar, ScrollBarOrientation)
and layoutEverything(JScrollBar, ScrollBarOrientation).
scrollBar - the JScrollBar that the skin will be painting.
void installMouseListenersOnButtons(MouseListener decrementMoustListener,
MouseListener incrementMouseListener)
decrementMoustListener - the MouseListener to be notified when a control is
pressed that should result in the scroll bar's value decrementing.incrementMouseListener - the MouseListener to be notified when a control is
pressed that should result in the scroll bar's value incrementing.
void layoutTrackOnly(JScrollBar scrollBar,
ScrollBarOrientation orientation)
JScrollBar has been set to ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS
or ScrollPaneConstants.HORIZONTAL_SCROLLBAR_ALWAYS and the corresponding view is
showing all the content. Note that there are, in fact, no restrictions on what this method
lays out. That is, if this skin wishes to layout more than just an empty track when there is
no content to scroll, it may do so.
scrollBar - the JScrollBar that the skin is painting.orientation - the orientation of the scroll bar.
void layoutEverything(JScrollBar scrollBar,
ScrollBarOrientation orientation)
scrollBar - the JScrollBar that the skin is painting.orientation - the orientation of the scroll bar.Dimension getMinimumThumbSize()
Dimension getPreferredSize()
JScrollBar. For vertical scroll bars, this value will drive the width. For horiztonal
scroll bars, this value will drive the height.
JScrollBar.Rectangle getScrollThumbBounds()
void setScrollThumbBounds(Rectangle bounds)
JScrollBar's BoundedRangeModel is updated.
bounds - the new bounds of the scroll thumb.Rectangle getTrackBounds()
JScrollBar, but only the bounds that are valid for the
scroll thumb to exist in.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||