List of usage examples for com.google.gwt.user.client.ui Frame Frame
protected Frame(Element element)
From source file:asquare.gwt.tk.uitest.popuppanel.client.Demo.java
License:Apache License
private Widget createTransparencyTest() { RowPanel outer = new RowPanel(); BasicToolTip toolTip = new BasicToolTip(); Controller ttController = new BasicToolTipController(toolTip); outer.add(new HTML("<h3>Popup transparency</h3><p>Hover over a widget</p>")); ListBox list = new ListBox(true); list.setVisibleItemCount(4);/*from w ww . j av a 2 s. c om*/ list.addItem("ListBox"); list.addItem("1"); list.addItem("2"); list.addItem("3"); list.addItem("4"); list.addItem("5"); outer.add(new ToolTipWrapper(list, "Popup transparency over a ListBox").addController(ttController)); outer.add(new ToolTipWrapper(new Frame("FrameContents.html"), "Popup transparency over a Frame") .addController(ttController)); outer.add(new ToolTipWrapper(new RadioButton("radioGroup", "RadioButton a"), "Choice a") .addController(ttController)); outer.add(new ToolTipWrapper(new RadioButton("radioGroup", "RadioButton b"), "Choice b") .addController(ttController)); outer.add(new ToolTipWrapper(new RadioButton("radioGroup", "RadioButton c"), "Choice c") .addController(ttController)); return outer; }
From source file:cc.kune.gspace.client.i18n.I18nTranslateRecomendPanel.java
License:GNU Affero Public License
/** * Instantiates a new i18n translate recomend panel. * //from w w w. j ava2s. c o m * @param i18n * the i18n */ @Inject public I18nTranslateRecomendPanel(final I18nTranslationService i18n) { tabTitle = new Label(i18n.t("Recommendations")); recommFrame = new Frame("ws/i18n-recom.html"); // recommFrame.setHeight("auto"); recommFrame.setStyleName("k-i18n-recommend"); initWidget(recommFrame); }
From source file:ch.heftix.mailxel.client.AttachmentPanel.java
License:Open Source License
public AttachmentPanel(final AttachmentTO attachmentTO, final MailServiceAsync mailxelService, final MailxelPanel mailxelPanel, final boolean directDownload) { String url = GWT.getModuleBaseURL() + "mailxel?id=" + Integer.toString(attachmentTO.id); int type = MimeTypeDescriptor.TYPE_ANY; final MimeTypeDescriptor mtd = MimeTypeUtil.mimeTypeByName(attachmentTO.name); type = mtd.fileType;/*from ww w . j av a 2 s. co m*/ Frame frame = null; if (directDownload) { frame = new Frame(url); add(frame); return; } ServiceCall sc = new ServiceCall() { public String getMessage() { return "get attachment data"; }; public boolean runSynchronized() { return true; }; public void run(final StatusItem si) { mailxelService.getAttachmentData(attachmentTO.id, new AsyncCallback<String>() { public void onSuccess(String result) { si.done(); switch (mtd.fileType) { case MimeTypeDescriptor.TYPE_HTM: HTML html = new HTML(); html.setHTML(result); add(html); break; default: TextArea ta = new TextArea(); ta.setCharacterWidth(80); ta.setVisibleLines(25); ta.setReadOnly(true); ta.setText(result); add(ta); break; } } public void onFailure(Throwable caught) { si.error(caught); } }); } }; switch (type) { case MimeTypeDescriptor.TYPE_IMG: Image img = new Image(url); add(img); break; case MimeTypeDescriptor.TYPE_HTM: case MimeTypeDescriptor.TYPE_TXT: mailxelPanel.statusStart(sc); break; default: frame = new Frame(url); add(frame); break; } }
From source file:ch.heftix.mailxel.client.MailxelHelpPanel.java
License:Open Source License
public MailxelHelpPanel(final String topicId, final MailxelPanel mailxelPanel) { super("MaiXel Help", new Frame("http://code.google.com/p/mailxel/wiki/" + topicId), 500, mailxelPanel); }
From source file:com.allen_sauer.gwt.dnd.demo.client.example.window.WindowExample.java
License:Apache License
private Frame getIframe(String url) { Frame iframe = new Frame(url); DOM.setElementAttribute(iframe.getElement(), "frameBorder", "no"); iframe.addStyleName("demo-WindowPanel-iframe"); return iframe; }
From source file:com.allen_sauer.gwt.voices.demo.client.VoicesDemo.java
License:Apache License
public void onModuleLoad2() { RootPanel mainPanel = RootPanel.get("demo-main-panel"); StyleInjector.injectAtStart(DemoClientBundle.INSTANCE.css().getText()); // text area to log sound events as they are triggered final HTML eventTextArea = new HTML(); RootPanel.get("demo-event-text-area").add(eventTextArea); DemoSoundHandler demoSoundHandler = new DemoSoundHandler(eventTextArea); DisclosurePanel soundSupportMatrix = new DisclosurePanel("Sound Support Matrix for this browser"); soundSupportMatrix.setContent(new SupportedMimeTypeSummary()); mainPanel.add(soundSupportMatrix);//from w w w . ja v a 2 s.co m DisclosurePanel crowdSourceSupportMatrix = new DisclosurePanel( "HTML5 MIME Type support in popular browsers"); Frame crowdSourceFrame = new Frame("https://crowd-source-dot-gwt-voices.appspot.com/?embed=true"); crowdSourceFrame.setPixelSize(3000, 600); crowdSourceFrame.getElement().getStyle().setBorderStyle(BorderStyle.NONE); crowdSourceSupportMatrix.setContent(crowdSourceFrame); mainPanel.add(crowdSourceSupportMatrix); // initialize mimeTypeSoundMap for (ThirdPartySound thirdPartySound : thirdPartySounds) { String mimeType = thirdPartySound.getMimeType(); assert MIME_TYPES.contains(mimeType) : "MIME_TYPES must contain '" + mimeType + "'"; ArrayList<ThirdPartySound> freesoundList = mimeTypeSoundMap.get(mimeType); if (freesoundList == null) { freesoundList = new ArrayList<ThirdPartySound>(); mimeTypeSoundMap.put(mimeType, freesoundList); } freesoundList.add(thirdPartySound); } // display one panel for each unique MIME type, using the order supplied by // MIME_TYPES for (String mimeType : MIME_TYPES) { ArrayList<ThirdPartySound> soundList = mimeTypeSoundMap.get(mimeType); if (soundList != null) { SoundController sc = new SoundController(); for (SoundType soundType : SoundType.values()) { maybeShowType(mainPanel, demoSoundHandler, mimeType, soundList, sc, soundType); } } } DOM.getElementById("demo-loading").removeFromParent(); }
From source file:com.cubusmail.client.actions.message.DownloadAttachmentAction.java
License:Open Source License
@Override public void execute() { long messageId = this.attachment.getMessageId(); int index = this.attachment.getIndex(); String url = ServiceProvider.getRetrieveAttachmentServletUrl(messageId, index); Frame frame = new Frame(url); frame.setVisible(false);//from ww w . j a v a 2s .c o m RootPanel.get().add(frame); }
From source file:com.dawg6.web.dhcalc.client.PaperdollPanel.java
License:Open Source License
public PaperdollPanel() { frame = new Frame("http://www.google.com"); initWidget(frame); frame.setSize("640px", "640px"); }
From source file:com.dimdim.conference.ui.envcheck.client.layout.IFramePopup.java
License:Open Source License
public IFramePopup(String url, int contenWidth, int contentHeight) { this.setContentWidth(contenWidth + "px"); this.setContentHeight(contentHeight + "px"); this.frame = new Frame(url); this.frame.setStyleName("env-checks-helptext-frame"); Element elem = this.frame.getElement(); DOM.setIntAttribute(elem, "frameBorder", 0); DOM.setAttribute(elem, "scrolling", "no"); this.add(this.frame); this.frame.setSize("100%", "100%"); }
From source file:com.edgenius.wiki.gwt.client.space.ShellDialog.java
License:Open Source License
public ShellDialog(String shellThemeBaseURL, String spaceUname, String shellThemeName, boolean list) { this.spaceUname = spaceUname; this.setText(Msg.consts.link_to_shell()); this.setIcon(new Image(IconBundle.I.get().shell())); //shellThemeUrl: http://localhost:8888/theme?instance=1, append spaceUname Frame frame = new Frame( shellThemeBaseURL + "&space=" + URL.encodeQueryString(spaceUname) + (list ? "&action=list" : "") + (shellThemeName != null ? "&theme=" + URL.encodeQueryString(shellThemeName) : "")); //dirty code: space admin open this GWT dialog with "list" is true, that dialog needs to call back pure Javascript. needCallback = list;//w w w . j ava 2 s . c o m mainPanel.add(frame); this.setWidget(mainPanel); DOM.setElementAttribute(frame.getElement(), "frameborder", "0"); frame.setSize("100%", "100%"); okBtn.addClickHandler(this); linkBtn.addClickHandler(this); cancelBtn.addClickHandler(this); getButtonBar().add(cancelBtn); getButtonBar().add(linkBtn); this.addStyleName(Css.SHELL_DIALOG_BOX); mainPanel.setStyleName(Css.DECK); }