public class PrettyTimeLabel
extends com.vaadin.ui.Label
com.vaadin.ui.Label.ValueChangeEvent
com.vaadin.ui.AbstractComponent.ComponentErrorEvent, com.vaadin.ui.AbstractComponent.ComponentErrorHandler
com.vaadin.data.Property.ConversionException, com.vaadin.data.Property.Editor, com.vaadin.data.Property.ReadOnlyException, com.vaadin.data.Property.ReadOnlyStatusChangeEvent, com.vaadin.data.Property.ReadOnlyStatusChangeListener, com.vaadin.data.Property.ReadOnlyStatusChangeNotifier, com.vaadin.data.Property.ValueChangeListener, com.vaadin.data.Property.ValueChangeNotifier, com.vaadin.data.Property.Viewer
Modifier and Type | Field and Description |
---|---|
protected Date |
date |
protected String |
labelTemplate |
protected String |
noDateCaption |
protected boolean |
showTime |
Constructor and Description |
---|
PrettyTimeLabel(Date date,
boolean showTime) |
PrettyTimeLabel(Date date,
String noDateCaption,
boolean showTime) |
PrettyTimeLabel(String labelTemplate,
Date date,
String noDateCaption,
boolean showTime)
Constructor for pretty time label.
|
Modifier and Type | Method and Description |
---|---|
protected void |
init() |
void |
setValue(Object newValue) |
addListener, compareTo, fireValueChange, getContentMode, getPropertyDataSource, getType, getValue, isReadOnly, paintContent, removeListener, setContentMode, setPropertyDataSource, setReadOnly, toString, valueChange
addListener, addListener, addListener, addListener, addListener, addStyleName, attach, changeVariables, childRequestedRepaint, detach, fireComponentErrorEvent, fireComponentEvent, fireEvent, focus, getApplication, getCaption, getComponentError, getData, getDebugId, getDescription, getErrorHandler, getErrorMessage, getHeight, getHeightUnits, getIcon, getListeners, getLocale, getParent, getStyle, getStyleName, getWidth, getWidthUnits, getWindow, handleError, hasListeners, isEnabled, isImmediate, isVisible, paint, removeListener, removeListener, removeListener, removeListener, removeListener, removeListener, removeStyleName, requestRepaint, requestRepaintRequests, setCaption, setComponentError, setData, setDebugId, setDescription, setEnabled, setErrorHandler, setHeight, setHeight, setHeight, setHeightUnits, setIcon, setImmediate, setLocale, setParent, setSizeFull, setSizeUndefined, setStyle, setStyleName, setVisible, setWidth, setWidth, setWidth, setWidthUnits
protected String labelTemplate
protected Date date
protected String noDateCaption
protected boolean showTime
public PrettyTimeLabel(Date date, boolean showTime)
public PrettyTimeLabel(String labelTemplate, Date date, String noDateCaption, boolean showTime)
labelTemplate
- template to use for date, eg. "Date: {0}". Null, if date/time
should just be shown.date
- to shownoDateCaption
- caption of label to show when dat is null. Empty label is shown
when null.protected void init()
public void setValue(Object newValue)
setValue
in interface com.vaadin.data.Property
setValue
in class com.vaadin.ui.Label
Copyright © 2016 Alfresco. All rights reserved.