|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.vaadin.server.AbstractClientConnector
com.vaadin.ui.AbstractComponent
com.vaadin.ui.Label
public class Label
Label component for showing non-editable short texts.
The label content can be set to the modes specified by ContentMode
The contents of the label may contain simple formatting:
| Nested Class Summary | |
|---|---|
static class |
Label.ValueChangeEvent
Value change event |
| Nested classes/interfaces inherited from class com.vaadin.ui.AbstractComponent |
|---|
AbstractComponent.ComponentErrorEvent, AbstractComponent.ComponentErrorHandler |
| Nested classes/interfaces inherited from interface com.vaadin.data.Property |
|---|
Property.Editor, Property.ReadOnlyException, Property.ReadOnlyStatusChangeEvent, Property.ReadOnlyStatusChangeListener, Property.ReadOnlyStatusChangeNotifier, Property.Transactional<T>, Property.ValueChangeListener, Property.ValueChangeNotifier, Property.Viewer |
| Nested classes/interfaces inherited from interface com.vaadin.ui.Component |
|---|
Component.ErrorEvent, Component.ErrorListener, Component.Event, Component.Focusable, Component.Listener |
| Nested classes/interfaces inherited from interface com.vaadin.server.Sizeable |
|---|
Sizeable.Unit |
| Field Summary | |
|---|---|
static com.vaadin.shared.ui.label.ContentMode |
CONTENT_DEFAULT
Deprecated. From 7.0, use ContentMode.TEXT instead |
static com.vaadin.shared.ui.label.ContentMode |
CONTENT_PREFORMATTED
Deprecated. From 7.0, use ContentMode.PREFORMATTED instead |
static com.vaadin.shared.ui.label.ContentMode |
CONTENT_RAW
Deprecated. From 7.0, use ContentMode.RAW instead |
static com.vaadin.shared.ui.label.ContentMode |
CONTENT_TEXT
Deprecated. From 7.0, use ContentMode.TEXT instead |
static com.vaadin.shared.ui.label.ContentMode |
CONTENT_XHTML
Deprecated. From 7.0, use ContentMode.HTML instead |
static com.vaadin.shared.ui.label.ContentMode |
CONTENT_XML
Deprecated. From 7.0, use ContentMode.XML instead |
| Fields inherited from interface com.vaadin.server.Sizeable |
|---|
SIZE_UNDEFINED, UNITS_CM, UNITS_EM, UNITS_EX, UNITS_INCH, UNITS_MM, UNITS_PERCENTAGE, UNITS_PICAS, UNITS_PIXELS, UNITS_POINTS |
| Constructor Summary | |
|---|---|
Label()
Creates an empty Label. |
|
Label(Property contentSource)
Creates a new instance of Label with text-contents read from given datasource. |
|
Label(Property contentSource,
com.vaadin.shared.ui.label.ContentMode contentMode)
Creates a new instance of Label with text-contents read from given datasource. |
|
Label(java.lang.String content)
Creates a new instance of Label with text-contents. |
|
Label(java.lang.String content,
com.vaadin.shared.ui.label.ContentMode contentMode)
Creates a new instance of Label with text-contents. |
|
| Method Summary | |
|---|---|
void |
addListener(Property.ValueChangeListener listener)
Deprecated. Since 7.0, replaced by addValueChangeListener(com.vaadin.data.Property.ValueChangeListener) |
void |
addValueChangeListener(Property.ValueChangeListener listener)
Adds the value change listener. |
int |
compareTo(Label other)
Compares the Label to other objects. |
protected void |
fireValueChange()
Emits the options change event. |
com.vaadin.shared.ui.label.ContentMode |
getContentMode()
Gets the content mode of the Label. |
Converter<java.lang.String,java.lang.Object> |
getConverter()
Gets the converter used to convert the property data source value to the label value. |
Property |
getPropertyDataSource()
Gets the viewing data-source property. |
protected com.vaadin.shared.ui.label.LabelState |
getState()
Returns the shared state bean with information to be sent from the server to the client. |
java.lang.Class<java.lang.String> |
getType()
Gets the type of the Property. |
java.lang.String |
getValue()
Gets the value of the label. |
void |
removeListener(Property.ValueChangeListener listener)
Deprecated. Since 7.0, replaced by removeValueChangeListener(com.vaadin.data.Property.ValueChangeListener) |
void |
removeValueChangeListener(Property.ValueChangeListener listener)
Removes the value change listener. |
void |
setContentMode(com.vaadin.shared.ui.label.ContentMode contentMode)
Sets the content mode of the Label. |
void |
setConverter(Converter<java.lang.String,?> converter)
Sets the converter used to convert the label value to the property data source type. |
void |
setPropertyDataSource(Property newDataSource)
Sets the property as data-source for viewing. |
void |
setValue(java.lang.Object newStringValue)
Set the value of the label. |
java.lang.String |
toString()
Deprecated. As of 7.0.0, use getValue() to get the value of the
label or getPropertyDataSource() .getValue() to get
the value of the data source. |
void |
valueChange(Property.ValueChangeEvent event)
Listens the value change events from data source. |
| Methods inherited from class com.vaadin.server.AbstractClientConnector |
|---|
addExtension, addMethodInvocationToQueue, createState, encodeState, getAllChildrenIterable, getConnectorId, getExtensions, getResource, getRpcManager, getRpcProxy, getSession, getStateType, getUI, handleConnectorRequest, markAsDirty, markAsDirtyRecursive, registerRpc, registerRpc, removeExtension, requestRepaint, requestRepaintAll, retrievePendingRpcCalls, setResource |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface com.vaadin.data.Property |
|---|
isReadOnly, setReadOnly |
| Methods inherited from interface com.vaadin.ui.Component |
|---|
getUI |
| Methods inherited from interface com.vaadin.server.ClientConnector |
|---|
encodeState, getExtensions, getStateType, handleConnectorRequest, markAsDirty, markAsDirtyRecursive, removeExtension, requestRepaint, requestRepaintAll, retrievePendingRpcCalls |
| Methods inherited from interface com.vaadin.shared.Connector |
|---|
getConnectorId |
| Methods inherited from interface com.vaadin.server.RpcTarget |
|---|
getRpcManager |
| Field Detail |
|---|
@Deprecated public static final com.vaadin.shared.ui.label.ContentMode CONTENT_TEXT
ContentMode.TEXT instead@Deprecated public static final com.vaadin.shared.ui.label.ContentMode CONTENT_PREFORMATTED
ContentMode.PREFORMATTED instead@Deprecated public static final com.vaadin.shared.ui.label.ContentMode CONTENT_XHTML
ContentMode.HTML instead@Deprecated public static final com.vaadin.shared.ui.label.ContentMode CONTENT_XML
ContentMode.XML instead@Deprecated public static final com.vaadin.shared.ui.label.ContentMode CONTENT_RAW
ContentMode.RAW instead@Deprecated public static final com.vaadin.shared.ui.label.ContentMode CONTENT_DEFAULT
ContentMode.TEXT instead| Constructor Detail |
|---|
public Label()
public Label(java.lang.String content)
content - public Label(Property contentSource)
contentSource -
public Label(java.lang.String content,
com.vaadin.shared.ui.label.ContentMode contentMode)
content - contentMode -
public Label(Property contentSource,
com.vaadin.shared.ui.label.ContentMode contentMode)
contentSource - contentMode - | Method Detail |
|---|
protected com.vaadin.shared.ui.label.LabelState getState()
AbstractComponent
getState in class AbstractComponentpublic java.lang.String getValue()
The value of the label is the text that is shown to the end user.
Depending on the ContentMode it is plain text or markup.
getValue in interface Property<java.lang.String>public void setValue(java.lang.Object newStringValue)
setValue in interface Property<java.lang.String>newStringValue - the New value of the label.@Deprecated public java.lang.String toString()
getValue() to get the value of the
label or getPropertyDataSource() .getValue() to get
the value of the data source.
toString in class java.lang.ObjectObject.toString()public java.lang.Class<java.lang.String> getType()
getType in interface Property<java.lang.String>Property.getType()public Property getPropertyDataSource()
getPropertyDataSource in interface Property.ViewerProperty.Viewer.getPropertyDataSource()public void setPropertyDataSource(Property newDataSource)
setPropertyDataSource in interface Property.ViewernewDataSource - the new data source PropertyProperty.Viewer.setPropertyDataSource(com.vaadin.data.Property)public com.vaadin.shared.ui.label.ContentMode getContentMode()
ContentModepublic void setContentMode(com.vaadin.shared.ui.label.ContentMode contentMode)
contentMode - the New content mode of the label.ContentModepublic void addValueChangeListener(Property.ValueChangeListener listener)
addValueChangeListener in interface Property.ValueChangeNotifierlistener - the Listener to be added.Property.ValueChangeNotifier.addListener(com.vaadin.data.Property.ValueChangeListener)@Deprecated public void addListener(Property.ValueChangeListener listener)
addValueChangeListener(com.vaadin.data.Property.ValueChangeListener)
addListener in interface Property.ValueChangeNotifierpublic void removeValueChangeListener(Property.ValueChangeListener listener)
removeValueChangeListener in interface Property.ValueChangeNotifierlistener - the Listener to be removed.Property.ValueChangeNotifier.removeListener(com.vaadin.data.Property.ValueChangeListener)@Deprecated public void removeListener(Property.ValueChangeListener listener)
removeValueChangeListener(com.vaadin.data.Property.ValueChangeListener)
removeListener in interface Property.ValueChangeNotifierprotected void fireValueChange()
public void valueChange(Property.ValueChangeEvent event)
valueChange in interface Property.ValueChangeListenerevent - value change event objectProperty.ValueChangeListener.valueChange(Property.ValueChangeEvent)public int compareTo(Label other)
Labels can be compared to other labels for sorting label contents. This is especially handy for sorting table columns.
In RAW, PREFORMATTED and TEXT modes, the label contents are compared as is. In XML, UIDL and HTML modes, only CDATA is compared and tags ignored. If the other object is not a Label, its toString() return value is used in comparison.
compareTo in interface java.lang.Comparable<Label>other - the Other object to compare to.
Comparable.compareTo(java.lang.Object)public Converter<java.lang.String,java.lang.Object> getConverter()
public void setConverter(Converter<java.lang.String,?> converter)
converter - The new converter to use.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||