public class CmsSimpleDecoratedPanel extends com.google.gwt.user.client.ui.Composite implements I_CmsTruncable
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.
| 限定符和类型 | 类和说明 |
|---|---|
protected static interface |
CmsSimpleDecoratedPanel.I_CmsSimpleDecoratedPanelUiBinder |
| 限定符和类型 | 字段和说明 |
|---|---|
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.
|
| 构造器和说明 |
|---|
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.
|
| 限定符和类型 | 方法和说明 |
|---|---|
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.
|
claimElement, getWidget, initializeClaimedElement, initWidget, isAttached, onAttach, onBrowserEvent, onDetach, render, render, resolvePotentialElement, setWidgetaddAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, doAttachChildren, doDetachChildren, fireEvent, getHandlerCount, getLayoutData, getParent, isOrWasAttached, onLoad, onUnload, removeFromParent, setLayoutData, sinkEventsaddStyleDependentName, 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, unsinkEvents@UiField protected com.google.gwt.user.client.ui.FlowPanel m_decorationBox
@UiField protected com.google.gwt.user.client.ui.FlowPanel m_panel
@UiField protected com.google.gwt.user.client.ui.FlowPanel m_primary
public CmsSimpleDecoratedPanel(int decorationWidth,
com.google.gwt.user.client.ui.Widget mainWidget,
java.util.List<com.google.gwt.user.client.ui.Widget> decoration)
decorationWidth - the width which the decoration box should havemainWidget - the main widgetdecoration - the list of decoration widgets (from left to right)public void addDecorationBoxStyle(java.lang.String cssClass)
cssClass - the CSS class to addpublic com.google.gwt.user.client.ui.Widget getWidget(int index)
index - the positionpublic void truncate(java.lang.String textMetricsPrefix,
int widgetWidth)
I_CmsTruncabletruncate 在接口中 I_CmsTruncabletextMetricsPrefix - the key identifying the text metrics to usewidgetWidth - the width to use in pixelsI_CmsTruncable.truncate(java.lang.String, int)