Package org.eclipse.rap.rwt.template
Class TextCell
- All Implemented Interfaces:
Serializable
Defines a region in a template that displays a text.
- Since:
- 2.2
- See Also:
-
Constructor Summary
-
Method Summary
Methods inherited from class org.eclipse.rap.rwt.template.Cell
setBackground, setBindingIndex, setBottom, setBottom, setFont, setForeground, setHeight, setHorizontalAlignment, setLeft, setLeft, setName, setRight, setRight, setSelectable, setTop, setTop, setVerticalAlignment, setWidth
-
Constructor Details
-
TextCell
Constructs a new text cell and adds it to the given template.
-
-
Method Details
-
setText
Sets the text to be displayed in the cell if the bindingIndex is not set. Can be used to display a static text.- Parameters:
text
- the text to display, must not benull
- Returns:
- the cell itself, to enable method chaining
-
setWrap
Enables automatic line wrapping. The default isfalse
.- Parameters:
wrap
-true
to enable automatic line wrapping- Returns:
- the cell itself, to enable method chaining
-
toJson
Description copied from class:Cell
Creates a JSON representation of this cell. Subclasses can override this method, but must call super and add additional attributes like this:protected JsonObject toJson() { JsonObject json = super.toJson(); json.add( "foo", getFoo() ); ... return json; }
-