Package org.opencms.ui.components
Class CmsUploadButton
java.lang.Object
com.vaadin.server.AbstractClientConnector
com.vaadin.ui.AbstractComponent
com.vaadin.ui.AbstractFocusable
com.vaadin.ui.Button
org.opencms.ui.components.CmsUploadButton
- All Implemented Interfaces:
com.vaadin.event.Action.ShortcutNotifier
,com.vaadin.event.ContextClickEvent.ContextClickNotifier
,com.vaadin.event.FieldEvents.BlurNotifier
,com.vaadin.event.FieldEvents.FocusNotifier
,com.vaadin.event.MethodEventSource
,com.vaadin.server.ClientConnector
,com.vaadin.server.Sizeable
,com.vaadin.shared.communication.ServerRpc
,com.vaadin.shared.Connector
,com.vaadin.ui.Component
,com.vaadin.ui.Component.Focusable
,Serializable
,I_CmsUploadRpc
The upload button.
- See Also:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic interface
Upload listener interface.Nested classes/interfaces inherited from class com.vaadin.ui.Button
com.vaadin.ui.Button.ClickEvent, com.vaadin.ui.Button.ClickListener, com.vaadin.ui.Button.ClickShortcut
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.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.Sizeable
com.vaadin.server.Sizeable.Unit
-
Field Summary
Fields inherited from class com.vaadin.ui.Button
clickShortcut
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
ConstructorDescriptionCmsUploadButton
(com.vaadin.server.Resource icon, String targetFolderRootPath) Constructor.CmsUploadButton
(String targetFolderRootPath) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Adds an upload listener.protected CmsUploadState
getState()
void
onUploadFinished
(List<String> uploadedFiles) Called once the upload is finished.void
Removes the given upload listener.void
setEnabled
(boolean enabled) void
setTargetFolder
(String targetFolder) Sets the upload target folder.Methods inherited from class com.vaadin.ui.Button
addClickListener, click, fireClick, fireClick, getCustomAttributes, getIconAlternateText, getState, isDisableOnClick, isHtmlContentAllowed, readDesign, removeClickListener, removeClickShortcut, setClickShortcut, setDisableOnClick, setHtmlContentAllowed, setIcon, setIconAlternateText, writeDesign
Methods inherited from class com.vaadin.ui.AbstractFocusable
addBlurListener, addFocusListener, focus, getTabIndex, setTabIndex
Methods inherited from class com.vaadin.ui.AbstractComponent
addContextClickListener, addListener, addShortcutListener, addStyleName, attach, beforeClientResponse, detach, findAncestor, fireComponentErrorEvent, fireComponentEvent, getActionManager, getCaption, getComponentError, getData, getDebugId, getDescription, getErrorMessage, getHeight, getHeightUnits, getIcon, getId, getLocale, getParent, getPrimaryStyleName, getStyleName, getWidth, getWidthUnits, isCaptionAsHtml, isConnectorEnabled, isEnabled, isOrHasAncestor, isReadOnly, isRequiredIndicatorVisible, isResponsive, isVisible, removeContextClickListener, removeListener, removeShortcutListener, removeStyleName, setCaption, setCaptionAsHtml, setComponentError, setData, setDebugId, setDescription, setDescription, setHeight, setHeight, setHeightFull, setHeightUndefined, setIcon, setId, setLocale, setParent, setPrimaryStyleName, setReadOnly, setRequiredIndicatorVisible, setResponsive, setSizeFull, setSizeUndefined, setStyleName, setVisible, setWidth, setWidth, setWidthFull, setWidthUndefined
Methods inherited from class com.vaadin.server.AbstractClientConnector
addAttachListener, addDetachListener, addExtension, addListener, addListener, addListener, 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, removeListener, requestRepaint, requestRepaintAll, retrievePendingRpcCalls, setErrorHandler, setResource, updateDiffstate
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, 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, detach, 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, addStyleNames, attach, getCaption, getDescription, getIcon, getId, getLocale, getParent, getPrimaryStyleName, getStyleName, getUI, isEnabled, isVisible, removeListener, removeStyleName, removeStyleNames, setCaption, setIcon, setId, setParent, setPrimaryStyleName, setStyleName, setStyleName, setVisible
Methods inherited from interface com.vaadin.shared.Connector
getConnectorId
Methods inherited from interface com.vaadin.server.Sizeable
getHeight, getHeightUnits, getWidth, getWidthUnits, setHeight, setHeight, setHeightFull, setHeightUndefined, setSizeFull, setSizeUndefined, setWidth, setWidth, setWidthFull, setWidthUndefined
-
Constructor Details
-
CmsUploadButton
Constructor.- Parameters:
icon
- the button icontargetFolderRootPath
- the target folder path
-
CmsUploadButton
Constructor.- Parameters:
targetFolderRootPath
- the upload target folder root path
-
-
Method Details
-
addUploadListener
Adds an upload listener.- Parameters:
listener
- the listener instance
-
onUploadFinished
Description copied from interface:I_CmsUploadRpc
Called once the upload is finished.- Specified by:
onUploadFinished
in interfaceI_CmsUploadRpc
- Parameters:
uploadedFiles
- the uploaded file root paths- See Also:
-
removeUploadListener
Removes the given upload listener.- Parameters:
listener
- the listener to remove
-
setEnabled
- Specified by:
setEnabled
in interfacecom.vaadin.ui.Component
- Overrides:
setEnabled
in classcom.vaadin.ui.AbstractComponent
-
setTargetFolder
Sets the upload target folder.- Parameters:
targetFolder
- the upload target
-
getState
- Overrides:
getState
in classcom.vaadin.ui.Button
- See Also:
-
AbstractComponent.getState()
-