Class VDDAccordion
java.lang.Object
com.google.gwt.user.client.ui.UIObject
com.google.gwt.user.client.ui.Widget
com.google.gwt.user.client.ui.Panel
com.google.gwt.user.client.ui.ComplexPanel
com.vaadin.client.ui.VTabsheetBase
com.vaadin.client.ui.VAccordion
io.jmix.ui.widget.client.addon.dragdroplayouts.ui.accordion.VDDAccordion
- All Implemented Interfaces:
com.google.gwt.event.logical.shared.HasAttachHandlers
,com.google.gwt.event.shared.HasHandlers
,com.google.gwt.user.client.EventListener
,com.google.gwt.user.client.ui.HasEnabled
,com.google.gwt.user.client.ui.HasVisibility
,com.google.gwt.user.client.ui.HasWidgets
,com.google.gwt.user.client.ui.HasWidgets.ForIsWidget
,com.google.gwt.user.client.ui.IndexedPanel
,com.google.gwt.user.client.ui.IndexedPanel.ForIsWidget
,com.google.gwt.user.client.ui.IsWidget
,com.vaadin.client.ui.dd.VHasDropHandler
,VDDHasDropHandler<VDDAccordionDropHandler>
,VDDTabContainer
,VHasDragCaptionProvider
,VHasDragFilter
,VHasDragImageReferenceSupport
,VHasDragMode
,VHasGrabFilter
,VHasIframeShims
,VLayoutDragDropMouseHandler.DragStartListener
,Iterable<com.google.gwt.user.client.ui.Widget>
public class VDDAccordion
extends com.vaadin.client.ui.VAccordion
implements VHasDragMode, VDDHasDropHandler<VDDAccordionDropHandler>, VLayoutDragDropMouseHandler.DragStartListener, VDDTabContainer, VHasDragFilter, VHasDragImageReferenceSupport, VHasIframeShims, VHasGrabFilter, VHasDragCaptionProvider
Client side implementation for
DDAccordion
- Since:
- 0.4.0
-
Nested Class Summary
Nested classes/interfaces inherited from class com.vaadin.client.ui.VAccordion
com.vaadin.client.ui.VAccordion.StackItem
Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.UIObject
com.google.gwt.user.client.ui.UIObject.DebugIdImpl, com.google.gwt.user.client.ui.UIObject.DebugIdImplEnabled
Nested classes/interfaces inherited from interface com.google.gwt.user.client.ui.HasWidgets
com.google.gwt.user.client.ui.HasWidgets.ForIsWidget
Nested classes/interfaces inherited from interface com.google.gwt.user.client.ui.IndexedPanel
com.google.gwt.user.client.ui.IndexedPanel.ForIsWidget
-
Field Summary
Fields inherited from class com.vaadin.client.ui.VAccordion
CLASSNAME, selectedItemIndex
Fields inherited from class com.vaadin.client.ui.VTabsheetBase
activeTabIndex, client, connector, disabled, disabledTabKeys, readonly, tabKeys
Fields inherited from class com.google.gwt.user.client.ui.UIObject
DEBUG_ID_PREFIX
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
Removes any previous emphasis made by drag&dropboolean
dragStart
(com.google.gwt.user.client.ui.Widget widget, LayoutDragMode mode) Can be used to listen to drag start events, must return true for the drag to commence.protected void
emphasis
(com.google.gwt.user.client.Element element, com.vaadin.client.ui.dd.VDragEvent event) Emphasisizes a container elementReturns the drag filter used by the layoutReturns the drag modeprotected com.vaadin.shared.ui.dd.VerticalDropLocation
getDropLocation
(com.vaadin.client.ui.VAccordion.StackItem tab, com.vaadin.client.ui.dd.VDragEvent event) Returns the drop location of a tabprotected final VLayoutDragDropMouseHandler
int
getTabContentPosition
(com.google.gwt.user.client.ui.Widget w) Get the position of a tabs contentint
getTabPosition
(com.google.gwt.user.client.ui.Widget tabWidget) Returns the position of a tabfloat
void
iframeShimsEnabled
(boolean enabled) boolean
protected void
onLoad()
protected void
onUnload()
protected boolean
postDropHook
(com.vaadin.client.ui.dd.VDragEvent drag) A hook for extended components to post process the the drop before it is sent to the server.protected void
postEnterHook
(com.vaadin.client.ui.dd.VDragEvent drag) A hook for extended components to post process the the enter event.protected void
postLeaveHook
(com.vaadin.client.ui.dd.VDragEvent drag) A hook for extended components to post process the the leave event.protected void
postOverHook
(com.vaadin.client.ui.dd.VDragEvent drag) A hook for extended components to post process the the over event.void
setDragCaptionProvider
(VDragCaptionProvider dragCaption) void
setDragFilter
(VDragFilter filter) void
setDragImageProvider
(VDragImageProvider provider) void
setDragMode
(LayoutDragMode mode) void
setDropHandler
(VDDAccordionDropHandler dropHandler) void
setGrabFilter
(VGrabFilter grabFilter) void
setTabTopBottomDropRatio
(float tabTopBottomDropRatio) protected void
updateDragDetails
(com.vaadin.client.ui.dd.VDragEvent event) Updates the drop details while dragging.Methods inherited from class com.vaadin.client.ui.VAccordion
clearPaintables, close, getOpenStackItem, getStackItem, getStackItems, getTab, getTabCount, getWidgetIterator, onSelectTab, open, removeTab, renderTab, selectTab, setStyleName, setStylePrimaryName, setTabIndex, updateStyleNames
Methods inherited from class com.vaadin.client.ui.VTabsheetBase
addTabKey, clearTabKeys, getConnectorForWidget, isDynamicHeight, isDynamicWidth, isEnabled, isTabCaptionsAsHtml, setActiveTabIndex, setClient, setConnector, setEnabled, setReadonly, setTabCaptionsAsHtml
Methods inherited from class com.google.gwt.user.client.ui.ComplexPanel
add, add, adjustIndex, checkIndexBoundsForAccess, checkIndexBoundsForInsertion, getChildren, getWidget, getWidgetCount, getWidgetIndex, getWidgetIndex, insert, insert, iterator, remove, remove
Methods inherited from class com.google.gwt.user.client.ui.Panel
add, add, adopt, clear, doAttachChildren, doDetachChildren, orphan, remove
Methods inherited from class com.google.gwt.user.client.ui.Widget
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, fireEvent, getHandlerCount, getLayoutData, getParent, isAttached, isOrWasAttached, onAttach, onBrowserEvent, onDetach, removeFromParent, setLayoutData, sinkEvents, unsinkEvents
Methods inherited from class com.google.gwt.user.client.ui.UIObject
addStyleDependentName, addStyleName, ensureDebugId, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getElement, getOffsetHeight, getOffsetWidth, getStyleElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, getTitle, isVisible, isVisible, onEnsureDebugId, removeStyleDependentName, removeStyleName, resolvePotentialElement, setElement, setElement, setHeight, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setTitle, setVisible, setVisible, setWidth, sinkBitlessEvent, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Field Details
-
CLASSNAME_OVER
- See Also:
-
CLASSNAME_SPACER
- See Also:
-
-
Constructor Details
-
VDDAccordion
public VDDAccordion()
-
-
Method Details
-
setDragCaptionProvider
- Specified by:
setDragCaptionProvider
in interfaceVHasDragCaptionProvider
-
getDragCaptionProvider
- Specified by:
getDragCaptionProvider
in interfaceVHasDragCaptionProvider
-
onLoad
protected void onLoad()- Overrides:
onLoad
in classcom.google.gwt.user.client.ui.Widget
-
onUnload
protected void onUnload()- Overrides:
onUnload
in classcom.google.gwt.user.client.ui.Widget
-
getDropHandler
- Specified by:
getDropHandler
in interfaceVDDHasDropHandler<VDDAccordionDropHandler>
- Specified by:
getDropHandler
in interfacecom.vaadin.client.ui.dd.VHasDropHandler
-
setDropHandler
- Specified by:
setDropHandler
in interfaceVDDHasDropHandler<VDDAccordionDropHandler>
-
getDragMode
Description copied from interface:VHasDragMode
Returns the drag mode- Specified by:
getDragMode
in interfaceVHasDragMode
- Returns:
-
postDropHook
protected boolean postDropHook(com.vaadin.client.ui.dd.VDragEvent drag) A hook for extended components to post process the the drop before it is sent to the server. Useful if you don't want to override the whole drop handler. -
postEnterHook
protected void postEnterHook(com.vaadin.client.ui.dd.VDragEvent drag) A hook for extended components to post process the the enter event. Useful if you don't want to override the whole drophandler. -
postLeaveHook
protected void postLeaveHook(com.vaadin.client.ui.dd.VDragEvent drag) A hook for extended components to post process the the leave event. Useful if you don't want to override the whole drophandler. -
postOverHook
protected void postOverHook(com.vaadin.client.ui.dd.VDragEvent drag) A hook for extended components to post process the the over event. Useful if you don't want to override the whole drophandler. -
dragStart
Can be used to listen to drag start events, must return true for the drag to commence. Return false to interrupt the drag:- Specified by:
dragStart
in interfaceVLayoutDragDropMouseHandler.DragStartListener
- Parameters:
widget
- The widget which is about to be draggedmode
- The draggin mode- Returns:
- Should the dragging be commenced.
-
updateDragDetails
protected void updateDragDetails(com.vaadin.client.ui.dd.VDragEvent event) Updates the drop details while dragging. This is needed to ensure client side criterias can validate the drop location.- Parameters:
event
- The drag event
-
getDropLocation
protected com.vaadin.shared.ui.dd.VerticalDropLocation getDropLocation(com.vaadin.client.ui.VAccordion.StackItem tab, com.vaadin.client.ui.dd.VDragEvent event) Returns the drop location of a tab- Parameters:
tab
- The tab that was draggedevent
- The drag event- Returns:
-
emphasis
protected void emphasis(com.google.gwt.user.client.Element element, com.vaadin.client.ui.dd.VDragEvent event) Emphasisizes a container element- Parameters:
element
-
-
deEmphasis
protected void deEmphasis()Removes any previous emphasis made by drag&drop -
getTabContentPosition
public int getTabContentPosition(com.google.gwt.user.client.ui.Widget w) Description copied from interface:VDDTabContainer
Get the position of a tabs content- Specified by:
getTabContentPosition
in interfaceVDDTabContainer
- Parameters:
w
- The tabs content
-
getTabPosition
public int getTabPosition(com.google.gwt.user.client.ui.Widget tabWidget) Description copied from interface:VDDTabContainer
Returns the position of a tab- Specified by:
getTabPosition
in interfaceVDDTabContainer
- Parameters:
tabWidget
- The tab in the tabbar- Returns:
-
getDragFilter
Description copied from interface:VHasDragFilter
Returns the drag filter used by the layout- Specified by:
getDragFilter
in interfaceVHasDragFilter
- Returns:
-
getTabTopBottomDropRatio
public float getTabTopBottomDropRatio() -
setTabTopBottomDropRatio
public void setTabTopBottomDropRatio(float tabTopBottomDropRatio) -
setDragFilter
- Specified by:
setDragFilter
in interfaceVHasDragFilter
-
iframeShimsEnabled
public void iframeShimsEnabled(boolean enabled) - Specified by:
iframeShimsEnabled
in interfaceVHasIframeShims
-
isIframeShimsEnabled
public boolean isIframeShimsEnabled()- Specified by:
isIframeShimsEnabled
in interfaceVHasIframeShims
-
setDragMode
- Specified by:
setDragMode
in interfaceVHasDragMode
-
setDragImageProvider
- Specified by:
setDragImageProvider
in interfaceVHasDragImageReferenceSupport
-
getMouseHandler
-
getGrabFilter
- Specified by:
getGrabFilter
in interfaceVHasGrabFilter
-
setGrabFilter
- Specified by:
setGrabFilter
in interfaceVHasGrabFilter
-