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.FlowPanel
Base 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 boolean
definedHeight
protected boolean
spacing
boolean
vertical
For internal use only.
-
Constructor Summary
Constructors Constructor Description VAbstractOrderedLayout(boolean vertical)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
addOrMoveSlot(Slot slot, int index)
Deprecated.since 7.1.4, useaddOrMoveSlot(Slot, int, boolean)
void
addOrMoveSlot(Slot slot, int index, boolean adjustSpacing)
Add or move a slot to another index.void
clearExpand()
Removes elements used to expand a slot.protected Slot
createSlot(com.google.gwt.user.client.ui.Widget widget)
Create a slot to be added to the layout.CaptionPosition
getCaptionPositionFromElement(com.google.gwt.dom.client.Element captionWrap)
Deducts the caption position by examining the wrapping element.CaptionPosition
getCaptionPositionFromElement(com.google.gwt.user.client.Element captionWrap)
Deprecated.As of 7.2, call or overridegetCaptionPositionFromElement(Element)
insteadLayoutManager
getLayoutManager()
Get the layout manager used by this layoutSlot
getSlot(com.google.gwt.dom.client.Element widgetElement)
Gets a slot based on the widget element.Slot
getSlot(com.google.gwt.user.client.Element widgetElement)
Deprecated.As of 7.2, call or overridegetSlot(Element)
insteadSlot
getSlot(com.google.gwt.user.client.ui.Widget widget)
Get the containing slot for a widget.protected void
insert(com.google.gwt.user.client.ui.Widget child, com.google.gwt.dom.client.Element container, int beforeIndex, boolean domInsert)
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.protected void
removeSlot(Slot slot)
Remove a slot from the layout.void
removeWidget(com.google.gwt.user.client.ui.Widget widget)
Remove a slot from the layoutvoid
setHeight(String height)
void
setLayoutManager(LayoutManager manager)
Set the layout manager for the layoutvoid
setMargin(MarginInfo marginInfo)
Set the margin of the layoutvoid
setSlotStyleNames(com.google.gwt.user.client.ui.Widget widget, String... stylenames)
Sets the slots style names.void
setSpacing(boolean spacing)
Turn on or off spacing in the layoutvoid
updateCaptionOffset(com.google.gwt.dom.client.Element caption)
Update the offset off the caption relative to the slotvoid
updateCaptionOffset(com.google.gwt.user.client.Element caption)
Deprecated.As of 7.2, call or overrideupdateCaptionOffset(Element)
insteadvoid
updateExpandCompensation()
Updates the expand compensation based on the measured sizes of children without expand.void
updateExpandedSizes()
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
-
-
-
-
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:
insert
in 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:
insert
in 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
-
-
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:
-
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:
-
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:
- 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
-
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:
setHeight
in classcom.google.gwt.user.client.ui.UIObject
-
setSlotStyleNames
public void setSlotStyleNames(com.google.gwt.user.client.ui.Widget widget, String... stylenames)
Sets the slots style names. The style names will be prefixed with the v-slot prefix.- Parameters:
stylenames
- The style names of the slot.
-
-