Package org.opencms.gwt.client.ui
Class CmsSimpleDecoratedPanel
- 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.CmsSimpleDecoratedPanel
-
- 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 CmsSimpleDecoratedPanel extends com.google.gwt.user.client.ui.Composite implements I_CmsTruncable
A panel containing two sub-panels next to each other , one for 'decorations' (check boxes, etc.) and one containing a main widget.This widget does not calculate the width of the decoration panel automatically. You have to pass the appropriate width as a parameter to the constructor.
- Since:
- 8.0.0
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static interface
CmsSimpleDecoratedPanel.I_CmsSimpleDecoratedPanelUiBinder
-
Field Summary
Fields Modifier and Type Field Description protected com.google.gwt.user.client.ui.FlowPanel
m_decorationBox
The float panel.protected com.google.gwt.user.client.ui.FlowPanel
m_panel
The panel containing both the main and float panel.protected com.google.gwt.user.client.ui.FlowPanel
m_primary
The main panel.
-
Constructor Summary
Constructors Constructor Description CmsSimpleDecoratedPanel(int decorationWidth, com.google.gwt.user.client.ui.Widget mainWidget, java.util.List<com.google.gwt.user.client.ui.Widget> decoration)
Creates a new instance of this widget.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addDecorationBoxStyle(java.lang.String cssClass)
Adds a style name to the decoration box.com.google.gwt.user.client.ui.Widget
getWidget(int index)
Returns the widget at the given position.void
truncate(java.lang.String textMetricsPrefix, int widgetWidth)
Truncates long text and sets the original text to the title attribute.-
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, 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, setElement, setElement, setHeight, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setTitle, setVisible, setVisible, setWidth, sinkBitlessEvent, toString
-
-
-
-
Field Detail
-
m_decorationBox
@UiField protected com.google.gwt.user.client.ui.FlowPanel m_decorationBox
The float panel.
-
m_panel
@UiField protected com.google.gwt.user.client.ui.FlowPanel m_panel
The panel containing both the main and float panel.
-
m_primary
@UiField protected com.google.gwt.user.client.ui.FlowPanel m_primary
The main panel.
-
-
Constructor Detail
-
CmsSimpleDecoratedPanel
public CmsSimpleDecoratedPanel(int decorationWidth, com.google.gwt.user.client.ui.Widget mainWidget, java.util.List<com.google.gwt.user.client.ui.Widget> decoration)
Creates a new instance of this widget.- Parameters:
decorationWidth
- the width which the decoration box should havemainWidget
- the main widgetdecoration
- the list of decoration widgets (from left to right)
-
-
Method Detail
-
addDecorationBoxStyle
public void addDecorationBoxStyle(java.lang.String cssClass)
Adds a style name to the decoration box.- Parameters:
cssClass
- the CSS class 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
-
truncate
public void truncate(java.lang.String textMetricsPrefix, int widgetWidth)
Description copied from interface:I_CmsTruncable
Truncates long text and sets the original text to the title attribute.- Specified by:
truncate
in interfaceI_CmsTruncable
- Parameters:
textMetricsPrefix
- the key identifying the text metrics to usewidgetWidth
- the width to use in pixels- See Also:
I_CmsTruncable.truncate(java.lang.String, int)
-
-