List of usage examples for com.google.gwt.dom.client IFrameElement setFrameBorder
public void setFrameBorder(int frameBorder)
From source file:com.haulmont.cuba.web.toolkit.ui.client.downloader.CubaFileDownloaderConnector.java
License:Apache License
public void downloadFileById(String resourceId) { final String url = getResourceUrl(resourceId); if (url != null && !url.isEmpty()) { final IFrameElement iframe = Document.get().createIFrameElement(); Style style = iframe.getStyle(); style.setVisibility(Style.Visibility.HIDDEN); style.setHeight(0, Style.Unit.PX); style.setWidth(0, Style.Unit.PX); iframe.setFrameBorder(0); iframe.setTabIndex(-1);// ww w .ja v a 2 s.co m iframe.setSrc(url); RootPanel.getBodyElement().appendChild(iframe); Timer removeTimer = new Timer() { @Override public void run() { iframe.removeFromParent(); } }; removeTimer.schedule(60 * 1000); } }
From source file:com.ikon.frontend.client.widget.richtext.RichTextToolbar.java
License:Open Source License
/** Constructor of the Toolbar **/ public RichTextToolbar(final RichTextArea richtext) { //Initialize the main-panel outer = new VerticalPanel(); //Initialize the two inner panels topPanel = new HorizontalPanel(); bottomPanel = new HorizontalPanel(); topPanel.setStyleName("RichTextToolbar"); bottomPanel.setStyleName("RichTextToolbar"); //Save the reference to the RichText area we refer to and get the interfaces to the stylings styleText = richtext;//from w w w . j a v a 2 s. co m styleTextFormatter = styleText.getFormatter(); //Set some graphical options, so this toolbar looks how we like it. topPanel.setHorizontalAlignment(HorizontalPanel.ALIGN_LEFT); bottomPanel.setHorizontalAlignment(HorizontalPanel.ALIGN_LEFT); //Add the two inner panels to the main panel outer.add(topPanel); outer.add(bottomPanel); //Some graphical stuff to the main panel and the initialisation of the new widget outer.setStyleName("RichTextToolbar"); initWidget(outer); // evHandler = new EventHandler(); //Add KeyUp and Click-Handler to the RichText, so that we can actualize the toolbar if neccessary styleText.addKeyUpHandler(evHandler); styleText.addClickHandler(evHandler); // Changing styles IFrameElement e = IFrameElement.as(richtext.getElement()); e.setSrc("iframe_richtext.html"); e.setFrameBorder(0); // removing frame border richTextPopup = new RichTextPopup(this); richTextPopup.setWidth("300px"); richTextPopup.setHeight("50px"); richTextPopup.setStyleName("okm-Popup"); //Now lets fill the new toolbar with life buildTools(); }
From source file:org.waveprotocol.wave.client.doodad.experimental.htmltemplate.CajolerFacade.java
License:Apache License
private static IFrameElement createCajaFrame() { IFrameElement cajaFrame = Document.get().createIFrameElement(); cajaFrame.setFrameBorder(0); cajaFrame.setAttribute("width", "0"); cajaFrame.setAttribute("height", "0"); Document.get().getBody().appendChild(cajaFrame); Document cajaFrameDoc = cajaFrame.getContentDocument(); cajaFrameDoc.getBody().appendChild(cajaFrameDoc.createScriptElement(RESOURCES.supportingJs().getText())); cajaFrameDoc.getBody().appendChild(cajaFrameDoc.createScriptElement(RESOURCES.taming().getText())); return cajaFrame; }