public class CmsPaddedPanel
extends com.google.gwt.user.client.ui.SimplePanel
This padding is implemented by dynamically setting the size and margins of the contained widget after insertion into the DOM.
It only works with a single child widget right now and thus extends SimplePanel.
| 限定符和类型 | 字段和说明 |
|---|---|
static I_CmsInputCss |
CSS
The CSS bundle used for this widget.
|
| 构造器和说明 |
|---|
CmsPaddedPanel(int paddingX)
Constructs a new instance of this widget.
|
| 限定符和类型 | 方法和说明 |
|---|---|
protected void |
onLoad()
We override the onLoad method because the width of the internal text box needs
to be calculated after the widget is attached to the DOM.
|
void |
setPaddingX(int paddingX)
Sets the horizontal padding of this widget and updates the style for this widget.
|
void |
updatePadding()
Updates the horizontal "padding" for this text box.
|
add, getContainerElement, getWidget, iterator, remove, setWidget, setWidgetadd, adopt, adopt, clear, disown, doAttachChildren, doDetachChildren, orphan, removeaddAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, fireEvent, getHandlerCount, getLayoutData, getParent, isAttached, isOrWasAttached, onAttach, onBrowserEvent, onDetach, onUnload, removeFromParent, setLayoutData, sinkEventsaddStyleDependentName, addStyleName, ensureDebugId, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getElement, getOffsetHeight, getOffsetWidth, getStyleElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, getTitle, isVisible, isVisible, onEnsureDebugId, removeStyleDependentName, removeStyleName, resolvePotentialElement, setElement, setElement, setHeight, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setTitle, setVisible, setVisible, setWidth, sinkBitlessEvent, toString, unsinkEventspublic static final I_CmsInputCss CSS
public CmsPaddedPanel(int paddingX)
paddingX - the horizontal padding to usepublic void setPaddingX(int paddingX)
paddingX - the new padding valuepublic void updatePadding()
This isn't done via the CSS padding property, because if we set the width of the widget to 100%, a real padding would make a part of the widget stick outside of its parent element. Instead, we change the width of the textbox and its left and right margins.
protected void onLoad()
onLoad 在类中 com.google.gwt.user.client.ui.WidgetWidget.onLoad()