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.FlowPanelClass that represents a single column grouping indicator.- Author:
- Thomas Mattsson / Vaadin LTD
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceGroupingWidget.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
-
-
Field Summary
Fields Modifier and Type Field Description static StringCONTRACT_SIGNstatic StringEXPAND_CHARprotected GroupingWidget.GroupingHandlerhandlerprotected doubleheightprotected intleftprotected doublemarginLeftprotected doublemarginTopprotected static intSINGLE_ITEM_SIZE_HEIGHTprotected static intSINGLE_ITEM_SIZE_WIDTHprotected inttopprotected doublewidth
-
Constructor Summary
Constructors Constructor Description GroupingWidget(int index, GroupingWidget.GroupingHandler handler)
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract GroupingWidgetcloneWidget()protected voidcopyfields(GroupingWidget newWidget)intgetIndex()static intgetTotalHeight(int maxGrouping)static intgetTotalWidth(int maxGrouping)booleanisCollapsed()protected abstract booleanisCols()booleanisInversed()voidonBrowserEvent(com.google.gwt.user.client.Event event)voidsetCollapsed(boolean collapsed)voidsetIndex(int i)voidsetInversed(boolean inversed)protected abstract voidsetMargin(double size)abstract voidsetPos(int offset, int level)Where this marker should be positioned.protected abstract voidsetSize(double size)voidsetWidthPX(double w)-
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 java.lang.Iterable
forEach, spliterator
-
-
-
-
Field Detail
-
SINGLE_ITEM_SIZE_HEIGHT
protected static final int SINGLE_ITEM_SIZE_HEIGHT
- See Also:
- Constant Field Values
-
SINGLE_ITEM_SIZE_WIDTH
protected static final int SINGLE_ITEM_SIZE_WIDTH
- See Also:
- Constant Field Values
-
EXPAND_CHAR
public static final String EXPAND_CHAR
- See Also:
- Constant Field Values
-
CONTRACT_SIGN
public static final String CONTRACT_SIGN
- See Also:
- Constant Field Values
-
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 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:
onBrowserEventin interfacecom.google.gwt.user.client.EventListener- Overrides:
onBrowserEventin classcom.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)
-
-