pivot.wtk.skin.terra
Class TerraSliderSkin
java.lang.Object
pivot.wtk.skin.ComponentSkin
pivot.wtk.skin.ContainerSkin
pivot.wtk.skin.SliderSkin
pivot.wtk.skin.terra.TerraSliderSkin
- All Implemented Interfaces:
- ComponentKeyListener, ComponentLayoutListener, ComponentListener, ComponentMouseButtonListener, ComponentMouseListener, ComponentMouseWheelListener, ComponentStateListener, ConstrainedVisual, ContainerListener, Skin, SliderListener, SliderValueListener, Visual
public class TerraSliderSkin
- extends SliderSkin
Terra slider skin.
- Author:
- gbrown
Methods inherited from class pivot.wtk.skin.ContainerSkin |
componentInserted, componentsRemoved, contextKeyChanged, focusTraversalPolicyChanged, getBackgroundColor, getBackgroundPaint, isFocusable, isOpaque, setBackgroundColor, setBackgroundColor, setBackgroundPaint, setBackgroundPaint |
Methods inherited from class pivot.wtk.skin.ComponentSkin |
cursorChanged, displayableChanged, enabledChanged, focusedChanged, getComponent, getHeight, getWidth, invalidateComponent, keyPressed, keyReleased, keyTyped, locationChanged, mouseClick, mouseDown, mouseMove, mouseOut, mouseOver, mouseUp, mouseWheel, parentChanged, preferredSizeChanged, repaintComponent, repaintComponent, repaintComponent, repaintComponent, setSize, sizeChanged, styleUpdated, tooltipTextChanged, visibleChanged |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DEFAULT_WIDTH
public static final int DEFAULT_WIDTH
- See Also:
- Constant Field Values
MINIMUM_THUMB_WIDTH
public static final int MINIMUM_THUMB_WIDTH
- See Also:
- Constant Field Values
MINIMUM_THUMB_HEIGHT
public static final int MINIMUM_THUMB_HEIGHT
- See Also:
- Constant Field Values
TerraSliderSkin
public TerraSliderSkin()
install
public void install(Component component)
- Description copied from interface:
Skin
- Associates a skin with a component.
- Specified by:
install
in interface Skin
- Overrides:
install
in class SliderSkin
- Parameters:
component
- The component to which the skin is being attached.
uninstall
public void uninstall()
- Description copied from interface:
Skin
- Dissociates a skin from a component.
- Specified by:
uninstall
in interface Skin
- Overrides:
uninstall
in class SliderSkin
getPreferredWidth
public int getPreferredWidth(int height)
- Description copied from interface:
ConstrainedVisual
- Returns the visual's preferred width given the provided height
constraint.
- Specified by:
getPreferredWidth
in interface ConstrainedVisual
- Overrides:
getPreferredWidth
in class ContainerSkin
- Parameters:
height
- The height by which to constrain the preferred width, or -1
for no constraint.
getPreferredHeight
public int getPreferredHeight(int width)
- Description copied from interface:
ConstrainedVisual
- Returns the visual's preferred height given the provided width
constraint.
- Specified by:
getPreferredHeight
in interface ConstrainedVisual
- Overrides:
getPreferredHeight
in class ContainerSkin
- Parameters:
width
- The width by which to constrain the preferred height, or -1
for no constraint.
getPreferredSize
public Dimensions getPreferredSize()
- Description copied from interface:
ConstrainedVisual
- Returns the visual's unconstrained preferred size.
- Specified by:
getPreferredSize
in interface ConstrainedVisual
- Overrides:
getPreferredSize
in class ComponentSkin
layout
public void layout()
- Description copied from interface:
Skin
- If the component on which the skin is installed is a container, lays
out the container's children.
paint
public void paint(Graphics2D graphics)
- Description copied from interface:
Visual
- Paints the visual.
- Specified by:
paint
in interface Visual
- Overrides:
paint
in class ContainerSkin
- Parameters:
graphics
- The graphics context in which to paint the visual.
getTrackColor
public Color getTrackColor()
setTrackColor
public void setTrackColor(Color trackColor)
setTrackColor
public final void setTrackColor(String trackColor)
getTrackWidth
public int getTrackWidth()
setTrackWidth
public void setTrackWidth(int trackWidth)
setTrackWidth
public void setTrackWidth(Number trackWidth)
getButtonBackgroundColor
public Color getButtonBackgroundColor()
setButtonBackgroundColor
public void setButtonBackgroundColor(Color buttonBackgroundColor)
setButtonBackgroundColor
public final void setButtonBackgroundColor(String buttonBackgroundColor)
getButtonBorderColor
public Color getButtonBorderColor()
setButtonBorderColor
public void setButtonBorderColor(Color buttonBorderColor)
setButtonBorderColor
public final void setButtonBorderColor(String buttonBorderColor)
getThumbWidth
public int getThumbWidth()
setThumbWidth
public void setThumbWidth(int thumbWidth)
setThumbWidth
public void setThumbWidth(Number thumbWidth)
getThumbHeight
public int getThumbHeight()
setThumbHeight
public void setThumbHeight(int thumbHeight)
setThumbHeight
public void setThumbHeight(Number thumbHeight)
valueChanged
public void valueChanged(Slider slider,
int previousValue)
- Description copied from interface:
SliderValueListener
- Called when a slider's value has changed.
- Specified by:
valueChanged
in interface SliderValueListener
- Overrides:
valueChanged
in class SliderSkin