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

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.JDImage

public class JDImage
extends JDRectangular

JDraw Image graphic object. JDraw supports GIF, JPG and PNG format. Alpha mask is supported for PNG image.


Field Summary
 
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
JDImage(java.lang.String objectName, java.lang.String fileName, int x, int y)
          Contruct an image.
 
Method Summary
 JDObject copy(int x, int y)
          Returns a copy of this object at the specified location.
 java.lang.String getFileName()
          Returns current image filename.
 int getImageHeight()
          Returns original image height.
 int getImageWidth()
          Returns original image widht.
 boolean hasShadow()
          Returns false, Image cannot be shadowed.
 void paint(JDrawEditor parent, java.awt.Graphics g)
          Paints this object.
 void resetToOriginalSize()
          Reset the size to its original size.
 void setFileName(java.lang.String fileName)
          Loads a new image into this object.
 
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, hasVisibilityMapper, hasVTranslationMapper, isAntiAliased, isFixedExtendedParam, isInsideObject, 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
 

Constructor Detail

JDImage

public JDImage(java.lang.String objectName,
               java.lang.String fileName,
               int x,
               int y)
Contruct an image.

Parameters:
objectName - Image name
fileName - Image file name.
x - Up left corner x coordinate
y - Up left corner y coordinate
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.

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

hasShadow

public boolean hasShadow()
Returns false, Image cannot be shadowed.

Overrides:
hasShadow in class JDObject

setFileName

public void setFileName(java.lang.String fileName)
Loads a new image into this object.

Parameters:
fileName - Image file name.

getFileName

public java.lang.String getFileName()
Returns current image filename.


resetToOriginalSize

public void resetToOriginalSize()
Reset the size to its original size.


getImageWidth

public int getImageWidth()
Returns original image widht.


getImageHeight

public int getImageHeight()
Returns original image height.