public Window getEmptyWindow() { Window w = new Window(); w.setMinimizable(false); w.setMaximizable(false); w.setBodyBorder(false); w.setBorders(false); w.setClosable(false); w.setHeaderVisible(false); return w; }
public Window createVideoWindow() { Window w = new Window(); w.setSize(800, 800); w.setMinimizable(true); w.setMaximizable(true); w.setBodyBorder(false); w.setBorders(false); w.setHeading("Received mms:)"); Frame frame = new Frame(); frame.setUrl("video.html"); frame.setLayoutData(new FitLayout()); w.setLayout(new FitLayout()); w.add(frame); return w; }
public Window createPrezioWindow() { Window w = new Window(); w.setSize(500, 500); w.setMinimizable(true); w.setMaximizable(true); w.setBodyBorder(false); w.setBorders(false); w.setHeading("Presentation:)"); Frame frame = new Frame(); frame.setUrl("https://prezi.com/secure/40398e8bef489ebec26c2f09c4e0cf4b1d419524/"); frame.setLayoutData(new FitLayout()); w.setLayout(new FitLayout()); w.add(frame); return w; }
public void initUserImportView() { final Window window = new Window(); window.setBodyBorder(false); FormPanel reportPanel = new FormPanel(); Label dLabel = new Label(I18nUtils.getMessages().user_userImportReports()); reportPanel.add(dLabel); reportPanel.setHeight(120); reportPanel.setBodyBorder(false); reportPanel.setHeaderVisible(false); reportPanel.setHideLabels(true); Button close = new Button(I18nUtils.getMessages().user_userImportReports_close()); close.addListener( Events.OnClick, new Listener<BaseEvent>() { public void handleEvent(BaseEvent be) { window.hide(); } }); window.setTitle(I18nUtils.getMessages().user_userImportReports_window()); window.setWidth(560); window.setHeading(I18nUtils.getMessages().user_importUsersPanel_title()); window.setClosable(true); MyFileUpload importUserTool = new MyFileUpload("importusers") { @SuppressWarnings("unchecked") @Override public void fireActionComplete(String responseText) { JSONObject json = (JSONObject) JSONParser.parseLenient(responseText); JSONValue number = json.get("reportId"); JSONNumber sJsonNumber = number.isNumber(); UserService.Util.getInstance() .importUsers( (int) sJsonNumber.doubleValue(), new AsyncCallback() { public void onFailure(Throwable caught) { MessageBox.alert( I18nUtils.getMessages().user_importUsersPanel_title(), caught.getMessage(), null); GWT.log("importing users failed"); } public void onSuccess(final Object result) { ImportUserReport[] reports = (ImportUserReport[]) result; String msg = ""; for (ImportUserReport r : reports) { msg += r + "<br/>"; } Dialog report = new Dialog(); report.setHeight(300); report.setWidth(480); report.addText(msg); report.setHideOnButtonClick(true); report.show(); load(); } }); } @Override public void actionEnd() { GWT.log("importing users end up"); } }; reportPanel.add(importUserTool); reportPanel.addButton(close); reportPanel.setButtonAlign(HorizontalAlignment.RIGHT); window.add(reportPanel); window.show(); }