List of usage examples for com.google.gwt.user.client.ui Widget setHeight
public void setHeight(String height)
From source file:org.cruxframework.crux.widgets.client.slider.Slider.java
License:Apache License
@SuppressWarnings("unused") private static void fixWidthHeight(final Widget widget) { widget.setWidth("100%"); Scheduler.get().scheduleDeferred(new ScheduledCommand() { @Override/*from ww w .j a v a 2s.com*/ public void execute() { widget.setHeight("100%"); } }); }
From source file:org.drools.guvnor.client.asseteditor.ruleflow.RuleFlowNodeFactory.java
License:Apache License
private static void fillRuleFlowBaseNode(RuleFlowBaseNode node, TransferNode tn) { fillIdAndCoordinates(node, tn);/*from w w w. j a v a 2 s .c o m*/ Widget panel; if (node.getImagePath() == null) { panel = createContentWithoutImage(tn.getName(), node, tn.getWidth()); } else { panel = createContentWithImage(tn.getName(), node, tn.getWidth()); } if (node.getCorners() == Corners.ROUNDED) { int cornerHeight = LayoutCalculator.calculateCornerHeight(tn.getWidth()); panel.setHeight(LayoutCalculator.calculateNodeHeight(tn.getHeight(), cornerHeight) + "px"); RuleFlowRoundedPanel rp = new RuleFlowRoundedPanel(RoundedPanel.ALL, RuleFlowBaseNode.CORNER_HEIGHT); rp.setTopAndBottomRowColor("Black"); rp.setCornerStyleName(node.getStyle()); rp.add(panel); node.add(rp); } else if (node.getCorners() == Corners.ROUND) { int cornerHeight = LayoutCalculator.calculateRoundCornerHeight(tn.getWidth()); panel.setHeight("1px"); RuleFlowRoundPanel rp = new RuleFlowRoundPanel(cornerHeight); rp.setTopAndBottomRowColor("Black"); rp.setCornerStyleName(node.getStyle()); rp.add(panel); node.add(rp); } else { panel.setHeight(tn.getHeight() + "px"); if (node instanceof ElementContainerNode) { // Add nodes that are in for each node AbsolutePanel ap = new AbsolutePanel(); ElementContainerNode fen = (ElementContainerNode) node; for (RuleFlowBaseNode baseNode : fen.getNodes().values()) { ap.add(baseNode, baseNode.getX(), baseNode.getY()); } // Add connections that are in for each node for (Connection c : fen.getConnections()) { c.appendTo(ap); } ap.add(panel); node.add(ap); } else { node.add(panel); } } }
From source file:org.drools.guvnor.client.explorer.navigation.reporting.ReportTemplatesActivity.java
License:Apache License
@Override public void start(AcceptItem tabbedPanel, EventBus eventBus) { ReportView reportView = new ReportView(clientFactory); reportView.setController(clientFactory.getController()); Widget widget = reportView.asWidget(); widget.setHeight("600px"); tabbedPanel.add(ConstantsCore.INSTANCE.ReportTemplates(), widget); }
From source file:org.drools.guvnor.client.explorer.PerspectivesPanelViewImpl.java
License:Apache License
public void setWidget(IsWidget widget) { perspective.clear();/*from w ww . j a va 2 s.c om*/ Widget w = widget.asWidget(); w.setHeight("100%"); w.setWidth("100%"); perspective.add(w); }
From source file:org.eclipse.swt.widgets.Control.java
License:Open Source License
int setBounds(int x, int y, int width, int height, boolean move, boolean resize) { com.google.gwt.user.client.ui.Widget gwtWidget = getGwtWidget(); gwtWidget.setHeight(height + "px"); gwtWidget.setWidth(width + "px"); redrawWidget(0, 0, 0, 0, true, true, true); return 0;/*from ww w .j a v a2 s . co m*/ }
From source file:org.ednovo.gooru.client.mvp.shelf.collection.tab.resource.CollectionResourceTabView.java
License:Open Source License
@Override public void setEditMode(boolean editMode, Widget resourceWidget) { Widget sequenceWidget = sequenceVerPanel .getWidget(collectionResourcePanelVc.getWidgetIndex(resourceWidget.getParent())); collectionResourcePanelVc.makeChildrenDraggable(!editMode); sequenceWidget.setHeight((resourceWidget.getOffsetHeight() - 7) + "px"); }
From source file:org.gwtbootstrap3.extras.gallery.client.ui.Gallery.java
License:Apache License
@Override public void add(final Widget child) { if (child instanceof GalleryImage) { ((GalleryImage) child).addLoadHandler(new LoadHandler() { @Override//from w w w .j a va2 s .c om public void onLoad(LoadEvent event) { if (thumbnailWidth != null) { child.setWidth(thumbnailWidth); } if (thumbnailHeight != null) { child.setHeight(thumbnailHeight); } } }); super.add(child); } else { throw new IllegalArgumentException("Gallery can only contain GalleryImage's."); } }
From source file:org.jbpm.form.builder.ng.model.client.form.items.ServerTransformationFormItem.java
License:Apache License
@Override public Widget cloneDisplay(Map<String, Object> data) { Widget display = new MyWidget(); if (scriptMarker.getText() != null && !"".equals(scriptMarker.getText())) { eval0(scriptMarker.getText());// w ww .j a v a 2 s . c o m } display.setHeight(getHeight()); display.setWidth(getWidth()); super.populateActions(display.getElement()); return display; }
From source file:org.kaaproject.avro.ui.gwt.client.widget.FormPopup.java
License:Apache License
void maybeUpdateSizeInternal() { Widget w = super.getWidget(); if (w != null) { if (desiredHeight != null) { w.setHeight(desiredHeight); }/*w ww .ja v a 2 s . c o m*/ if (desiredWidth != null) { w.setWidth(desiredWidth); } } }
From source file:org.obiba.opal.web.gwt.app.client.ui.TabDeckPanel.java
License:Apache License
/** * Setup the container around the widget. *///from w ww . ja v a 2s.c om private void finishWidgetInitialization(Element container, Widget w) { UIObject.setVisible(container, false); DOM.setStyleAttribute(container, "height", "100%"); // Set 100% by default. Element element = w.getElement(); if ("".equals(DOM.getStyleAttribute(element, "width"))) { w.setWidth("100%"); } if ("".equals(DOM.getStyleAttribute(element, "height"))) { 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); }