Class JmixMainTabSheet

java.lang.Object
com.vaadin.server.AbstractClientConnector
com.vaadin.ui.AbstractComponent
com.vaadin.ui.AbstractComponentContainer
com.vaadin.ui.TabSheet
io.jmix.ui.widget.addon.dragdroplayouts.DDTabSheet
io.jmix.ui.widget.JmixMainTabSheet
All Implemented Interfaces:
com.vaadin.event.Action.Container, 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, HasTabSheetBehaviour, Serializable, Iterable<com.vaadin.ui.Component>, EventListener

public class JmixMainTabSheet extends DDTabSheet implements com.vaadin.event.Action.Container, HasTabSheetBehaviour
See Also:
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static interface 
     
    protected static class 
     

    Nested classes/interfaces inherited from class io.jmix.ui.widget.addon.dragdroplayouts.DDTabSheet

    DDTabSheet.TabSheetTargetDetails

    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
    Modifier and Type
    Field
    Description
    protected Set<com.vaadin.event.Action.Handler>
     
    protected com.vaadin.server.KeyMapper<com.vaadin.event.Action>
     
     
    protected Consumer<com.vaadin.ui.ComponentContainer>
     
    protected Map<com.vaadin.ui.Component,JmixMainTabSheet.TabCloseHandler>
     
    protected Consumer<com.vaadin.ui.ComponentContainer>
     
    protected Stack<com.vaadin.ui.Component>
     
     
    protected com.google.common.collect.BiMap<String,com.vaadin.ui.TabSheet.Tab>
     

    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

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    addActionHandler(com.vaadin.event.Action.Handler actionHandler)
     
    void
    beforeClientResponse(boolean initial)
     
    void
     
    void
    closeOtherTabs(com.vaadin.ui.Component currentTab)
     
    void
    closeTab(com.vaadin.ui.Component tab)
     
    protected Set<com.vaadin.event.Action>
    getActions(com.vaadin.ui.Component actionTarget)
     
    protected com.vaadin.ui.Component
    getActionTarget(com.vaadin.ui.TabSheet.Tab tab)
     
    Consumer<com.vaadin.ui.ComponentContainer>
     
    Consumer<com.vaadin.ui.ComponentContainer>
     
    getJTestId(com.vaadin.ui.TabSheet.Tab tab)
     
    com.vaadin.ui.Component
    getPreviousTab(com.vaadin.ui.Component tab)
     
     
    getState(boolean markAsDirty)
     
     
    boolean
     
    void
    moveTab(com.vaadin.ui.Component c, int position)
     
    void
    removeActionHandler(com.vaadin.event.Action.Handler actionHandler)
     
    void
    removeComponent(com.vaadin.ui.Component c)
     
    void
    removeTab(com.vaadin.ui.TabSheet.Tab tab)
     
    void
    replaceComponent(com.vaadin.ui.Component oldComponent, com.vaadin.ui.Component newComponent)
     
    void
    setCloseAllTabsHandler(Consumer<com.vaadin.ui.ComponentContainer> closeAllTabsHandler)
     
    void
    setCloseOthersHandler(Consumer<com.vaadin.ui.ComponentContainer> closeOthersHandler)
     
    void
    setDDHtml5Enabled(boolean enable)
    Important! If Tab in TabSheet contains components that provide drag and drop features, users may face UI freezes in case of dragging elements to TabSheet or Tab layout.
    void
    setJTestId(com.vaadin.ui.TabSheet.Tab tab, String id)
     
    void
    setSelectedTab(com.vaadin.ui.Component c, boolean userOriginated)
     
    void
    setTabCloseHandler(com.vaadin.ui.Component tabContent, JmixMainTabSheet.TabCloseHandler closeHandler)
     
    void
    setTestId(com.vaadin.ui.TabSheet.Tab tab, String testId)
     
    void
    silentCloseTabAndSelectPrevious(com.vaadin.ui.Component tab)
     

    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, removeSelectedTabChangeListener, selectedTabIndexAfterTabRemove, setCloseHandler, 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
  • Field Details

    • openedComponents

      protected Stack<com.vaadin.ui.Component> openedComponents
    • actionHandlers

      protected Set<com.vaadin.event.Action.Handler> actionHandlers
    • actionMapper

      protected com.vaadin.server.KeyMapper<com.vaadin.event.Action> actionMapper
    • closeHandlers

      protected Map<com.vaadin.ui.Component,JmixMainTabSheet.TabCloseHandler> closeHandlers
    • tabIds

      protected com.google.common.collect.BiMap<String,com.vaadin.ui.TabSheet.Tab> tabIds
    • behaviour

      protected TabSheetBehaviour behaviour
    • closeOthersHandler

      protected Consumer<com.vaadin.ui.ComponentContainer> closeOthersHandler
    • closeAllTabsHandler

      protected Consumer<com.vaadin.ui.ComponentContainer> closeAllTabsHandler
    • rpc

  • Constructor Details

    • JmixMainTabSheet

      public JmixMainTabSheet()
  • Method Details

    • getActionTarget

      protected com.vaadin.ui.Component getActionTarget(com.vaadin.ui.TabSheet.Tab tab)
    • getActions

      protected Set<com.vaadin.event.Action> getActions(com.vaadin.ui.Component actionTarget)
    • getState

      public JmixMainTabSheetState getState()
      Overrides:
      getState in class DDTabSheet
    • getState

      protected JmixMainTabSheetState getState(boolean markAsDirty)
      Overrides:
      getState in class com.vaadin.ui.TabSheet
    • beforeClientResponse

      public void beforeClientResponse(boolean initial)
      Specified by:
      beforeClientResponse in interface com.vaadin.server.ClientConnector
      Overrides:
      beforeClientResponse in class DDTabSheet
    • getPreviousTab

      @Nullable public com.vaadin.ui.Component getPreviousTab(com.vaadin.ui.Component tab)
    • silentCloseTabAndSelectPrevious

      public void silentCloseTabAndSelectPrevious(com.vaadin.ui.Component tab)
    • setSelectedTab

      public void setSelectedTab(com.vaadin.ui.Component c, boolean userOriginated)
      Overrides:
      setSelectedTab in class com.vaadin.ui.TabSheet
    • removeTab

      public void removeTab(com.vaadin.ui.TabSheet.Tab tab)
      Overrides:
      removeTab in class com.vaadin.ui.TabSheet
    • closeTab

      public void closeTab(com.vaadin.ui.Component tab)
    • setTestId

      public void setTestId(com.vaadin.ui.TabSheet.Tab tab, String testId)
    • setJTestId

      public void setJTestId(com.vaadin.ui.TabSheet.Tab tab, String id)
    • getJTestId

      public String getJTestId(com.vaadin.ui.TabSheet.Tab tab)
    • removeComponent

      public void removeComponent(com.vaadin.ui.Component c)
      Specified by:
      removeComponent in interface com.vaadin.ui.ComponentContainer
      Overrides:
      removeComponent in class com.vaadin.ui.TabSheet
    • replaceComponent

      public void replaceComponent(com.vaadin.ui.Component oldComponent, com.vaadin.ui.Component newComponent)
      Specified by:
      replaceComponent in interface com.vaadin.ui.ComponentContainer
      Overrides:
      replaceComponent in class com.vaadin.ui.TabSheet
    • addActionHandler

      public void addActionHandler(com.vaadin.event.Action.Handler actionHandler)
      Specified by:
      addActionHandler in interface com.vaadin.event.Action.Container
    • removeActionHandler

      public void removeActionHandler(com.vaadin.event.Action.Handler actionHandler)
      Specified by:
      removeActionHandler in interface com.vaadin.event.Action.Container
    • moveTab

      public void moveTab(com.vaadin.ui.Component c, int position)
    • setTabCloseHandler

      public void setTabCloseHandler(com.vaadin.ui.Component tabContent, JmixMainTabSheet.TabCloseHandler closeHandler)
    • getTabSheetBehaviour

      public TabSheetBehaviour getTabSheetBehaviour()
      Specified by:
      getTabSheetBehaviour in interface HasTabSheetBehaviour
    • getCloseOthersHandler

      public Consumer<com.vaadin.ui.ComponentContainer> getCloseOthersHandler()
    • setCloseOthersHandler

      public void setCloseOthersHandler(Consumer<com.vaadin.ui.ComponentContainer> closeOthersHandler)
    • getCloseAllTabsHandler

      public Consumer<com.vaadin.ui.ComponentContainer> getCloseAllTabsHandler()
    • setCloseAllTabsHandler

      public void setCloseAllTabsHandler(Consumer<com.vaadin.ui.ComponentContainer> closeAllTabsHandler)
    • closeOtherTabs

      public void closeOtherTabs(com.vaadin.ui.Component currentTab)
    • closeAllTabs

      public void closeAllTabs()
    • setDDHtml5Enabled

      public void setDDHtml5Enabled(boolean enable)
      Important! If Tab in TabSheet contains components that provide drag and drop features, users may face UI freezes in case of dragging elements to TabSheet or Tab layout.
      Parameters:
      enable - enable html5 drag and drop
    • isDDHtml5Enabled

      public boolean isDDHtml5Enabled()
      Returns:
      true if html5 drag and drop is enabled