/** * Reset the dimensions of the widget when it is removed. */ private void resetChildWidget(Widget w) { w.setSize("", ""); w.setVisible(true); } }
/*************************************** * Sets the argument widgets to an HTML size of 100%. * * @param rWidgets The widgets to set the size of */ private void setToMaximumSize(Widget... rWidgets) { for (Widget rWidget : rWidgets) { rWidget.setSize("100%", "100%"); } }
Widget gw = mDynamicPlot.getGraphWidget(); // FILL mode with values of 0 means fill 100% of container: SizeMetrics sm = new SizeMetrics(0,SizeLayoutType.FILL, 0,SizeLayoutType.FILL)); gw.setSize(sm); // get a handle to the layout manager: LayoutManager lm = mDynamicPlot.getLayoutManager(); // position the upper left corner of gw in the upper left corner of the space // controlled by lm. lm.position(gw, 0, XLayoutStyle.ABSOLUTE_FROM_LEFT, 0, YLayoutStyle.ABSOLUTE_FROM_TOP);
/** * Reset the dimensions of the widget when it is removed. */ private void resetChildWidget(Widget w) { w.setSize("", ""); w.setVisible(true); } }
public void setSize(int width, int height) { int realHeight = height - 20; int realWidth = width - 20; if (realHeight > 0 && realWidth > 0) { widget.setSize("" + realWidth + "px", "" + realHeight + "px"); super.setSize("" + width + "px", "" + height + "px"); } }
/** * Reset the dimensions of the widget when it is removed. */ private void resetChildWidget(Widget w) { w.setSize("", ""); w.setVisible(true); } }
/** * Set the button size. */ public void setButtonSize(String width, String height) { button.setSize(width, height); updateSize(); }
public void setSize(String width, String height) { asWidget().setSize(width, height); }
public void setSize(String width, String height) { asWidget().setSize(width, height); }
public void setSize(String width, String height) { button.setSize(width, height); container.setSize(width, height); wrapper.setSize(width, height); } }
public void setDocumentDetailView(final DocumentDetailView view) { Widget widget = view.asWidget(); widget.setSize("100%", "100%"); // View starts hidden widget.setVisible(false); detailContainer.setDetail(widget); }
/** * Create an HTML container widget that represents a DIV element. When using this constructor, width and height are * set to 100%. We always set the width and height, because XHTML does not like DIV's without sizing attributes. */ public HtmlGroup() { super(new DivPanel()); asWidget().setSize("100%", "100%"); asWidget().getElement().getStyle().setZIndex(0); }
/** * Resizes the {@link CSS3DRenderer} viewport * to (width, height), and also sets the viewport to fit that size, * starting in (0, 0). * * @param width the new width of the {@link CSS3DRenderer}. * @param height the new height of the {@link CSS3DRenderer}. */ private void setSize(int width, int height) { Log.debug("CSS3DRenderingPanel: set size: W=" + width + ", H=" + height); getCanvas().setSize(width+"px", height+"px"); getRenderer().setSize(width, height); }
@Override public void applyScale(double scale, int x, int y) { this.scale = scale; if (!Dom.isTransformationSupported()) { // Best effort to make animations work in IE8... if (scale == 1.0) { asWidget().getElement().getStyle().clearProperty("filter"); asWidget().setSize("100px", "100px"); } else { asWidget().setSize("100%", "100%"); String filter = "progid:DXImageTransform.Microsoft.Matrix(M11=" + scale + ", M12=0, M21=0, M22=" + scale + ", SizingMethod='auto expand')"; Dom.setStyleAttribute(asWidget().getElement(), "filter", filter); } } else { // Normal browsers: Dom.setTransform(asWidget().getElement(), "scale(" + scale + ")"); Dom.setTransformOrigin(asWidget().getElement(), x + "px " + y + "px"); } }