List of usage examples for com.google.gwt.user.client.ui NamedFrame NamedFrame
@UiConstructor
public NamedFrame(String name)
From source file:com.chinarewards.gwt.license.client.license.presenter.LicenseListPresenterImpl.java
License:Open Source License
private void initTableColumns() { Sorting<LicenseClient> ref = new Sorting<LicenseClient>() { @Override//from w w w.j a va 2s. co m public void sortingCurrentPage(Comparator<LicenseClient> comparator) { // listViewAdapter.sortCurrentPage(comparator); } @Override public void sortingAll(String sorting, String direction) { listViewAdapter.sortFromDateBase(sorting, direction); } }; cellTable.addColumn("??", new TextCell(), new GetValue<LicenseClient, String>() { @Override public String getValue(LicenseClient license) { return license.getCorporationName(); } }, ref, "licenseName"); cellTable.addColumn("?", new TextCell(), new GetValue<LicenseClient, String>() { @Override public String getValue(LicenseClient license) { return license.getLicenseTypeText(); } }, ref, ""); cellTable.addColumn("", new TextCell(), new GetValue<LicenseClient, String>() { @Override public String getValue(LicenseClient license) { return license.getStaffNumber() + ""; } }, ref, ""); cellTable.addColumn("?", new TextCell(), new GetValue<LicenseClient, String>() { @Override public String getValue(LicenseClient license) { return license.getMacaddress(); } }, ref, ""); cellTable.addColumn("", new DateCell(dateFormatAll), new GetValue<LicenseClient, Date>() { @Override public Date getValue(LicenseClient object) { return object.getNotafter(); } }, ref, "notafter"); cellTable.addColumn("", new TextCell(), new GetValue<LicenseClient, String>() { @Override public String getValue(LicenseClient license) { return license.getDescription(); } }, ref, ""); cellTable.addColumn("?", new TextCell(), new GetValue<LicenseClient, String>() { @Override public String getValue(LicenseClient license) { return license.getAwarduser(); } }, ref, "awarduser"); cellTable.addColumn("?", new DateCell(dateFormatAll), new GetValue<LicenseClient, Date>() { @Override public Date getValue(LicenseClient object) { return object.getIssued(); } }, ref, "issued"); cellTable.addColumn("?", new TextCell(), new GetValue<LicenseClient, String>() { @Override public String getValue(LicenseClient license) { return license.getStatus().getDisplayName(); } }, ref, "status"); cellTable.addColumn("?", new HyperLinkCell(), new GetValue<LicenseClient, String>() { @Override public String getValue(LicenseClient arg0) { return ""; } }, new FieldUpdater<LicenseClient, String>() { @Override public void update(int index, LicenseClient licenseClient, String value) { licenseClient.setThisAction(LicenseConstants.ACTION_LICENSE_VIEW); Platform.getInstance().getEditorRegistry().openEditor(LicenseConstants.EDITOR_LICENSE_VIEW, LicenseConstants.EDITOR_LICENSE_VIEW + licenseClient.getId(), licenseClient); } }); cellTable.addColumn("?", new HyperLinkCell(), new GetValue<LicenseClient, String>() { @Override public String getValue(LicenseClient arg0) { return ""; } }, new FieldUpdater<LicenseClient, String>() { @Override public void update(int index, final LicenseClient licenseClient, String value) { licenseClient.setThisAction(LicenseConstants.ACTION_LICENSE_EDIT); Platform.getInstance().getEditorRegistry().openEditor(LicenseConstants.EDITOR_LICENSE_EDIT, LicenseConstants.EDITOR_LICENSE_EDIT + licenseClient.getId(), licenseClient); } }); cellTable.addColumn("?", new HyperLinkCell(), new GetValue<LicenseClient, String>() { @Override public String getValue(LicenseClient license) { return ""; } }, new FieldUpdater<LicenseClient, String>() { @Override public void update(int index, LicenseClient o, String value) { if (Window.confirm("?")) { delteLicense(o.getId()); } } }); cellTable.addColumn("?", new HyperLinkCell(), new GetValue<LicenseClient, String>() { @Override public String getValue(LicenseClient license) { return ""; } }, new FieldUpdater<LicenseClient, String>() { @Override public void update(int index, LicenseClient license, String value) { if (RootPanel.get("downloadiframe") != null) { Widget widgetFrame = (Widget) RootPanel.get("downloadiframe"); widgetFrame.removeFromParent(); } NamedFrame frame = new NamedFrame("downloadiframe"); String url = ""; // url+=GWT.getModuleBaseURL(); url += "filedownload?licenseFileName=" + license.getLicenseFileName(); frame.setUrl(url); frame.setVisible(false); RootPanel.get().add(frame); } }); }
From source file:com.google.gerrit.prettify.client.PrivateScopeImpl.java
License:Apache License
public PrivateScopeImpl() { scopeName = nextScopeName();//from w w w . j a v a 2 s . c o m NamedFrame frame = new NamedFrame(scopeName); frame.setUrl("javascript:''"); initWidget(frame); setVisible(false); }
From source file:com.gwtcx.smartgwt.client.view.FileUploadPageView.java
License:Open Source License
private VLayout initBody() { // initialise the Footer layout container VLayout body = new VLayout(); body.setStyleName(WIZARD_BODY_STYLE_NAME); body.setWidth100();/*from w ww . jav a 2 s.c o m*/ body.setHeight100(); // initialise the form uploadForm = new DynamicForm(); uploadForm.setWidth100(); uploadForm.setMargin(FORM_MARGIN); uploadForm.setNumCols(NUMBER_OF_COLUMNS); uploadForm.setCellPadding(CELL_PADDING); // uploadForm.setAutoFocus(false); uploadForm.setWrapItemTitles(false); // no ":" after the field name uploadForm.setTitleSuffix(BLANK_SPACE); uploadForm.setRequiredTitleSuffix(BLANK_SPACE); // initialise the hidden frame NamedFrame frame = new NamedFrame(TARGET); frame.setWidth("1px"); frame.setHeight("1px"); frame.setVisible(false); uploadForm.setEncoding(Encoding.MULTIPART); uploadForm.setMethod(FormMethod.POST); // set the (hidden) form target uploadForm.setTarget(TARGET); uploadForm.setAction(SmartGwtEntryPoint.getRelativeURL(DEFAULT_FILE_UPLOAD_SERVICE_PATH)); // initialise the Record type field recordType = new ComboBoxItem(RECORD_TYPE, I18nUtil.getConstant().recordTypeLabel()); recordType.setName(RECORD_TYPE); recordType.setType("comboBox"); // recordType.setValueMap("Account", "Contact"); // TO DO recordType.setValueMap(I18nUtil.getConstant().accountLabel()); recordType.setDefaultToFirstOption(true); recordType.setSelectOnFocus(true); // initialise the Map field mapName = new ComboBoxItem(MAP_NAME, I18nUtil.getConstant().dataMapLabel()); mapName.setName(MAP_NAME); mapName.setType("comboBox"); // mapName.setValueMap("Automatic", "Create new map"); // TO DO mapName.setValueMap(I18nUtil.getConstant().automaticLabel()); mapName.setDefaultToFirstOption(true); // initialise the File name field uploadItem = new UploadItem(FILE_NAME); uploadItem.setName(FILE_NAME); uploadItem.setTitle(I18nUtil.getConstant().fileNameLabel()); uploadItem.setWidth(280); // set the fields into the form uploadForm.setFields(recordType, mapName, uploadItem); // add the Upload Form and the (hidden) Frame to the main layout container body.addMember(uploadForm); body.addMember(frame); return body; }
From source file:com.priocept.jcr.client.fileupload.Upload.java
License:Open Source License
/** * @param args/* ww w .j a va 2s.co m*/ */ public Upload(Map<String, String> args, Mode mode) { initComplete(this); initFailed(this); List<FormItem> items = new ArrayList<FormItem>(); if (args != null) { hiddenItems = new ArrayList<HiddenItem>(); for (String key : args.keySet()) { HiddenItem item = new HiddenItem(key); item.setValue(args.get(key)); items.add(item); hiddenItems.add(item); } ; } ValuesManager vm = new ValuesManager(); uploadForm = new DynamicForm(); uploadForm.setValuesManager(vm); uploadForm.setEncoding(Encoding.MULTIPART); uploadForm.setTarget(TARGET); uploadForm.setCanSubmit(true); fileItem = new UploadItem("file"); fileItem.setTitle("File"); fileItem.setWidth(500); items.add(fileItem); fileItem.addChangedHandler(new ChangedHandler() { public void onChanged(ChangedEvent e) { System.out.println("change"); } }); Button uploadButton = new Button("Upload"); uploadButton.addClickHandler(new ClickHandler() { public void onClick(ClickEvent e) { Object obj = fileItem.getDisplayValue(); if (obj != null) { uploadForm.submitForm(); } else SC.say("Please select a file."); } }); VStack stack = new VStack(); stack.setWidth100(); stack.setMembersMargin(10); stack.setDefaultLayoutAlign(Alignment.CENTER); NamedFrame frame = new NamedFrame(TARGET); frame.setWidth("1"); frame.setHeight("1"); frame.setVisible(false); VStack mainLayout = new VStack(); mainLayout.setWidth(300); mainLayout.setHeight(100); if (mode == Mode.CONVERSIONS) { CheckboxItem unzip = new CheckboxItem("unzip"); unzip.setDefaultValue(true); unzip.setTitle("Unzip .zip file"); items.add(unzip); CheckboxItem overwrite = new CheckboxItem("overwrite"); overwrite.setDefaultValue(false); overwrite.setTitle("Overwrite existing file"); items.add(overwrite); CheckboxItem convertpdf = new CheckboxItem("convertpdf"); convertpdf.setDefaultValue(true); convertpdf.setTitle("Convert Word document to PDF"); items.add(convertpdf); CheckboxItem streaming = new CheckboxItem("streaming"); streaming.setDefaultValue(true); streaming.setTitle("Convert video file to streaming format(flv)"); items.add(streaming); CheckboxItem thumbnail = new CheckboxItem("thumbnail"); thumbnail.setDefaultValue(true); thumbnail.setTitle("Make thumbnail(48x48) from image"); items.add(thumbnail); } FormItem[] fitems = new FormItem[items.size()]; items.toArray(fitems); uploadForm.setItems(fitems); stack.addMember(uploadForm); stack.addMember(uploadButton); mainLayout.addMember(stack); mainLayout.addMember(frame); addChild(mainLayout); }
From source file:com.pronoiahealth.olhie.client.features.dialogs.ViewBookassetDialog.java
License:Open Source License
/** * Sets up hidden iFrame for download/*from www.j a v a 2 s.c om*/ * * @param uri */ private void downloadContent(String uri) { if (iFrame != null) { iFrame.removeFromParent(); iFrame = null; } iFrame = new NamedFrame("view"); iFrame.getElement().setId("viewFrame"); iFrame.setWidth("100%"); iFrame.setHeight("400px"); viewBookassetPanel.add(iFrame); iFrame.setUrl(uri); }
From source file:com.pronoiahealth.olhie.client.widgets.DownloadFrame.java
License:Open Source License
/** * Sets up hidden iFrame for download//from w ww.j a va 2 s .c o m * * @param uri */ private void downloadContent(String uri) { if (iFrame != null) { iFrame.removeFromParent(); iFrame = null; } iFrame = new NamedFrame("download"); iFrame.getElement().setId("downloadFrame"); iFrame.setVisible(false); iFrame.addLoadHandler(loadHandler); add(iFrame); iFrame.setUrl(uri); }
From source file:com.smartgwt.extensions.fileuploader.client.filemanager.Upload.java
License:Open Source License
/** * @param args/*w w w. ja v a 2s . c o m*/ */ public Upload(Map<String, String> args, Mode mode) { initComplete(this); List<FormItem> items = new ArrayList<FormItem>(); if (args != null) { hiddenItems = new ArrayList<HiddenItem>(); for (String key : args.keySet()) { HiddenItem item = new HiddenItem(key); item.setValue(args.get(key)); items.add(item); hiddenItems.add(item); } ; } ValuesManager vm = new ValuesManager(); uploadForm = new DynamicForm(); uploadForm.setValuesManager(vm); uploadForm.setEncoding(Encoding.MULTIPART); uploadForm.setTarget(TARGET); fileItem = new UploadItem("file"); fileItem.setTitle("File"); fileItem.setWidth(300); items.add(fileItem); fileItem.addChangedHandler(new ChangedHandler() { public void onChanged(ChangedEvent e) { System.out.println("change"); } }); Button uploadButton = new Button("Upload"); uploadButton.addClickHandler(new ClickHandler() { public void onClick(ClickEvent e) { Object obj = fileItem.getDisplayValue(); if (obj != null) { uploadForm.submitForm(); } else SC.say("Please select a file."); } }); VStack stack = new VStack(); stack.setWidth100(); stack.setMembersMargin(10); stack.setDefaultLayoutAlign(Alignment.CENTER); NamedFrame frame = new NamedFrame(TARGET); frame.setWidth("1"); frame.setHeight("1"); frame.setVisible(false); VStack mainLayout = new VStack(); mainLayout.setWidth(300); mainLayout.setHeight(200); if (mode == Mode.CONVERSIONS) { CheckboxItem unzip = new CheckboxItem("unzip"); unzip.setDefaultValue(true); unzip.setTitle("Unzip .zip file"); items.add(unzip); CheckboxItem overwrite = new CheckboxItem("overwrite"); overwrite.setDefaultValue(false); overwrite.setTitle("Overwrite existing file"); items.add(overwrite); CheckboxItem convertpdf = new CheckboxItem("convertpdf"); convertpdf.setDefaultValue(true); convertpdf.setTitle("Convert Word document to PDF"); items.add(convertpdf); CheckboxItem streaming = new CheckboxItem("streaming"); streaming.setDefaultValue(true); streaming.setTitle("Convert video file to streaming format(flv)"); items.add(streaming); CheckboxItem thumbnail = new CheckboxItem("thumbnail"); thumbnail.setDefaultValue(true); thumbnail.setTitle("Make thumbnail(48x48) from image"); items.add(thumbnail); } FormItem[] fitems = new FormItem[items.size()]; items.toArray(fitems); uploadForm.setItems(fitems); stack.addMember(uploadForm); stack.addMember(uploadButton); mainLayout.addMember(stack); mainLayout.addMember(frame); addChild(mainLayout); }
From source file:com.tasktop.c2c.server.profile.web.ui.client.view.components.account.authentication.AuthenticationView.java
License:Open Source License
public AuthenticationView() { createSshKeyTable();/*w w w . j a v a2s. c o m*/ // Give our Github form a target of "_self" - that will ensure that it replaces the current page when the // redirect to GitHub happens (which is what we want). githubForm = new FormPanel(new NamedFrame("_self")); initWidget(ourUiBinder.createAndBindUi(this)); if (!AppGinjector.get.instance().getConfiguration().isEnablePasswordManagment()) { UIObject.setVisible(changePasswordDiv, false); } if (!AppGinjector.get.instance().getConfiguration().isEnableGitHubAuth()) { UIObject.setVisible(linkGitHubDiv, false); } associateGitHubAccountLabel .setHTML(profileMessages.gitHubAssociateAccount(commonProfileMessages.code2Cloud())); }
From source file:com.tasktop.c2c.server.profile.web.ui.client.view.components.SignInView.java
License:Open Source License
private SignInView() { // Give our Github form a target of "_self" - that will ensure that it replaces the current page when the // redirect to GitHub happens (which is what we want). this.githubForm = new FormPanel(new NamedFrame("_self")); initWidget(uiBinder.createAndBindUi(this)); hookDefaultButton(logonButton);/*from w w w .j av a2 s . c o m*/ TextBoxUtil.turnOffAutoCorrect(username); if (!AppGinjector.get.instance().getConfiguration().isEnableGitHubAuth()) { UIObject.setVisible(gitHubDiv, false); } gitHubSignInDescription .setHTML(profileMessages.gitHubSignInDescription(commonProfileMessages.code2Cloud())); }
From source file:com.tasktop.c2c.server.profile.web.ui.client.view.components.SignUpViewImpl.java
License:Open Source License
private SignUpViewImpl() { // Give our Github form a target of "_self" - that will ensure that it replaces the current page when the // redirect to GitHub happens (which is what we want). this.githubForm = new FormPanel(new NamedFrame("_self")); initWidget(uiBinder.createAndBindUi(this)); hookDefaultButton(createAccountButton); invitationOnlyLabel.setText(profileMessages.invitationOnly(commonProfileMessages.code2Cloud())); gitHubDetailsLabel.setHTML(profileMessages.gitHubDetailsContent(commonProfileMessages.code2Cloud())); nowCreateYourAccountLabel.setText(profileMessages.nowCreateYourAccount(commonProfileMessages.code2Cloud())); completeSignUpLabel.setText(profileMessages.completeSignUp(commonProfileMessages.code2Cloud())); }