Class VAbstractOrderedLayout
- 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.client.ui.orderedlayout.VAbstractOrderedLayout
-
- 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:
VHorizontalLayout,VVerticalLayout
public class VAbstractOrderedLayout extends com.google.gwt.user.client.ui.FlowPanelBase class for ordered layouts.
-
-
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
-
-
Field Summary
Fields Modifier and Type Field Description protected booleandefinedHeightDefined height state.protected booleanspacingSpacing state.booleanverticalFor internal use only.
-
Constructor Summary
Constructors Constructor Description VAbstractOrderedLayout(boolean vertical)Constructs an ordered layout widget with the indicated orientation.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidaddOrMoveSlot(Slot slot, int index)Deprecated.since 7.1.4, useaddOrMoveSlot(Slot, int, boolean)voidaddOrMoveSlot(Slot slot, int index, boolean adjustSpacing)Add or move a slot to another index.voidclearExpand()Removes elements used to expand a slot.protected SlotcreateSlot(com.google.gwt.user.client.ui.Widget widget)Create a slot to be added to the layout.CaptionPositiongetCaptionPositionFromElement(com.google.gwt.dom.client.Element captionWrap)Deducts the caption position by examining the wrapping element.CaptionPositiongetCaptionPositionFromElement(com.google.gwt.user.client.Element captionWrap)Deprecated.As of 7.2, call or overridegetCaptionPositionFromElement(Element)insteadLayoutManagergetLayoutManager()Get the layout manager used by this layout.SlotgetSlot(com.google.gwt.dom.client.Element widgetElement)Gets a slot based on the widget element.SlotgetSlot(com.google.gwt.user.client.Element widgetElement)Deprecated.As of 7.2, call or overridegetSlot(Element)insteadSlotgetSlot(com.google.gwt.user.client.ui.Widget widget)Get the containing slot for a widget.protected voidinsert(com.google.gwt.user.client.ui.Widget child, com.google.gwt.dom.client.Element container, int beforeIndex, boolean domInsert)protected voidinsert(com.google.gwt.user.client.ui.Widget child, com.google.gwt.user.client.Element container, int beforeIndex, boolean domInsert)Deprecated.As of 7.2, use or overrideinsert(Widget, Element, int, boolean)instead.protected voidremoveSlot(Slot slot)Remove a slot from the layout.voidremoveWidget(com.google.gwt.user.client.ui.Widget widget)Remove a slot from the layout.voidsetHeight(String height)voidsetLayoutManager(LayoutManager manager)Set the layout manager for the layout.voidsetMargin(MarginInfo marginInfo)Set the margin of the layout.voidsetSlotStyleNames(com.google.gwt.user.client.ui.Widget widget, String... stylenames)Sets the slot's style names.voidsetSpacing(boolean spacing)Turn on or off spacing in the layout.voidupdateCaptionOffset(com.google.gwt.dom.client.Element caption)Update the offset off the caption relative to the slotvoidupdateCaptionOffset(com.google.gwt.user.client.Element caption)Deprecated.As of 7.2, call or overrideupdateCaptionOffset(Element)insteadvoidupdateExpandCompensation()Updates the expand compensation based on the measured sizes of children without expand.voidupdateExpandedSizes()Assigns relative sizes to the children that should expand based on their expand ratios.-
Methods inherited from class com.google.gwt.user.client.ui.ComplexPanel
add, add, adjustIndex, checkIndexBoundsForAccess, checkIndexBoundsForInsertion, getChildren, getWidget, getWidgetCount, getWidgetIndex, getWidgetIndex, 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, 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, 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
-
-
-
-
Method Detail
-
addOrMoveSlot
@Deprecated public void addOrMoveSlot(Slot slot, int index)
Deprecated.since 7.1.4, useaddOrMoveSlot(Slot, int, boolean)See the methodaddOrMoveSlot(Slot, int, boolean).This method always adjusts spacings for the whole layout.
- Parameters:
slot- The slot to move or addindex- The index where the slot should be placed.
-
addOrMoveSlot
public void addOrMoveSlot(Slot slot, int index, boolean adjustSpacing)
Add or move a slot to another index.For internal use only. May be removed or replaced in the future.
You should note that the index does not refer to the DOM index if spacings are used. If spacings are used then the index will be adjusted to include the spacings when inserted.
For instance when using spacing the index converts to DOM index in the following way:
index : 0 -> DOM index: 0 index : 1 -> DOM index: 1 index : 2 -> DOM index: 3 index : 3 -> DOM index: 5 index : 4 -> DOM index: 7
When using this method never account for spacings.The caller should remove all spacings before calling this method and re-add them (if necessary) after this method. This can be done before and after all slots have been added/moved.
- Parameters:
slot- The slot to move or addindex- The index where the slot should be placed.adjustSpacing- true to recalculate spacings for the whole layout after the operation- Since:
- 7.1.4
-
insert
@Deprecated protected void insert(com.google.gwt.user.client.ui.Widget child, com.google.gwt.user.client.Element container, int beforeIndex, boolean domInsert)
Deprecated.As of 7.2, use or overrideinsert(Widget, Element, int, boolean)instead.- Overrides:
insertin classcom.google.gwt.user.client.ui.ComplexPanel
-
insert
protected void insert(com.google.gwt.user.client.ui.Widget child, com.google.gwt.dom.client.Element container, int beforeIndex, boolean domInsert)- Overrides:
insertin classcom.google.gwt.user.client.ui.ComplexPanel- Since:
- 7.2
-
removeWidget
public void removeWidget(com.google.gwt.user.client.ui.Widget widget)
Remove a slot from the layout.- Parameters:
widget- the widget whose slot to remove
-
removeSlot
protected void removeSlot(Slot slot)
Remove a slot from the layout. This method is called automatically byremoveWidget(Widget)and should not be called directly by the user. When overridden, the super method must be called.- Parameters:
slot- to remove- Since:
- 7.6
-
getSlot
public Slot getSlot(com.google.gwt.user.client.ui.Widget widget)
Get the containing slot for a widget. If no slot is found a new slot is created and returned.- Parameters:
widget- The widget whose slot you want to get- Returns:
- the slot
-
createSlot
protected Slot createSlot(com.google.gwt.user.client.ui.Widget widget)
Create a slot to be added to the layout. This method is called automatically bygetSlot(Widget)when a new slot is needed. It should not be called directly by the user, but can be overridden to customize slot creation.- Parameters:
widget- the widget for which a slot is being created- Returns:
- created Slot
- Since:
- 7.6
-
getSlot
@Deprecated public Slot getSlot(com.google.gwt.user.client.Element widgetElement)
Deprecated.As of 7.2, call or overridegetSlot(Element)insteadGets a slot based on the widget element. If no slot is found then null is returned.- Parameters:
widgetElement- The element of the widget ( Same as getWidget().getElement() )- Returns:
- the slot, or
nullif not found
-
getSlot
public Slot getSlot(com.google.gwt.dom.client.Element widgetElement)
Gets a slot based on the widget element. If no slot is found then null is returned.- Parameters:
widgetElement- The element of the widget ( Same as getWidget().getElement() )- Returns:
- the slot, or
nullif not found - Since:
- 7.2
-
setLayoutManager
public void setLayoutManager(LayoutManager manager)
Set the layout manager for the layout.- Parameters:
manager- The layout manager to use
-
getLayoutManager
public LayoutManager getLayoutManager()
Get the layout manager used by this layout.- Returns:
- the layout manager
-
getCaptionPositionFromElement
@Deprecated public CaptionPosition getCaptionPositionFromElement(com.google.gwt.user.client.Element captionWrap)
Deprecated.As of 7.2, call or overridegetCaptionPositionFromElement(Element)insteadDeducts the caption position by examining the wrapping element.For internal use only. May be removed or replaced in the future.
- Parameters:
captionWrap- The wrapping element- Returns:
- The caption position
-
getCaptionPositionFromElement
public CaptionPosition getCaptionPositionFromElement(com.google.gwt.dom.client.Element captionWrap)
Deducts the caption position by examining the wrapping element.For internal use only. May be removed or replaced in the future.
- Parameters:
captionWrap- The wrapping element- Returns:
- The caption position
- Since:
- 7.2
-
updateCaptionOffset
@Deprecated public void updateCaptionOffset(com.google.gwt.user.client.Element caption)
Deprecated.As of 7.2, call or overrideupdateCaptionOffset(Element)insteadUpdate the offset off the caption relative to the slotFor internal use only. May be removed or replaced in the future.
- Parameters:
caption- The caption element
-
updateCaptionOffset
public void updateCaptionOffset(com.google.gwt.dom.client.Element caption)
Update the offset off the caption relative to the slotFor internal use only. May be removed or replaced in the future.
- Parameters:
caption- The caption element- Since:
- 7.2
-
setMargin
public void setMargin(MarginInfo marginInfo)
Set the margin of the layout.- Parameters:
marginInfo- The margin information
-
setSpacing
public void setSpacing(boolean spacing)
Turn on or off spacing in the layout.- Parameters:
spacing- True if spacing should be used, false if not
-
updateExpandedSizes
public void updateExpandedSizes()
Assigns relative sizes to the children that should expand based on their expand ratios.
-
clearExpand
public void clearExpand()
Removes elements used to expand a slot.For internal use only. May be removed or replaced in the future.
-
updateExpandCompensation
public void updateExpandCompensation()
Updates the expand compensation based on the measured sizes of children without expand.
-
setHeight
public void setHeight(String height)
- Overrides:
setHeightin classcom.google.gwt.user.client.ui.UIObject
-
setSlotStyleNames
public void setSlotStyleNames(com.google.gwt.user.client.ui.Widget widget, String... stylenames)Sets the slot's style names. The style names will be prefixed with the v-slot prefix.- Parameters:
widget- the widget whose slot to stylestylenames- The style names of the slot.
-
-