public class CmsFloatDecoratedPanel extends com.google.gwt.user.client.ui.Composite implements I_CmsTruncable
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.
构造器和说明 |
---|
CmsFloatDecoratedPanel()
Creates a new instance of the widget.
|
限定符和类型 | 方法和说明 |
---|---|
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.
|
claimElement, getWidget, initializeClaimedElement, initWidget, isAttached, onAttach, onBrowserEvent, onDetach, render, render, resolvePotentialElement, setWidget
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, doAttachChildren, doDetachChildren, fireEvent, getHandlerCount, getLayoutData, getParent, isOrWasAttached, onUnload, removeFromParent, setLayoutData, sinkEvents
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, unsinkEvents
public CmsFloatDecoratedPanel()
public void add(com.google.gwt.user.client.ui.Widget widget)
widget
- the widget to addpublic void addToFloat(com.google.gwt.user.client.ui.Widget widget)
widget
- the widget to addpublic void addToFrontOfFloat(com.google.gwt.user.client.ui.Widget widget)
widget
- the widget to addpublic com.google.gwt.user.client.ui.Widget getWidget(int index)
index
- the positionpublic void truncate(java.lang.String textMetricsPrefix, int widgetWidth)
I_CmsTruncable
truncate
在接口中 I_CmsTruncable
textMetricsPrefix
- the key identifying the text metrics to usewidgetWidth
- the width to use in pixelsI_CmsTruncable.truncate(java.lang.String, int)
public void updateLayout()
protected void onLoad()
onLoad
在类中 com.google.gwt.user.client.ui.Widget
Widget.onLoad()