|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.pivot.wtk.skin.ComponentSkin
org.apache.pivot.wtk.skin.ContainerSkin
org.apache.pivot.wtk.skin.terra.TerraScrollBarSkin
public class TerraScrollBarSkin
Scroll bar skin.
| Nested Class Summary | |
|---|---|
protected class |
TerraScrollBarSkin.AutomaticScroller
Encapsulates the code needed to perform timer-controlled scrolling. |
protected class |
TerraScrollBarSkin.Handle
Scroll bar handle component. |
protected class |
TerraScrollBarSkin.HandleSkin
Scroll bar scroll handle component skin. |
protected class |
TerraScrollBarSkin.ScrollButton
Scroll bar scroll button component. |
protected class |
TerraScrollBarSkin.ScrollButtonImage
|
protected class |
TerraScrollBarSkin.ScrollButtonSkin
Scroll bar scroll button component skin. |
protected class |
TerraScrollBarSkin.ScrollDownImage
|
protected class |
TerraScrollBarSkin.ScrollUpImage
|
| Nested classes/interfaces inherited from class org.apache.pivot.wtk.skin.ContainerSkin |
|---|
ContainerSkin.IndexFocusTraversalPolicy |
| Nested classes/interfaces inherited from interface org.apache.pivot.wtk.ScrollBarListener |
|---|
ScrollBarListener.Adapter |
| Nested classes/interfaces inherited from interface org.apache.pivot.wtk.ContainerListener |
|---|
ContainerListener.Adapter |
| Nested classes/interfaces inherited from interface org.apache.pivot.wtk.ContainerMouseListener |
|---|
ContainerMouseListener.Adapter |
| Nested classes/interfaces inherited from interface org.apache.pivot.wtk.ComponentListener |
|---|
ComponentListener.Adapter |
| Nested classes/interfaces inherited from interface org.apache.pivot.wtk.ComponentStateListener |
|---|
ComponentStateListener.Adapter |
| Nested classes/interfaces inherited from interface org.apache.pivot.wtk.ComponentMouseListener |
|---|
ComponentMouseListener.Adapter |
| Nested classes/interfaces inherited from interface org.apache.pivot.wtk.ComponentMouseButtonListener |
|---|
ComponentMouseButtonListener.Adapter |
| Nested classes/interfaces inherited from interface org.apache.pivot.wtk.ComponentKeyListener |
|---|
ComponentKeyListener.Adapter |
| Constructor Summary | |
|---|---|
TerraScrollBarSkin()
|
|
| Method Summary | |
|---|---|
void |
blockIncrementChanged(ScrollBar scrollBar,
int previousBlockIncrement)
Called when a scroll bar's block increment has changed. |
void |
enabledChanged(Component component)
Propagates the scroll bar's enabled state to the scroll buttons. |
Color |
getBorderColor()
|
int |
getMinimumHandleLength()
|
int |
getPreferredHeight(int width)
Returns the visual's preferred height given the provided width constraint. |
Dimensions |
getPreferredSize()
Returns the visual's unconstrained preferred size. |
int |
getPreferredWidth(int height)
Returns the visual's preferred width given the provided height constraint. |
Color |
getScrollButtonBackgroundColor()
|
Color |
getScrollButtonDisabledBackgroundColor()
|
Color |
getScrollButtonHighlightedBackgroundColor()
|
Color |
getScrollButtonImageColor()
|
Color |
getScrollButtonPressedBackgroundColor()
|
void |
install(Component component)
Associates a skin with a component. |
void |
layout()
If the component on which the skin is installed is a container, lays out the container's children. |
boolean |
mouseDown(Component component,
Mouse.Button button,
int x,
int y)
Initiates automatic block scrolling. |
void |
mouseOut(Component component)
Called when the mouse exits a component. |
boolean |
mouseUp(Component component,
Mouse.Button button,
int x,
int y)
Cancels automatic block scrolling. |
boolean |
mouseWheel(Component component,
Mouse.ScrollType scrollType,
int scrollAmount,
int wheelRotation,
int x,
int y)
Updates the scroll bar's value. |
void |
orientationChanged(ScrollBar scrollBar,
Orientation previousOrientation)
Called when a scroll bar's orientation has changed. |
void |
paint(Graphics2D graphics)
Paints the visual. |
void |
scopeChanged(ScrollBar scrollBar,
int previousStart,
int previousEnd,
int previousExtent)
Called when a scroll bar's scope has changed. |
void |
setBackgroundColor(int backgroundColor)
|
void |
setBorderColor(Color borderColor)
|
void |
setBorderColor(int borderColor)
|
void |
setBorderColor(String borderColor)
|
void |
setMinimumHandleLength(int minimumHandleLength)
|
void |
setScrollButtonBackgroundColor(Color scrollButtonBackgroundColor)
|
void |
setScrollButtonBackgroundColor(int scrollButtonBackgroundColor)
|
void |
setScrollButtonBackgroundColor(String scrollButtonBackgroundColor)
|
void |
setScrollButtonDisabledBackgroundColor(Color scrollButtonDisabledBackgroundColor)
|
void |
setScrollButtonDisabledBackgroundColor(int scrollButtonDisabledBackgroundColor)
|
void |
setScrollButtonDisabledBackgroundColor(String scrollButtonDisabledBackgroundColor)
|
void |
setScrollButtonHighlightedBackgroundColor(Color scrollButtonHighlightedBackgroundColor)
|
void |
setScrollButtonHighlightedBackgroundColor(int scrollButtonHighlightedBackgroundColor)
|
void |
setScrollButtonHighlightedBackgroundColor(String scrollButtonHighlightedBackgroundColor)
|
void |
setScrollButtonImageColor(Color scrollButtonImageColor)
|
void |
setScrollButtonImageColor(int scrollButtonImageColor)
|
void |
setScrollButtonImageColor(String scrollButtonImageColor)
|
void |
setScrollButtonPressedBackgroundColor(Color scrollButtonPressedBackgroundColor)
|
void |
setScrollButtonPressedBackgroundColor(int scrollButtonPressedBackgroundColor)
|
void |
setScrollButtonPressedBackgroundColor(String scrollButtonPressedBackgroundColor)
|
void |
unitIncrementChanged(ScrollBar scrollBar,
int previousUnitIncrement)
Called when a scroll bar's unit increment has changed. |
void |
valueChanged(ScrollBar scrollBar,
int previousValue)
Called when a scroll bar's value has changed. |
| Methods inherited from class org.apache.pivot.wtk.skin.ContainerSkin |
|---|
componentInserted, componentMoved, componentsRemoved, focusTraversalPolicyChanged, getBackgroundColor, getBackgroundPaint, isFocusable, isOpaque, mouseDown, mouseMove, mouseUp, mouseWheel, setBackgroundColor, setBackgroundColor, setBackgroundPaint, setBackgroundPaint, setBackgroundPaint |
| Methods inherited from class org.apache.pivot.wtk.skin.ComponentSkin |
|---|
cursorChanged, decodeFont, dragSourceChanged, dropTargetChanged, focusedChanged, getBaseline, getBaseline, getComponent, getHeight, getWidth, heightLimitsChanged, invalidateComponent, keyPressed, keyReleased, keyTyped, locationChanged, menuHandlerChanged, mouseClick, mouseMove, mouseOver, nameChanged, parentChanged, preferredSizeChanged, repaintComponent, repaintComponent, repaintComponent, repaintComponent, repaintComponent, setSize, sizeChanged, tooltipDelayChanged, tooltipTextChanged, tooltipTriggered, visibleChanged, widthLimitsChanged |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public TerraScrollBarSkin()
| Method Detail |
|---|
public void install(Component component)
Skin
install in interface Skininstall in class ContainerSkincomponent - The component to which the skin is being attached.public int getPreferredWidth(int height)
ConstrainedVisual
getPreferredWidth in interface ConstrainedVisualgetPreferredWidth in class ContainerSkinheight - The height by which to constrain the preferred width, or -1
for no constraint.public int getPreferredHeight(int width)
ConstrainedVisual
getPreferredHeight in interface ConstrainedVisualgetPreferredHeight in class ContainerSkinwidth - The width by which to constrain the preferred height, or -1
for no constraint.public Dimensions getPreferredSize()
ConstrainedVisual
getPreferredSize in interface ConstrainedVisualgetPreferredSize in class ComponentSkinpublic void layout()
Skin
layout in interface Skinpublic void paint(Graphics2D graphics)
Visual
paint in interface Visualpaint in class ContainerSkingraphics - The graphics context in which to paint the visual.public final void setBackgroundColor(int backgroundColor)
public int getMinimumHandleLength()
public void setMinimumHandleLength(int minimumHandleLength)
public Color getBorderColor()
public void setBorderColor(Color borderColor)
public final void setBorderColor(String borderColor)
public final void setBorderColor(int borderColor)
public Color getScrollButtonImageColor()
public void setScrollButtonImageColor(Color scrollButtonImageColor)
public final void setScrollButtonImageColor(String scrollButtonImageColor)
public final void setScrollButtonImageColor(int scrollButtonImageColor)
public Color getScrollButtonBackgroundColor()
public void setScrollButtonBackgroundColor(Color scrollButtonBackgroundColor)
public final void setScrollButtonBackgroundColor(String scrollButtonBackgroundColor)
public final void setScrollButtonBackgroundColor(int scrollButtonBackgroundColor)
public Color getScrollButtonDisabledBackgroundColor()
public void setScrollButtonDisabledBackgroundColor(Color scrollButtonDisabledBackgroundColor)
public final void setScrollButtonDisabledBackgroundColor(String scrollButtonDisabledBackgroundColor)
public final void setScrollButtonDisabledBackgroundColor(int scrollButtonDisabledBackgroundColor)
public Color getScrollButtonPressedBackgroundColor()
public void setScrollButtonPressedBackgroundColor(Color scrollButtonPressedBackgroundColor)
public final void setScrollButtonPressedBackgroundColor(String scrollButtonPressedBackgroundColor)
public final void setScrollButtonPressedBackgroundColor(int scrollButtonPressedBackgroundColor)
public Color getScrollButtonHighlightedBackgroundColor()
public void setScrollButtonHighlightedBackgroundColor(Color scrollButtonHighlightedBackgroundColor)
public final void setScrollButtonHighlightedBackgroundColor(String scrollButtonHighlightedBackgroundColor)
public final void setScrollButtonHighlightedBackgroundColor(int scrollButtonHighlightedBackgroundColor)
public void mouseOut(Component component)
ComponentMouseListener
mouseOut in interface ComponentMouseListenermouseOut in class ComponentSkin
public boolean mouseDown(Component component,
Mouse.Button button,
int x,
int y)
mouseDown in interface ComponentMouseButtonListenermouseDown in class ComponentSkincomponent - The scroll bar.button - The button that was pressed.x - The x-coordinate of the event in the scroll bar's coordinate space.y - The y-coordinate of the event in the scroll bar's coordinate space.
public boolean mouseUp(Component component,
Mouse.Button button,
int x,
int y)
mouseUp in interface ComponentMouseButtonListenermouseUp in class ComponentSkincomponent - The scroll bar.button - The button that was released.x - The x-coordinate of the event in the scroll bar's coordinate space.y - The y-coordinate of the event in the scroll bar's coordinate space.
public boolean mouseWheel(Component component,
Mouse.ScrollType scrollType,
int scrollAmount,
int wheelRotation,
int x,
int y)
mouseWheel in interface ComponentMouseWheelListenermouseWheel in class ComponentSkincomponent - The scroll bar.scrollType - Unit or block scrolling.scrollAmount - The amount of scrolling.wheelRotation - -1 or 1 for backward or forward scrolling,
respectively.x - The x-coordinate of the event in the scroll bar's coordinate space.y - The y-coordinate of the event in the scroll bar's coordinate space.
public void enabledChanged(Component component)
enabledChanged in interface ComponentStateListenerenabledChanged in class ComponentSkincomponent - The scroll bar.
public void orientationChanged(ScrollBar scrollBar,
Orientation previousOrientation)
ScrollBarListener
orientationChanged in interface ScrollBarListener
public void scopeChanged(ScrollBar scrollBar,
int previousStart,
int previousEnd,
int previousExtent)
ScrollBarListener
scopeChanged in interface ScrollBarListener
public void unitIncrementChanged(ScrollBar scrollBar,
int previousUnitIncrement)
ScrollBarListener
unitIncrementChanged in interface ScrollBarListener
public void blockIncrementChanged(ScrollBar scrollBar,
int previousBlockIncrement)
ScrollBarListener
blockIncrementChanged in interface ScrollBarListener
public void valueChanged(ScrollBar scrollBar,
int previousValue)
ScrollBarValueListener
valueChanged in interface ScrollBarValueListener
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||