Package org.dellroad.stuff.vaadin7
Class BlobField
- java.lang.Object
-
- com.vaadin.server.AbstractClientConnector
-
- com.vaadin.ui.AbstractComponent
-
- com.vaadin.ui.AbstractField<T>
-
- com.vaadin.ui.CustomField<byte[]>
-
- org.dellroad.stuff.vaadin7.BlobField
-
- All Implemented Interfaces:
Buffered,BufferedValidatable,Property<byte[]>,Property.Editor,Property.ReadOnlyStatusChangeListener,Property.ReadOnlyStatusChangeNotifier,Property.ValueChangeListener,Property.ValueChangeNotifier,Property.Viewer,Validatable,Action.ShortcutNotifier,ContextClickEvent.ContextClickNotifier,MethodEventSource,ClientConnector,Sizeable,Connector,Component,Component.Focusable,Field<byte[]>,HasComponents,Upload.FailedListener,Upload.ProgressListener,Upload.Receiver,Upload.StartedListener,Upload.SucceededListener,Serializable,Iterable<Component>
public class BlobField extends CustomField<byte[]> implements Serializable, Upload.Receiver, Upload.StartedListener, Upload.ProgressListener, Upload.SucceededListener, Upload.FailedListener
A VaadinFieldfor editingPropertys withbyte[]array values (i.e., "blobs"). The blob is updated using a file upload.- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.vaadin.ui.AbstractField
AbstractField.FocusShortcut, AbstractField.ReadOnlyStatusChangeEvent
-
Nested classes/interfaces inherited from interface com.vaadin.data.Buffered
Buffered.SourceException
-
Nested classes/interfaces inherited from interface com.vaadin.server.ClientConnector
ClientConnector.AttachEvent, ClientConnector.AttachListener, ClientConnector.ConnectorErrorEvent, ClientConnector.DetachEvent, ClientConnector.DetachListener
-
Nested classes/interfaces inherited from interface com.vaadin.ui.Component
Component.ErrorEvent, Component.Event, Component.Focusable, Component.Listener
-
Nested classes/interfaces inherited from interface com.vaadin.ui.Field
Field.ValueChangeEvent
-
Nested classes/interfaces inherited from interface com.vaadin.ui.HasComponents
HasComponents.ComponentAttachDetachNotifier, HasComponents.ComponentAttachEvent, HasComponents.ComponentAttachListener, HasComponents.ComponentDetachEvent, HasComponents.ComponentDetachListener
-
Nested classes/interfaces inherited from interface com.vaadin.data.Property
Property.Editor, Property.ReadOnlyException, Property.ReadOnlyStatusChangeListener, Property.ReadOnlyStatusChangeNotifier, Property.Transactional<T extends Object>, Property.ValueChangeListener, Property.ValueChangeNotifier, Property.Viewer
-
Nested classes/interfaces inherited from interface com.vaadin.server.Sizeable
Sizeable.Unit
-
-
Field Summary
Fields Modifier and Type Field Description protected Loggerlog-
Fields inherited from class com.vaadin.ui.AbstractComponent
DESIGN_ATTR_PLAIN_TEXT
-
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
Constructors Constructor Description BlobField()Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidattach()voiddetach()LabelgetDescriptionLabel()Get the descriptionLabelassociated with this instance.Class<byte[]>getType()UploadgetUpload()Get theUploadassociated with this instance.protected ComponentinitContent()OutputStreamreceiveUpload(String filename, String mimeType)protected voidsetInternalValue(byte[] value)protected voidupdateDisplay()Update the description label to reflect the current property value and read-only status.voidupdateProgress(long readBytes, long contentLength)voiduploadFailed(Upload.FailedEvent event)voiduploadStarted(Upload.StartedEvent event)voiduploadSucceeded(Upload.SucceededEvent event)-
Methods inherited from class com.vaadin.ui.CustomField
focus, getContent, getTabIndex, iterator, setFocusDelegate, setHeight, setTabIndex, setWidth
-
Methods inherited from class com.vaadin.ui.AbstractField
addListener, addListener, addReadOnlyStatusChangeListener, addValidator, addValueChangeListener, beforeClientResponse, clear, commit, discard, fireReadOnlyStatusChange, fireValueChange, getConversionError, getConversionError, getConvertedValue, getConverter, getCurrentBufferedSourceException, getCustomAttributes, getErrorMessage, getInternalValue, getModelType, getPropertyDataSource, getRequiredError, getState, getState, getValidators, getValue, isBuffered, isEmpty, isImmediate, isInvalidAllowed, isInvalidCommitted, isModified, isReadOnly, isRequired, isValid, isValidationVisible, readDesign, readOnlyStatusChange, removeAllValidators, removeListener, removeListener, removeReadOnlyStatusChangeListener, removeValidator, removeValueChangeListener, setBuffered, setConversionError, setConvertedValue, setConverter, setConverter, setCurrentBufferedSourceException, setInvalidAllowed, setInvalidCommitted, setLocale, setPropertyDataSource, setReadOnly, setRequired, setRequiredError, setValidationVisible, setValue, setValue, setValue, shouldHideErrors, toString, validate, validate, valueChange, writeDesign
-
Methods inherited from class com.vaadin.ui.AbstractComponent
addContextClickListener, addListener, addShortcutListener, addStyleName, findAncestor, fireComponentErrorEvent, fireComponentEvent, getActionManager, getCaption, getComponentError, getData, getDebugId, getDescription, getExplicitImmediateValue, getHeight, getHeightUnits, getIcon, getId, getLocale, getParent, getPrimaryStyleName, getStyleName, getWidth, getWidthUnits, isCaptionAsHtml, isConnectorEnabled, isEnabled, isOrHasAncestor, isResponsive, isVisible, removeContextClickListener, removeListener, removeShortcutListener, removeStyleName, setCaption, setCaptionAsHtml, setComponentError, setData, setDebugId, setDescription, setEnabled, setHeight, setHeightUndefined, setIcon, setId, setImmediate, setParent, setPrimaryStyleName, setResponsive, setSizeFull, setSizeUndefined, setStyleName, setStyleName, setVisible, setWidth, setWidthUndefined
-
Methods inherited from class com.vaadin.server.AbstractClientConnector
addAttachListener, 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
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.vaadin.event.Action.ShortcutNotifier
addShortcutListener, removeShortcutListener
-
Methods inherited from interface com.vaadin.server.ClientConnector
addAttachListener, addDetachListener, beforeClientResponse, encodeState, getErrorHandler, getExtensions, getRpcManager, getStateType, handleConnectorRequest, isAttached, isConnectorEnabled, markAsDirty, markAsDirtyRecursive, removeAttachListener, removeDetachListener, removeExtension, requestRepaint, requestRepaintAll, retrievePendingRpcCalls, setErrorHandler
-
Methods inherited from interface com.vaadin.ui.Component
addListener, addStyleName, getCaption, getDescription, getIcon, getId, getLocale, getParent, getPrimaryStyleName, getStyleName, getUI, isEnabled, isReadOnly, isVisible, readDesign, removeListener, removeStyleName, setCaption, setEnabled, setIcon, setId, setParent, setPrimaryStyleName, setReadOnly, setStyleName, setVisible, writeDesign
-
Methods inherited from interface com.vaadin.shared.Connector
getConnectorId
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Methods inherited from interface com.vaadin.server.Sizeable
getHeight, getHeightUnits, getWidth, getWidthUnits, setHeight, setHeightUndefined, setSizeFull, setSizeUndefined, setWidth, setWidthUndefined
-
-
-
-
Field Detail
-
log
protected final Logger log
-
-
Method Detail
-
attach
public void attach()
- Specified by:
attachin interfaceClientConnector- Specified by:
attachin interfaceComponent- Overrides:
attachin classCustomField<byte[]>
-
detach
public void detach()
- Specified by:
detachin interfaceClientConnector- Overrides:
detachin classAbstractField<byte[]>
-
getUpload
public Upload getUpload()
Get theUploadassociated with this instance.- Returns:
- the associated
Upload
-
getDescriptionLabel
public Label getDescriptionLabel()
Get the descriptionLabelassociated with this instance.- Returns:
- the associated description
-
getType
public Class<byte[]> getType()
- Specified by:
getTypein interfaceProperty<byte[]>- Specified by:
getTypein classAbstractField<byte[]>
-
initContent
protected Component initContent()
- Specified by:
initContentin classCustomField<byte[]>
-
setInternalValue
protected void setInternalValue(byte[] value)
- Overrides:
setInternalValuein classAbstractField<byte[]>
-
receiveUpload
public OutputStream receiveUpload(String filename, String mimeType)
- Specified by:
receiveUploadin interfaceUpload.Receiver
-
uploadStarted
public void uploadStarted(Upload.StartedEvent event)
- Specified by:
uploadStartedin interfaceUpload.StartedListener
-
updateProgress
public void updateProgress(long readBytes, long contentLength)- Specified by:
updateProgressin interfaceUpload.ProgressListener
-
uploadSucceeded
public void uploadSucceeded(Upload.SucceededEvent event)
- Specified by:
uploadSucceededin interfaceUpload.SucceededListener
-
uploadFailed
public void uploadFailed(Upload.FailedEvent event)
- Specified by:
uploadFailedin interfaceUpload.FailedListener
-
updateDisplay
protected void updateDisplay()
Update the description label to reflect the current property value and read-only status.
-
-