Class JDLine
java.lang.Object
fr.esrf.tangoatk.widget.util.jdraw.JDObject
fr.esrf.tangoatk.widget.util.jdraw.JDLine
- All Implemented Interfaces:
JDRotatable
JDraw Line graphic object.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intNo arrow.static final intLeft and right arrow type 1.static final intcenter arrow type 1.static final intLeft arrow type 1.static final intright arrow type 1.static final intLeft and right arrow type 2.static final intcenter arrow type 2.static final intLeft arrow type 2.static final intright arrow type 2.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
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncopy(int x, int y) Returns a copy of this object at the specified location.intgetArrow()intbooleanbooleanisInsideObject(int x, int y) voidmoveSummit(int id, double x, double y) Moves the specifed summit to the specified position.voidpaint(JDrawEditor parent, Graphics g) Paints this object.voidrotate(double angle, double xCenter, double yCenter) Rotates this object.voidsetArrow(int arrow) Sets the arrow for this line.voidsetArrowSize(int s) Sets the arrow size.voidsetLineWidth(int width) Sets the line width of this object.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, isDisabled, isFixedExtendedParam, isInteractive, isProgrammed, isVisible, moveSummitH, moveSummitV, preRefresh, refresh, removeExtension, removeMouseListener, removeValueListener, restoreTransform, rotate90, saveTransform, scale, scaleTranslate, setAntiAlias, setBackground, setBackgroundMapper, setDisabled, setExtendedParam, setExtendedParam, setExtensionList, setFillStyle, setForeground, setForegroundMapper, setGradientFillParam, setHTranslationMapper, setInitValue, setInteractive, setInverseShadow, setInvertShadowMapper, setLineStyle, setMaxValue, setMinValue, setName, setOrigin, setShadow, setShadowWidth, setValue, setValueChangeMode, setVisibilityMapper, setVisible, setVTranslationMapper, toString, translate
-
Field Details
-
ARROW_NONE
public static final int ARROW_NONENo arrow.- See Also:
-
ARROW1_LEFT
public static final int ARROW1_LEFTLeft arrow type 1.- See Also:
-
ARROW1_RIGHT
public static final int ARROW1_RIGHTright arrow type 1.- See Also:
-
ARROW1_BOTH
public static final int ARROW1_BOTHLeft and right arrow type 1.- See Also:
-
ARROW1_CENTER
public static final int ARROW1_CENTERcenter arrow type 1.- See Also:
-
ARROW2_LEFT
public static final int ARROW2_LEFTLeft arrow type 2.- See Also:
-
ARROW2_RIGHT
public static final int ARROW2_RIGHTright arrow type 2.- See Also:
-
ARROW2_BOTH
public static final int ARROW2_BOTHLeft and right arrow type 2.- See Also:
-
ARROW2_CENTER
public static final int ARROW2_CENTERcenter arrow type 2.- See Also:
-
-
Constructor Details
-
JDLine
Construct a JDLine.- Parameters:
objectName- Line namex1- X position First pointy1- Y position First pointx2- X position Second pointy2- Y position Second point
-
-
Method Details
-
copy
Description copied from class:JDObjectReturns a copy of this object at the specified location. -
setArrow
public void setArrow(int arrow) Sets the arrow for this line.- Parameters:
arrow- Arrow mode- See Also:
-
getArrow
public int getArrow()- Returns:
- the current arrow of this line.
- See Also:
-
setArrowSize
public void setArrowSize(int s) Sets the arrow size.- Parameters:
s- Arrow size.
-
getArrowSize
public int getArrowSize()- Returns:
- the current arrow width.
- See Also:
-
paint
Description copied from class:JDObjectPaints this object. -
hasShadow
public boolean hasShadow() -
moveSummit
public void moveSummit(int id, double x, double y) Description copied from class:JDObjectMoves the specifed summit to the specified position. When using moveSummit() to animate objects, A call to refresh() of this object may be needed.- Specified by:
moveSummitin classJDObject- Parameters:
id- Summit indexx- Absolute X positiony- Absolute Y position- See Also:
-
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.
-
setLineWidth
public void setLineWidth(int width) Description copied from class:JDObjectSets the line width of this object.- Overrides:
setLineWidthin classJDObject- Parameters:
width- Line width (pixel)
-
rotate
public void rotate(double angle, double xCenter, double yCenter) Description copied from interface:JDRotatableRotates this object.- Specified by:
rotatein interfaceJDRotatable- Parameters:
angle- Angle valuexCenter- Rotation center vertical posyCenter- Rotation center horizontal pos
-