Class JDEllipse
java.lang.Object
fr.esrf.tangoatk.widget.util.jdraw.JDObject
fr.esrf.tangoatk.widget.util.jdraw.JDRectangular
fr.esrf.tangoatk.widget.util.jdraw.JDEllipse
JDraw Ellipse graphic object.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intClosed arcstatic final intOpened arcstatic final intPie arcFields 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
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncopy(int x, int y) Returns a copy of this object at the specified location.intintintintgetStep()booleanisInsideObject(int x, int y) voidpaint(JDrawEditor parent, Graphics g) Paints this object.voidRestore original shape previously backuped by saveTransformvoidrotate90(double x, double y) Rotate the object by 90deg.voidBackup the shape.voidsetAngleExtent(int a) Sets the arc angle extent.voidsetAngleStart(int a) Sets the starting angle of the arc.voidsetArcType(int type) Sets the arc type for this ellipse.voidsetStep(int s) Sets the interpolation step of this ellispe.Methods inherited from class fr.esrf.tangoatk.widget.util.jdraw.JDRectangular
getBottom, getHeight, getLeft, getRight, getTop, getWidth, moveSummit, setBottom, setHeight, setLeft, setRight, setTop, setWidthMethods 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, isDisabled, isFixedExtendedParam, isInteractive, isProgrammed, isVisible, moveSummitH, moveSummitV, preRefresh, refresh, removeExtension, removeMouseListener, removeValueListener, scale, scaleTranslate, setAntiAlias, setBackground, setBackgroundMapper, setDisabled, 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
-
Field Details
-
ARC_OPEN
public static final int ARC_OPENOpened arc- See Also:
-
ARC_CLOSED
public static final int ARC_CLOSEDClosed arc- See Also:
-
ARC_PIE
public static final int ARC_PIEPie arc- See Also:
-
-
Constructor Details
-
JDEllipse
Construct a JDEllipse.- Parameters:
objectName- Object namex- Up left corner x coordinatey- Up left corner y coordinatew- Ellipse widthh- Ellipse height
-
-
Method Details
-
copy
Description copied from class:JDObjectReturns a copy of this object at the specified location. -
isInsideObject
public boolean isInsideObject(int x, int y) - Overrides:
isInsideObjectin classJDObject- Parameters:
x- X coordinate (pixel)y- Y coordinate (pixel)- Returns:
- whether the specified point is inside this object.
-
convertToPolyline
-
rotate90
public void rotate90(double x, double y) Description copied from class:JDObjectRotate the object by 90deg. A call to refresh() is needed after transformation.- Overrides:
rotate90in classJDRectangular- Parameters:
x- Rotation center horizontal posy- Rotation center vertical pos- See Also:
-
restoreTransform
public void restoreTransform()Description copied from class:JDObjectRestore original shape previously backuped by saveTransform- Overrides:
restoreTransformin classJDObject- See Also:
-
saveTransform
public void saveTransform()Description copied from class:JDObjectBackup 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().- Overrides:
saveTransformin classJDObject- See Also:
-
setStep
public void setStep(int s) Sets the interpolation step of this ellispe.- Parameters:
s- Interpolation step (Default is 10)
-
getStep
public int getStep()- Returns:
- the interpolation step.
- See Also:
-
setArcType
public void setArcType(int type) Sets the arc type for this ellipse.- Parameters:
type- Arc type- See Also:
-
getArcType
public int getArcType()- Returns:
- the current arc type.
- See Also:
-
setAngleStart
public void setAngleStart(int a) Sets the starting angle of the arc.- Parameters:
a- Angle in degrees.
-
getAngleStart
public int getAngleStart()- Returns:
- the starting angle of the arc.
- See Also:
-
setAngleExtent
public void setAngleExtent(int a) Sets the arc angle extent.- Parameters:
a- Angle extent in degrees.
-
getAngleExtent
public int getAngleExtent()- Returns:
- the arc angle extent.
- See Also:
-
paint
Description copied from class:JDObjectPaints this object.- Overrides:
paintin classJDRectangular- Parameters:
parent- JdrawEditor parent (Can be null except for JDSwingObject)g- the specified Graphics window
-