Class JDPolyline
java.lang.Object
fr.esrf.tangoatk.widget.util.jdraw.JDObject
fr.esrf.tangoatk.widget.util.jdraw.JDPolyline
- All Implemented Interfaces:
JDRotatable
- Direct Known Subclasses:
JDSpline
JDraw Polyline graphic object.
-
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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidconnect(JDPolyline pline) Connects this polyline to an other polyline.copy(int x, int y) Returns a copy of this object at the specified location.intgetStep()voidInvert control point order.booleanisClosed()booleanisInsideObject(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.voidsetClosed(boolean b) Close or Open the polyline.voidsetStartingPoint(int idx) Rotate control points to make idx as stating point (index 0).voidsetStep(int s) Sets the polyline interpolation step.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, 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, setLineWidth, setMaxValue, setMinValue, setName, setOrigin, setShadow, setShadowWidth, setValue, setValueChangeMode, setVisibilityMapper, setVisible, setVTranslationMapper, toString, translate
-
Constructor Details
-
JDPolyline
Contructs a polyline.- Parameters:
objectName- Polyline namep- Array of control point.
-
-
Method Details
-
copy
Description copied from class:JDObjectReturns a copy of this object at the specified location. -
paint
Description copied from class:JDObjectPaints this object. -
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.
-
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
-
isClosed
public boolean isClosed()- Returns:
- whether this polyline is closed.
- See Also:
-
setClosed
public void setClosed(boolean b) Close or Open the polyline.- Parameters:
b- True to close, false otherwise.
-
getStep
public int getStep()- Returns:
- the polyline interpolation step.
- See Also:
-
setStep
public void setStep(int s) Sets the polyline interpolation step.- Parameters:
s- Interpolation step (must be greater or equal than 1).
-
setStartingPoint
public void setStartingPoint(int idx) Rotate control points to make idx as stating point (index 0).- Parameters:
idx- Point index to be moved to the starting point.
-
connect
Connects this polyline to an other polyline. Points are added to the end of this polyline.- Parameters:
pline- Polyline to be concatened.
-
invertSummitOrder
public void invertSummitOrder()Invert control point order.
-