本文整理了Java中com.google.gwt.user.client.ui.Panel.getElement()
方法的一些代码示例,展示了Panel.getElement()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Panel.getElement()
方法的具体详情如下:
包路径:com.google.gwt.user.client.ui.Panel
类名称:Panel
方法名:getElement
暂无
代码示例来源:origin: org.jboss.errai/errai-bus
private void resize() {
contentPanel.setWidth(Window.getClientWidth() * 0.90 + "px");
contentPanel.setHeight(Window.getClientHeight() * 0.90 + "px");
contentPanel.getElement().getStyle().setProperty("overflow", "auto");
}
}
代码示例来源:origin: kiegroup/appformer
public void setResizable(int maxWidth, int maxHeight) {
displayerPanel.setWidth("100%");
displayerPanel.getElement().getStyle().setProperty("maxWidth", maxWidth + "px");
displayerPanel.getElement().getStyle().setProperty("maxHeight", maxHeight + "px");
registerMutationObserver();
}
代码示例来源:origin: kiegroup/appformer
Double getHorizontalScrollPosition() {
final Integer scrollLeft = scrollPanel().getElement().getScrollLeft();
final Integer scrollWidth = scrollPanel().getElement().getScrollWidth();
final Integer clientWidth = scrollPanel().getElement().getClientWidth();
final Integer level = scrollWidth - clientWidth;
return level == 0 ? 0d : 100d * scrollLeft / level;
}
代码示例来源:origin: kiegroup/appformer
Double getVerticalScrollPosition() {
final Integer scrollTop = scrollPanel().getElement().getScrollTop();
final Integer scrollHeight = scrollPanel().getElement().getScrollHeight();
final Integer clientHeight = scrollPanel().getElement().getClientHeight();
final Integer level = scrollHeight - clientHeight;
return level == 0 ? 0d : 100d * scrollTop / level;
}
代码示例来源:origin: org.uberfire/uberfire-wires-core-grids
Double getHorizontalScrollPosition() {
final Integer scrollLeft = scrollPanel().getElement().getScrollLeft();
final Integer scrollWidth = scrollPanel().getElement().getScrollWidth();
final Integer clientWidth = scrollPanel().getElement().getClientWidth();
final Integer level = scrollWidth - clientWidth;
return level == 0 ? 0d : 100d * scrollLeft / level;
}
代码示例来源:origin: org.uberfire/uberfire-wires-core-grids
Double getVerticalScrollPosition() {
final Integer scrollTop = scrollPanel().getElement().getScrollTop();
final Integer scrollHeight = scrollPanel().getElement().getScrollHeight();
final Integer clientHeight = scrollPanel().getElement().getClientHeight();
final Integer level = scrollHeight - clientHeight;
return level == 0 ? 0d : 100d * scrollTop / level;
}
代码示例来源:origin: sk.seges.acris/acris-widgets-beantable
private void adjustmentsForExpandedState() {
master.setWidth(width + "px");
DOM.setStyleAttribute(container.getElement(), "left", "0px");
}
代码示例来源:origin: org.uberfire/uberfire-wires-core-grids
void setVerticalScrollPosition(final Double percentage) {
final Integer scrollHeight = scrollPanel().getElement().getScrollHeight();
final Integer clientHeight = scrollPanel().getElement().getClientHeight();
final Integer max = scrollHeight - clientHeight;
setScrollTop((int) ((max * percentage) / 100));
}
代码示例来源:origin: org.uberfire/uberfire-wires-core-grids
void setHorizontalScrollPosition(final Double percentage) {
final Integer scrollWidth = scrollPanel().getElement().getScrollWidth();
final Integer clientWidth = scrollPanel().getElement().getClientWidth();
final Integer max = scrollWidth - clientWidth;
setScrollLeft((int) ((max * percentage) / 100));
}
代码示例来源:origin: net.sf.advanced-gwt/advanced-gwt
/**
* Sets body width property to the specified value.<p/>
* Use this method only for those grids that mustn't be auto resisable (see {@link #setResizable(boolean)}).
*
* @param width is a value of the property.
*/
public void setBodyWidth(String width) {
DOM.setStyleAttribute(DOM.getParent(getScrollPanel().getElement()), "width", width);
}
代码示例来源:origin: kiegroup/appformer
@Override
public void updateChart(C3ChartConf conf) {
displayerPanel.clear();
conf.setBindto(displayerPanel.getElement());
chart = C3.generate(conf);
}
代码示例来源:origin: net.sf.advanced-gwt/advanced-gwt
/**
* Sets header width property to the specified value.<p/>
* Use this method only for those grids that mustn't be auto resisable (see {@link #setResizable(boolean)}).
*
* @param width is a value of the property.
*/
public void setHeaderWidth(String width) {
DOM.setStyleAttribute(DOM.getParent(getScrollPanel().getElement()), "width", width);
}
代码示例来源:origin: errai/errai
private void resize() {
contentPanel.setWidth(Window.getClientWidth() * 0.90 + "px");
contentPanel.setHeight(Window.getClientHeight() * 0.90 + "px");
contentPanel.getElement().getStyle().setProperty("overflow", "auto");
}
}
代码示例来源:origin: org.uberfire/uberfire-wires-core-grids
private Panel scrollPanel() {
final Panel panel = mock(AbsolutePanel.class);
final Element element = mock(Element.class);
doReturn(SCROLL_LEFT).when(element).getScrollLeft();
doReturn(SCROLL_TOP).when(element).getScrollTop();
doReturn(SCROLL_WIDTH).when(element).getScrollWidth();
doReturn(SCROLL_HEIGHT).when(element).getScrollHeight();
doReturn(CLIENT_WIDTH).when(element).getClientWidth();
doReturn(CLIENT_HEIGHT).when(element).getClientHeight();
doReturn(element).when(panel).getElement();
return panel;
}
代码示例来源:origin: net.sf.advanced-gwt/advanced-gwt
/** {@inheritDoc} */
public void enableVerticalScrolling(boolean enabled) {
if (isScrollable() != enabled) {
String bodyParentHeight = DOM.getStyleAttribute(DOM.getParent(getScrollPanel().getElement()), "height");
if (bodyParentHeight == null || "".equals(bodyParentHeight)) {
setBodyHeight("200px"); //default height of body if actual height is missed
}
super.enableVerticalScrolling(enabled);
resize();
}
}
代码示例来源:origin: org.uberfire/uberfire-runtime-plugins-client
@Override
public void onOpen() {
LayoutInstance layoutInstance = layoutGenerator.build(layoutTemplate);
mainPanel.clear();
mainPanel.getElement().addClassName("uf-perspective-component");
mainPanel.add(ElementWrapperWidget.getWidget(layoutInstance.getElement()));
}
代码示例来源:origin: kiegroup/appformer
@Override
public void onOpen() {
LayoutInstance layoutInstance = layoutGenerator.build(layoutTemplate);
mainPanel.clear();
mainPanel.getElement().addClassName("uf-perspective-component");
mainPanel.add(ElementWrapperWidget.getWidget(layoutInstance.getElement()));
}
代码示例来源:origin: org.dashbuilder/dashbuilder-renderer-lienzo
@Override
public void init(P presenter) {
super.setPresenter(presenter);
super.setVisualization(container);
container.add(titleHtml);
container.add(filterPanel);
container.add(displayerPanel);
filterPanel.getElement().setAttribute("cellpadding", "2");
}
代码示例来源:origin: kiegroup/appformer
@Override
public void init(P presenter) {
super.setPresenter(presenter);
super.setVisualization(container);
container.add(titleHtml);
container.add(filterPanel);
container.add(displayerPanel);
filterPanel.getElement().setAttribute("cellpadding", "2");
}
代码示例来源:origin: kiegroup/appformer
@Override
public void init(P presenter) {
super.setPresenter(presenter);
super.setVisualization(container);
container.add(titleHtml);
container.add(filterPanel);
container.add(displayerPanel);
filterPanel.getElement().setAttribute("cellpadding", "2");
}
内容来源于网络,如有侵权,请联系作者删除!