|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.explodingpixels.widgets.plaf.ButtonsSeparateScrollBarSkin
public class ButtonsSeparateScrollBarSkin
A ScrollBarSkin with the buttons placed at the bottom or right of the scroll bar.
| Constructor Summary | |
|---|---|
ButtonsSeparateScrollBarSkin(AbstractButton decrementButton,
AbstractButton incrementButton,
Painter<Component> trackPainter,
Painter<Component> scrollThumbPainter,
int decrementButtonRecess,
int incrementButtonRecess,
Dimension minimumThumbSize,
Dimension preferredSize)
Creates a ButtonsTogetherScrollBarSkin using the given parameters. |
|
| 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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ButtonsSeparateScrollBarSkin(AbstractButton decrementButton,
AbstractButton incrementButton,
Painter<Component> trackPainter,
Painter<Component> scrollThumbPainter,
int decrementButtonRecess,
int incrementButtonRecess,
Dimension minimumThumbSize,
Dimension preferredSize)
ButtonsTogetherScrollBarSkin using the given parameters.
decrementButton - the button to cause a decrement in the scroll bar to occur.incrementButton - the button to cause a increment in the scroll bar to occur.trackPainter - the Painter to use to paint the track.scrollThumbPainter - the Painter to use to paint the scroll thumb.decrementButtonRecess - the number of pixels to allow the scrollbar to "recess" into the
decrement button. this is useful when using scroll bars with rounded ends.incrementButtonRecess - the number of pixels to allow the scrollbar to "recess" into the
increment button. this is useful when using scroll bars with rounded ends.minimumThumbSize - the minimum size that the scroll thumb can be.preferredSize - the preferred size of this skin.| Method Detail |
|---|
public Dimension getMinimumThumbSize()
ScrollBarSkin
getMinimumThumbSize in interface ScrollBarSkinpublic Dimension getPreferredSize()
ScrollBarSkinJScrollBar. For vertical scroll bars, this value will drive the width. For horiztonal
scroll bars, this value will drive the height.
getPreferredSize in interface ScrollBarSkinJScrollBar.public Rectangle getScrollThumbBounds()
ScrollBarSkin
getScrollThumbBounds in interface ScrollBarSkinpublic Rectangle getTrackBounds()
ScrollBarSkinJScrollBar, but only the bounds that are valid for the
scroll thumb to exist in.
getTrackBounds in interface ScrollBarSkinpublic void installComponents(JScrollBar scrollBar)
ScrollBarSkinScrollBarSkin.layoutTrackOnly(JScrollBar, ScrollBarOrientation)
and ScrollBarSkin.layoutEverything(JScrollBar, ScrollBarOrientation).
installComponents in interface ScrollBarSkinscrollBar - the JScrollBar that the skin will be painting.
public void layoutTrackOnly(JScrollBar scrollBar,
ScrollBarOrientation orientation)
ScrollBarSkinJScrollBar 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.
layoutTrackOnly in interface ScrollBarSkinscrollBar - the JScrollBar that the skin is painting.orientation - the orientation of the scroll bar.
public void layoutEverything(JScrollBar scrollBar,
ScrollBarOrientation orientation)
ScrollBarSkin
layoutEverything in interface ScrollBarSkinscrollBar - the JScrollBar that the skin is painting.orientation - the orientation of the scroll bar.
public void installMouseListenersOnButtons(MouseListener decrementMoustListener,
MouseListener incrementMouseListener)
ScrollBarSkin
installMouseListenersOnButtons in interface ScrollBarSkindecrementMoustListener - 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.public void setScrollThumbBounds(Rectangle bounds)
ScrollBarSkinJScrollBar's BoundedRangeModel is updated.
setScrollThumbBounds in interface ScrollBarSkinbounds - the new bounds of the scroll thumb.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||