List of usage examples for com.google.gwt.user.client.ui Widget setSize
public void setSize(String width, String height)
From source file:com.openkm.frontend.client.widget.toolbar.ToolBar.java
License:Open Source License
/** * Create html uploader applet code//w w w . j a v a 2s. c o m */ public void setUploaderApplet(String sessionId, String path) { Widget uploaderApplet = RootPanel.get("uploaderApplet"); uploaderApplet.setSize("1", "1"); uploaderApplet.getElement().setInnerHTML( "<applet code=\"com.openkm.applet.Uploader\" name=\"Uploader\" width=\"1\" height=\"1\" mayscript archive=\"../uploader.jar\">" + "<param name=\"sessionId\" value=\"" + sessionId + "\">" + "<param name=\"path\" value=\"" + path + "\">" + "<param name=\"lang\" value=\"" + Main.get().getLang() + "\">" + "</applet>"); }
From source file:com.ponysdk.core.terminal.UIBuilder.java
License:Apache License
public void init(final RequestBuilder requestBuilder) { if (log.isLoggable(Level.INFO)) log.info("Init graphical system"); this.requestBuilder = requestBuilder; PTHistory.addValueChangeHandler(this); final PTCookies cookies = new PTCookies(this); objectByID.put(0, cookies);/*from w w w .j a v a 2 s . com*/ // hide loading component final Widget w = RootPanel.get("loading"); if (w != null) { w.setSize("0px", "0px"); w.setVisible(false); } else { log.log(Level.WARNING, "Include splash screen html element into your index.html with id=\"loading\""); } }
From source file:com.ponysdk.ui.terminal.UIBuilder.java
License:Apache License
public void init() { loadingMessageBox = new SimplePanel(); communicationErrorMessagePanel = new PopupPanel(false, true); communicationErrorMessagePanel.setGlassEnabled(true); communicationErrorMessagePanel.setStyleName("pony-notification"); communicationErrorMessagePanel.addStyleName("error"); // RootPanel.get().add(loadingMessageBox); loadingMessageBox.setStyleName("pony-LoadingMessageBox"); loadingMessageBox.getElement().getStyle().setVisibility(Visibility.HIDDEN); loadingMessageBox.getElement().setInnerText("Loading ..."); // hide loading component final Widget w = RootPanel.get("loading"); if (w == null) { Window.alert("Include splash screen html element into your index.html with id=\"loading\""); } else {//from w ww . j a v a 2s .c o m w.setSize("0px", "0px"); w.setVisible(false); } }
From source file:com.vaadin.addon.spreadsheet.client.SheetOverlay.java
public SheetOverlay(Widget widget, OverlayInfo overlayInfo) { widget.setSize("100%", "100%"); getElement().getStyle().setProperty("pointerEvents", "none"); widget.getElement().getStyle().setProperty("pointerEvents", "all"); this.add(widget); this.updateSizeLocationPadding(overlayInfo); }
From source file:edu.caltech.ipac.fftools.core.MinimalLayoutManager.java
public void layout(String rootId) { AllPlots.getInstance().setToolBarIsPopup(false); init();/*from w ww . j a va 2 s. c o m*/ Region visTB = getRegion(LayoutManager.VIS_TOOLBAR_REGION); Region visRO = getRegion(LayoutManager.VIS_READOUT_REGION); Region visPV = getRegion(LayoutManager.VIS_PREVIEW_REGION); Widget pvOrIcoArea = visPV.getDisplay(); // GwtUtil.setStyle(visPV.getContent(), "background", "url(images/ipac_bar.jpg)"); Widget readout = visRO == null ? new Label("") : visRO.getDisplay(); readout.setSize("100%", "100%"); HTMLPanel appBanner = new HTMLPanel("<div id='container' style='min-width:1060px;'>\n" + " <div style='float:right;'>\n" + " <div id='alt-app-icon' style='background: url(images/ipac_bar.jpg);height:74px'></div>\n" + " </div>\n" + " <div id='readout' style='background: url(images/ipac_bar.jpg);height:45px;'></div>\n" + " <div id='vis-toolbar' style=''></div>\n" + "</div>"); appBanner.add(readout, "readout"); appBanner.add(pvOrIcoArea, "alt-app-icon"); appBanner.add(visTB.getDisplay(), "vis-toolbar"); // -experiment Toolbar toolbar = Application.getInstance().getToolBar(); GwtUtil.setStyles(toolbar, "width", "100%", "height", "0", "position", "absolute"); GwtUtil.setStyles(toolbar.getDropdown(), "zIndex", "10", "position", "absolute"); getMenu().setDisplay(toolbar); // -experiment mainPanel.add(appBanner, DockPanel.NORTH); // -experiment mainPanel.add(toolbar.getDropdown(), DockPanel.NORTH); // -experiment mainPanel.setCellHeight(appBanner, "1px"); mainPanel.setSize("100%", "100%"); // making results area. Widget center = makeCenter(); mainPanel.add(center, DockPanel.CENTER); GwtUtil.setStyles(center, "position", "absolute", "left", "10px", "right", "10px", "top", "80px", "bottom", "1px"); RootPanel rp = null; if (rootId != null) { rp = RootPanel.get(rootId); } rp = rp == null ? RootPanel.get() : rp; rp.add(mainPanel); GwtUtil.setStyles(rp, "minWidth", getMinWidth() + "px", "minHeight", getMinHeight() + "px"); Application.getInstance().getProperties().setProperty("BackToSearch.show", "false"); ((FFToolsStandaloneCreator) Application.getInstance().getCreator()).getStandaloneUI().init(); }
From source file:edu.caltech.ipac.firefly.core.layout.IrsaLayoutManager.java
public void layout(String rootId) { AllPlots.getInstance().setToolBarIsPopup(false); init();/*from w w w . j av a 2s .com*/ Region menuBar = getRegion(LayoutManager.MENU_REGION); Region appIcon = getRegion(LayoutManager.APP_ICON_REGION); Region adtlIcon = getRegion(LayoutManager.ADDTL_ICON_REGION); Region visTB = getRegion(LayoutManager.VIS_TOOLBAR_REGION); Region visRO = getRegion(LayoutManager.VIS_READOUT_REGION); Region visPV = getRegion(LayoutManager.VIS_PREVIEW_REGION); Widget pvOrIcoArea = visPV.getDisplay(); if (adtlIcon != null) { final DeckPanel previewOrAddlIcon = new DeckPanel(); previewOrAddlIcon.add(adtlIcon.getDisplay()); // idx 0 previewOrAddlIcon.add(visPV.getDisplay()); // idx 1 WebEventManager.getAppEvManager().addListener(Name.REGION_SHOW, new WebEventListener() { public void eventNotify(WebEvent ev) { Region source = (Region) ev.getSource(); if (VIS_PREVIEW_REGION.equals(source.getId())) { previewOrAddlIcon.showWidget(1); } else if (ADDTL_ICON_REGION.equals(source.getId())) { previewOrAddlIcon.showWidget(0); } else if (RESULT_REGION.equals(source.getId())) { // do nothing } } }); WebEventManager.getAppEvManager().addListener(Name.REGION_HIDE, new WebEventListener() { public void eventNotify(WebEvent ev) { Region source = (Region) ev.getSource(); if (VIS_PREVIEW_REGION.equals(source.getId())) { previewOrAddlIcon.showWidget(0); } } }); pvOrIcoArea = previewOrAddlIcon; } Widget readout = visRO == null ? new Label("") : visRO.getDisplay(); readout.setSize("100%", "100%"); HTMLPanel appBanner = new HTMLPanel("<div id='container' style='width:100%'>\n" + "<div id='app-icon' style='background: url(images/ipac_bar.jpg);height:75px;width:75px;float:left;'></div>\n" + "<div id='alt-app-icon' style='background: url(images/ipac_bar.jpg);height:75px;width:148px;float:right;'></div>\n" + "<div style='position:absolute;left:75px;right:148px;min-width:820px'>\n" + "<div id='readout' style='background: url(images/ipac_bar.jpg);height:45px;width:100%;'></div>\n" + "<div id='menu-bar' style='background: url(images/ipac_bar.jpg);height:30px;width:100%'></div>\n" + "</div>\n"); appBanner.add(menuBar.getDisplay(), "menu-bar"); appBanner.add(readout, "readout"); appBanner.add(appIcon.getDisplay(), "app-icon"); appBanner.add(pvOrIcoArea, "alt-app-icon"); // // now.. add the menu to the top Toolbar toolbar = Application.getInstance().getToolBar(); GwtUtil.setStyles(toolbar, "width", "100%", "position", "absolute"); GwtUtil.setStyles(toolbar.getDropdown(), "zIndex", "10", "position", "absolute"); getMenu().setDisplay(toolbar); mainPanel.add(appBanner, DockPanel.NORTH); mainPanel.setCellHeight(appBanner, "1px"); mainPanel.add(toolbar.getDropdown(), DockPanel.NORTH); mainPanel.setCellHeight(toolbar.getDropdown(), "1px"); // mainPanel.setCellHeight(toolbar.getDropDownComponent(), "1px"); mainPanel.add(visTB.getDisplay(), DockPanel.NORTH); mainPanel.setCellHeight(visTB.getDisplay(), "1px"); mainPanel.setSize("100%", "100%"); // making results area. Widget center = makeCenter(); mainPanel.add(center, DockPanel.CENTER); GwtUtil.setStyles(center, "position", "absolute", "left", "10px", "right", "10px", "top", "120px", "bottom", "1px"); if (rootId != null) { RootPanel root = RootPanel.get(rootId); if (root == null) { throw new RuntimeException("Application is not setup correctly; unable to find " + rootId); } root.add(mainPanel); GwtUtil.setStyles(root, "position", "absolute", "top", topOffset + "px", "left", "1px", "right", "1px", "bottom", "1px", "minWidth", getMinWidth() + "px", "minHeight", getMinHeight() + "px"); } else { RootPanel.get().add(mainPanel); } Image icon = Application.getInstance().getCreator().getMissionIcon(); if (icon != null) { icon.setSize("75px", "75px"); getRegion(APP_ICON_REGION).setDisplay(icon); } }
From source file:edu.caltech.ipac.firefly.ui.catalog.CatalogPanel.java
private void setTargetCard(int card) { if (card == TARGET_PANEL && _targetPanelHolder.getWidget() == null) { _targetPanelHolder.setWidget(_targetPanel); }/* w w w. ja va 2 s . c o m*/ if (card == TARGET_DESC) updateTargetDesc(); if (card == TARGET_HIDDEN && _targetCards.getVisibleWidget() == TARGET_DESC) { Widget desc = _targetCards.getWidget(TARGET_DESC); Widget hidden = _targetCards.getWidget(TARGET_HIDDEN); hidden.setSize(desc.getOffsetWidth() + "px", desc.getOffsetHeight() + "px"); } _targetCards.showWidget(card); }
From source file:edu.caltech.ipac.firefly.ui.searchui.AnyDataSetSearchUI.java
public Widget makeUI() { spacialArea = new SpacialSelectUI(new SpacialSelectUI.TabChange() { public void onTabChange() { adjustSpacialHeight();// w ww . j a va2 s .c o m } }); mainPanel.setSize("100%", "100%"); topArea = new DockLayoutPanel(Style.Unit.PX); // top area details - version 1 // Widget typeSelectPanelWrap= GwtUtil.wrap(typeSelectPanel,50,5,0,5); // topArea.addWest(typeSelectPanelWrap, 200); // topArea.add(new SimplePanel(spacialArea)); // top area details - version 2 Widget typeSelectPanelWrap = GwtUtil.wrap(typeSelectPanel, 30, 0, 0, 5); GwtUtil.setStyles(topInner, "display", "inline-block", "whiteSpace", "nowrap"); Widget spacialAreaWrap = new SimplePanel(spacialArea); topInner.add(typeSelectPanelWrap); topInner.add(spacialAreaWrap); GwtUtil.setStyles(spacialAreaWrap, "display", "inline-block", "verticalAlign", "top"); GwtUtil.setStyles(typeSelectPanelWrap, "display", "inline-block", "paddingRight", "20px"); typeSelectPanelWrap.setSize("200px", "235px"); topArea.add(topInner); // mainPanel.addNorth(new SimplePanel(spacialArea), SpacialSelectUI.MIN_HEIGHT_REQUIRED); // mainPanel.addNorth(typeSelectPanel, 45); mainPanel.addNorth(topArea, spacialArea.getHeightRequired()); // Element topWrap = DOM.getParent(topArea.getElement()); // topWrap.addClassName("change-height-transition"); DOM.getParent(topArea.getElement()).addClassName("change-height-transition"); Widget dataTypeViewsWrapper = GwtUtil.wrap(dataTypeViews, 10, 0, 0, 5); mainPanel.add(dataTypeViewsWrapper); DOM.getParent(dataTypeViewsWrapper.getElement()).addClassName("change-height-transition"); // typeSelectPanel.setSize("100%", "45px"); // dataTypeViews.setSize("100%", "300px"); dataTypeViews.add(catalogView); dataTypeViews.add(imageView); dataTypeViews.add(spectrumView); dataTypeViews.showWidget(0); DataSetInfoFactory factory = Application.getDataSetFactory(); if (factory.isAllDataSetsRetrieved()) { allDatasetList = factory.getAllDataSetsImmediate(); initMissionSection(); } else { factory.getAllDataSets(mainPanel, new AsyncCallback<List<DataSetInfo>>() { public void onFailure(Throwable caught) { //todo } public void onSuccess(List<DataSetInfo> result) { allDatasetList = result; initMissionSection(); } }); } return mainPanel; }
From source file:edu.caltech.ipac.firefly.ui.ShadowedPanel.java
public void setContent(Widget w) { _panel.clear(); _panel.add(w); w.setSize("100%", "100%"); }
From source file:edu.caltech.ipac.firefly.ui.table.TablePanel.java
public void setHelpId(String id) { if (!StringUtils.isEmpty(id)) { Widget helpIcon = HelpManager.makeHelpIcon(id); helpIcon.setSize("24px", "24px"); helpButton.setWidget(helpIcon);// w w w .ja v a 2s . c o m helpButton.setVisible(true); } else { helpButton.setVisible(false); } }