|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.vaadin.server.AbstractClientConnector com.vaadin.ui.AbstractComponent com.vaadin.ui.AbstractField<T> com.vaadin.ui.CustomField<Byte[]> info.magnolia.ui.form.field.upload.AbstractUploadField<D> info.magnolia.ui.form.field.upload.basic.BasicUploadField<D>
D
- FileItemWrapper
implemented class.public class BasicUploadField<D extends BasicFileItemWrapper>
Basic implementation of AbstractUploadField
.
Define the Layout components for
Nested Class Summary |
---|
Nested classes/interfaces inherited from class info.magnolia.ui.form.field.upload.AbstractUploadField |
---|
AbstractUploadField.InterruptionReason |
Nested classes/interfaces inherited from class com.vaadin.ui.AbstractField |
---|
com.vaadin.ui.AbstractField.FocusShortcut, com.vaadin.ui.AbstractField.ReadOnlyStatusChangeEvent |
Nested classes/interfaces inherited from interface com.vaadin.ui.HasComponents |
---|
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 |
Nested classes/interfaces inherited from interface com.vaadin.ui.Component |
---|
com.vaadin.ui.Component.ErrorEvent, com.vaadin.ui.Component.Event, com.vaadin.ui.Component.Focusable, com.vaadin.ui.Component.Listener |
Nested classes/interfaces inherited from interface com.vaadin.server.ClientConnector |
---|
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 |
Nested classes/interfaces inherited from interface com.vaadin.server.Sizeable |
---|
com.vaadin.server.Sizeable.Unit |
Nested classes/interfaces inherited from interface com.vaadin.ui.Field |
---|
com.vaadin.ui.Field.ValueChangeEvent |
Nested classes/interfaces inherited from interface com.vaadin.data.Buffered |
---|
com.vaadin.data.Buffered.SourceException |
Nested classes/interfaces inherited from interface com.vaadin.data.Property |
---|
com.vaadin.data.Property.Editor, com.vaadin.data.Property.ReadOnlyException, com.vaadin.data.Property.ReadOnlyStatusChangeListener, com.vaadin.data.Property.ReadOnlyStatusChangeNotifier, com.vaadin.data.Property.Transactional<T>, com.vaadin.data.Property.ValueChangeListener, com.vaadin.data.Property.ValueChangeNotifier, com.vaadin.data.Property.Viewer |
Field Summary | |
---|---|
protected String |
captionExtension
Caption section. |
protected String |
deleteCaption
|
protected String |
dropZoneCaption
|
protected String |
errorNoteCaption
|
protected String |
fileDetailFormatCaption
|
protected String |
fileDetailHeaderCaption
|
protected String |
fileDetailNameCaption
|
protected String |
fileDetailSizeCaption
|
protected String |
fileDetailSourceCaption
|
protected ImageProvider |
imageProvider
|
protected String |
inProgressCaption
|
protected String |
inProgressRatioCaption
|
protected String |
selectAnotherCaption
|
protected String |
selectNewCaption
|
protected String |
successNoteCaption
|
protected UiContext |
uiContext
|
protected String |
warningNoteCaption
|
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 | |
---|---|
BasicUploadField(D fileWrapper,
File tmpUploadDirectory,
ImageProvider imageProvider,
UiContext uiContext,
BasicUploadFieldDefinition definition,
info.magnolia.i18nsystem.SimpleTranslator i18n)
|
Method Summary | |
---|---|
void |
attach()
Initialize the root component. |
protected void |
buildCompletedLayout()
Main entry point to create the Completed Layout. |
protected void |
buildEmptyLayout()
Main entry point to create the Empty Layout. |
protected void |
buildInProgressLayout(String uploadedFileMimeType)
Main entry point to create the In Progress Layout. |
protected com.vaadin.ui.Layout |
createCompletedActionLayout()
Build the Completed Action Layout. |
protected com.vaadin.ui.Button |
createDeleteButton()
Create Delete button. |
protected String |
createIconStyleName(FileItemWrapper fileWrapper)
Create the Icon related to a File. |
protected com.vaadin.ui.Component |
createThumbnailComponent()
|
protected void |
displayUploadFailedNote(String fileName)
|
protected void |
displayUploadFinishedNote(String fileName)
|
protected void |
displayUploadInterruptNote(AbstractUploadField.InterruptionReason reason)
|
protected String |
getCaption(String caption,
String[] args)
|
com.vaadin.ui.CssLayout |
getCssLayout()
For test cases. |
protected com.vaadin.ui.Component |
getFileDetailFileFormat()
Add File Format. If editFileFormat is true, display an Input Text Field. |
protected com.vaadin.ui.Component |
getFileDetailFileName()
Add File Name. If editFileName is true, display an Input Text Field. |
protected com.vaadin.ui.Component |
getFileDetailHeader()
Add Title. |
protected com.vaadin.ui.Component |
getFileDetailSize()
Add File Info. |
protected com.vaadin.ui.Component |
initContent()
|
protected boolean |
isEmpty()
|
protected void |
populateFromDefinition(BasicUploadFieldDefinition definition)
Configure Field based on the definition. |
protected void |
refreshInProgressLayout(long readBytes,
long contentLength,
String fileName)
Update the in Progress Layout. |
protected void |
setCaptionExtension(String mimeType)
|
void |
setDeteteCaption(String deleteCaption)
|
void |
setDropZoneCaption(String dropZoneCaption)
|
void |
setEditFileFormat(boolean editFileFormat)
|
void |
setEditFileName(boolean editFileName)
|
void |
setErrorNoteCaption(String errorNoteCaption)
|
void |
setFileDetailFormatCaption(String fileDetailFormatCaption)
|
void |
setFileDetailHeaderCaption(String fileDetailHeaderCaption)
|
void |
setFileDetailNameCaption(String fileDetailNameCaption)
|
void |
setFileDetailSizeCaption(String fileDetailSizeCaption)
|
void |
setFileDetailSourceCaption(String fileDetailSourceCaption)
|
void |
setInProgressCaption(String inProgressCaption)
|
void |
setInProgressRatioCaption(String inProgressRatioCaption)
|
void |
setReadOnly(boolean readOnly)
|
void |
setSelectAnotherCaption(String selectAnotherCaption)
|
void |
setSelectNewCaption(String selectNewCaption)
|
void |
setSizeInterruption(String sizeInterruption)
|
void |
setSuccessNoteCaption(String successNoteCaption)
|
void |
setTypeInterruption(String typeInterruption)
|
void |
setUserInterruption(String userInterruption)
|
void |
setWarningNoteCaption(String warningNoteCaption)
|
Methods inherited from class info.magnolia.ui.form.field.upload.AbstractUploadField |
---|
createDropZone, detach, drop, getAcceptCriterion, getDropZone, getFileWrapper, getRootLayout, getType, getUpload, interruptUpload, isValidFile, setAllowedMimeTypePattern, setMaxUploadSize, setRootLayout, updateDisplay, updateProgress, uploadFailed, uploadFinished, uploadStarted |
Methods inherited from class com.vaadin.ui.CustomField |
---|
getContent, iterator, setHeight, setWidth |
Methods inherited from class com.vaadin.ui.AbstractField |
---|
addListener, addListener, addReadOnlyStatusChangeListener, addValidator, addValueChangeListener, beforeClientResponse, commit, discard, fireReadOnlyStatusChange, fireValueChange, focus, getConversionError, getConversionError, getConvertedValue, getConverter, getCurrentBufferedSourceException, getErrorMessage, getInternalValue, getModelType, getPropertyDataSource, getRequiredError, getState, getState, getTabIndex, getValidators, getValue, isBuffered, isInvalidAllowed, isInvalidCommitted, isModified, isReadOnly, isRequired, isValid, isValidationVisible, readOnlyStatusChange, removeAllValidators, removeListener, removeListener, removeReadOnlyStatusChangeListener, removeValidator, removeValueChangeListener, setBuffered, setConversionError, setConvertedValue, setConverter, setConverter, setCurrentBufferedSourceException, setInternalValue, setInvalidAllowed, setInvalidCommitted, setLocale, setPropertyDataSource, setRequired, setRequiredError, setTabIndex, setValidationVisible, setValue, setValue, shouldHideErrors, toString, validate, validate, valueChange |
Methods inherited from class com.vaadin.ui.AbstractComponent |
---|
addListener, addShortcutListener, addStyleName, findAncestor, fireComponentErrorEvent, fireComponentEvent, getActionManager, getCaption, getComponentError, getData, getDebugId, getDescription, getHeight, getHeightUnits, getIcon, getId, getLocale, getParent, getPrimaryStyleName, getStyleName, getWidth, getWidthUnits, isConnectorEnabled, isEnabled, isImmediate, isVisible, removeListener, removeShortcutListener, removeStyleName, setCaption, setComponentError, setData, setDebugId, setDescription, setEnabled, setHeight, setIcon, setId, setImmediate, setParent, setPrimaryStyleName, setSizeFull, setSizeUndefined, setStyleName, setVisible, setWidth |
Methods inherited from class com.vaadin.server.AbstractClientConnector |
---|
addAttachListener, addDetachListener, addExtension, addListener, addListener, addListener, addMethodInvocationToQueue, createState, encodeState, fireEvent, getAllChildrenIterable, getConnectorId, getErrorHandler, getExtensions, getListeners, getResource, getRpcManager, getRpcProxy, getSession, getStateType, getUI, handleConnectorRequest, hasListeners, isAttached, markAsDirty, markAsDirtyRecursive, registerRpc, registerRpc, removeAttachListener, removeDetachListener, removeExtension, removeListener, removeListener, removeListener, removeListener, requestRepaint, requestRepaintAll, retrievePendingRpcCalls, setErrorHandler, setResource |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface com.vaadin.ui.Component |
---|
addListener, addStyleName, getCaption, getDescription, getIcon, getId, getLocale, getParent, getPrimaryStyleName, getStyleName, getUI, isEnabled, isReadOnly, isVisible, removeListener, removeStyleName, setCaption, setEnabled, setIcon, setId, setParent, setPrimaryStyleName, setStyleName, setVisible |
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.shared.Connector |
---|
getConnectorId |
Methods inherited from interface com.vaadin.server.Sizeable |
---|
getHeight, getHeightUnits, getWidth, getWidthUnits, setHeight, setSizeFull, setSizeUndefined, setWidth |
Methods inherited from interface com.vaadin.event.Action.ShortcutNotifier |
---|
addShortcutListener, removeShortcutListener |
Field Detail |
---|
protected final ImageProvider imageProvider
protected UiContext uiContext
protected String captionExtension
protected String selectNewCaption
protected String selectAnotherCaption
protected String deleteCaption
protected String dropZoneCaption
protected String inProgressCaption
protected String inProgressRatioCaption
protected String fileDetailHeaderCaption
protected String fileDetailNameCaption
protected String fileDetailSizeCaption
protected String fileDetailFormatCaption
protected String fileDetailSourceCaption
protected String successNoteCaption
protected String warningNoteCaption
protected String errorNoteCaption
Constructor Detail |
---|
public BasicUploadField(D fileWrapper, File tmpUploadDirectory, ImageProvider imageProvider, UiContext uiContext, BasicUploadFieldDefinition definition, info.magnolia.i18nsystem.SimpleTranslator i18n)
Method Detail |
---|
public void attach()
attach
in interface com.vaadin.server.ClientConnector
attach
in interface com.vaadin.ui.Component
attach
in class com.vaadin.ui.CustomField<Byte[]>
protected void buildEmptyLayout()
buildEmptyLayout
in class AbstractUploadField<D extends BasicFileItemWrapper>
protected void buildInProgressLayout(String uploadedFileMimeType)
buildInProgressLayout
in class AbstractUploadField<D extends BasicFileItemWrapper>
protected void refreshInProgressLayout(long readBytes, long contentLength, String fileName)
AbstractUploadField
refreshInProgressLayout
in class AbstractUploadField<D extends BasicFileItemWrapper>
protected void buildCompletedLayout()
buildCompletedLayout
in class AbstractUploadField<D extends BasicFileItemWrapper>
protected com.vaadin.ui.Layout createCompletedActionLayout()
protected com.vaadin.ui.Button createDeleteButton()
protected com.vaadin.ui.Component getFileDetailHeader()
protected com.vaadin.ui.Component getFileDetailFileName()
protected com.vaadin.ui.Component getFileDetailSize()
protected com.vaadin.ui.Component getFileDetailFileFormat()
protected com.vaadin.ui.Component createThumbnailComponent()
protected String createIconStyleName(FileItemWrapper fileWrapper)
fileWrapper
-
protected com.vaadin.ui.Component initContent()
initContent
in class com.vaadin.ui.CustomField<Byte[]>
protected void populateFromDefinition(BasicUploadFieldDefinition definition)
protected void setCaptionExtension(String mimeType)
protected String getCaption(String caption, String[] args)
public void setSelectNewCaption(String selectNewCaption)
public void setSelectAnotherCaption(String selectAnotherCaption)
public void setDropZoneCaption(String dropZoneCaption)
public void setInProgressCaption(String inProgressCaption)
public void setInProgressRatioCaption(String inProgressRatioCaption)
public void setFileDetailHeaderCaption(String fileDetailHeaderCaption)
public void setFileDetailNameCaption(String fileDetailNameCaption)
public void setFileDetailSizeCaption(String fileDetailSizeCaption)
public void setFileDetailFormatCaption(String fileDetailFormatCaption)
public void setFileDetailSourceCaption(String fileDetailSourceCaption)
public void setSuccessNoteCaption(String successNoteCaption)
public void setWarningNoteCaption(String warningNoteCaption)
public void setErrorNoteCaption(String errorNoteCaption)
public void setDeteteCaption(String deleteCaption)
public void setSizeInterruption(String sizeInterruption)
public void setTypeInterruption(String typeInterruption)
public void setUserInterruption(String userInterruption)
protected void displayUploadInterruptNote(AbstractUploadField.InterruptionReason reason)
displayUploadInterruptNote
in class AbstractUploadField<D extends BasicFileItemWrapper>
protected void displayUploadFinishedNote(String fileName)
displayUploadFinishedNote
in class AbstractUploadField<D extends BasicFileItemWrapper>
protected void displayUploadFailedNote(String fileName)
displayUploadFailedNote
in class AbstractUploadField<D extends BasicFileItemWrapper>
public void setEditFileName(boolean editFileName)
public void setEditFileFormat(boolean editFileFormat)
public com.vaadin.ui.CssLayout getCssLayout()
protected boolean isEmpty()
isEmpty
in class com.vaadin.ui.AbstractField<Byte[]>
public void setReadOnly(boolean readOnly)
setReadOnly
in interface com.vaadin.data.Property<Byte[]>
setReadOnly
in interface com.vaadin.ui.Component
setReadOnly
in class com.vaadin.ui.AbstractField<Byte[]>
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |