|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.smartgwt.client.core.BaseClass
com.smartgwt.client.widgets.drawing.DrawItem
com.smartgwt.client.widgets.drawing.DrawRect
public class DrawRect
DrawItem subclass to render rectangle shapes, optionally with rounded corners.
| Field Summary |
|---|
| Fields inherited from class com.smartgwt.client.core.BaseClass |
|---|
config, id, scClassName |
| Constructor Summary | |
|---|---|
DrawRect()
|
|
DrawRect(JavaScriptObject jsObj)
|
|
| Method Summary | |
|---|---|
JavaScriptObject |
create()
|
int |
getHeight()
Height in pixels. |
int |
getLeft()
Left coordinate in pixels relative to the DrawPane, or owning DrawGroup. |
LineCap |
getLineCap()
Style of drawing the endpoints of a line. |
static DrawRect |
getOrCreateRef(JavaScriptObject jsObj)
|
float |
getRounding()
Rounding of corners, from 0 (square corners) to 1.0 (shorter edge is a semicircle). |
int |
getTop()
Top coordinate in pixels relative to the DrawPane, or owning DrawGroup. |
int |
getWidth()
Width in pixels. |
void |
moveBy(int dX,
int dY)
Move the drawRect by the specified delta |
void |
moveTo(int left,
int top)
Move the drawRect to the specified position |
void |
resizeBy(int dX,
int dY)
Resize by the specified delta |
void |
resizeTo(int width,
int height)
Resize to the specified size |
void |
setCenter(int left,
int top)
Move the drawRect such that it is centered over the specified coordinates. |
void |
setHeight(int height)
Height in pixels. |
void |
setLeft(int left)
Left coordinate in pixels relative to the DrawPane, or owning DrawGroup. |
void |
setLineCap(LineCap lineCap)
Style of drawing the endpoints of a line. |
void |
setRect(int left,
int top,
int width,
int height)
Move and resize the drawRect to match the specified coordinates and size. |
void |
setRounding(float rounding)
Rounding of corners, from 0 (square corners) to 1.0 (shorter edge is a semicircle). |
void |
setTop(int top)
Top coordinate in pixels relative to the DrawPane, or owning DrawGroup. |
void |
setWidth(int width)
Width in pixels. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.google.gwt.event.shared.HasHandlers |
|---|
fireEvent |
| Constructor Detail |
|---|
public DrawRect()
public DrawRect(JavaScriptObject jsObj)
| Method Detail |
|---|
public static DrawRect getOrCreateRef(JavaScriptObject jsObj)
public JavaScriptObject create()
create in class DrawItem
public void setHeight(int height)
throws IllegalStateException
height - new height. Default value is 100
IllegalStateException - this property cannot be changed after the underlying component has been createdpublic int getHeight()
public void setLeft(int left)
left - new left coordinate. Default value is 0public int getLeft()
public void setLineCap(LineCap lineCap)
Note that for dashed and dotted lines, the lineCap style affects each dash or dot.
setLineCap in class DrawItemlineCap - lineCap Default value is "butt"public LineCap getLineCap()
Note that for dashed and dotted lines, the lineCap style affects each dash or dot.
getLineCap in class DrawItem
public void setRounding(float rounding)
throws IllegalStateException
rounding
rounding - new rounding value. Should be between zero (a rectangle) and 1 (shorter edge is a semicircle). Default value is 0
IllegalStateException - this property cannot be changed after the underlying component has been createdpublic float getRounding()
public void setTop(int top)
top - new top coordinate. Default value is 0public int getTop()
public void setWidth(int width)
throws IllegalStateException
width - new width. Default value is 100
IllegalStateException - this property cannot be changed after the underlying component has been createdpublic int getWidth()
public void moveBy(int dX,
int dY)
moveBy in class DrawItemdX - number of pixels to move horizontallydY - number of pixels to move vertically
public void moveTo(int left,
int top)
left - new left coordinatetop - new top coordinate
public void resizeBy(int dX,
int dY)
resizeBy in class DrawItemdX - number of pixels to resize by horizontallydY - number of pixels to resize by vertically
public void resizeTo(int width,
int height)
width - new widthheight - new height
public void setCenter(int left,
int top)
left - left coordinate for new center positiontop - top coordinate for new center postiion
public void setRect(int left,
int top,
int width,
int height)
left - new left coordinatetop - new top coordinatewidth - new widthheight - new height
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||