|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.google.gwt.user.client.ui.UIObject
com.google.gwt.user.client.ui.Widget
com.google.gwt.user.client.ui.Label
A widget that contains arbitrary text, not interpreted as HTML.
code
| Nested Class Summary |
| Nested classes inherited from class com.google.gwt.user.client.ui.HasHorizontalAlignment |
HasHorizontalAlignment.HorizontalAlignmentConstant |
| Field Summary |
| Fields inherited from class java.lang.Object |
typeId, typeName |
| Fields inherited from interface com.google.gwt.user.client.ui.HasHorizontalAlignment |
ALIGN_CENTER, ALIGN_LEFT, ALIGN_RIGHT |
| Constructor Summary | |
Label()
Creates an empty label. |
|
Label(String text)
Creates a label with the specified text. |
|
Label(String text,
boolean wordWrap)
Creates a label with the specified text. |
|
| Method Summary | |
void |
addClickListener(ClickListener listener)
Adds a listener interface to receive click events. |
void |
addMouseListener(MouseListener listener)
Adds a listener interface to receive mouse events. |
HasHorizontalAlignment.HorizontalAlignmentConstant |
getHorizontalAlignment()
Gets the horizontal alignment. |
String |
getText()
Gets this object's text. |
boolean |
getWordWrap()
Gets whether word-wrapping is enabled. |
void |
onBrowserEvent(Event event)
Fired whenever a browser event is received. |
void |
removeClickListener(ClickListener listener)
Removes a previously added listener interface. |
void |
removeMouseListener(MouseListener listener)
Removes a previously added listener interface. |
void |
setHorizontalAlignment(HasHorizontalAlignment.HorizontalAlignmentConstant align)
Sets the horizontal alignment. |
void |
setText(String text)
Sets this object's text. |
void |
setWordWrap(boolean wrap)
Sets whether word-wrapping is enabled. |
| Methods inherited from class com.google.gwt.user.client.ui.Widget |
getParent, isAttached, onAttach, onDetach, onLoad |
| Methods inherited from class com.google.gwt.user.client.ui.UIObject |
addStyleName, getAbsoluteLeft, getAbsoluteTop, getElement, getOffsetHeight, getOffsetWidth, getStyleName, isVisible, isVisible, removeStyleName, setElement, setHeight, setPixelSize, setSize, setStyleName, setStyleName, setVisible, setVisible, setWidth, sinkEvents, toString, unsinkEvents |
| Methods inherited from class java.lang.Object |
equals, finalize, hashCode |
| Constructor Detail |
public Label()
public Label(String text)
text - the new label's text
public Label(String text,
boolean wordWrap)
text - the new label's textwordWrap - false to disable word wrapping| Method Detail |
public void addClickListener(ClickListener listener)
SourcesClickEvents
addClickListener in interface SourcesClickEventslistener - the listener interface to addpublic void addMouseListener(MouseListener listener)
SourcesMouseEvents
addMouseListener in interface SourcesMouseEventslistener - the listener interface to addpublic HasHorizontalAlignment.HorizontalAlignmentConstant getHorizontalAlignment()
HasHorizontalAlignment
getHorizontalAlignment in interface HasHorizontalAlignmentpublic String getText()
HasText
getText in interface HasTextpublic boolean getWordWrap()
HasWordWrap
getWordWrap in interface HasWordWraptrue if word-wrapping is enabled.public void onBrowserEvent(Event event)
EventListener
onBrowserEvent in interface EventListeneronBrowserEvent in class Widgetpublic void removeClickListener(ClickListener listener)
SourcesClickEvents
removeClickListener in interface SourcesClickEventslistener - the listener interface to removepublic void removeMouseListener(MouseListener listener)
SourcesMouseEvents
removeMouseListener in interface SourcesMouseEventslistener - the listener interface to removepublic void setHorizontalAlignment(HasHorizontalAlignment.HorizontalAlignmentConstant align)
HasHorizontalAlignment
setHorizontalAlignment in interface HasHorizontalAlignmentalign - the horizontal alignment (
HasHorizontalAlignment.ALIGN_LEFT,
HasHorizontalAlignment.ALIGN_CENTER, or
HasHorizontalAlignment.ALIGN_RIGHT).public void setText(String text)
HasText
setText in interface HasTextpublic void setWordWrap(boolean wrap)
HasWordWrap
setWordWrap in interface HasWordWrapwrap - true to enable word-wrapping.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||