fr.esrf.tangoatk.widget.util.jdraw
Class JDSlider

java.lang.Object
  extended by fr.esrf.tangoatk.widget.util.jdraw.JDObject
      extended by fr.esrf.tangoatk.widget.util.jdraw.JDRectangular
          extended by fr.esrf.tangoatk.widget.util.jdraw.JDSlider

public class JDSlider
extends JDRectangular

JDraw Slider graphic object.


Field Summary
static int SLIDER_HORIZONTAL_LEFT
          Horizontal bar , min at feft
static int SLIDER_HORIZONTAL_RIGHT
          Horizontal bar , min at right
static int SLIDER_VERTICAL_BOTTOM
          Vertical bar , min at bottom
static int SLIDER_VERTICAL_TOP
          Vertical bar , min at top
 
Fields inherited from class fr.esrf.tangoatk.widget.util.jdraw.JDObject
FILL_STYLE_DOT_PATTERN_1, FILL_STYLE_DOT_PATTERN_2, FILL_STYLE_DOT_PATTERN_3, FILL_STYLE_GRADIENT, FILL_STYLE_LARGE_CROSS_HATCH, FILL_STYLE_LARGE_LEFT_HATCH, FILL_STYLE_LARGE_RIGHT_HATCH, FILL_STYLE_NONE, FILL_STYLE_SMALL_CROSS_HATCH, FILL_STYLE_SMALL_LEFT_HATCH, FILL_STYLE_SMALL_RIGHT_HATCH, FILL_STYLE_SOLID, LINE_STYLE_DASH, LINE_STYLE_DASH_DOT, LINE_STYLE_DOT, LINE_STYLE_LONG_DASH, LINE_STYLE_SOLID, VALUE_CHANGE_ON_XDRAG_LEFT, VALUE_CHANGE_ON_XDRAG_RIGHT, VALUE_CHANGE_ON_YDRAG_BOTTOM, VALUE_CHANGE_ON_YDRAG_TOP, VALUE_INC_ON_CLICK, VALUE_INC_ON_PRESSRELEASE
 
Constructor Summary
JDSlider(java.lang.String objectName, int x, int y, int w, int h)
          Contructs a JDSlider.
 
Method Summary
 JDObject copy(int x, int y)
          Returns a copy of this object at the specified location.
 JDObject getCursor()
          Returns the current cursor object.
 double getMaximum()
          Returns the slider's maximum value.
 double getMinimum()
          Returns the slider's maximum value.
 int getOrientation()
          Returns the current bar orientation.
 double getSliderValue()
          Returns the current slider value.
 boolean isInsideObject(int x, int y)
          Determines whether the specified point is inside this object.
 void paint(JDrawEditor parent, java.awt.Graphics g)
          Paints this object.
 void setCursor(JDObject nCursor)
          Sets the cursor object.
 void setMaximum(double m)
          Sets the slider's maximum value .
 void setMinimum(double m)
          Sets the slider's minimum value .
 void setOrientation(int o)
          Sets the bar orientation.
 void setSliderValue(double v)
          Sets the slider value.
 
Methods inherited from class fr.esrf.tangoatk.widget.util.jdraw.JDRectangular
moveSummit, rotate90
 
Methods inherited from class fr.esrf.tangoatk.widget.util.jdraw.JDObject
addExtension, addMouseListener, addValueListener, centerOrigin, clearMouseListener, clearValueListener, getBackground, getBackgroundMapper, getBoundRect, getExtendedParam, getExtendedParam, getExtendedParamDesc, getExtendedParamIndex, getExtendedParamName, getExtendedParamNumber, getFillStyle, getForeground, getForegroundMapper, getHTranslationMapper, getInitValue, getInvertShadowMapper, getLineStyle, getLineWidth, getMaxValue, getMinValue, getName, getObjectsByName, getOrigin, getShadowWidth, getSummit, getSummitNumber, getValue, getValueChangeMode, getVisibilityMapper, getVTranslationMapper, hasBackgroundMapper, hasExtendedParam, hasForegroundMapper, hasHTranslationMapper, hasInverseShadow, hasInvertShadowMapper, hasShadow, hasVisibilityMapper, hasVTranslationMapper, isAntiAliased, isFixedExtendedParam, isInteractive, isProgrammed, isVisible, moveSummitH, moveSummitV, preRefresh, refresh, removeExtension, removeMouseListener, removeValueListener, restoreTransform, saveTransform, scale, scaleTranslate, setAntiAlias, setBackground, setBackgroundMapper, setExtendedParam, setExtendedParam, setExtensionList, setFillStyle, setForeground, setForegroundMapper, setGradientFillParam, setHTranslationMapper, setInitValue, setInteractive, setInverseShadow, setInvertShadowMapper, setLineStyle, setLineWidth, setMaxValue, setMinValue, setName, setOrigin, setShadow, setShadowWidth, setValue, setValueChangeMode, setVisibilityMapper, setVisible, setVTranslationMapper, toString, translate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

SLIDER_HORIZONTAL_LEFT

public static final int SLIDER_HORIZONTAL_LEFT
Horizontal bar , min at feft

See Also:
Constant Field Values

SLIDER_HORIZONTAL_RIGHT

public static final int SLIDER_HORIZONTAL_RIGHT
Horizontal bar , min at right

See Also:
Constant Field Values

SLIDER_VERTICAL_TOP

public static final int SLIDER_VERTICAL_TOP
Vertical bar , min at top

See Also:
Constant Field Values

SLIDER_VERTICAL_BOTTOM

public static final int SLIDER_VERTICAL_BOTTOM
Vertical bar , min at bottom

See Also:
Constant Field Values
Constructor Detail

JDSlider

public JDSlider(java.lang.String objectName,
                int x,
                int y,
                int w,
                int h)
Contructs a JDSlider.

Parameters:
objectName - Object name
x - Up left corner x coordinate
y - Up left corner y coordinate
w - Rectangle width
h - Rectangle height
Method Detail

copy

public JDObject copy(int x,
                     int y)
Description copied from class: JDObject
Returns a copy of this object at the specified location.

Specified by:
copy in class JDObject
Parameters:
x - Horizontal position of the copied object (pixel)
y - Vertical Position of the copied object (pixel)
Returns:
The copy of this object.

isInsideObject

public boolean isInsideObject(int x,
                              int y)
Description copied from class: JDObject
Determines whether the specified point is inside this object.

Overrides:
isInsideObject in class JDObject
Parameters:
x - X coordinate (pixel)
y - Y coordinate (pixel)

paint

public void paint(JDrawEditor parent,
                  java.awt.Graphics g)
Description copied from class: JDObject
Paints this object.

Overrides:
paint in class JDRectangular
Parameters:
parent - JdrawEditor parent (Can be null except for JDSwingObject)
g - the specified Graphics window

setMaximum

public void setMaximum(double m)
Sets the slider's maximum value . It is used to handle the bar position calculation.

Parameters:
m - Maximum value

getMaximum

public double getMaximum()
Returns the slider's maximum value.

See Also:
setMaximum(double)

setMinimum

public void setMinimum(double m)
Sets the slider's minimum value . It is used to handle the slider position calculation.

Parameters:
m - Miniimum value

getMinimum

public double getMinimum()
Returns the slider's maximum value.

See Also:
setMinimum(double)

setSliderValue

public void setSliderValue(double v)
Sets the slider value.

Parameters:
v - slider value.

getSliderValue

public double getSliderValue()
Returns the current slider value.


setOrientation

public void setOrientation(int o)
Sets the bar orientation.

Parameters:
o - Orientation value
See Also:
SLIDER_HORIZONTAL_LEFT, SLIDER_HORIZONTAL_RIGHT, SLIDER_VERTICAL_TOP, SLIDER_VERTICAL_BOTTOM

getOrientation

public int getOrientation()
Returns the current bar orientation.

See Also:
setOrientation(int)

getCursor

public JDObject getCursor()
Returns the current cursor object.

See Also:
setCursor(fr.esrf.tangoatk.widget.util.jdraw.JDObject)

setCursor

public void setCursor(JDObject nCursor)
Sets the cursor object.

Parameters:
nCursor - Cursor object