Class 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 
      Constructor Description
      CmsFloatDecoratedPanel()
      Creates a new instance of the widget.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void add​(com.google.gwt.user.client.ui.Widget widget)
      Adds a widget to the main panel.
      void addToFloat​(com.google.gwt.user.client.ui.Widget widget)
      Adds a widget to the float panel.
      void addToFrontOfFloat​(com.google.gwt.user.client.ui.Widget widget)
      Adds a widget to the front of the float panel.
      com.google.gwt.user.client.ui.Widget getWidget​(int index)
      Returns the widget at the given position.
      protected void onLoad()
      Automatically calls the updateLayout method after insertion into the DOM.
      void truncate​(java.lang.String textMetricsPrefix, int widgetWidth)
      Truncates long text and sets the original text to the title attribute.
      void updateLayout()
      Sets 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, setWidget
      • Methods 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, 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, 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
    • Method Detail

      • add

        public void add​(com.google.gwt.user.client.ui.Widget widget)
        Adds a widget to the main panel.

        Parameters:
        widget - the widget to add
      • addToFloat

        public void addToFloat​(com.google.gwt.user.client.ui.Widget widget)
        Adds a widget to the float panel.

        Parameters:
        widget - the widget to add
      • addToFrontOfFloat

        public void addToFrontOfFloat​(com.google.gwt.user.client.ui.Widget widget)
        Adds a widget to the front of the float panel.

        Parameters:
        widget - the widget to add
      • getWidget

        public com.google.gwt.user.client.ui.Widget getWidget​(int index)
        Returns the widget at the given position.

        Parameters:
        index - the position
        Returns:
        the widget at the given position
      • updateLayout

        public void updateLayout()
        Sets the left margin of the main panel to the width of the float panel.

      • onLoad

        protected void onLoad()
        Automatically calls the updateLayout method after insertion into the DOM.

        Overrides:
        onLoad in class com.google.gwt.user.client.ui.Widget
        See Also:
        Widget.onLoad()