public class TextCell extends Cell<TextCell>
Constructor and Description |
---|
TextCell(Template template)
Constructs a new text cell and adds it to the given template.
|
Modifier and Type | Method and Description |
---|---|
TextCell |
setText(java.lang.String text)
Sets the text to be displayed in the cell if the bindingIndex is not set.
|
TextCell |
setWrap(boolean wrap)
Enables automatic line wrapping.
|
protected JsonObject |
toJson()
Creates a JSON representation of this cell.
|
setBackground, setBindingIndex, setBottom, setBottom, setFont, setForeground, setHeight, setHorizontalAlignment, setLeft, setLeft, setName, setRight, setRight, setSelectable, setTop, setTop, setVerticalAlignment, setWidth
public TextCell(Template template)
public TextCell setText(java.lang.String text)
text
- the text to display, must not be null
public TextCell setWrap(boolean wrap)
false
.wrap
- true
to enable automatic line wrappingprotected JsonObject toJson()
Cell
protected JsonObject toJson() { JsonObject json = super.toJson(); json.add( "foo", getFoo() ); ... return json; }
Copyright (c) EclipseSource and others 2002, 2017.
All rights reserved. This program and the accompanying materials
are made available under the terms of the
Eclipse Public License v1.0