Package org.opencms.gwt.client.ui
Class CmsFloatDecoratedPanel
java.lang.Object
com.google.gwt.user.client.ui.UIObject
com.google.gwt.user.client.ui.Widget
com.google.gwt.user.client.ui.Composite
org.opencms.gwt.client.ui.CmsFloatDecoratedPanel
- 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.IsRenderable,com.google.gwt.user.client.ui.IsWidget,I_CmsTruncable
public class CmsFloatDecoratedPanel
extends com.google.gwt.user.client.ui.Composite
implements I_CmsTruncable
A widget used for laying out multiple widgets horizontally.
It contains two panels, the "primary" (or main) panel and the "float" panel, to which widgets can be added. The float panel is styled so as to float left of the primary panel, and the primary panel's left margin is set to the width of the float panel. If the widget starts out as hidden, the float panel width can not be measured, so you have to call the updateLayout method manually when the widget becomes visible.
- Since:
- 8.0.0
-
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 -
Field Summary
Fields inherited from class com.google.gwt.user.client.ui.UIObject
DEBUG_ID_PREFIX -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidadd(com.google.gwt.user.client.ui.Widget widget) Adds a widget to the main panel.voidaddToFloat(com.google.gwt.user.client.ui.Widget widget) Adds a widget to the float panel.voidaddToFrontOfFloat(com.google.gwt.user.client.ui.Widget widget) Adds a widget to the front of the float panel.com.google.gwt.user.client.ui.WidgetgetWidget(int index) Returns the widget at the given position.protected voidonLoad()Automatically calls the updateLayout method after insertion into the DOM.voidTruncates long text and sets the original text to the title attribute.voidSets the left margin of the main panel to the width of the float panel.Methods inherited from class com.google.gwt.user.client.ui.Composite
claimElement, getWidget, initializeClaimedElement, initWidget, isAttached, onAttach, onBrowserEvent, onDetach, render, render, resolvePotentialElement, setWidgetMethods inherited from class com.google.gwt.user.client.ui.Widget
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, doAttachChildren, doDetachChildren, fireEvent, getHandlerCount, getLayoutData, getParent, isOrWasAttached, onUnload, removeFromParent, setLayoutData, sinkEvents, unsinkEventsMethods 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, setElement, setElement, setHeight, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setTitle, setVisible, setVisible, setWidth, sinkBitlessEvent, toString
-
Constructor Details
-
CmsFloatDecoratedPanel
public CmsFloatDecoratedPanel()Creates a new instance of the widget.
-
-
Method Details
-
add
Adds a widget to the main panel.- Parameters:
widget- the widget to add
-
addToFloat
Adds a widget to the float panel.- Parameters:
widget- the widget to add
-
addToFrontOfFloat
Adds a widget to the front of the float panel.- Parameters:
widget- the widget to add
-
getWidget
Returns the widget at the given position.- Parameters:
index- the position- Returns:
- the widget at the given position
-
truncate
Description copied from interface:I_CmsTruncableTruncates long text and sets the original text to the title attribute.- Specified by:
truncatein interfaceI_CmsTruncable- Parameters:
textMetricsPrefix- the key identifying the text metrics to usewidgetWidth- the width to use in pixels- See Also:
-
updateLayout
Sets the left margin of the main panel to the width of the float panel. -
onLoad
Automatically calls the updateLayout method after insertion into the DOM.- Overrides:
onLoadin classcom.google.gwt.user.client.ui.Widget- See Also:
-