本文整理了Java中com.google.gwt.user.client.ui.Widget.setHeight()
方法的一些代码示例,展示了Widget.setHeight()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Widget.setHeight()
方法的具体详情如下:
包路径:com.google.gwt.user.client.ui.Widget
类名称:Widget
方法名:setHeight
暂无
代码示例来源:origin: com.google.gwt/gwt-servlet
/**
* We control size by setting our child widget's size. However, if we don't
* currently have a child, we record the size the user wanted so that when we
* do get a child, we can set it correctly. Until size is explicitly cleared,
* any child put into the popup will be given that size.
*/
void maybeUpdateSize() {
// For subclasses of PopupPanel, we want the default behavior of setWidth
// and setHeight to change the dimensions of PopupPanel's child widget.
// We do this because PopupPanel's child widget is the first widget in
// the hierarchy which provides structure to the panel. DialogBox is
// an example of this. We want to set the dimensions on DialogBox's
// FlexTable, which is PopupPanel's child widget. However, it is not
// DialogBox's child widget. To make sure that we are actually getting
// PopupPanel's child widget, we have to use super.getWidget().
Widget w = super.getWidget();
if (w != null) {
if (desiredHeight != null) {
w.setHeight(desiredHeight);
}
if (desiredWidth != null) {
w.setWidth(desiredWidth);
}
}
}
代码示例来源:origin: com.google.gwt/gwt-servlet
/**
* Setup the container around the widget.
*/
private void finishWidgetInitialization(Element container, Widget w) {
UIObject.setVisible(container, false);
container.getStyle().setProperty("height", "100%");
// Set 100% by default.
Element element = w.getElement();
if (element.getStyle().getProperty("width").equals("")) {
w.setWidth("100%");
}
if (element.getStyle().getProperty("height").equals("")) {
w.setHeight("100%");
}
// Issue 2510: Hiding the widget isn't necessary because we hide its
// wrapper, but it's in here for legacy support.
w.setVisible(false);
}
代码示例来源:origin: com.extjs/gxt
@Override
public void setHeight(int height) {
widget.setHeight(height + "px");
}
代码示例来源:origin: org.gwtopenmaps.openlayers/openlayers_gwt
public void setHeight(String height)
{
if (height.matches("^\\d+$"))
{
super.setHeight(height+"px");
}
else super.setHeight(height);
}
代码示例来源:origin: geosdi/GWT-OpenLayers
public void setHeight(String height) {
if (height.matches("^\\d+$")) {
super.setHeight(height + "px");
} else {
super.setHeight(height);
}
}
代码示例来源:origin: info.magnolia.ui/magnolia-ui-vaadin-common-widgets
@Override
public void setHeight(String height) {
super.setHeight(height);
doResize();
}
代码示例来源:origin: org.gwtbootstrap3/gwtbootstrap3-extras
@Override
public void onLoad(LoadEvent event) {
if(thumbnailWidth != null) {
child.setWidth(thumbnailWidth);
}
if(thumbnailHeight != null) {
child.setHeight(thumbnailHeight);
}
}
});
代码示例来源:origin: de.esoco/gewt
/***************************************
* Sets the height of this component in string format. How this value is
* interpreted may depend on the underlying implementation.
*
* @param sHeight The new height
*/
public void setHeight(String sHeight)
{
getWidget().setHeight(sHeight);
}
代码示例来源:origin: org.jbpm/jbpm-gwt-form-api
@Override
public void setHeight(String height) {
super.setHeight(height);
this.text.setHeight(height);
}
}
代码示例来源:origin: gwtbootstrap3/gwtbootstrap3-extras
@Override
public void onLoad(LoadEvent event) {
if(thumbnailWidth != null) {
child.setWidth(thumbnailWidth);
}
if(thumbnailHeight != null) {
child.setHeight(thumbnailHeight);
}
}
});
代码示例来源:origin: com.github.gwtmaterialdesign/gwt-material-table
public void setHeight(String height) {
this.height = height;
Widget widget = getWidget();
if(widget != null && widget.isAttached()) {
widget.setHeight(height);
}
}
代码示例来源:origin: org.xwiki.platform/xwiki-platform-gwt-api
public static void setMaxHeight(Widget widget) {
int absoluteTop = getAbsoluteTop(widget);
int newHeight = (Window.getClientHeight() - absoluteTop);
if (newHeight>0) {
try {
widget.setHeight(newHeight + "px");
} catch (Exception e) {
// We need to catch this call since in IE7
// it seems to be able to break sometime on initial loading
}
}
}
代码示例来源:origin: GwtMaterialDesign/gwt-material-table
public void setHeight(String height) {
this.height = height;
Widget widget = getWidget();
if(widget != null && widget.isAttached()) {
widget.setHeight(height);
}
}
代码示例来源:origin: io.github.nibiruos.ui/org.nibiru.ui.gwt
static void setNativeSize(Widget control, int width, int height) {
control.setWidth(width + "px");
control.setHeight(height + "px");
control.getElement().getStyle().setOverflow(com.google.gwt.dom.client.Style.Overflow.HIDDEN);
}
代码示例来源:origin: info.magnolia.ui/magnolia-ui-vaadin-common-widgets
private void adjustTextAreaAndFormSizeToScreen() {
int formHeight = calculateFormHeight();
form.setHeight(formHeight + "px");
textWidget.setWidth((form.getOffsetWidth() + getDialogWrapperBorder()[RIGHT] + getDialogWrapperBorder()[LEFT]) + "px");
textWidget.setHeight(formHeight + "px");
}
代码示例来源:origin: kiegroup/appformer
@Override
public void setPreferredHeight(final int height) {
if (getWidgetCount() == 1 && getWidget(0) instanceof ModalDialog) {
this.getWidget(0).setHeight(height + "px");
}
}
代码示例来源:origin: org.uberfire/uberfire-widgets-core-client
@Override
public void setPreferredHeight(final int height) {
if (getWidgetCount() == 1 && getWidget(0) instanceof ModalDialog) {
this.getWidget(0).setHeight(height + "px");
}
}
代码示例来源:origin: fr.lteconsulting/hexa.core
public void addFull(Widget widget)
{
panel.add( widget );
widget.setWidth( "100%" );
widget.setHeight( "100%" );
widget.getElement().getParentElement().getParentElement().getStyle().setHeight( 100, Unit.PCT );
}
代码示例来源:origin: ltearno/hexa.tools
public void addFull(Widget widget)
{
panel.add( widget );
widget.setWidth( "100%" );
widget.setHeight( "100%" );
widget.getElement().getParentElement().getParentElement().getStyle().setHeight( 100, Unit.PCT );
}
代码示例来源:origin: bedatadriven/activityinfo
private void sizeContainer() {
container.setWidth((Window.getClientWidth() - LEFT_MARGIN) + "px");
container.setHeight((Window.getClientHeight()) + "px");
container.setWidgetPosition(widget, PADDING, PADDING);
widget.setWidth((Window.getClientWidth() - LEFT_MARGIN - (PADDING * 2)) + "px");
widget.setHeight((Window.getClientHeight() - (PADDING * 2)) + "px");
}
内容来源于网络,如有侵权,请联系作者删除!