public class JDPolyline extends JDObject implements JDRotatable
Here is an example of few JDPolyline:

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 and Description |
|---|
JDPolyline(java.lang.String objectName,
java.awt.Point[] p)
Contructs a polyline.
|
| Modifier and Type | Method and Description |
|---|---|
void |
connect(JDPolyline pline)
Connects this polyline to an other polyline.
|
JDObject |
copy(int x,
int y)
Returns a copy of this object at the specified location.
|
int |
getStep()
Returns the polyline interpolation step.
|
void |
invertSummitOrder()
Invert control point order.
|
boolean |
isClosed()
Determines whether this polyline is closed.
|
boolean |
isInsideObject(int x,
int y)
Determines whether the specified point is inside this object.
|
void |
moveSummit(int id,
double x,
double y)
Moves the specifed summit to the specified position.
|
void |
paint(JDrawEditor parent,
java.awt.Graphics g)
Paints this object.
|
void |
rotate(double angle,
double xCenter,
double yCenter)
Rotates this object.
|
void |
setClosed(boolean b)
Close or Open the polyline.
|
void |
setStartingPoint(int idx)
Rotate control points to make idx as stating point (index 0).
|
void |
setStep(int s)
Sets the polyline interpolation step.
|
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, translatepublic JDPolyline(java.lang.String objectName,
java.awt.Point[] p)
objectName - Polyline namep - Array of control point.public JDObject copy(int x, int y)
JDObjectpublic void paint(JDrawEditor parent, java.awt.Graphics g)
JDObjectpublic void moveSummit(int id,
double x,
double y)
JDObjectmoveSummit in class JDObjectid - Summit indexx - Absolute X positiony - Absolute Y positionJDObject.refresh()public boolean isInsideObject(int x,
int y)
JDObjectisInsideObject in class JDObjectx - X coordinate (pixel)y - Y coordinate (pixel)public void rotate(double angle,
double xCenter,
double yCenter)
JDRotatablerotate in interface JDRotatableangle - Angle valuexCenter - Rotation center vertical posyCenter - Rotation center horizontal pospublic boolean isClosed()
setClosed(boolean)public void setClosed(boolean b)
b - True to close, false otherwise.public int getStep()
setStep(int)public void setStep(int s)
s - Interpolation step (must be >=1).public void setStartingPoint(int idx)
idx - Point index to be moved to the starting point.public void connect(JDPolyline pline)
pline - Polyline to be concatened.public void invertSummitOrder()