Class GroupingWidget

  • 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.InsertPanel, com.google.gwt.user.client.ui.InsertPanel.ForIsWidget, com.google.gwt.user.client.ui.IsWidget, Iterable<com.google.gwt.user.client.ui.Widget>
    Direct Known Subclasses:
    ColumnGrouping, RowGrouping

    public abstract class GroupingWidget
    extends com.google.gwt.user.client.ui.FlowPanel
    Class that represents a single column grouping indicator.
    Author:
    Thomas Mattsson / Vaadin LTD
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static interface  GroupingWidget.GroupingHandler  
      • 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
      • Nested classes/interfaces inherited from interface com.google.gwt.user.client.ui.InsertPanel

        com.google.gwt.user.client.ui.InsertPanel.ForIsWidget
    • Method Summary

      All Methods Static Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      protected abstract GroupingWidget cloneWidget()  
      protected void copyfields​(GroupingWidget newWidget)  
      int getIndex()  
      static int getTotalHeight​(int maxGrouping)  
      static int getTotalWidth​(int maxGrouping)  
      boolean isCollapsed()  
      protected abstract boolean isCols()  
      boolean isInversed()  
      void onBrowserEvent​(com.google.gwt.user.client.Event event)  
      void setCollapsed​(boolean collapsed)  
      void setIndex​(int i)  
      void setInversed​(boolean inversed)  
      protected abstract void setMargin​(double size)  
      abstract void setPos​(int offset, int level)
      Where this marker should be positioned.
      protected abstract void setSize​(double size)  
      void setWidthPX​(double w)  
      • Methods inherited from class com.google.gwt.user.client.ui.FlowPanel

        add, clear, insert, insert
      • 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, adopt, 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
      • Methods inherited from interface com.google.gwt.user.client.ui.IndexedPanel

        getWidget, getWidgetCount, getWidgetIndex, remove
      • Methods inherited from interface com.google.gwt.user.client.ui.IndexedPanel.ForIsWidget

        getWidgetIndex
      • Methods inherited from interface com.google.gwt.user.client.ui.InsertPanel.ForIsWidget

        add
    • Constructor Detail

      • GroupingWidget

        public GroupingWidget​(int index,
                              GroupingWidget.GroupingHandler handler)
        Parameters:
        index - Unique index for the group, 0-based. This index is used on server side when collapsing/expanding the group.
        handler - The gateway to the server side
    • Method Detail

      • setWidthPX

        public void setWidthPX​(double w)
      • setSize

        protected abstract void setSize​(double size)
      • setMargin

        protected abstract void setMargin​(double size)
      • setCollapsed

        public void setCollapsed​(boolean collapsed)
      • isCollapsed

        public boolean isCollapsed()
      • 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
      • isCols

        protected abstract boolean isCols()
      • setPos

        public abstract void setPos​(int offset,
                                    int level)
        Where this marker should be positioned.
        Parameters:
        offset - The number of pixels from 0 (top or left) this group should be positioned.
        level - The level of the group, 0-based.
      • getTotalHeight

        public static int getTotalHeight​(int maxGrouping)
        Returns:
        The total height of a panel with the given amount of groups
      • getTotalWidth

        public static int getTotalWidth​(int maxGrouping)
        Returns:
        The total width of a panel with the given amount of groups
      • setIndex

        public void setIndex​(int i)
      • getIndex

        public int getIndex()
      • isInversed

        public boolean isInversed()
      • setInversed

        public void setInversed​(boolean inversed)
      • copyfields

        protected void copyfields​(GroupingWidget newWidget)