Class DDAccordion
java.lang.Object
com.vaadin.server.AbstractClientConnector
com.vaadin.ui.AbstractComponent
com.vaadin.ui.AbstractComponentContainer
com.vaadin.ui.TabSheet
com.vaadin.ui.Accordion
io.jmix.ui.widget.addon.dragdroplayouts.DDAccordion
- All Implemented Interfaces:
com.vaadin.event.ConnectorEventListener
,com.vaadin.event.ContextClickEvent.ContextClickNotifier
,com.vaadin.event.dd.DragSource
,com.vaadin.event.dd.DropTarget
,com.vaadin.event.FieldEvents.BlurNotifier
,com.vaadin.event.FieldEvents.FocusNotifier
,com.vaadin.event.MethodEventSource
,com.vaadin.event.SerializableEventListener
,com.vaadin.server.ClientConnector
,com.vaadin.server.Sizeable
,com.vaadin.server.VariableOwner
,com.vaadin.shared.Connector
,com.vaadin.ui.Component
,com.vaadin.ui.Component.Focusable
,com.vaadin.ui.Component.HasContextHelp
,com.vaadin.ui.ComponentContainer
,com.vaadin.ui.HasComponents
,com.vaadin.ui.HasComponents.ComponentAttachDetachNotifier
,com.vaadin.ui.LegacyComponent
,com.vaadin.ui.SelectiveRenderer
,DragFilterSupport
,DragGrabFilterSupport
,DragImageReferenceSupport
,HasDragCaptionProvider
,LayoutDragSource
,ShimSupport
,Serializable
,Iterable<com.vaadin.ui.Component>
,EventListener
public class DDAccordion
extends com.vaadin.ui.Accordion
implements LayoutDragSource, com.vaadin.event.dd.DropTarget, ShimSupport, com.vaadin.ui.LegacyComponent, DragImageReferenceSupport, DragFilterSupport, DragGrabFilterSupport, HasDragCaptionProvider
Accordion with drag and drop support
- Since:
- 0.4.0
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class com.vaadin.ui.TabSheet
com.vaadin.ui.TabSheet.CloseHandler, com.vaadin.ui.TabSheet.SelectedTabChangeEvent, com.vaadin.ui.TabSheet.SelectedTabChangeListener, com.vaadin.ui.TabSheet.Tab, com.vaadin.ui.TabSheet.TabsheetServerRpcImpl, com.vaadin.ui.TabSheet.TabSheetTabImpl
Nested classes/interfaces inherited from class com.vaadin.server.AbstractClientConnector
com.vaadin.server.AbstractClientConnector.IncorrectConcurrentAccessHandler
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.HasContextHelp, com.vaadin.ui.Component.Listener
Nested classes/interfaces inherited from interface com.vaadin.ui.Component.HasContextHelp
com.vaadin.ui.Component.HasContextHelp.ContextHelpIconClickEvent, com.vaadin.ui.Component.HasContextHelp.ContextHelpIconClickListener
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.server.Sizeable
com.vaadin.server.Sizeable.Unit
-
Field Summary
Fields inherited from class com.vaadin.ui.TabSheet
keyMapper
Fields inherited from class com.vaadin.ui.AbstractComponent
componentErrorProvider, DESIGN_ATTR_PLAIN_TEXT, requiredError
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
ConstructorDescriptionConstruct a new accordionDDAccordion
(com.vaadin.ui.Component... components) Construct a new accordion with the provided tabs -
Method Summary
Modifier and TypeMethodDescriptionvoid
beforeClientResponse
(boolean initial) void
changeVariables
(Object source, Map<String, Object> variables) Get a filter which determines which components can be dragged from the layout and which cannot.Returns the drag image providerGets the drag mode which controls how drags can be made.com.vaadin.event.dd.DropHandler
getState()
com.vaadin.event.Transferable
getTransferable
(Map<String, Object> rawVariables) boolean
Are shims used over iframes so dragging is possiblevoid
paintContent
(com.vaadin.server.PaintTarget target) void
setComponentVerticalDropRatio
(float ratio) Sets the ratio which determines how a tab is divided into drop zones.void
setDragCaptionProvider
(DragCaptionProvider provider) void
setDragFilter
(DragFilter dragFilter) Set a filter which determines which components can be dragged from the layout and which cannot.void
setDragGrabFilter
(DragGrabFilter dragGrabFilter) void
setDragImageProvider
(DragImageProvider provider) Set a component as a drag image for a component in the layout.void
setDragMode
(LayoutDragMode mode) Sets the drag mode which controls how drags can be made.void
setDropHandler
(com.vaadin.event.dd.DropHandler dropHandler) Sets the current handler which handles dropped components on the layout.void
setShim
(boolean shim) False to disable the iframe shim used to enable dragging iframe based components (defaults to true).com.vaadin.event.dd.TargetDetails
translateDropTargetDetails
(Map<String, Object> clientVariables) Methods inherited from class com.vaadin.ui.Accordion
getState
Methods inherited from class com.vaadin.ui.TabSheet
_closeHandler, _components, _selected, _tabs, addBlurListener, addComponent, addFocusListener, addSelectedTabChangeListener, addTab, addTab, addTab, addTab, addTab, areTabsHidden, fireSelectedTabChange, fireSelectedTabChange, focus, getComponentCount, getCustomAttributes, getSelectedTab, getTab, getTab, getTabIndex, getTabPosition, hideTabs, isRendered, isTabCaptionsAsHtml, isTabsVisible, iterator, moveComponentsFrom, readDesign, removeComponent, removeSelectedTabChangeListener, removeTab, replaceComponent, selectedTabIndexAfterTabRemove, setCloseHandler, setSelectedTab, setSelectedTab, setSelectedTab, setSelectedTab, setTabCaptionsAsHtml, setTabIndex, setTabPosition, setTabsVisible, writeDesign
Methods inherited from class com.vaadin.ui.AbstractComponentContainer
addComponentAttachListener, addComponentDetachListener, addComponents, fireComponentAttachEvent, fireComponentDetachEvent, getComponentIterator, removeAllComponents, removeComponentAttachListener, removeComponentDetachListener, setHeight, setWidth
Methods inherited from class com.vaadin.ui.AbstractComponent
addContextClickListener, addContextHelpIconClickListener, addListener, addShortcutListener, addStyleName, attach, detach, ensureContextHelpInitialized, findAncestor, fireComponentErrorEvent, fireComponentEvent, fireContextHelpClick, getActionManager, getCaption, getComponentError, getComponentErrorProvider, getContextHelpText, getData, getDebugId, getDescription, getErrorMessage, getHeight, getHeightUnits, getIcon, getId, getJTestId, getLocale, getParent, getPrimaryStyleName, getRequiredError, getStyleName, getWidth, getWidthUnits, isCaptionAsHtml, isConnectorEnabled, isContextHelpTextHtmlEnabled, isEnabled, isOrHasAncestor, isReadOnly, isRequiredIndicatorVisible, isResponsive, isVisible, removeContextClickListener, removeListener, removeShortcutListener, removeStyleName, setCaption, setCaptionAsHtml, setComponentError, setComponentErrorProvider, setContextHelpText, setContextHelpTextHtmlEnabled, setData, setDebugId, setDescription, setDescription, setEnabled, setHeight, setHeightFull, setHeightUndefined, setIcon, setId, setJTestId, setLocale, setParent, setPrimaryStyleName, setReadOnly, setRequiredError, setRequiredIndicatorVisible, setResponsive, setSizeFull, setSizeUndefined, setStyleName, setVisible, 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, getIncorrectConcurrentAccessHandler, 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, setConnectorResource, setErrorHandler, setIncorrectConcurrentAccessHandler, setResource, updateDiffstate
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.vaadin.server.ClientConnector
addAttachListener, addDetachListener, detach, encodeState, getErrorHandler, getExtensions, getRpcManager, getStateType, handleConnectorRequest, isAttached, isConnectorEnabled, markAsDirtyRecursive, removeAttachListener, removeDetachListener, removeExtension, requestRepaint, requestRepaintAll, retrievePendingRpcCalls, setErrorHandler
Methods inherited from interface com.vaadin.ui.Component
addListener, addStyleName, addStyleNames, attach, getCaption, getDescription, getIcon, getId, getJTestId, getLocale, getParent, getPrimaryStyleName, getStyleName, getUI, isEnabled, isVisible, readDesign, removeListener, removeStyleName, removeStyleNames, setCaption, setEnabled, setIcon, setId, setJTestId, setParent, setPrimaryStyleName, setStyleName, 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.ui.LegacyComponent
markAsDirty
Methods inherited from interface com.vaadin.server.Sizeable
getHeight, getHeightUnits, getWidth, getWidthUnits, setHeight, setHeight, setHeightFull, setHeightUndefined, setSizeFull, setSizeUndefined, setWidth, setWidth, setWidthFull, setWidthUndefined
Methods inherited from interface com.vaadin.server.VariableOwner
isEnabled
-
Constructor Details
-
DDAccordion
public DDAccordion()Construct a new accordion -
DDAccordion
public DDAccordion(com.vaadin.ui.Component... components) Construct a new accordion with the provided tabs- Parameters:
components
- the components provided as tabs
-
-
Method Details
-
getTransferable
- Specified by:
getTransferable
in interfacecom.vaadin.event.dd.DragSource
-
setDragCaptionProvider
- Specified by:
setDragCaptionProvider
in interfaceHasDragCaptionProvider
-
getDragCaptionProvider
- Specified by:
getDragCaptionProvider
in interfaceHasDragCaptionProvider
-
setDropHandler
public void setDropHandler(com.vaadin.event.dd.DropHandler dropHandler) Sets the current handler which handles dropped components on the layout. By setting a drop handler dropping components on the layout is enabled. By setting the dropHandler to null dropping is disabled.- Parameters:
dropHandler
- The drop handler to handle drop events or null to disable dropping
-
getDropHandler
public com.vaadin.event.dd.DropHandler getDropHandler()- Specified by:
getDropHandler
in interfacecom.vaadin.event.dd.DropTarget
-
translateDropTargetDetails
public com.vaadin.event.dd.TargetDetails translateDropTargetDetails(Map<String, Object> clientVariables) - Specified by:
translateDropTargetDetails
in interfacecom.vaadin.event.dd.DropTarget
-
getDragMode
Gets the drag mode which controls how drags can be made. The layout supports two modes, NONE which disables dragging from the layout and CLONE which enables dragging the component from the layout.- Specified by:
getDragMode
in interfaceLayoutDragSource
- Returns:
- The drag mode
-
setDragMode
Sets the drag mode which controls how drags can be made. The layout supports two modes, NONE which disables dragging from the layout and CLONE which enables dragging the component from the layout.- Specified by:
setDragMode
in interfaceLayoutDragSource
- Parameters:
mode
- The mode to set
-
paintContent
public void paintContent(com.vaadin.server.PaintTarget target) throws com.vaadin.server.PaintException - Specified by:
paintContent
in interfacecom.vaadin.ui.LegacyComponent
- Throws:
com.vaadin.server.PaintException
-
setComponentVerticalDropRatio
public void setComponentVerticalDropRatio(float ratio) Sets the ratio which determines how a tab is divided into drop zones. The ratio is measured from the left and right borders. For example, setting the ratio to 0.3 will divide the drop zone in three equal parts (left,middle,right). Setting the ratio to 0.5 will disable dropping in the middle and setting it to 0 will disable dropping at the sides.- Parameters:
ratio
- A ratio between 0 and 0.5. Default is 0.2
-
setShim
public void setShim(boolean shim) False to disable the iframe shim used to enable dragging iframe based components (defaults to true).- Specified by:
setShim
in interfaceShimSupport
- Parameters:
shim
- Are the iframes shimmed
-
isShimmed
public boolean isShimmed()Are shims used over iframes so dragging is possible- Specified by:
isShimmed
in interfaceShimSupport
- Returns:
- Are the iframes shimmed
-
getDragFilter
Get a filter which determines which components can be dragged from the layout and which cannot. This does not effect the drag mode, but only provides a means to make exceptions in the drag mode. The drag filter is only used when dragging is enabled in the layout, i.e drag mode is NOTLayoutDragMode.NONE
By default the drag filter permits dragging all components when the layout drag mode allows it.- Specified by:
getDragFilter
in interfaceDragFilterSupport
- Specified by:
getDragFilter
in interfaceLayoutDragSource
- Returns:
- dragFilter
The filter to use, by default
DragFilter.ALL
is used.
-
setDragFilter
Set a filter which determines which components can be dragged from the layout and which cannot. This does not effect the drag mode, but only provides a means to make exceptions in the drag mode. The drag filter is only used when dragging is enabled in the layout, i.e drag mode is NOTLayoutDragMode.NONE
By default the drag filter permits dragging all components when the layout drag mode allows it.- Specified by:
setDragFilter
in interfaceDragFilterSupport
- Specified by:
setDragFilter
in interfaceLayoutDragSource
- Parameters:
dragFilter
- The filter to use, by defaultDragFilter.ALL
is used.
-
getState
- Overrides:
getState
in classcom.vaadin.ui.Accordion
-
beforeClientResponse
public void beforeClientResponse(boolean initial) - Specified by:
beforeClientResponse
in interfacecom.vaadin.server.ClientConnector
- Overrides:
beforeClientResponse
in classcom.vaadin.ui.AbstractComponent
-
changeVariables
- Specified by:
changeVariables
in interfacecom.vaadin.server.VariableOwner
-
setDragImageProvider
Description copied from interface:DragImageReferenceSupport
Set a component as a drag image for a component in the layout. The drag image will be shown instead of the component when the user drag a component in the layout.- Specified by:
setDragImageProvider
in interfaceDragImageReferenceSupport
- Parameters:
provider
- The image provider
-
getDragImageProvider
Description copied from interface:DragImageReferenceSupport
Returns the drag image provider- Specified by:
getDragImageProvider
in interfaceDragImageReferenceSupport
- Returns:
- the image provider
-
getDragGrabFilter
- Specified by:
getDragGrabFilter
in interfaceDragGrabFilterSupport
- Returns:
- Drag grab filter
-
setDragGrabFilter
- Specified by:
setDragGrabFilter
in interfaceDragGrabFilterSupport
- Parameters:
dragGrabFilter
- drag grab filter
-