Class TerraSliderSkin

    • Constructor Detail

      • TerraSliderSkin

        public TerraSliderSkin()
    • Method Detail

      • install

        public void install​(Component component)
        Description copied from class: ComponentSkin
        Must be implemented in every subclass in order to do component-specific operations at instantiation time, but every subclass must call this superclass method to setup the necessary listeners, etc.
        Specified by:
        install in interface Skin
        Overrides:
        install in class SliderSkin
        Parameters:
        component - The component to which the skin is being attached.
      • 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.
        Returns:
        The preferred width given the height 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.
        Returns:
        The preferred height given the width constraint.
      • 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​(java.awt.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 java.awt.Color getTrackColor()
      • setTrackColor

        public void setTrackColor​(java.awt.Color trackColorValue)
      • setTrackColor

        public final void setTrackColor​(java.lang.String trackColorString)
      • setTrackColor

        public final void setTrackColor​(int trackColorIndex)
      • getButtonBackgroundColor

        public java.awt.Color getButtonBackgroundColor()
      • setButtonBackgroundColor

        public void setButtonBackgroundColor​(java.awt.Color buttonBackgroundColorValue)
      • setButtonBackgroundColor

        public final void setButtonBackgroundColor​(java.lang.String buttonBackgroundColorString)
      • setButtonBackgroundColor

        public final void setButtonBackgroundColor​(int buttonBackgroundColorIndex)
      • getButtonBorderColor

        public java.awt.Color getButtonBorderColor()
      • setButtonBorderColor

        public void setButtonBorderColor​(java.awt.Color buttonBorderColorValue)
      • setButtonBorderColor

        public final void setButtonBorderColor​(java.lang.String buttonBorderColorString)
      • setButtonBorderColor

        public final void setButtonBorderColor​(int buttonBorderColorIndex)
      • getTrackWidth

        public int getTrackWidth()
      • setTrackWidth

        public void setTrackWidth​(int trackWidthValue)
      • setTrackWidth

        public void setTrackWidth​(java.lang.Number trackWidthValue)
      • getThumbWidth

        public int getThumbWidth()
      • setThumbWidth

        public void setThumbWidth​(int thumbWidthValue)
      • setThumbWidth

        public void setThumbWidth​(java.lang.Number thumbWidthValue)
      • getThumbHeight

        public int getThumbHeight()
      • setThumbHeight

        public void setThumbHeight​(int thumbHeightValue)
      • setThumbHeight

        public void setThumbHeight​(java.lang.Number thumbHeightValue)
      • getTickSpacing

        public int getTickSpacing()
      • setTickSpacing

        public void setTickSpacing​(int tickSpacingValue)
        Set the tick spacing value along the slider axis.
        Parameters:
        tickSpacingValue - An integer number of pixels to use to space out the tick marks along the axis. Less or equal zero implies don't draw tick marks.
      • setTickSpacing

        public void setTickSpacing​(java.lang.Number tickSpacingValue)
      • mouseClick

        public boolean mouseClick​(Component component,
                                  Mouse.Button button,
                                  int x,
                                  int y,
                                  int count)
        Description copied from interface: ComponentMouseButtonListener
        Called when a mouse button is clicked over a component.
        Specified by:
        mouseClick in interface ComponentMouseButtonListener
        Overrides:
        mouseClick in class ComponentSkin
        Parameters:
        component - Component user the mouse pointer.
        button - Which mouse button was clicked.
        x - X position of the mouse.
        y - Y position of the mouse.
        count - Number of clicks (1 = single click, 2 = double click, etc.).
        Returns:
        true to consume the event; false to allow it to propagate (default).
      • rangeChanged

        public void rangeChanged​(Slider slider,
                                 int previousStart,
                                 int previousEnd)
        Description copied from interface: SliderListener
        Called when a slider's range has changed.
        Parameters:
        slider - The slider that has changed.
        previousStart - The previous start of the slider's range.
        previousEnd - The previous end value.
      • orientationChanged

        public void orientationChanged​(Slider slider)
        Description copied from interface: SliderListener
        Called when a sliders's orientation has changed.
        Parameters:
        slider - The source of the event.
      • valueChanged

        public void valueChanged​(Slider slider,
                                 int previousValue)
        Description copied from interface: SliderValueListener
        Called when a slider's value has changed.
        Parameters:
        slider - The slider whose value has changed.
        previousValue - What the previous value was.