|
|||||||||
| 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.DrawLabel
public class DrawLabel
DrawItem subclass to render a single-line text label.
| Field Summary |
|---|
| Fields inherited from class com.smartgwt.client.core.BaseClass |
|---|
config, id, scClassName |
| Constructor Summary | |
|---|---|
DrawLabel()
|
|
DrawLabel(com.google.gwt.core.client.JavaScriptObject jsObj)
|
|
| Method Summary | |
|---|---|
com.google.gwt.core.client.JavaScriptObject |
create()
|
java.lang.String |
getAlignment()
Sets the text alignment from the x position. |
java.lang.String |
getContents()
This is the content that will exist as the label. |
java.lang.String |
getFontFamily()
Font family name, similar to the CSS font-family attribute. |
int |
getFontSize()
Font size, similar to the CSS font-size attribute. |
java.lang.String |
getFontStyle()
Font style, similar to the CSS font-style attribute, eg "normal", "italic". |
java.lang.String |
getFontWeight()
Font weight, similar to the CSS font-weight attribute, eg "normal", "bold". |
int |
getLeft()
Sets the amount from the left of its positioning that the element should be placed. |
static DrawLabel |
getOrCreateRef(com.google.gwt.core.client.JavaScriptObject jsObj)
|
float |
getRotation()
Rotation in degrees. |
int |
getTop()
Sets the amount from the top of its positioning that the element should be placed. |
void |
moveBy(int left,
int top)
Move both the start and end points of the line by a relative amount. |
void |
moveTo(int left,
int top)
Move the label to the absolute x, y coordinates |
void |
rotateTo(float degrees)
Rotate the label by the absolute rotation in degrees |
void |
setAlignment(java.lang.String alignment)
Sets the text alignment from the x position. |
void |
setContents(java.lang.String contents)
This is the content that will exist as the label. |
void |
setFontFamily(java.lang.String fontFamily)
Font family name, similar to the CSS font-family attribute. |
void |
setFontSize(int fontSize)
Font size, similar to the CSS font-size attribute. |
void |
setFontStyle(java.lang.String fontStyle)
Font style, similar to the CSS font-style attribute, eg "normal", "italic". |
void |
setFontWeight(java.lang.String fontWeight)
Font weight, similar to the CSS font-weight attribute, eg "normal", "bold". |
void |
setJavaScriptObject(com.google.gwt.core.client.JavaScriptObject jsObj)
|
void |
setLeft(int left)
Sets the amount from the left of its positioning that the element should be placed. |
void |
setRotation(float rotation)
Rotation in degrees. |
void |
setTop(int top)
Sets the amount from the top of its positioning that the element should be placed. |
| 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 DrawLabel()
public DrawLabel(com.google.gwt.core.client.JavaScriptObject jsObj)
| Method Detail |
|---|
public static DrawLabel getOrCreateRef(com.google.gwt.core.client.JavaScriptObject jsObj)
public void setJavaScriptObject(com.google.gwt.core.client.JavaScriptObject jsObj)
setJavaScriptObject in class DrawItempublic com.google.gwt.core.client.JavaScriptObject create()
create in class DrawItem
public void setAlignment(java.lang.String alignment)
throws java.lang.IllegalStateException
alignment - . See String. Default value is "start"
java.lang.IllegalStateException - this property cannot be changed after the underlying component has been createdpublic java.lang.String getAlignment()
String
public void setContents(java.lang.String contents)
throws java.lang.IllegalStateException
contents - . See String. Default value is null
java.lang.IllegalStateException - this property cannot be changed after the underlying component has been createdpublic java.lang.String getContents()
String
public void setFontFamily(java.lang.String fontFamily)
throws java.lang.IllegalStateException
fontFamily - . See String. Default value is "Tahoma"
java.lang.IllegalStateException - this property cannot be changed after the underlying component has been createdpublic java.lang.String getFontFamily()
String
public void setFontSize(int fontSize)
throws java.lang.IllegalStateException
fontSize - fontSize Default value is 18
java.lang.IllegalStateException - this property cannot be changed after the underlying component has been createdpublic int getFontSize()
public void setFontStyle(java.lang.String fontStyle)
throws java.lang.IllegalStateException
fontStyle - . See String. Default value is "normal"
java.lang.IllegalStateException - this property cannot be changed after the underlying component has been createdpublic java.lang.String getFontStyle()
String
public void setFontWeight(java.lang.String fontWeight)
throws java.lang.IllegalStateException
fontWeight - . See String. Default value is "bold"
java.lang.IllegalStateException - this property cannot be changed after the underlying component has been createdpublic java.lang.String getFontWeight()
String
public void setLeft(int left)
throws java.lang.IllegalStateException
left - left Default value is 0
java.lang.IllegalStateException - this property cannot be changed after the underlying component has been createdpublic int getLeft()
public void setRotation(float rotation)
throws java.lang.IllegalStateException
NOTE: For best results, only use rotation values 0, 90, 180, and 270 with DrawLabels.
setRotation in class DrawItemrotation - rotation Default value is 0.0
java.lang.IllegalStateException - this property cannot be changed after the underlying component has been createdpublic float getRotation()
NOTE: For best results, only use rotation values 0, 90, 180, and 270 with DrawLabels.
getRotation in class DrawItem
public void setTop(int top)
throws java.lang.IllegalStateException
top - top Default value is 0
java.lang.IllegalStateException - this property cannot be changed after the underlying component has been createdpublic int getTop()
public void moveBy(int left,
int top)
moveBy in class DrawItemleft - change to left coordinate in pixelstop - change to top coordinate in pixels
public void moveTo(int left,
int top)
left - new startLeft coordinate in pixelstop - new startTop coordinate in pixelspublic void rotateTo(float degrees)
rotateTo in class DrawItemdegrees - number of degrees to rotate
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||