public class DrawPath extends DrawItem
config, factoryCreated, factoryProperties, id, scClassName
Constructor and Description |
---|
DrawPath() |
DrawPath(JavaScriptObject jsObj) |
Modifier and Type | Method and Description |
---|---|
JavaScriptObject |
create() |
Point |
getCenter()
Get the mean center of the path.
|
KnobType[] |
getKnobs()
DrawPath only supports the
KnobType.MOVE knob type. |
static DrawPath |
getOrCreateRef(JavaScriptObject jsObj) |
Point[] |
getPoints()
Array of Points for the line.
|
void |
moveBy(int dX,
int dY)
Move the points by dX,dY
|
void |
moveFirstPointTo(java.lang.Integer left,
java.lang.Integer top)
Move all points in the path such that the first point ends up at the specified coordinates and the line lengths and
angles are unchanged.
|
void |
resizeBy(int dX,
int dY)
Resize by the specified delta
|
void |
resizeTo(java.lang.Integer width,
java.lang.Integer height)
Resize to the specified size
|
static void |
setDefaultProperties(DrawPath drawPathProperties)
Class level method to set the default properties of this class.
|
void |
setKnobs(KnobType... knobs)
DrawPath only supports the
KnobType.MOVE knob type. |
void |
setPoints(Point... points)
Array of Points for the line.
|
addClickHandler, addDragMoveHandler, addDragResizeMoveHandler, addDragResizeStartHandler, addDragResizeStopHandler, addDragStartHandler, addDragStopHandler, addMouseDownHandler, addMouseMoveHandler, addMouseOutHandler, addMouseOverHandler, addMouseUpHandler, addMovedHandler, addResizedHandler, addShowContextMenuHandler, changeAutoChildDefaults, changeAutoChildDefaults, changeAutoChildDefaults, computeAngle, computeAngleAsDouble, dragResizeMove, draw, erase, getAttributeAsIntArray, getBoundingBox, getBoundingBoxAsDouble, getCanDrag, getCanHover, getCanvasAutoChild, getContextMenu, getCornerResizeKnob, getCursor, getDestroyed, getDestroying, getDragStartDistance, getDrawGroup, getDrawItemAutoChild, getDrawPane, getEditProxyConstructor, getEndArrow, getEndKnob, getEventOpaque, getFillColor, getFillGradient, getFillGradientAsString, getFillOpacity, getFormItemAutoChild, getHoverDelay, getHoverHTML, getKeepInParentRect, getLineCap, getLineColor, getLineOpacity, getLinePattern, getLineWidth, getMoveKnob, getMoveKnobOffset, getMoveKnobPoint, getPageLeft, getPageTop, getPrompt, getProportionalResizeModifiers, getProportionalResizing, getRef, getResizeBoundingBox, getResizeBoundingBoxAsDouble, getResizeKnobPoints, getResizeOutline, getResizeViaLocalTransformOnly, getRotation, getRotationAsDouble, getScale, getShadow, getShowHover, getShowResizeOutline, getSideResizeKnob, getStartArrow, getStartKnob, getSvgString, getTranslate, getXShearFactor, getYShearFactor, hide, hideAllKnobs, hideKnobs, hideKnobs, hover, isInBounds, isPointInPath, moveTo, rotateBy, rotateTo, scaleBy, scaleTo, setAttribute, setAttribute, setAutoChildConstructor, setAutoChildProperties, setAutoChildProperties, setAutoChildProperties, setAutoChildProperties, setAutoChildVisibility, setCanDrag, setCanHover, setCenterPoint, setContextMenu, setCursor, setDefaultProperties, setDragStartDistance, setDrawGroup, setDrawPane, setEditProxyConstructor, setEndArrow, setEventOpaque, setFillColor, setFillGradient, setFillGradient, setFillOpacity, setHoverDelay, setKeepInParentRect, setKeepInParentRect, setLineCap, setLineColor, setLineOpacity, setLinePattern, setLineWidth, setMoveKnobOffset, setMoveKnobPoint, setPrompt, setPropertyValue, setProportionalResizeModifiers, setProportionalResizing, setResizeKnobPoints, setResizeViaLocalTransformOnly, setRotation, setRotation, setScale, setShadow, setShowHover, setShowResizeOutline, setStartArrow, setTranslate, setXShearFactor, setYShearFactor, show, showAllKnobs, showKnobs, showKnobs, supportsEndArrow, supportsStartArrow
applyFactoryProperties, asSGWTComponent, createJsObj, destroy, doAddHandler, doInit, error, error, errorIfNotCreated, fireEvent, getAttribute, getAttributeAsBoolean, getAttributeAsDate, getAttributeAsDouble, getAttributeAsElement, getAttributeAsFloat, getAttributeAsInt, getAttributeAsJavaScriptObject, getAttributeAsMap, getAttributeAsString, getAttributeAsStringArray, getClassName, getConfig, getHandlerCount, getID, getJsObj, getOrCreateJsObj, getScClassName, getTestInstance, hasAutoAssignedID, internalSetID, internalSetID, isCreated, isFactoryCreated, onBind, onInit, registerID, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setConfig, setFactoryCreated, setID, setJavaScriptObject, setProperty, setProperty, setProperty, setProperty, setScClassName
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
fireEvent
public DrawPath()
public DrawPath(JavaScriptObject jsObj)
public static DrawPath getOrCreateRef(JavaScriptObject jsObj)
public JavaScriptObject create()
public void setKnobs(KnobType... knobs) throws java.lang.IllegalStateException
KnobType.MOVE
knob type.setKnobs
in class DrawItem
knobs
- Default value is nulljava.lang.IllegalStateException
- this property cannot be changed after the underlying component has been createdDrawItem.setKnobs(com.smartgwt.client.types.KnobType...)
,
Diagramming Examplepublic KnobType[] getKnobs()
KnobType.MOVE
knob type.getKnobs
in class DrawItem
DrawItem.getKnobs()
,
Diagramming Examplepublic void setPoints(Point... points)
points
- Default value is [[0,0], [100,100]]public Point[] getPoints()
public Point getCenter()
public void moveBy(int dX, int dY)
public void moveFirstPointTo(java.lang.Integer left, java.lang.Integer top)
left
- new left coordinate in pixelstop
- new top coordinate in pixelspublic void resizeBy(int dX, int dY)
public void resizeTo(java.lang.Integer width, java.lang.Integer height)
public static void setDefaultProperties(DrawPath drawPathProperties)
Note: This method is intended for setting default attributes only and will affect all instances of the underlying class (including those automatically generated in JavaScript). This method should not be used to apply standard EventHandlers or override methods for a class - use a custom subclass instead. Calling this method after instances have been created can result in undefined behavior, since it bypasses any setters and a class instance may have already examined a particular property and not be expecting any changes through this route.
drawPathProperties
- properties that should be used as new defaults when instances of this class are created