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 ClassesModifier and TypeClassDescriptionprotected static interface
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
FieldsModifier and TypeFieldDescriptionprotected com.google.gwt.user.client.ui.FlowPanel
The float panel.protected com.google.gwt.user.client.ui.FlowPanel
The panel containing both the main and float panel.protected com.google.gwt.user.client.ui.FlowPanel
The main panel.Fields inherited from class com.google.gwt.user.client.ui.UIObject
DEBUG_ID_PREFIX
-
Constructor Summary
ConstructorsConstructorDescriptionCmsSimpleDecoratedPanel
(int decorationWidth, com.google.gwt.user.client.ui.Widget mainWidget, List<com.google.gwt.user.client.ui.Widget> decoration) Creates a new instance of this widget. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addDecorationBoxStyle
(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
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 Details
-
m_decorationBox
The float panel. -
m_panel
The panel containing both the main and float panel. -
m_primary
The main panel.
-
-
Constructor Details
-
CmsSimpleDecoratedPanel
public CmsSimpleDecoratedPanel(int decorationWidth, com.google.gwt.user.client.ui.Widget mainWidget, 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 Details
-
addDecorationBoxStyle
Adds a style name to the decoration box.- Parameters:
cssClass
- the CSS class 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_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:
-