Class ScaledSliderFigure

    • Field Detail

      • fillColor

        private org.eclipse.swt.graphics.Color fillColor
      • fillBackgroundColor

        private org.eclipse.swt.graphics.Color fillBackgroundColor
      • thumbColor

        private org.eclipse.swt.graphics.Color thumbColor
      • effect3D

        private boolean effect3D
      • horizontal

        private boolean horizontal
      • WHITE_COLOR

        private static final org.eclipse.swt.graphics.Color WHITE_COLOR
      • GRAY_COLOR

        private static final org.eclipse.swt.graphics.Color GRAY_COLOR
      • GREEN_COLOR

        private static final org.eclipse.swt.graphics.Color GREEN_COLOR
      • BLUE_COLOR

        private static final org.eclipse.swt.graphics.Color BLUE_COLOR
      • LABEL_COLOR

        private static final org.eclipse.swt.graphics.Color LABEL_COLOR
      • DISABLED_ALPHA

        private static final int DISABLED_ALPHA
        The alpha (0 is transparency and 255 is opaque) for disabled paint
        See Also:
        Constant Field Values
      • stepIncrement

        private double stepIncrement
      • pageIncrement

        private double pageIncrement
      • drawFocus

        private boolean drawFocus
    • Constructor Detail

      • ScaledSliderFigure

        public ScaledSliderFigure()
    • Method Detail

      • addManualValueChangeListener

        public void addManualValueChangeListener​(IManualValueChangeListener listener)
        Add a slider listener.
        Parameters:
        listener - The slider listener to add.
      • removeManualValueChangeListener

        public void removeManualValueChangeListener​(IManualValueChangeListener listener)
        Remove a manual value change listener.
        Parameters:
        listener - the listner to be removed.
      • calcValueChange

        private double calcValueChange​(org.eclipse.draw2d.geometry.Dimension difference,
                                       double oldValue)
        Convert the difference of two points to the corresponding value to be changed.
        Parameters:
        difference - the difference between two points. difference = endPoint - startPoint
        oldValue - the old value before this change
        Returns:
        the value to be changed
      • fireManualValueChange

        private void fireManualValueChange​(double newManualValue)
        Inform all slider listeners, that the manual value has changed.
        Parameters:
        newManualValue - the new manual value
      • getFillBackgroundColor

        public org.eclipse.swt.graphics.Color getFillBackgroundColor()
        Returns:
        the fillBackgroundColor
      • getFillColor

        public org.eclipse.swt.graphics.Color getFillColor()
        Returns:
        the fillColor
      • getPageIncrement

        public double getPageIncrement()
        Returns:
        the pageIncrement
      • getStepIncrement

        public double getStepIncrement()
        Returns:
        the stepIncrement
      • getThumbColor

        public org.eclipse.swt.graphics.Color getThumbColor()
        Returns:
        the thumbColor
      • isEffect3D

        public boolean isEffect3D()
        Returns:
        the effect3D
      • isHorizontal

        public boolean isHorizontal()
        Returns:
        the horizontal
      • revalidate

        public void revalidate()
        Specified by:
        revalidate in interface org.eclipse.draw2d.IFigure
        Overrides:
        revalidate in class org.eclipse.draw2d.Figure
      • manualSetValue

        public void manualSetValue​(double value)
        Set Value from manual control of the widget. Value will be coerced in range.
        Parameters:
        value -
      • pageDown

        public void pageDown()
      • pageUp

        public void pageUp()
      • setDrawFocus

        public void setDrawFocus​(boolean drawFocus)
        Set the focus rectangle should be drawn on the figure when it has focus.
        Parameters:
        drawFocus - true to draw focus rectangle.
      • isDrawFocus

        public boolean isDrawFocus()
        Get whether the focus rectangle is drawn when figure has focus.
        Returns:
        true if focus rectangle is drawn
      • paintClientArea

        protected void paintClientArea​(org.eclipse.draw2d.Graphics graphics)
        Overrides:
        paintClientArea in class org.eclipse.draw2d.Figure
      • setEffect3D

        public void setEffect3D​(boolean effect3D)
        Parameters:
        effect3D - the effect3D to set
      • setEnabled

        public void setEnabled​(boolean value)
        Specified by:
        setEnabled in interface org.eclipse.draw2d.IFigure
        Overrides:
        setEnabled in class org.eclipse.draw2d.Figure
      • setFillBackgroundColor

        public void setFillBackgroundColor​(org.eclipse.swt.graphics.Color fillBackgroundColor)
        Parameters:
        fillBackgroundColor - the fillBackgroundColor to set
      • setFillColor

        public void setFillColor​(org.eclipse.swt.graphics.Color fillColor)
        Parameters:
        fillColor - the fillColor to set
      • setHorizontal

        public void setHorizontal​(boolean horizontal)
        Parameters:
        horizontal - the horizontal to set
      • setPageIncrement

        public void setPageIncrement​(double pageIncrement)
      • setStepIncrement

        public void setStepIncrement​(double stepIncrement)
        Parameters:
        stepIncrement - the stepIncrement to set
      • setThumbColor

        public void setThumbColor​(org.eclipse.swt.graphics.Color thumbColor)
        Parameters:
        thumbColor - the thumbColor to set
      • stepDown

        public void stepDown()
      • stepUp

        public void stepUp()