public abstract class ImageMediaField extends com.vaadin.v7.ui.CustomField<byte[]> implements MediaField, Scalable
com.vaadin.v7.ui.AbstractField.FocusShortcut, com.vaadin.v7.ui.AbstractField.ReadOnlyStatusChangeEvent
com.vaadin.v7.ui.Field.ValueChangeEvent
com.vaadin.v7.data.Buffered.SourceException
com.vaadin.v7.data.Property.Editor, com.vaadin.v7.data.Property.ReadOnlyException, com.vaadin.v7.data.Property.ReadOnlyStatusChangeEvent, com.vaadin.v7.data.Property.ReadOnlyStatusChangeListener, com.vaadin.v7.data.Property.ReadOnlyStatusChangeNotifier, com.vaadin.v7.data.Property.Transactional<T>, com.vaadin.v7.data.Property.ValueChangeListener, com.vaadin.v7.data.Property.ValueChangeNotifier, com.vaadin.v7.data.Property.Viewer
com.vaadin.ui.Component.ErrorEvent, com.vaadin.ui.Component.Event, com.vaadin.ui.Component.Focusable, com.vaadin.ui.Component.Listener
com.vaadin.server.ClientConnector.AttachEvent, com.vaadin.server.ClientConnector.AttachListener, com.vaadin.server.ClientConnector.ConnectorErrorEvent, com.vaadin.server.ClientConnector.DetachEvent, com.vaadin.server.ClientConnector.DetachListener
com.vaadin.server.Sizeable.Unit
com.vaadin.ui.HasComponents.ComponentAttachDetachNotifier, com.vaadin.ui.HasComponents.ComponentAttachEvent, com.vaadin.ui.HasComponents.ComponentAttachListener, com.vaadin.ui.HasComponents.ComponentDetachEvent, com.vaadin.ui.HasComponents.ComponentDetachListener
Modifier and Type | Field and Description |
---|---|
protected static String |
DEFAULT_FORMAT |
protected static String |
TEMP_FILE_NAME_BASE |
Constructor and Description |
---|
ImageMediaField() |
Modifier and Type | Method and Description |
---|---|
void |
applyChanges() |
protected abstract com.vaadin.ui.Component |
createImage() |
protected com.vaadin.server.StreamResource |
createResourceFromValue() |
protected InputStream |
createStreamSource(BufferedImage img,
String formatName) |
void |
execute() |
protected BufferedImage |
executeImageModification() |
protected String |
generateTempFileName() |
Class<byte[]> |
getType() |
protected com.vaadin.ui.Component |
initContent() |
abstract void |
refreshImageSource() |
void |
revertChanges() |
void |
scaleToActualSize() |
void |
scaleToFit() |
protected void |
setInternalValue(byte[] newValue) |
attach, focus, getContent, getTabIndex, iterator, setFocusDelegate, setHeight, setTabIndex, setWidth
addListener, addListener, addReadOnlyStatusChangeListener, addValidator, addValueChangeListener, beforeClientResponse, clear, commit, detach, discard, fireReadOnlyStatusChange, fireValueChange, getConversionError, getConversionError, getConvertedValue, getConverter, getCurrentBufferedSourceException, getCustomAttributes, getErrorMessage, getInternalValue, getModelType, getPropertyDataSource, getRequiredError, getState, getState, getValidators, getValue, isBuffered, isEmpty, 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, validate, validate, valueChange, writeDesign
getExplicitImmediateValue, isImmediate, setImmediate
addContextClickListener, addListener, addShortcutListener, addStyleName, findAncestor, fireComponentErrorEvent, fireComponentEvent, getActionManager, getCaption, getComponentError, getData, getDebugId, getDescription, 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, setHeightUndefined, setIcon, setId, setParent, setPrimaryStyleName, setRequiredIndicatorVisible, setResponsive, setSizeFull, setSizeUndefined, setStyleName, setStyleName, setVisible, setWidth, setWidthUndefined
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, updateDiffstate
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
clear, getRequiredError, isEmpty, isRequired, setRequired, setRequiredError
isInvalidCommitted, setInvalidCommitted
commit, discard, isBuffered, isModified, setBuffered
addValidator, getValidators, isInvalidAllowed, isValid, removeAllValidators, removeValidator, setInvalidAllowed, validate
getValue, isReadOnly, setReadOnly, setValue
addListener, addValueChangeListener, removeListener, removeValueChangeListener
getPropertyDataSource, setPropertyDataSource
addListener, addStyleName, addStyleNames, attach, getCaption, getDescription, getIcon, getId, getLocale, getParent, getPrimaryStyleName, getStyleName, getUI, isEnabled, isVisible, readDesign, removeListener, removeStyleName, removeStyleNames, setCaption, setEnabled, setIcon, setId, setParent, setPrimaryStyleName, setStyleName, setVisible, writeDesign
addAttachListener, addDetachListener, beforeClientResponse, detach, encodeState, getErrorHandler, getExtensions, getRpcManager, getStateType, handleConnectorRequest, isAttached, isConnectorEnabled, markAsDirty, markAsDirtyRecursive, removeAttachListener, removeDetachListener, removeExtension, requestRepaint, requestRepaintAll, retrievePendingRpcCalls, setErrorHandler
getHeight, getHeightUnits, getWidth, getWidthUnits, setHeight, setHeight, setHeightUndefined, setSizeFull, setSizeUndefined, setWidth, setWidth, setWidthUndefined
forEach, spliterator
protected static final String DEFAULT_FORMAT
protected static final String TEMP_FILE_NAME_BASE
protected com.vaadin.ui.Component initContent()
initContent
in class com.vaadin.v7.ui.CustomField<byte[]>
protected abstract com.vaadin.ui.Component createImage()
protected void setInternalValue(byte[] newValue)
setInternalValue
in class com.vaadin.v7.ui.AbstractField<byte[]>
public void scaleToActualSize()
scaleToActualSize
in interface Scalable
public void scaleToFit()
scaleToFit
in interface Scalable
public Class<byte[]> getType()
getType
in interface com.vaadin.v7.data.Property<byte[]>
getType
in class com.vaadin.v7.ui.AbstractField<byte[]>
public void applyChanges()
applyChanges
in interface MediaField
public void revertChanges()
revertChanges
in interface MediaField
public void execute()
protected BufferedImage executeImageModification() throws IOException
IOException
public abstract void refreshImageSource()
protected String generateTempFileName()
protected com.vaadin.server.StreamResource createResourceFromValue()
protected InputStream createStreamSource(BufferedImage img, String formatName) throws IOException
IOException
Copyright © 2018 Magnolia International Ltd.. All rights reserved.