com.vaadin.client.ui.

Class VAbstractSplitPanel

  • 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.VAbstractSplitPanel
  • 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.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, Iterable<com.google.gwt.user.client.ui.Widget>

    Direct Known Subclasses:

    VSplitPanelHorizontal, VSplitPanelVertical

    public abstract class VAbstractSplitPanel
    extends com.google.gwt.user.client.ui.ComplexPanel

    Base class for the SplitPanel widgets.

    Author:

    Vaadin Ltd

    • Nested Class Summary

      Nested Classes
      Modifier and Type Class Description
      static interface  VAbstractSplitPanel.SplitterMoveHandler

      Event handler interface for moving the splitter element.

      • 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
    • Constructor Summary

      Constructors
      Constructor Description
      VAbstractSplitPanel()

      Constructs a base widget for a SplitPanel component.

      VAbstractSplitPanel​(Orientation orientation)

      Constructs a base widget for a SplitPanel component with the given orientation.

    • Method Summary

      All Methods
      Modifier and Type Method Description
      protected void constructDom()

      Constructs the DOM structure for this widget.

      protected com.google.gwt.dom.client.Element getFirstContainer()

      Gets the first region's container element.

      com.google.gwt.user.client.ui.Widget getFirstWidget()

      Returns the widget in the first region, if any.

      protected com.google.gwt.dom.client.Element getSecondContainer()

      Gets the second region's container element.

      com.google.gwt.user.client.ui.Widget getSecondWidget()

      Returns the widget in the second region, if any.

      String getSplitterPosition()

      For internal use only.

      boolean isEnabled()

      Returns whether this split panel is enabled or not.

      void makeScrollable()

      Ensures the panels are scrollable e.g.

      void onBrowserEvent​(com.google.gwt.user.client.Event event)  
      void onMouseDown​(com.google.gwt.user.client.Event event)

      Handle initiating content resize and moving of the split position when clicking the splitter with a mouse.

      void onMouseMove​(com.google.gwt.user.client.Event event)

      Handle updating the splitter position when dragging the splitter with a mouse.

      void onMouseUp​(com.google.gwt.user.client.Event event)

      Handle concluding the content resize when dragging the splitter with a mouse.

      boolean remove​(com.google.gwt.user.client.ui.Widget w)  
      void setEnabled​(boolean enabled)

      Sets this split panel enabled.

      void setFirstWidget​(com.google.gwt.user.client.ui.Widget w)

      For internal use only.

      void setLocked​(boolean newValue)

      For internal use only.

      void setPositionReversed​(boolean reversed)

      For internal use only.

      void setSecondWidget​(com.google.gwt.user.client.ui.Widget w)

      For internal use only.

      void setSplitPosition​(String pos)

      Sets the position of the splitter element.

      void setStylenames()

      For internal use only.

      protected abstract void startResize()

      Called when starting splitter drag resize of contents.

      protected abstract void stopResize()

      Called when stopping splitter drag resize of contents.

      void updateSizes()

      For internal use only.

      • 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
      • 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, onDetach, onLoad, onUnload, 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, setStyleName, setStylePrimaryName, setStylePrimaryName, setTitle, setVisible, setVisible, setWidth, sinkBitlessEvent, toString
    • Field Detail

      • splitter

        public final com.google.gwt.dom.client.Element splitter

        For internal use only. May be removed or replaced in the future.

      • componentStyleNames

        public List<String> componentStyleNames

        For internal use only. May be removed or replaced in the future.

      • client

        public ApplicationConnection client

        For internal use only. May be removed or replaced in the future.

      • position

        public String position

        The current position of the split handle in either percentages or pixels

        For internal use only. May be removed or replaced in the future.

      • maximumPosition

        public String maximumPosition

        For internal use only. May be removed or replaced in the future.

      • minimumPosition

        public String minimumPosition

        For internal use only. May be removed or replaced in the future.

      • scrolledContainer

        @Deprecated
        protected com.google.gwt.dom.client.Element scrolledContainer
        Deprecated.
        this element is no longer used or updated by the framework
      • origScrollTop

        @Deprecated
        protected int origScrollTop
        Deprecated.
        this value is no longer used or updated by the framework
    • Constructor Detail

      • VAbstractSplitPanel

        public VAbstractSplitPanel()

        Constructs a base widget for a SplitPanel component. Uses horizontal orientation.

      • VAbstractSplitPanel

        public VAbstractSplitPanel​(Orientation orientation)

        Constructs a base widget for a SplitPanel component with the given orientation.

        Parameters:

        orientation - the orientation to use

    • Method Detail

      • constructDom

        protected void constructDom()

        Constructs the DOM structure for this widget.

      • remove

        public boolean remove​(com.google.gwt.user.client.ui.Widget w)

        Specified by:

        remove in interface com.google.gwt.user.client.ui.HasWidgets

        Overrides:

        remove in class com.google.gwt.user.client.ui.ComplexPanel

      • setLocked

        public void setLocked​(boolean newValue)

        For internal use only. May be removed or replaced in the future.

        Parameters:

        newValue - true if split position should be locked, false otherwise

      • setPositionReversed

        public void setPositionReversed​(boolean reversed)

        For internal use only. May be removed or replaced in the future.

        Parameters:

        reversed - true if split position should be measured from the second region, false (default) if from the the first region

      • setSplitPosition

        public void setSplitPosition​(String pos)

        Sets the position of the splitter element.

        Parameters:

        pos - the required position as either percentage or pixels

      • updateSizes

        public void updateSizes()

        For internal use only. May be removed or replaced in the future.

      • setFirstWidget

        public void setFirstWidget​(com.google.gwt.user.client.ui.Widget w)

        For internal use only. May be removed or replaced in the future.

        Parameters:

        w - the widget to set to the first region or null to remove previously set widget

      • getFirstWidget

        public com.google.gwt.user.client.ui.Widget getFirstWidget()

        Returns the widget in the first region, if any.

        Returns:

        the widget in the first region, or null if not set

      • setSecondWidget

        public void setSecondWidget​(com.google.gwt.user.client.ui.Widget w)

        For internal use only. May be removed or replaced in the future.

        Parameters:

        w - the widget to set to the second region or null to remove previously set widget

      • getSecondWidget

        public com.google.gwt.user.client.ui.Widget getSecondWidget()

        Returns the widget in the second region, if any.

        Returns:

        the widget in the second region, or null if not set

      • onBrowserEvent

        public void onBrowserEvent​(com.google.gwt.user.client.Event event)

        Specified by:

        onBrowserEvent in interface com.google.gwt.user.client.EventListener

        Overrides:

        onBrowserEvent in class com.google.gwt.user.client.ui.Widget

      • onMouseDown

        public void onMouseDown​(com.google.gwt.user.client.Event event)

        Handle initiating content resize and moving of the split position when clicking the splitter with a mouse. If the click targets any other element, the split position is locked, or this split panel is not enabled, nothing is done.

        Parameters:

        event - the browser event

      • startResize

        protected abstract void startResize()

        Called when starting splitter drag resize of contents.

        Since:

        7.5.1

      • stopResize

        protected abstract void stopResize()

        Called when stopping splitter drag resize of contents.

        Since:

        7.5.1

      • getFirstContainer

        protected com.google.gwt.dom.client.Element getFirstContainer()

        Gets the first region's container element.

        Returns:

        the container element

        Since:

        7.5.1

      • getSecondContainer

        protected com.google.gwt.dom.client.Element getSecondContainer()

        Gets the second region's container element.

        Returns:

        the container element

        Since:

        7.5.1

      • onMouseMove

        public void onMouseMove​(com.google.gwt.user.client.Event event)

        Handle updating the splitter position when dragging the splitter with a mouse. This should only be called if content resizing has been successfully initialized via a mouse down event.

        Parameters:

        event - the browser event

      • onMouseUp

        public void onMouseUp​(com.google.gwt.user.client.Event event)

        Handle concluding the content resize when dragging the splitter with a mouse. This should only be called if resizing has been successfully initialized via a mouse down event.

        Parameters:

        event - the browser event

      • getSplitterPosition

        public String getSplitterPosition()

        For internal use only. May be removed or replaced in the future.

        Returns:

        the current position of the split handle in either percentages or pixels

      • setStylenames

        public void setStylenames()

        For internal use only. May be removed or replaced in the future.

      • setEnabled

        public void setEnabled​(boolean enabled)

        Sets this split panel enabled.

        Parameters:

        enabled - true if enabled, false if disabled

      • isEnabled

        public boolean isEnabled()

        Returns whether this split panel is enabled or not.

        Returns:

        true if enabled, false if disabled

      • makeScrollable

        public void makeScrollable()

        Ensures the panels are scrollable e.g. after style name changes

        For internal use only. May be removed or replaced in the future.