Label that removes
data binding support@Deprecated public class Label extends AbstractLegacyComponent implements Property<String>, Property.Viewer, Property.ValueChangeListener, Property.ValueChangeNotifier, Comparable<Label>
ContentMode
The contents of the label may contain simple formatting:
| Modifier and Type | Class and Description |
|---|---|
static class |
Label.ValueChangeEvent
Deprecated.
|
Property.Editor, Property.ReadOnlyException, Property.ReadOnlyStatusChangeEvent, Property.ReadOnlyStatusChangeListener, Property.ReadOnlyStatusChangeNotifier, Property.Transactional<T>, Property.ValueChangeListener, Property.ValueChangeNotifier, Property.ViewerComponent.ErrorEvent, Component.Event, Component.Focusable, Component.ListenerClientConnector.AttachEvent, ClientConnector.AttachListener, ClientConnector.ConnectorErrorEvent, ClientConnector.DetachEvent, ClientConnector.DetachListenerSizeable.Unit| Modifier and Type | Field and Description |
|---|---|
static ContentMode |
CONTENT_DEFAULT
Deprecated.
As of 7.0, use
ContentMode.TEXT instead |
static ContentMode |
CONTENT_PREFORMATTED
Deprecated.
As of 7.0, use
ContentMode.PREFORMATTED instead |
static ContentMode |
CONTENT_RAW
Deprecated.
As of 7.0, use
ContentMode.RAW instead |
static ContentMode |
CONTENT_TEXT
Deprecated.
As of 7.0, use
ContentMode.TEXT instead |
static ContentMode |
CONTENT_XHTML
Deprecated.
As of 7.0, use
ContentMode.HTML instead |
static ContentMode |
CONTENT_XML
Deprecated.
As of 7.0, use
ContentMode.XML instead |
DESIGN_ATTR_PLAIN_TEXTSIZE_UNDEFINED, UNITS_CM, UNITS_EM, UNITS_EX, UNITS_INCH, UNITS_MM, UNITS_PERCENTAGE, UNITS_PICAS, UNITS_PIXELS, UNITS_POINTS| Constructor and Description |
|---|
Label()
Deprecated.
Creates an empty Label.
|
Label(Property contentSource)
Deprecated.
Creates a new instance of Label with text-contents read from given
datasource.
|
Label(Property contentSource,
ContentMode contentMode)
Deprecated.
Creates a new instance of Label with text-contents read from given
datasource.
|
Label(String content)
Deprecated.
Creates a new instance of Label with text-contents.
|
Label(String content,
ContentMode contentMode)
Deprecated.
Creates a new instance of Label with text-contents.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addListener(Property.ValueChangeListener listener)
Deprecated.
As of 7.0, replaced by
addValueChangeListener(Property.ValueChangeListener) |
void |
addValueChangeListener(Property.ValueChangeListener listener)
Deprecated.
Adds the value change listener.
|
void |
attach()
Deprecated.
|
int |
compareTo(Label other)
Deprecated.
Compares the Label to other objects.
|
protected void |
fireValueChange()
Deprecated.
Emits the options change event.
|
ContentMode |
getContentMode()
Deprecated.
Gets the content mode of the Label.
|
Converter<String,Object> |
getConverter()
Deprecated.
Gets the converter used to convert the property data source value to the
label value.
|
protected Collection<String> |
getCustomAttributes()
Deprecated.
|
Property |
getPropertyDataSource()
Deprecated.
Gets the viewing data-source property.
|
protected LabelState |
getState()
Deprecated.
|
protected LabelState |
getState(boolean markAsDirty)
Deprecated.
|
Class<String> |
getType()
Deprecated.
Gets the type of the Property.
|
String |
getValue()
Deprecated.
Gets the value of the label.
|
void |
readDesign(org.jsoup.nodes.Element design,
DesignContext designContext)
Deprecated.
|
void |
removeListener(Property.ValueChangeListener listener)
Deprecated.
As of 7.0, replaced by
removeValueChangeListener(Property.ValueChangeListener) |
void |
removeValueChangeListener(Property.ValueChangeListener listener)
Deprecated.
Removes the value change listener.
|
void |
setContentMode(ContentMode contentMode)
Deprecated.
Sets the content mode of the Label.
|
void |
setConverter(Converter<String,?> converter)
Deprecated.
Sets the converter used to convert the label value to the property data
source type.
|
void |
setLocale(Locale locale)
Deprecated.
|
void |
setPropertyDataSource(Property newDataSource)
Deprecated.
Sets the property as data-source for viewing.
|
void |
setValue(String newStringValue)
Deprecated.
Set the value of the label.
|
void |
valueChange(Property.ValueChangeEvent event)
Deprecated.
Listens the value change events from data source.
|
void |
writeDesign(org.jsoup.nodes.Element design,
DesignContext designContext)
Deprecated.
|
beforeClientResponse, getExplicitImmediateValue, isImmediate, isReadOnly, setImmediate, setReadOnlyaddContextClickListener, addListener, addShortcutListener, addStyleName, detach, findAncestor, fireComponentErrorEvent, fireComponentEvent, focus, getActionManager, getCaption, getComponentError, getData, getDebugId, getDescription, getErrorMessage, getHeight, getHeightUnits, getIcon, getId, getLocale, getParent, getPrimaryStyleName, getStyleName, getWidth, getWidthUnits, isCaptionAsHtml, isConnectorEnabled, isEnabled, isOrHasAncestor, isRequiredIndicatorVisible, isResponsive, isVisible, removeContextClickListener, removeListener, removeShortcutListener, removeStyleName, setCaption, setCaptionAsHtml, setComponentError, setData, setDebugId, setDescription, setDescription, setEnabled, setHeight, setHeight, setHeightUndefined, setIcon, setId, setParent, setPrimaryStyleName, setRequiredIndicatorVisible, setResponsive, setSizeFull, setSizeUndefined, setStyleName, setVisible, setWidth, setWidth, setWidthUndefinedaddAttachListener, addDetachListener, addExtension, addListener, addListener, addListener, addMethodInvocationToQueue, createState, encodeState, equals, fireEvent, getAllChildrenIterable, getConnectorId, getErrorHandler, getExtensions, getListeners, getResource, getRpcManager, getRpcProxy, getSession, getStateType, getUI, handleConnectorRequest, hashCode, hasListeners, isAttached, isThis, markAsDirty, markAsDirtyRecursive, registerRpc, registerRpc, removeAttachListener, removeDetachListener, removeExtension, removeListener, removeListener, removeListener, removeListener, requestRepaint, requestRepaintAll, retrievePendingRpcCalls, setErrorHandler, setResource, updateDiffstateclone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitisReadOnly, setReadOnlyaddStyleNames, getUI, removeStyleNames, setStyleNameaddAttachListener, addDetachListener, encodeState, getErrorHandler, getExtensions, getRpcManager, getStateType, handleConnectorRequest, isAttached, markAsDirty, markAsDirtyRecursive, removeAttachListener, removeDetachListener, removeExtension, requestRepaint, requestRepaintAll, retrievePendingRpcCalls, setErrorHandler@Deprecated public static final ContentMode CONTENT_TEXT
ContentMode.TEXT instead@Deprecated public static final ContentMode CONTENT_PREFORMATTED
ContentMode.PREFORMATTED instead@Deprecated public static final ContentMode CONTENT_XHTML
ContentMode.HTML instead@Deprecated public static final ContentMode CONTENT_XML
ContentMode.XML instead@Deprecated public static final ContentMode CONTENT_RAW
ContentMode.RAW instead@Deprecated public static final ContentMode CONTENT_DEFAULT
ContentMode.TEXT insteadpublic Label()
public Label(String content)
content - public Label(Property contentSource)
contentSource - public Label(String content, ContentMode contentMode)
content - contentMode - public Label(Property contentSource, ContentMode contentMode)
contentSource - contentMode - protected LabelState getState()
getState in class AbstractLegacyComponentprotected LabelState getState(boolean markAsDirty)
getState in class AbstractLegacyComponentpublic 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.
public void setValue(String newStringValue)
public Class<String> getType()
getType in interface Property<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(Property)public ContentMode getContentMode()
ContentModepublic void setContentMode(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(Property.ValueChangeListener)@Deprecated public void addListener(Property.ValueChangeListener listener)
addValueChangeListener(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(Property.ValueChangeListener)@Deprecated public void removeListener(Property.ValueChangeListener listener)
removeValueChangeListener(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 void attach()
attach in interface ClientConnectorattach in interface Componentattach in class AbstractComponentpublic void setLocale(Locale locale)
setLocale in class AbstractComponentpublic 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 Comparable<Label>other - the Other object to compare to.Comparable.compareTo(java.lang.Object)public Converter<String,Object> getConverter()
public void setConverter(Converter<String,?> converter)
converter - The new converter to use.public void readDesign(org.jsoup.nodes.Element design,
DesignContext designContext)
readDesign in interface ComponentreadDesign in class AbstractLegacyComponentprotected Collection<String> getCustomAttributes()
getCustomAttributes in class AbstractComponentpublic void writeDesign(org.jsoup.nodes.Element design,
DesignContext designContext)
writeDesign in interface ComponentwriteDesign in class AbstractLegacyComponentCopyright © 2019 Vaadin Ltd. All rights reserved.