org.apache.pivot.wtk.skin.terra
Class TerraScrollBarSkin
java.lang.Object
org.apache.pivot.wtk.skin.ComponentSkin
org.apache.pivot.wtk.skin.ContainerSkin
org.apache.pivot.wtk.skin.terra.TerraScrollBarSkin
- All Implemented Interfaces:
- org.apache.pivot.wtk.ComponentKeyListener, org.apache.pivot.wtk.ComponentListener, org.apache.pivot.wtk.ComponentMouseButtonListener, org.apache.pivot.wtk.ComponentMouseListener, org.apache.pivot.wtk.ComponentMouseWheelListener, org.apache.pivot.wtk.ComponentStateListener, org.apache.pivot.wtk.ComponentTooltipListener, org.apache.pivot.wtk.ConstrainedVisual, org.apache.pivot.wtk.ContainerListener, org.apache.pivot.wtk.ContainerMouseListener, org.apache.pivot.wtk.ScrollBarListener, org.apache.pivot.wtk.ScrollBarValueListener, org.apache.pivot.wtk.Skin, org.apache.pivot.wtk.Visual
public class TerraScrollBarSkin
- extends org.apache.pivot.wtk.skin.ContainerSkin
- implements org.apache.pivot.wtk.ScrollBarListener, org.apache.pivot.wtk.ScrollBarValueListener
Scroll bar skin.
| Nested classes/interfaces inherited from class org.apache.pivot.wtk.skin.ContainerSkin |
org.apache.pivot.wtk.skin.ContainerSkin.IndexFocusTraversalPolicy |
| Nested classes/interfaces inherited from interface org.apache.pivot.wtk.ScrollBarListener |
org.apache.pivot.wtk.ScrollBarListener.Adapter |
| Nested classes/interfaces inherited from interface org.apache.pivot.wtk.ContainerListener |
org.apache.pivot.wtk.ContainerListener.Adapter |
| Nested classes/interfaces inherited from interface org.apache.pivot.wtk.ContainerMouseListener |
org.apache.pivot.wtk.ContainerMouseListener.Adapter |
| Nested classes/interfaces inherited from interface org.apache.pivot.wtk.ComponentListener |
org.apache.pivot.wtk.ComponentListener.Adapter |
| Nested classes/interfaces inherited from interface org.apache.pivot.wtk.ComponentStateListener |
org.apache.pivot.wtk.ComponentStateListener.Adapter |
| Nested classes/interfaces inherited from interface org.apache.pivot.wtk.ComponentMouseListener |
org.apache.pivot.wtk.ComponentMouseListener.Adapter |
| Nested classes/interfaces inherited from interface org.apache.pivot.wtk.ComponentMouseButtonListener |
org.apache.pivot.wtk.ComponentMouseButtonListener.Adapter |
| Nested classes/interfaces inherited from interface org.apache.pivot.wtk.ComponentKeyListener |
org.apache.pivot.wtk.ComponentKeyListener.Adapter |
|
Method Summary |
void |
blockIncrementChanged(org.apache.pivot.wtk.ScrollBar scrollBar,
int previousBlockIncrement)
|
void |
enabledChanged(org.apache.pivot.wtk.Component component)
Propagates the scroll bar's enabled state to the scroll buttons. |
Color |
getBorderColor()
|
int |
getMinimumHandleLength()
|
int |
getPreferredHeight(int width)
|
org.apache.pivot.wtk.Dimensions |
getPreferredSize()
|
int |
getPreferredWidth(int height)
|
Color |
getScrollButtonBackgroundColor()
|
Color |
getScrollButtonDisabledBackgroundColor()
|
Color |
getScrollButtonHighlightedBackgroundColor()
|
Color |
getScrollButtonImageColor()
|
Color |
getScrollButtonPressedBackgroundColor()
|
void |
install(org.apache.pivot.wtk.Component component)
|
void |
layout()
|
boolean |
mouseDown(org.apache.pivot.wtk.Component component,
org.apache.pivot.wtk.Mouse.Button button,
int x,
int y)
Initiates automatic block scrolling. |
void |
mouseOut(org.apache.pivot.wtk.Component component)
|
boolean |
mouseUp(org.apache.pivot.wtk.Component component,
org.apache.pivot.wtk.Mouse.Button button,
int x,
int y)
Cancels automatic block scrolling. |
boolean |
mouseWheel(org.apache.pivot.wtk.Component component,
org.apache.pivot.wtk.Mouse.ScrollType scrollType,
int scrollAmount,
int wheelRotation,
int x,
int y)
Updates the scroll bar's value. |
void |
orientationChanged(org.apache.pivot.wtk.ScrollBar scrollBar,
org.apache.pivot.wtk.Orientation previousOrientation)
|
void |
paint(Graphics2D graphics)
|
void |
scopeChanged(org.apache.pivot.wtk.ScrollBar scrollBar,
int previousStart,
int previousEnd,
int previousExtent)
|
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(org.apache.pivot.wtk.ScrollBar scrollBar,
int previousUnitIncrement)
|
void |
valueChanged(org.apache.pivot.wtk.ScrollBar scrollBar,
int previousValue)
|
| 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 |
TerraScrollBarSkin
public TerraScrollBarSkin()
install
public void install(org.apache.pivot.wtk.Component component)
- Specified by:
install in interface org.apache.pivot.wtk.Skin- Overrides:
install in class org.apache.pivot.wtk.skin.ContainerSkin
getPreferredWidth
public int getPreferredWidth(int height)
- Specified by:
getPreferredWidth in interface org.apache.pivot.wtk.ConstrainedVisual- Overrides:
getPreferredWidth in class org.apache.pivot.wtk.skin.ContainerSkin
getPreferredHeight
public int getPreferredHeight(int width)
- Specified by:
getPreferredHeight in interface org.apache.pivot.wtk.ConstrainedVisual- Overrides:
getPreferredHeight in class org.apache.pivot.wtk.skin.ContainerSkin
getPreferredSize
public org.apache.pivot.wtk.Dimensions getPreferredSize()
- Specified by:
getPreferredSize in interface org.apache.pivot.wtk.ConstrainedVisual- Overrides:
getPreferredSize in class org.apache.pivot.wtk.skin.ComponentSkin
layout
public void layout()
- Specified by:
layout in interface org.apache.pivot.wtk.Skin
paint
public void paint(Graphics2D graphics)
- Specified by:
paint in interface org.apache.pivot.wtk.Visual- Overrides:
paint in class org.apache.pivot.wtk.skin.ContainerSkin
setBackgroundColor
public final void setBackgroundColor(int backgroundColor)
getMinimumHandleLength
public int getMinimumHandleLength()
setMinimumHandleLength
public void setMinimumHandleLength(int minimumHandleLength)
getBorderColor
public Color getBorderColor()
setBorderColor
public void setBorderColor(Color borderColor)
setBorderColor
public final void setBorderColor(String borderColor)
setBorderColor
public final void setBorderColor(int borderColor)
getScrollButtonImageColor
public Color getScrollButtonImageColor()
setScrollButtonImageColor
public void setScrollButtonImageColor(Color scrollButtonImageColor)
setScrollButtonImageColor
public final void setScrollButtonImageColor(String scrollButtonImageColor)
setScrollButtonImageColor
public final void setScrollButtonImageColor(int scrollButtonImageColor)
getScrollButtonBackgroundColor
public Color getScrollButtonBackgroundColor()
setScrollButtonBackgroundColor
public void setScrollButtonBackgroundColor(Color scrollButtonBackgroundColor)
setScrollButtonBackgroundColor
public final void setScrollButtonBackgroundColor(String scrollButtonBackgroundColor)
setScrollButtonBackgroundColor
public final void setScrollButtonBackgroundColor(int scrollButtonBackgroundColor)
getScrollButtonDisabledBackgroundColor
public Color getScrollButtonDisabledBackgroundColor()
setScrollButtonDisabledBackgroundColor
public void setScrollButtonDisabledBackgroundColor(Color scrollButtonDisabledBackgroundColor)
setScrollButtonDisabledBackgroundColor
public final void setScrollButtonDisabledBackgroundColor(String scrollButtonDisabledBackgroundColor)
setScrollButtonDisabledBackgroundColor
public final void setScrollButtonDisabledBackgroundColor(int scrollButtonDisabledBackgroundColor)
getScrollButtonPressedBackgroundColor
public Color getScrollButtonPressedBackgroundColor()
setScrollButtonPressedBackgroundColor
public void setScrollButtonPressedBackgroundColor(Color scrollButtonPressedBackgroundColor)
setScrollButtonPressedBackgroundColor
public final void setScrollButtonPressedBackgroundColor(String scrollButtonPressedBackgroundColor)
setScrollButtonPressedBackgroundColor
public final void setScrollButtonPressedBackgroundColor(int scrollButtonPressedBackgroundColor)
getScrollButtonHighlightedBackgroundColor
public Color getScrollButtonHighlightedBackgroundColor()
setScrollButtonHighlightedBackgroundColor
public void setScrollButtonHighlightedBackgroundColor(Color scrollButtonHighlightedBackgroundColor)
setScrollButtonHighlightedBackgroundColor
public final void setScrollButtonHighlightedBackgroundColor(String scrollButtonHighlightedBackgroundColor)
setScrollButtonHighlightedBackgroundColor
public final void setScrollButtonHighlightedBackgroundColor(int scrollButtonHighlightedBackgroundColor)
mouseOut
public void mouseOut(org.apache.pivot.wtk.Component component)
- Specified by:
mouseOut in interface org.apache.pivot.wtk.ComponentMouseListener- Overrides:
mouseOut in class org.apache.pivot.wtk.skin.ComponentSkin
mouseDown
public boolean mouseDown(org.apache.pivot.wtk.Component component,
org.apache.pivot.wtk.Mouse.Button button,
int x,
int y)
- Initiates automatic block scrolling. This only happens if the handle is
visible since whether the user clicked before or after the handle
determines the direction of the scrolling.
- Specified by:
mouseDown in interface org.apache.pivot.wtk.ComponentMouseButtonListener- Overrides:
mouseDown in class org.apache.pivot.wtk.skin.ComponentSkin
- Parameters:
component - 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.
mouseUp
public boolean mouseUp(org.apache.pivot.wtk.Component component,
org.apache.pivot.wtk.Mouse.Button button,
int x,
int y)
- Cancels automatic block scrolling.
- Specified by:
mouseUp in interface org.apache.pivot.wtk.ComponentMouseButtonListener- Overrides:
mouseUp in class org.apache.pivot.wtk.skin.ComponentSkin
- Parameters:
component - 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.
mouseWheel
public boolean mouseWheel(org.apache.pivot.wtk.Component component,
org.apache.pivot.wtk.Mouse.ScrollType scrollType,
int scrollAmount,
int wheelRotation,
int x,
int y)
- Updates the scroll bar's value.
- Specified by:
mouseWheel in interface org.apache.pivot.wtk.ComponentMouseWheelListener- Overrides:
mouseWheel in class org.apache.pivot.wtk.skin.ComponentSkin
- Parameters:
component - 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.
enabledChanged
public void enabledChanged(org.apache.pivot.wtk.Component component)
- Propagates the scroll bar's enabled state to the scroll buttons.
- Specified by:
enabledChanged in interface org.apache.pivot.wtk.ComponentStateListener- Overrides:
enabledChanged in class org.apache.pivot.wtk.skin.ComponentSkin
- Parameters:
component - The scroll bar.
orientationChanged
public void orientationChanged(org.apache.pivot.wtk.ScrollBar scrollBar,
org.apache.pivot.wtk.Orientation previousOrientation)
- Specified by:
orientationChanged in interface org.apache.pivot.wtk.ScrollBarListener
scopeChanged
public void scopeChanged(org.apache.pivot.wtk.ScrollBar scrollBar,
int previousStart,
int previousEnd,
int previousExtent)
- Specified by:
scopeChanged in interface org.apache.pivot.wtk.ScrollBarListener
unitIncrementChanged
public void unitIncrementChanged(org.apache.pivot.wtk.ScrollBar scrollBar,
int previousUnitIncrement)
- Specified by:
unitIncrementChanged in interface org.apache.pivot.wtk.ScrollBarListener
blockIncrementChanged
public void blockIncrementChanged(org.apache.pivot.wtk.ScrollBar scrollBar,
int previousBlockIncrement)
- Specified by:
blockIncrementChanged in interface org.apache.pivot.wtk.ScrollBarListener
valueChanged
public void valueChanged(org.apache.pivot.wtk.ScrollBar scrollBar,
int previousValue)
- Specified by:
valueChanged in interface org.apache.pivot.wtk.ScrollBarValueListener