Class GroupingWidget

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.google.gwt.user.client.ui.FlowPanel
com.vaadin.addon.spreadsheet.client.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 
     

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

    Fields
    Modifier and Type
    Field
    Description
    static final String
     
    static final String
     
     
    protected double
     
    protected int
     
    protected double
     
    protected double
     
    protected static final int
     
    protected static final int
     
    protected int
     
    protected double
     

    Fields inherited from class com.google.gwt.user.client.ui.UIObject

    DEBUG_ID_PREFIX
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected abstract GroupingWidget
     
    protected void
     
    int
     
    static int
    getTotalHeight(int maxGrouping)
     
    static int
    getTotalWidth(int maxGrouping)
     
    boolean
     
    protected abstract boolean
     
    boolean
     
    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 class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    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

    Methods inherited from interface java.lang.Iterable

    forEach, spliterator
  • Field Details

    • SINGLE_ITEM_SIZE_HEIGHT

      protected static final int SINGLE_ITEM_SIZE_HEIGHT
      See Also:
    • SINGLE_ITEM_SIZE_WIDTH

      protected static final int SINGLE_ITEM_SIZE_WIDTH
      See Also:
    • EXPAND_CHAR

      public static final String EXPAND_CHAR
      See Also:
    • CONTRACT_SIGN

      public static final String CONTRACT_SIGN
      See Also:
    • handler

      protected GroupingWidget.GroupingHandler handler
    • top

      protected int top
    • left

      protected int left
    • marginLeft

      protected double marginLeft
    • marginTop

      protected double marginTop
    • width

      protected double width
    • height

      protected double height
  • Constructor Details

    • 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 Details

    • 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)
    • cloneWidget

      protected abstract GroupingWidget cloneWidget()
    • copyfields

      protected void copyfields(GroupingWidget newWidget)