本文整理汇总了Java中com.google.gwt.dom.client.Style.setPaddingBottom方法的典型用法代码示例。如果您正苦于以下问题:Java Style.setPaddingBottom方法的具体用法?Java Style.setPaddingBottom怎么用?Java Style.setPaddingBottom使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.google.gwt.dom.client.Style
的用法示例。
在下文中一共展示了Style.setPaddingBottom方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: QuickDocViewImpl
import com.google.gwt.dom.client.Style; //导入方法依赖的package包/类
@Inject
public QuickDocViewImpl() {
super(true, true);
addCloseHandler(
new CloseHandler<PopupPanel>() {
@Override
public void onClose(CloseEvent<PopupPanel> event) {
if (delegate != null) {
delegate.onCloseView();
}
}
});
setSize("400px", "200px");
Style style = getElement().getStyle();
style.setProperty("resize", "both");
style.setPaddingBottom(0, Style.Unit.PX);
style.setPaddingTop(3, Style.Unit.PX);
style.setPaddingLeft(3, Style.Unit.PX);
style.setPaddingRight(3, Style.Unit.PX);
createFrame();
add(frame);
}
示例2: TextBoxDOMElement
import com.google.gwt.dom.client.Style; //导入方法依赖的package包/类
public TextBoxDOMElement(final TextBox widget,
final GridLayer gridLayer,
final GridWidget gridWidget) {
super(widget,
gridLayer,
gridWidget);
final Style style = widget.getElement().getStyle();
style.setWidth(100,
Style.Unit.PCT);
style.setHeight(HEIGHT,
Style.Unit.PX);
style.setPaddingLeft(2,
Style.Unit.PX);
style.setPaddingRight(2,
Style.Unit.PX);
style.setFontSize(10,
Style.Unit.PX);
// --- Workaround for BS2 ---
style.setPosition(Style.Position.RELATIVE);
style.setPaddingTop(0,
Style.Unit.PX);
style.setPaddingBottom(0,
Style.Unit.PX);
style.setProperty("WebkitBoxSizing",
"border-box");
style.setProperty("MozBoxSizing",
"border-box");
style.setProperty("boxSizing",
"border-box");
style.setProperty("lineHeight",
"normal");
// --- End workaround ---
getContainer().getElement().getStyle().setPaddingLeft(5,
Style.Unit.PX);
getContainer().getElement().getStyle().setPaddingRight(5,
Style.Unit.PX);
getContainer().setWidget(widget);
}
示例3: CheckBoxDOMElement
import com.google.gwt.dom.client.Style; //导入方法依赖的package包/类
public CheckBoxDOMElement(final CheckBox widget,
final GridLayer gridLayer,
final GridWidget gridWidget) {
super(widget,
gridLayer,
gridWidget);
final Style style = widget.getElement().getStyle();
style.setMarginTop(0,
Style.Unit.PX);
style.setMarginLeft(2,
Style.Unit.PX);
style.setWidth(SIZE,
Style.Unit.PX);
style.setHeight(SIZE,
Style.Unit.PX);
// --- Workaround for BS2 ---
style.setPosition(Style.Position.RELATIVE);
style.setPaddingTop(0,
Style.Unit.PX);
style.setPaddingBottom(0,
Style.Unit.PX);
style.setProperty("WebkitBoxSizing",
"border-box");
style.setProperty("MozBoxSizing",
"border-box");
style.setProperty("boxSizing",
"border-box");
style.setProperty("lineHeight",
"normal");
// --- End workaround ---
getContainer().setWidget(widget);
}
示例4: ListBoxDOMElement
import com.google.gwt.dom.client.Style; //导入方法依赖的package包/类
public ListBoxDOMElement(final ListBox widget,
final GridLayer gridLayer,
final GridWidget gridWidget) {
super(widget,
gridLayer,
gridWidget);
final Style style = widget.getElement().getStyle();
style.setWidth(100,
Style.Unit.PCT);
style.setHeight(HEIGHT,
Style.Unit.PX);
style.setPaddingLeft(2,
Style.Unit.PX);
style.setPaddingRight(2,
Style.Unit.PX);
style.setFontSize(10,
Style.Unit.PX);
// --- Workaround for BS2 ---
style.setPosition(Style.Position.RELATIVE);
style.setPaddingTop(0,
Style.Unit.PX);
style.setPaddingBottom(0,
Style.Unit.PX);
style.setProperty("WebkitBoxSizing",
"border-box");
style.setProperty("MozBoxSizing",
"border-box");
style.setProperty("boxSizing",
"border-box");
style.setProperty("lineHeight",
"normal");
// --- End workaround ---
getContainer().getElement().getStyle().setPaddingLeft(5,
Style.Unit.PX);
getContainer().getElement().getStyle().setPaddingRight(5,
Style.Unit.PX);
getContainer().setWidget(widget);
}
示例5: layoutGroupBox
import com.google.gwt.dom.client.Style; //导入方法依赖的package包/类
protected void layoutGroupBox() {
CubaGroupBoxWidget panel = getWidget();
LayoutManager layoutManager = getLayoutManager();
if (isBordersVisible()) {
int captionWidth = layoutManager.getOuterWidth(panel.captionNode);
int captionStartWidth = layoutManager.getInnerWidth(panel.captionStartDeco);
int totalMargin = captionWidth + captionStartWidth;
panel.captionNode.getStyle().setWidth(captionWidth, Unit.PX);
panel.captionWrap.getStyle().setPaddingLeft(totalMargin, Unit.PX);
panel.captionStartDeco.getStyle().setMarginLeft(0 - totalMargin, Unit.PX);
}
Profiler.enter("CubaGroupBoxConnector.layout getHeights");
// Haulmont API get max height of caption components
int top = layoutManager.getOuterHeight(panel.captionNode);
top = Math.max(layoutManager.getOuterHeight(panel.captionStartDeco), top);
top = Math.max(layoutManager.getOuterHeight(panel.captionEndDeco), top);
int bottom = layoutManager.getInnerHeight(panel.bottomDecoration);
Profiler.leave("PanelConnector.layout getHeights");
Style style = panel.getElement().getStyle();
int paddingTop = 0;
int paddingBottom = 0;
if (panel.hasAnyOuterMargin()) {
Profiler.enter("PanelConnector.layout get values from styles");
// Clear previously set values
style.clearPaddingTop();
style.clearPaddingBottom();
// Calculate padding from styles
ComputedStyle computedStyle = new ComputedStyle(panel.getElement());
paddingTop = computedStyle.getIntProperty("padding-top");
paddingBottom = computedStyle.getIntProperty("padding-bottom");
Profiler.leave("PanelConnector.layout get values from styles");
}
Profiler.enter("PanelConnector.layout modify style");
panel.captionWrap.getStyle().setMarginTop(-top, Style.Unit.PX);
panel.bottomDecoration.getStyle().setMarginBottom(-bottom, Style.Unit.PX);
style.setPaddingTop(top + paddingTop, Style.Unit.PX);
style.setPaddingBottom(bottom + paddingBottom, Style.Unit.PX);
Profiler.leave("PanelConnector.layout modify style");
// Update scroll positions
Profiler.enter("PanelConnector.layout update scroll positions");
panel.contentNode.setScrollTop(panel.scrollTop);
panel.contentNode.setScrollLeft(panel.scrollLeft);
Profiler.leave("PanelConnector.layout update scroll positions");
// Read actual value back to ensure update logic is correct
Profiler.enter("PanelConnector.layout read scroll positions");
panel.scrollTop = panel.contentNode.getScrollTop();
panel.scrollLeft = panel.contentNode.getScrollLeft();
Profiler.leave("PanelConnector.layout read scroll positions");
}