public class DrawLinePath extends DrawItem
config, id, scClassName
Constructor and Description |
---|
DrawLinePath() |
DrawLinePath(com.google.gwt.core.client.JavaScriptObject jsObj) |
Modifier and Type | Method and Description |
---|---|
com.google.gwt.core.client.JavaScriptObject |
create() |
Point |
getCenter()
Get the center point of the line path.
|
ArrowStyle |
getEndArrow()
Style of arrowhead to draw at the end of the line or path.
|
int |
getEndLeft()
Ending left coordinate of the line.
|
Point |
getEndPoint()
End point of the line
|
int |
getEndTop()
Ending top coordinate of the line.
|
KnobType[] |
getKnobs()
Array of control knobs to display for this item.
|
static DrawLinePath |
getOrCreateRef(com.google.gwt.core.client.JavaScriptObject jsObj) |
int |
getStartLeft()
Starting left coordinate of the line.
|
Point |
getStartPoint()
Start point of the line
|
int |
getStartTop()
Starting top coordinate of the line.
|
int |
getTailSize()
Length of the horizontal "tail" between the start and end points of this LinePath and the diagonal connecting segment
|
void |
moveBy(int left,
int top)
Move both the start and end points of the line by a relative amount.
|
static void |
setDefaultProperties(DrawLinePath drawLinePathProperties)
Class level method to set the default properties of this class.
|
void |
setEndArrow(ArrowStyle endArrow)
Style of arrowhead to draw at the end of the line or path.
|
void |
setEndLeft(int endLeft)
Ending left coordinate of the line.
|
void |
setEndPoint(Point endPoint)
End point of the line
If this method is called after the component has been drawn/initialized: Update the endPoint |
void |
setEndTop(int endTop)
Ending top coordinate of the line.
|
void |
setKnobs(KnobType... knobs)
Array of control knobs to display for this item.
|
void |
setStartLeft(int startLeft)
Starting left coordinate of the line.
|
void |
setStartPoint(Point startPoint)
Start point of the line
If this method is called after the component has been drawn/initialized: Update the startPoint |
void |
setStartTop(int startTop)
Starting top coordinate of the line.
|
void |
setTailSize(int tailSize)
Length of the horizontal "tail" between the start and end points of this LinePath and the diagonal connecting segment
|
addClickHandler, addDragMoveHandler, addDragResizeMoveHandler, addDragStartHandler, addDragStopHandler, addMouseDownHandler, addMouseMoveHandler, addMouseOutHandler, addMouseOverHandler, addMouseUpHandler, addMovedHandler, addResizedHandler, addShowContextMenuHandler, computeAngle, computeAngleAsDouble, dragResizeMove, draw, erase, getAttributeAsIntArray, getBoundingBox, getBoundingBoxAsDouble, getCanDrag, getCanHover, getContextMenu, getCursor, getDestroyed, getDestroying, getDragStartDistance, getDrawGroup, getDrawPane, getEventOpaque, getFillColor, getFillGradient, getFillGradientAsString, getFillOpacity, getHoverDelay, getHoverHTML, getKeepInParentRect, getLineCap, getLineColor, getLineOpacity, getLinePattern, getLineWidth, getMoveKnobOffset, getMoveKnobPoint, getPageLeft, getPageTop, getPrompt, getRef, getResizeKnobPoints, getRotation, getRotationAsDouble, getScale, getShadow, getShowHover, getStartArrow, getSvgString, hide, hideKnobs, hideKnobs, hover, isInBounds, isPointInPath, resizeBy, resizeTo, rotateBy, rotateTo, scaleBy, scaleTo, setAttribute, setAttribute, setCanDrag, setCanHover, setContextMenu, setCursor, setDefaultProperties, setDragStartDistance, setDrawGroup, setDrawPane, setEventOpaque, setFillColor, setFillGradient, setFillGradient, setFillOpacity, setHoverDelay, setKeepInParentRect, setKeepInParentRect, setLineCap, setLineColor, setLineOpacity, setLinePattern, setLineWidth, setMoveKnobOffset, setMoveKnobPoint, setPrompt, setResizeKnobPoints, setRotation, setRotation, setScale, setShadow, setShowHover, setStartArrow, show, showKnobs, showKnobs, supportsEndArrow, supportsStartArrow
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, hasAutoAssignedID, internalSetID, internalSetID, isCreated, onBind, onInit, registerID, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setConfig, setID, setJavaScriptObject, setProperty, setProperty, setProperty, setProperty, setScClassName
public DrawLinePath()
public DrawLinePath(com.google.gwt.core.client.JavaScriptObject jsObj)
public static DrawLinePath getOrCreateRef(com.google.gwt.core.client.JavaScriptObject jsObj)
public com.google.gwt.core.client.JavaScriptObject create()
public void setEndArrow(ArrowStyle endArrow)
setEndArrow
in class DrawItem
endArrow
- Default value is "open", IRWpublic ArrowStyle getEndArrow()
getEndArrow
in class DrawItem
public void setEndLeft(int endLeft) throws java.lang.IllegalStateException
endPoint
if both are set.endLeft
- Default value is 0 , IRWjava.lang.IllegalStateException
- this property cannot be changed after the underlying component has been createdpublic int getEndLeft()
endPoint
if both are set.public void setEndPoint(Point endPoint)
endPoint
- left coordinate for end point, in pixels. Default value is [100,100]public Point getEndPoint()
public void setEndTop(int endTop) throws java.lang.IllegalStateException
endPoint
if both are set.endTop
- Default value is 0 , IRWjava.lang.IllegalStateException
- this property cannot be changed after the underlying component has been createdpublic int getEndTop()
endPoint
if both are set.public void setKnobs(KnobType... knobs) throws java.lang.IllegalStateException
KnobType
specified in this will
turn on UI element(s) allowing the user to manipulate this DrawLinePath. To update the set of knobs at runtime use
DrawItem.showKnobs()
and DrawItem.hideKnobs()
. DrawLinePath supports the KnobType.STARTPOINT
and KnobType.ENDPOINT
knob types.
public KnobType[] getKnobs()
KnobType
specified in this will
turn on UI element(s) allowing the user to manipulate this DrawLinePath. To update the set of knobs at runtime use
DrawItem.showKnobs()
and DrawItem.hideKnobs()
. DrawLinePath supports the KnobType.STARTPOINT
and KnobType.ENDPOINT
knob types.
public void setStartLeft(int startLeft) throws java.lang.IllegalStateException
startPoint
if both are set.startLeft
- Default value is 0 , IRWjava.lang.IllegalStateException
- this property cannot be changed after the underlying component has been createdpublic int getStartLeft()
startPoint
if both are set.public void setStartPoint(Point startPoint)
startPoint
- left coordinate for start point, in pixels. Default value is [0,0]public Point getStartPoint()
public void setStartTop(int startTop) throws java.lang.IllegalStateException
startPoint
if both are set.startTop
- Default value is 0 , IRWjava.lang.IllegalStateException
- this property cannot be changed after the underlying component has been createdpublic int getStartTop()
startPoint
if both are set.public void setTailSize(int tailSize) throws java.lang.IllegalStateException
tailSize
- Default value is 30java.lang.IllegalStateException
- this property cannot be changed after the underlying component has been createdpublic int getTailSize()
public Point getCenter()
public void moveBy(int left, int top)
public static void setDefaultProperties(DrawLinePath drawLinePathProperties)
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.
drawLinePathProperties
- properties that should be used as new defaults when instances of this class are created