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

java.lang.Object
  extended by fr.esrf.tangoatk.widget.util.jdraw.JDObject
Direct Known Subclasses:
JDLine, JDPolyline, JDRectangular

public abstract class JDObject
extends java.lang.Object

An abstract class for the JDraw graphics objects. This class handle all common properties of JDObject.


Field Summary
static int FILL_STYLE_DOT_PATTERN_1
          Hatch fill style
static int FILL_STYLE_DOT_PATTERN_2
          Hatch fill style
static int FILL_STYLE_DOT_PATTERN_3
          Hatch fill style
static int FILL_STYLE_GRADIENT
          Gradient fill style
static int FILL_STYLE_LARGE_CROSS_HATCH
          Hatch fill style
static int FILL_STYLE_LARGE_LEFT_HATCH
          Hatch fill style
static int FILL_STYLE_LARGE_RIGHT_HATCH
          Hatch fill style
static int FILL_STYLE_NONE
          No filling
static int FILL_STYLE_SMALL_CROSS_HATCH
          Hatch fill style
static int FILL_STYLE_SMALL_LEFT_HATCH
          Hatch fill style
static int FILL_STYLE_SMALL_RIGHT_HATCH
          Hatch fill style
static int FILL_STYLE_SOLID
          Solid fill style
static int LINE_STYLE_DASH
          Dash line style
static int LINE_STYLE_DASH_DOT
          Dash + Dot line style
static int LINE_STYLE_DOT
          Dot line style
static int LINE_STYLE_LONG_DASH
          Long Dash line style
static int LINE_STYLE_SOLID
          Solid line style
static int VALUE_CHANGE_ON_XDRAG_LEFT
          the object value receive the x mouse coordinates when dragged (relative to left of object)
static int VALUE_CHANGE_ON_XDRAG_RIGHT
          the object value receive the x mouse coordinates when dragged (relative to right of object)
static int VALUE_CHANGE_ON_YDRAG_BOTTOM
          the object value receive the y mouse coordinates when dragged (relative to bottom of object)
static int VALUE_CHANGE_ON_YDRAG_TOP
          the object value receive the y mouse coordinates when dragged (relative to top of object)
static int VALUE_INC_ON_CLICK
          the object value is incremented (+1) on click
static int VALUE_INC_ON_PRESSRELEASE
          the object value is incremented (+1) on mousePressed or mouseReleased
 
Constructor Summary
JDObject()
           
 
Method Summary
 void addExtension(java.lang.String name)
          Add an extension to this object.
 void addMouseListener(JDMouseListener l)
          Adds the specified mouse listener to this object.
 void addValueListener(JDValueListener l)
          Adds the specified value listener to this object.
 void centerOrigin()
          Center the origin.
 void clearMouseListener()
          Remove all mouse listener belonging to this object.
 void clearValueListener()
          Remove all value listener belonging to this object.
abstract  JDObject copy(int x, int y)
          Returns a copy of this object at the specified location.
 java.awt.Color getBackground()
          Returns the current background color of this object.
 JDValueProgram getBackgroundMapper()
          Returns the current value program for background color of this object.
 java.awt.Rectangle getBoundRect()
          Gets the bounding rectangle of this object.
 java.lang.String getExtendedParam(int extIdx)
          Returns the value of the specified extended param, an empty string if not found.
 java.lang.String getExtendedParam(java.lang.String name)
          Returns the value of the specified extended param, an empty string if not found.
 java.lang.String getExtendedParamDesc(java.lang.String extName)
          Returns the description of the specified extension.
 int getExtendedParamIndex(java.lang.String name)
          Returns the index of the specified extended param , -1 when not found
 java.lang.String getExtendedParamName(int extIdx)
          Returns the name of the extended param at the specified index.
 int getExtendedParamNumber()
          Returns the number of extensions
 int getFillStyle()
          Returns the current fill style of this object.
 java.awt.Color getForeground()
          Returns the current foreground color of this object.
 JDValueProgram getForegroundMapper()
          Returns the current value program for foreground color of this object.
 JDValueProgram getHTranslationMapper()
          Returns the current value program for horizontal translation of this object.
 int getInitValue()
          Returns the init value of this object.
 JDValueProgram getInvertShadowMapper()
          Returns the current value program for invert shadow of this object.
 int getLineStyle()
          Returns the current line style of this object.
 int getLineWidth()
          Returns the current line width of this object.
 int getMaxValue()
          Returns the maximum value of this object.
 int getMinValue()
          Returns the minimum value of this object.
 java.lang.String getName()
          Returns the current name of this object.
 void getObjectsByName(java.util.Vector result, java.lang.String name, boolean recurseGroup)
          Returns all objects having the given name.
 java.awt.geom.Point2D.Double getOrigin()
          Returns the current origin.
 int getShadowWidth()
          Returns the current shadow thickness.
 java.awt.geom.Point2D.Double getSummit(int id)
          Returns the summit at the specified position.
 int getSummitNumber()
          Returns the summit number of this object.
 int getValue()
          Returns the value of this object.
 int getValueChangeMode()
          Returns the value change mode of this object for user interaction.
 JDValueProgram getVisibilityMapper()
          Returns the current value program for visibility of this object.
 JDValueProgram getVTranslationMapper()
          Returns the current value program for vertical translation of this object.
 boolean hasBackgroundMapper()
          Determines whether this object has a value program for background color.
 boolean hasExtendedParam(java.lang.String name)
          returns true if the specified extended param exists , false otherwise
 boolean hasForegroundMapper()
          Determines whether this object has a value program for foreground color.
 boolean hasHTranslationMapper()
          Determines whether this object has a value program for horizontal translation.
 boolean hasInverseShadow()
          Determines whether this object has inverse shadow.
 boolean hasInvertShadowMapper()
          Determines whether this object has a value program for invert shadow.
 boolean hasShadow()
          Returns true only if this object is shadowed.
 boolean hasVisibilityMapper()
          Determines whether this object has a value program for visibility.
 boolean hasVTranslationMapper()
          Determines whether this object has a value program for vertical translation.
 boolean isAntiAliased()
          Determines wheter this object is anti aliased.
 boolean isFixedExtendedParam(java.lang.String name)
          returns true if this parameters is fixed and cannot be removed.
 boolean isInsideObject(int x, int y)
          Determines whether the specified point is inside this object.
 boolean isInteractive()
          Determines whether this object is interactive.
 boolean isProgrammed()
          Determines whether this object has a programmed behavior.
 boolean isVisible()
          Determines whether this object is visible.
abstract  void moveSummit(int id, double x, double y)
          Moves the specifed summit to the specified position.
 void moveSummitH(int id, double x)
          Moves horizontaly the specifed summit to the specified position.
 void moveSummitV(int id, double y)
          Moves verticaly the specifed summit to the specified position.
abstract  void paint(JDrawEditor parent, java.awt.Graphics g)
          Paints this object.
 void preRefresh()
          Prepare this object to be repainted.
 void refresh()
          Refresh the JDObject on the screen by repainting its bounding rectangle.
 void removeExtension(int extIdx)
          Remove the extended param at the specified index.
 void removeMouseListener(JDMouseListener l)
          Remove the specified mouse listener from this object.
 void removeValueListener(JDValueListener l)
          Remove the specified value listener from this object.
 void restoreTransform()
          Restore original shape previously backuped by saveTransform
 void rotate90(double x, double y)
          Rotate the object by 90deg.
 void saveTransform()
          Backup the shape.
 void scale(double x, double y, double rx, double ry)
          Scale this object.
 void scaleTranslate(double scaleX, double scaleY, double ratioX, double ratioY, double transX, double transY)
          Scale, then translate this object.
 void setAntiAlias(boolean aliasing)
          Enables or disables the anti aliasing for this object.
 void setBackground(java.awt.Color c)
          Sets the background color (usualy fill color) of this object.
 void setBackgroundMapper(JDValueProgram m)
          Sets the value program for background color of this object.
 void setExtendedParam(int extIdx, java.lang.String value)
          Sets the extended param value.
 void setExtendedParam(java.lang.String name, java.lang.String value)
          Sets the extended param value.
 void setExtensionList(java.lang.String[] names)
          Sets the list of extended parameter name for this object.
 void setFillStyle(int style)
          Sets the fill style of this object.
 void setForeground(java.awt.Color c)
          Sets the foreground color (usualy line color) of this object.
 void setForegroundMapper(JDValueProgram m)
          Sets the value program for foreground color of this object.
 void setGradientFillParam(float x1, float y1, java.awt.Color color1, float x2, float y2, java.awt.Color color2, boolean cyclic)
          Sets the gradient of this object.
 void setHTranslationMapper(JDValueProgram m)
          Sets the value program for horizontal translation of this object.
 void setInitValue(int i)
          Sets the init value of this object.
 void setInteractive(boolean b)
          Enables or disabled the interactivity.
 void setInverseShadow(boolean b)
          Sets inverse shadow for this object.
 void setInvertShadowMapper(JDValueProgram m)
          Sets the value program for invert shadow of this object.
 void setLineStyle(int style)
          Sets the line style.
 void setLineWidth(int width)
          Sets the line width of this object.
 void setMaxValue(int max)
          Sets the max value of this object.
 void setMinValue(int min)
          Sets the minimum value of this object.
 void setName(java.lang.String s)
          Sets the name of this object.
 void setOrigin(java.awt.geom.Point2D.Double p)
          Sets the origin of this object.
 void setShadow(boolean b)
          Enables or disabled shadow for this object.
 void setShadowWidth(int w)
          Sets the shadow thickness of this object.
 void setValue(int v)
          Sets the value of this object and execute the dynamic object program if enabled.
 void setValueChangeMode(int m)
          Sets the value change mode of this object for user interaction.
 void setVisibilityMapper(JDValueProgram m)
          Sets the value program for visibility of this object.
 void setVisible(boolean b)
          Shows or hides this object.
 void setVTranslationMapper(JDValueProgram m)
          Sets the value program for vertical translation of this object.
 java.lang.String toString()
           
 void translate(double x, double y)
          Translate this object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

LINE_STYLE_SOLID

public static final int LINE_STYLE_SOLID
Solid line style

See Also:
Constant Field Values

LINE_STYLE_DOT

public static final int LINE_STYLE_DOT
Dot line style

See Also:
Constant Field Values

LINE_STYLE_DASH

public static final int LINE_STYLE_DASH
Dash line style

See Also:
Constant Field Values

LINE_STYLE_LONG_DASH

public static final int LINE_STYLE_LONG_DASH
Long Dash line style

See Also:
Constant Field Values

LINE_STYLE_DASH_DOT

public static final int LINE_STYLE_DASH_DOT
Dash + Dot line style

See Also:
Constant Field Values

FILL_STYLE_NONE

public static final int FILL_STYLE_NONE
No filling

See Also:
Constant Field Values

FILL_STYLE_SOLID

public static final int FILL_STYLE_SOLID
Solid fill style

See Also:
Constant Field Values

FILL_STYLE_LARGE_RIGHT_HATCH

public static final int FILL_STYLE_LARGE_RIGHT_HATCH
Hatch fill style

See Also:
Constant Field Values

FILL_STYLE_LARGE_LEFT_HATCH

public static final int FILL_STYLE_LARGE_LEFT_HATCH
Hatch fill style

See Also:
Constant Field Values

FILL_STYLE_LARGE_CROSS_HATCH

public static final int FILL_STYLE_LARGE_CROSS_HATCH
Hatch fill style

See Also:
Constant Field Values

FILL_STYLE_SMALL_RIGHT_HATCH

public static final int FILL_STYLE_SMALL_RIGHT_HATCH
Hatch fill style

See Also:
Constant Field Values

FILL_STYLE_SMALL_LEFT_HATCH

public static final int FILL_STYLE_SMALL_LEFT_HATCH
Hatch fill style

See Also:
Constant Field Values

FILL_STYLE_SMALL_CROSS_HATCH

public static final int FILL_STYLE_SMALL_CROSS_HATCH
Hatch fill style

See Also:
Constant Field Values

FILL_STYLE_DOT_PATTERN_1

public static final int FILL_STYLE_DOT_PATTERN_1
Hatch fill style

See Also:
Constant Field Values

FILL_STYLE_DOT_PATTERN_2

public static final int FILL_STYLE_DOT_PATTERN_2
Hatch fill style

See Also:
Constant Field Values

FILL_STYLE_DOT_PATTERN_3

public static final int FILL_STYLE_DOT_PATTERN_3
Hatch fill style

See Also:
Constant Field Values

FILL_STYLE_GRADIENT

public static final int FILL_STYLE_GRADIENT
Gradient fill style

See Also:
Constant Field Values

VALUE_INC_ON_CLICK

public static final int VALUE_INC_ON_CLICK
the object value is incremented (+1) on click

See Also:
Constant Field Values

VALUE_INC_ON_PRESSRELEASE

public static final int VALUE_INC_ON_PRESSRELEASE
the object value is incremented (+1) on mousePressed or mouseReleased

See Also:
Constant Field Values

VALUE_CHANGE_ON_XDRAG_LEFT

public static final int VALUE_CHANGE_ON_XDRAG_LEFT
the object value receive the x mouse coordinates when dragged (relative to left of object)

See Also:
Constant Field Values

VALUE_CHANGE_ON_XDRAG_RIGHT

public static final int VALUE_CHANGE_ON_XDRAG_RIGHT
the object value receive the x mouse coordinates when dragged (relative to right of object)

See Also:
Constant Field Values

VALUE_CHANGE_ON_YDRAG_TOP

public static final int VALUE_CHANGE_ON_YDRAG_TOP
the object value receive the y mouse coordinates when dragged (relative to top of object)

See Also:
Constant Field Values

VALUE_CHANGE_ON_YDRAG_BOTTOM

public static final int VALUE_CHANGE_ON_YDRAG_BOTTOM
the object value receive the y mouse coordinates when dragged (relative to bottom of object)

See Also:
Constant Field Values
Constructor Detail

JDObject

public JDObject()
Method Detail

getValue

public int getValue()
Returns the value of this object.

See Also:
setValue(int)

setValue

public void setValue(int v)
Sets the value of this object and execute the dynamic object program if enabled. If this object is a JDGroup, the specified value is spread all over children of this group.

Parameters:
v - New value

addValueListener

public void addValueListener(JDValueListener l)
Adds the specified value listener to this object.

Parameters:
l - Value listener

addMouseListener

public void addMouseListener(JDMouseListener l)
Adds the specified mouse listener to this object.

Parameters:
l - JDMouseListener

removeValueListener

public void removeValueListener(JDValueListener l)
Remove the specified value listener from this object.

Parameters:
l - Listener to be removed.

removeMouseListener

public void removeMouseListener(JDMouseListener l)
Remove the specified mouse listener from this object.

Parameters:
l - Listener to be removed.

clearValueListener

public void clearValueListener()
Remove all value listener belonging to this object.


clearMouseListener

public void clearMouseListener()
Remove all mouse listener belonging to this object.


paint

public abstract void paint(JDrawEditor parent,
                           java.awt.Graphics g)
Paints this object.

Parameters:
parent - JdrawEditor parent (Can be null except for JDSwingObject)
g - the specified Graphics window

getObjectsByName

public void getObjectsByName(java.util.Vector result,
                             java.lang.String name,
                             boolean recurseGroup)
Returns all objects having the given name.

Parameters:
result - Result vector (must be constructed by the caller)
name - JDObject name (Case sensitive)
recurseGroup - true to perform a deep search whithin group, false otherwise.
See Also:
JDrawEditor.getObjectsByName(java.lang.String, boolean)

getBoundRect

public java.awt.Rectangle getBoundRect()
Gets the bounding rectangle of this object.


isInsideObject

public boolean isInsideObject(int x,
                              int y)
Determines whether the specified point is inside this object.

Parameters:
x - X coordinate (pixel)
y - Y coordinate (pixel)

getSummitNumber

public int getSummitNumber()
Returns the summit number of this object.


getSummit

public java.awt.geom.Point2D.Double getSummit(int id)
Returns the summit at the specified position. Do not use this to change summit coordinates, Use moveSummit() instead.

Parameters:
id - Summit index
See Also:
getSummitNumber(), moveSummit(int, double, double), moveSummitH(int, double), moveSummitV(int, double)

moveSummit

public abstract void moveSummit(int id,
                                double x,
                                double y)
Moves the specifed summit to the specified position. When using moveSummit() to animate objects, A call to refresh() of this object may be needed.

Parameters:
id - Summit index
x - Absolute X position
y - Absolute Y position
See Also:
refresh()

moveSummitH

public void moveSummitH(int id,
                        double x)
Moves horizontaly the specifed summit to the specified position. When using moveSummit() to animate objects, A call to refresh() of this object may be needed.

Parameters:
id - Summit index
x - Absolute X position
See Also:
refresh(), moveSummit(int, double, double), moveSummitV(int, double)

moveSummitV

public void moveSummitV(int id,
                        double y)
Moves verticaly the specifed summit to the specified position. When using moveSummit() to animate objects, A call to refresh() of this object may be needed.

Parameters:
id - Summit index
y - Absolute Y position
See Also:
refresh(), moveSummit(int, double, double), moveSummitH(int, double)

copy

public abstract JDObject copy(int x,
                              int y)
Returns a copy of this object at the specified location.

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

translate

public void translate(double x,
                      double y)
Translate this object. A call to refresh() is needed after translation.

Parameters:
x - H translation
y - V translation
See Also:
restoreTransform(), saveTransform(), refresh()

scaleTranslate

public void scaleTranslate(double scaleX,
                           double scaleY,
                           double ratioX,
                           double ratioY,
                           double transX,
                           double transY)
Scale, then translate this object. A call to refresh() is needed after transformation.

Parameters:
scaleX - Scaling origin
scaleY - Scaling origin
ratioX - H scaling ratio
ratioY - V scaling ration
transX - H translation
transY - V translation
See Also:
restoreTransform(), saveTransform(), refresh()

scale

public void scale(double x,
                  double y,
                  double rx,
                  double ry)
Scale this object. A call to refresh() is needed after transformation.

Parameters:
x - Scaling origin
y - Scaling origin
rx - H scaling ratio
ry - V scaling ration
See Also:
restoreTransform(), saveTransform(), refresh()

rotate90

public void rotate90(double x,
                     double y)
Rotate the object by 90deg. A call to refresh() is needed after transformation.

Parameters:
x - Rotation center horizontal pos
y - Rotation center vertical pos
See Also:
refresh()

restoreTransform

public void restoreTransform()
Restore original shape previously backuped by saveTransform

See Also:
saveTransform()

saveTransform

public void saveTransform()
Backup the shape. This can be usefull when making scaling animation, after multiple scale the rounding may result in deformed shape. To avoid this you can use saveTransform() and restoreTransform(). Note: This is done once when JDrawEditor.loadFile() is called().

See Also:
restoreTransform()

setVisible

public void setVisible(boolean b)
Shows or hides this object.

Parameters:
b - True to show, false otherwise.

isVisible

public boolean isVisible()
Determines whether this object is visible.


setName

public void setName(java.lang.String s)
Sets the name of this object.

Parameters:
s - Object name

getName

public java.lang.String getName()
Returns the current name of this object.


setBackground

public void setBackground(java.awt.Color c)
Sets the background color (usualy fill color) of this object.

Parameters:
c - Background color

getBackground

public java.awt.Color getBackground()
Returns the current background color of this object.

See Also:
setBackground(java.awt.Color)

setForeground

public void setForeground(java.awt.Color c)
Sets the foreground color (usualy line color) of this object. This color is also used for base shadow color.

Parameters:
c - Foreground color

getForeground

public java.awt.Color getForeground()
Returns the current foreground color of this object.

See Also:
setForeground(java.awt.Color)

setOrigin

public void setOrigin(java.awt.geom.Point2D.Double p)
Sets the origin of this object.

Parameters:
p - Origin point.

centerOrigin

public void centerOrigin()
Center the origin.


getOrigin

public java.awt.geom.Point2D.Double getOrigin()
Returns the current origin.


toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

setFillStyle

public void setFillStyle(int style)
Sets the fill style of this object.

Parameters:
style - Fill style
See Also:
FILL_STYLE_NONE, FILL_STYLE_SOLID, FILL_STYLE_LARGE_RIGHT_HATCH, FILL_STYLE_LARGE_LEFT_HATCH, FILL_STYLE_LARGE_CROSS_HATCH, FILL_STYLE_SMALL_RIGHT_HATCH, FILL_STYLE_SMALL_LEFT_HATCH, FILL_STYLE_SMALL_CROSS_HATCH, FILL_STYLE_DOT_PATTERN_1, FILL_STYLE_DOT_PATTERN_2, FILL_STYLE_DOT_PATTERN_3, FILL_STYLE_GRADIENT

getFillStyle

public int getFillStyle()
Returns the current fill style of this object.

See Also:
setFillStyle(int)

setLineStyle

public void setLineStyle(int style)
Sets the line style.

Parameters:
style - Line style
See Also:
LINE_STYLE_SOLID, LINE_STYLE_DOT, LINE_STYLE_DASH, LINE_STYLE_LONG_DASH, LINE_STYLE_DASH_DOT

getLineStyle

public int getLineStyle()
Returns the current line style of this object.

See Also:
setLineStyle(int)

setAntiAlias

public void setAntiAlias(boolean aliasing)
Enables or disables the anti aliasing for this object.

Parameters:
aliasing - True to enable antialiasing, false otherwise

isAntiAliased

public boolean isAntiAliased()
Determines wheter this object is anti aliased.


setLineWidth

public void setLineWidth(int width)
Sets the line width of this object.

Parameters:
width - Line width (pixel)

getLineWidth

public int getLineWidth()
Returns the current line width of this object.


hasShadow

public boolean hasShadow()
Returns true only if this object is shadowed.


setShadow

public void setShadow(boolean b)
Enables or disabled shadow for this object. By default shadow represents a lowered bevel border. To change the shadow orientation, you can call setInverseShadow().

Parameters:
b - Shadow flag.
See Also:
setInverseShadow(boolean)

setShadowWidth

public void setShadowWidth(int w)
Sets the shadow thickness of this object.

Parameters:
w - Shadow thickness.

getShadowWidth

public int getShadowWidth()
Returns the current shadow thickness.

See Also:
setShadowWidth(int)

hasInverseShadow

public boolean hasInverseShadow()
Determines whether this object has inverse shadow.

See Also:
setInverseShadow(boolean)

setInverseShadow

public void setInverseShadow(boolean b)
Sets inverse shadow for this object.

Parameters:
b - Inverse shadow flag.
See Also:
setShadow(boolean)

setMinValue

public void setMinValue(int min)
Sets the minimum value of this object.

Parameters:
min - Min value
See Also:
setInitValue(int), setMaxValue(int), setValue(int)

getMinValue

public int getMinValue()
Returns the minimum value of this object.

See Also:
setMinValue(int)

setMaxValue

public void setMaxValue(int max)
Sets the max value of this object.

Parameters:
max - Max value
See Also:
setInitValue(int), setMinValue(int), setValue(int)

getMaxValue

public int getMaxValue()
Returns the maximum value of this object.

See Also:
setMaxValue(int)

setInitValue

public void setInitValue(int i)
Sets the init value of this object.

Parameters:
i - Initial value object.
See Also:
setMaxValue(int), setMinValue(int), setValue(int)

getInitValue

public int getInitValue()
Returns the init value of this object.

See Also:
setInitValue(int)

isInteractive

public boolean isInteractive()
Determines whether this object is interactive.

See Also:
setInteractive(boolean)

setInteractive

public void setInteractive(boolean b)
Enables or disabled the interactivity. When enabled the object value change with user interaction.

Parameters:
b - Interactive flag.
See Also:
setValueChangeMode(int), setValue(int)

getValueChangeMode

public int getValueChangeMode()
Returns the value change mode of this object for user interaction.

See Also:
setValueChangeMode(int)

setValueChangeMode

public void setValueChangeMode(int m)
Sets the value change mode of this object for user interaction.

Parameters:
m - Interaction mode
See Also:
VALUE_INC_ON_PRESSRELEASE, VALUE_CHANGE_ON_XDRAG_LEFT, VALUE_CHANGE_ON_XDRAG_RIGHT, VALUE_CHANGE_ON_YDRAG_TOP, VALUE_CHANGE_ON_YDRAG_BOTTOM

hasBackgroundMapper

public boolean hasBackgroundMapper()
Determines whether this object has a value program for background color.

See Also:
setBackgroundMapper(fr.esrf.tangoatk.widget.util.jdraw.JDValueProgram)

setBackgroundMapper

public void setBackgroundMapper(JDValueProgram m)
Sets the value program for background color of this object.

Parameters:
m - Value program.
See Also:
isProgrammed()

getBackgroundMapper

public JDValueProgram getBackgroundMapper()
Returns the current value program for background color of this object.


hasForegroundMapper

public boolean hasForegroundMapper()
Determines whether this object has a value program for foreground color.

See Also:
setForegroundMapper(fr.esrf.tangoatk.widget.util.jdraw.JDValueProgram)

setForegroundMapper

public void setForegroundMapper(JDValueProgram m)
Sets the value program for foreground color of this object.

Parameters:
m - Value program.
See Also:
isProgrammed()

getForegroundMapper

public JDValueProgram getForegroundMapper()
Returns the current value program for foreground color of this object.


hasVisibilityMapper

public boolean hasVisibilityMapper()
Determines whether this object has a value program for visibility.

See Also:
setVisibilityMapper(fr.esrf.tangoatk.widget.util.jdraw.JDValueProgram)

setVisibilityMapper

public void setVisibilityMapper(JDValueProgram m)
Sets the value program for visibility of this object.

Parameters:
m - Value program.
See Also:
isProgrammed()

getVisibilityMapper

public JDValueProgram getVisibilityMapper()
Returns the current value program for visibility of this object.


hasInvertShadowMapper

public boolean hasInvertShadowMapper()
Determines whether this object has a value program for invert shadow.

See Also:
setInvertShadowMapper(fr.esrf.tangoatk.widget.util.jdraw.JDValueProgram)

setInvertShadowMapper

public void setInvertShadowMapper(JDValueProgram m)
Sets the value program for invert shadow of this object.

Parameters:
m - Value program.
See Also:
isProgrammed()

getInvertShadowMapper

public JDValueProgram getInvertShadowMapper()
Returns the current value program for invert shadow of this object.


hasHTranslationMapper

public boolean hasHTranslationMapper()
Determines whether this object has a value program for horizontal translation.

See Also:
setHTranslationMapper(fr.esrf.tangoatk.widget.util.jdraw.JDValueProgram)

setHTranslationMapper

public void setHTranslationMapper(JDValueProgram m)
Sets the value program for horizontal translation of this object.

Parameters:
m - Value program.
See Also:
isProgrammed()

getHTranslationMapper

public JDValueProgram getHTranslationMapper()
Returns the current value program for horizontal translation of this object.


hasVTranslationMapper

public boolean hasVTranslationMapper()
Determines whether this object has a value program for vertical translation.

See Also:
setVTranslationMapper(fr.esrf.tangoatk.widget.util.jdraw.JDValueProgram)

setVTranslationMapper

public void setVTranslationMapper(JDValueProgram m)
Sets the value program for vertical translation of this object.

Parameters:
m - Value program.
See Also:
isProgrammed()

getVTranslationMapper

public JDValueProgram getVTranslationMapper()
Returns the current value program for vertical translation of this object.


setGradientFillParam

public void setGradientFillParam(float x1,
                                 float y1,
                                 java.awt.Color color1,
                                 float x2,
                                 float y2,
                                 java.awt.Color color2,
                                 boolean cyclic)
Sets the gradient of this object. Has effects only if fill style is FILL_STYLE_GRADIENT.

Parameters:
x1 - x coordinate of the first specified Point in user space
y1 - y coordinate of the first specified Point in user space
color1 - Color at the first specified Point
x2 - x coordinate of the second specified Point in user space
y2 - y coordinate of the second specified Point in user space
color2 - Color at the second specified Point
cyclic - true if the gradient pattern should cycle repeatedly between the two colors; false otherwise
See Also:
setFillStyle(int)

isProgrammed

public boolean isProgrammed()
Determines whether this object has a programmed behavior. If this object is a JDGroup, the function return true if at least one of grouped JDObject is programmed.

See Also:
setValue(int)

refresh

public void refresh()
Refresh the JDObject on the screen by repainting its bounding rectangle. This method shoud be called after a property change.

See Also:
translate(double, double), scaleTranslate(double, double, double, double, double, double), scale(double, double, double, double), moveSummit(int, double, double), preRefresh()

preRefresh

public void preRefresh()
Prepare this object to be repainted. Certain modifications of the object may need to be repainted outside the new bounding rectangle. So before applying modifcations to the object , a call to preRefresh() will memorize the current repaint region then a call to refresh() after mofications will repaint the union of the 2 rectangles.

See Also:
refresh()

setExtensionList

public void setExtensionList(java.lang.String[] names)
Sets the list of extended parameter name for this object. Note: All value are reseted.

Parameters:
names - List of names

addExtension

public void addExtension(java.lang.String name)
Add an extension to this object.

Parameters:
name - Name of the extension.
See Also:
setExtensionList(java.lang.String[])

setExtendedParam

public void setExtendedParam(java.lang.String name,
                             java.lang.String value)
Sets the extended param value.

Parameters:
name - Param name
value - Param value
See Also:
setExtensionList(java.lang.String[])

removeExtension

public void removeExtension(int extIdx)
Remove the extended param at the specified index.

Parameters:
extIdx - Index of the extension.

setExtendedParam

public void setExtendedParam(int extIdx,
                             java.lang.String value)
Sets the extended param value.

Parameters:
extIdx - Index of the extensions.
value - param value
See Also:
setExtensionList(java.lang.String[])

getExtendedParam

public java.lang.String getExtendedParam(java.lang.String name)
Returns the value of the specified extended param, an empty string if not found.

Parameters:
name - Extension name
Returns:
param value
See Also:
setExtensionList(java.lang.String[])

getExtendedParam

public java.lang.String getExtendedParam(int extIdx)
Returns the value of the specified extended param, an empty string if not found.

Parameters:
extIdx - Index of the extension.
Returns:
param value
See Also:
setExtensionList(java.lang.String[])

getExtendedParamName

public java.lang.String getExtendedParamName(int extIdx)
Returns the name of the extended param at the specified index.

Parameters:
extIdx - Index of the extension.
Returns:
param name
See Also:
setExtensionList(java.lang.String[])

getExtendedParamDesc

public java.lang.String getExtendedParamDesc(java.lang.String extName)
Returns the description of the specified extension.

Parameters:
extName - Extension name

getExtendedParamNumber

public int getExtendedParamNumber()
Returns the number of extensions


getExtendedParamIndex

public int getExtendedParamIndex(java.lang.String name)
Returns the index of the specified extended param , -1 when not found


hasExtendedParam

public boolean hasExtendedParam(java.lang.String name)
returns true if the specified extended param exists , false otherwise


isFixedExtendedParam

public boolean isFixedExtendedParam(java.lang.String name)
returns true if this parameters is fixed and cannot be removed.