com.vaadin.client.ui.

Class VTabsheetPanel

  • 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.VTabsheetPanel
  • 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>

    public class VTabsheetPanel
    extends com.google.gwt.user.client.ui.ComplexPanel

    A panel that displays all of its child widgets in a 'deck', where only one can be visible at a time. It is used by VTabsheet. This class has the same basic functionality as the GWT DeckPanel, with the exception that it doesn't manipulate the child widgets' width and height attributes.

    • Nested Class Summary

      • 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.google.gwt.user.client.ui.UIObject

        DEBUG_ID_PREFIX
    • Constructor Summary

      Constructors
      Constructor Description
      VTabsheetPanel()

      Creates an empty tabsheet panel.

    • Method Summary

      All Methods
      Modifier and Type Method Description
      void add​(com.google.gwt.user.client.ui.Widget w)

      Adds the specified widget to the deck.

      void fixVisibleTabSize​(int width, int height, int minWidth)

      Updates the size of the visible widget.

      int getVisibleWidget()

      Gets the index of the currently-visible widget.

      void insert​(com.google.gwt.user.client.ui.Widget w, int beforeIndex)

      Inserts a widget before the specified index.

      boolean remove​(com.google.gwt.user.client.ui.Widget w)  
      void replaceComponent​(com.google.gwt.user.client.ui.Widget oldComponent, com.google.gwt.user.client.ui.Widget newComponent)

      Removes the old component and sets the new component to its place.

      void showWidget​(int index)

      Shows the widget at the specified index.

      • 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, 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, 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
    • Constructor Detail

      • VTabsheetPanel

        public VTabsheetPanel()

        Creates an empty tabsheet panel.

    • Method Detail

      • add

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

        Adds the specified widget to the deck.

        Specified by:

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

        Overrides:

        add in class com.google.gwt.user.client.ui.Panel

        Parameters:

        w - the widget to be added

      • getVisibleWidget

        public int getVisibleWidget()

        Gets the index of the currently-visible widget.

        Returns:

        the visible widget's index

      • insert

        public void insert​(com.google.gwt.user.client.ui.Widget w,
                           int beforeIndex)

        Inserts a widget before the specified index.

        Parameters:

        w - the widget to be inserted

        beforeIndex - the index before which it will be inserted

        Throws:

        IndexOutOfBoundsException - if beforeIndex is out of range

      • 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

      • showWidget

        public void showWidget​(int index)

        Shows the widget at the specified index. This causes the currently- visible widget to be hidden.

        Parameters:

        index - the index of the widget to be shown

      • fixVisibleTabSize

        public void fixVisibleTabSize​(int width,
                                      int height,
                                      int minWidth)

        Updates the size of the visible widget.

        Parameters:

        width - the width to set (in pixels), or negative if the width should be dynamic (final width might get overridden by the minimum width if that is larger)

        height - the height to set (in pixels), or negative if the height should be dynamic

        minWidth - the minimum width (in pixels) that can be set

      • replaceComponent

        public void replaceComponent​(com.google.gwt.user.client.ui.Widget oldComponent,
                                     com.google.gwt.user.client.ui.Widget newComponent)

        Removes the old component and sets the new component to its place.

        Parameters:

        oldComponent - the component to remove

        newComponent - the component to add to the old location