Exemple #1
0
  private Window createGeolocationWindow() {

    final Window w = new Window();
    w.setMinimizable(true);
    w.setMaximizable(true);
    w.setIcon(IconHelper.createStyle("accordion"));
    w.setHeading("Contact list");
    w.setWidth(500);
    w.setHeight(500);
    w.setLayout(new FitLayout());

    ContentPanel cp = new ContentPanel();
    cp.setAnimCollapse(false);
    cp.setHeading("Localize your friends");
    cp.setScrollMode(Scroll.NONE);
    cp.setLayout(new FitLayout());

    Frame frame = new Frame();
    frame.setUrl("geolocation.html");
    frame.setLayoutData(new FitLayout());
    cp.add(frame);

    w.add(cp);
    return w;
  }
Exemple #2
0
 /**
  * Sets a url for the content area of the item.
  *
  * @param url the url
  * @return the frame widget
  */
 public Frame setUrl(String url) {
   Frame f = new Frame(url);
   f.getElement().setPropertyInt("frameBorder", 0);
   removeAll();
   setLayout(new FitLayout());
   add(f);
   layout();
   return f;
 }
Exemple #3
0
 public void insertFormIFrame(final String aFormIFrame) {
   myIFrame = new FormPageFrame();
   myIFrame.setStyleName("form_view_frame");
   final Element theElement = myIFrame.getElement();
   theElement.setId(formId);
   theElement.setAttribute("frameBorder", "0");
   theElement.setAttribute("allowTransparency", "true");
   myIFrame.setUrl(aFormIFrame);
   mySecondRowPanel.add(myIFrame);
 }
 /** {@inheritDoc} */
 @Override
 public void getAdditionalProposalInfo(AsyncCallback<Widget> callback) {
   Frame frame = new Frame();
   frame.setSize("100%", "100%");
   frame.getElement().getStyle().setBorderStyle(Style.BorderStyle.NONE);
   frame.getElement().setAttribute("sandbox", ""); // empty value, not null
   frame.getElement().getStyle().setProperty("resize", "both");
   frame.setUrl(client.getProposalDocUrl(id, sessionId));
   callback.onSuccess(frame);
 }
  @Inject
  public DownloadContainer() {
    frame = new Frame();
    frame.getElement().setAttribute("name", TARGET);
    frame.setSize("0px", "0px");
    frame.setVisible(false);
    frame.ensureDebugId(TARGET);

    RootLayoutPanel.get().add(frame);
  }
 @Override
 public void popupOpened(PopupPanel panel) {
   IFrameTabPanel iframeTab =
       SolutionBrowserPanel.getInstance().getContentTabPanel().getCurrentFrame();
   if (iframeTab == null || iframeTab.getFrame() == null) {
     return;
   }
   Frame currentFrame = iframeTab.getFrame();
   if (ElementUtils.elementsOverlap(panel.getElement(), currentFrame.getElement())) {
     FrameUtils.setEmbedVisibility(currentFrame, false);
   }
 }
  private Window createConfiguratorWindows() {
    Window w = new Window();
    w.setIcon(IconHelper.createStyle("icon-grid"));
    w.setMinimizable(true);
    w.setMaximizable(true);
    w.setHeading("Zweite Test3DApp");
    w.setSize(800, 600);
    w.setLayout(new FitLayout());

    Frame app3d = new Frame("scenes/car3d/AC_1038.xhtml");
    System.out.println(app3d.getUrl());

    w.add(app3d);
    return w;
  }
  private Window createCheeseWindows() {
    Window w = new Window();
    w.setIcon(IconHelper.createStyle("icon-grid"));
    w.setMinimizable(true);
    w.setMaximizable(true);
    w.setHeading("3Dtest app");
    w.setSize(800, 600);
    w.setLayout(new FitLayout());

    Frame app3d = new Frame("scenes/cheese.xhtml");
    System.out.println(app3d.getUrl());

    w.add(app3d);
    return w;
  }
Exemple #9
0
  public void refresh() {
    if (isOverviewVisible) {
      try {
        if (DOMUtils.getInstance().isInternetExplorer()) {
          update();
        } else {
          if (myIFrame != null) {
            myIFrame.setUrl(cleanURL(myIFrame.getUrl()));
          }
        }

      } catch (Exception e) {
        Window.alert("Unable to refresh the Case recap! " + e.getMessage());
      }
    }
    mustRefresh = false;
  }
  private void initWidgets() {
    String name;

    /**
     * EditorLauncher.HOSTED_MODE = Boolean.TRUE; // HACK to set it to HOSTED MODE if (
     * EditorLauncher.HOSTED_MODE.booleanValue() ) { name = "http://localhost:8080/designer/editor";
     * } else { name = "/designer/editor"; } *
     */
    name = "/designer/editor/?uuid=" + modelUUID + "&profile=jbpm";
    frame = new Frame(name);
    frame.getElement().setAttribute("domain", Document.get().getDomain());
    frame.setWidth("100%");
    frame.setHeight("100%");
    initWidget(frame);
    setWidth("100%");
    setHeight("100%");
  }
Exemple #11
0
  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;
  }
Exemple #12
0
  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 void onSave() {
   try {
     String s =
         callSave(
             ((IFrameElement) ((com.google.gwt.dom.client.Element) frame.getElement()))
                 .getContentDocument());
     String p =
         callPreprocessingData(
             ((IFrameElement) ((com.google.gwt.dom.client.Element) frame.getElement()))
                 .getContentDocument());
     if (asset.getContent() == null) {
       asset.setContent(new RuleFlowContentModel());
     }
     ((RuleFlowContentModel) asset.getContent()).setXml(null);
     ((RuleFlowContentModel) asset.getContent()).setJson(s);
     ((RuleFlowContentModel) asset.getContent()).setPreprocessingdata(p);
   } catch (Exception e) {
     GWT.log("JSNI method callSave() threw an exception:", e);
     Window.alert("JSNI method callSave() threw an exception: " + e);
   }
 }
Exemple #14
0
  private Window createStatisticWindow() {

    Window w = new Window();
    w.setIcon(IconHelper.createStyle("bogus"));
    w.setMinimizable(true);
    w.setMaximizable(true);
    w.setHeading("Statistics ");
    w.setSize(400, 400);

    w.setLayout(new AccordionLayout());

    ContentPanel cp = new ContentPanel();
    cp.setHeading("Most contacted friends this month");
    cp.setFrame(false);
    cp.setSize(300, 300);

    Frame frame = new Frame();
    frame.setUrl("chart.html");
    frame.setLayoutData(new FitLayout());
    cp.setLayout(new FitLayout());
    cp.add(frame);

    w.add(cp);

    cp = new ContentPanel();
    cp.setHeading("Most contacted friends in total");
    cp.setFrame(false);
    cp.setSize(300, 300);

    frame = new Frame();
    frame.setUrl(
        "https://chart.googleapis.com/chart?cht=p3&chs=350x200&chd=t:70,30,10&&chl=Hollie|Emerson|Christinal");
    frame.setLayoutData(new FitLayout());
    cp.setLayout(new FitLayout());
    cp.add(frame);

    w.add(cp);

    cp = new ContentPanel();
    cp.setHeading("Average sms per day last two weeks");
    cp.setFrame(false);
    cp.setSize(300, 300);

    frame = new Frame();
    frame.setUrl(
        "https://chart.googleapis.com/chart?cht=lc&chs=350x200&chd=t:25,50,70,90,25,44,56,34,23,56,0,0,34,5,5,103,3,2,6,13&&chl=1|2|3|4|5|6|7|8|9|10|11|12|13|14&chxt=x,y");
    frame.setLayoutData(new FitLayout());
    cp.setLayout(new FitLayout());
    cp.add(frame);

    w.add(cp);

    return w;
  }
 /** Costructor */
 public CollectionSummaryTeacherView() {
   this.res = CollectionSummaryTeacherCBundle.INSTANCE;
   res.css().ensureInjected();
   setWidget(uiBinder.createAndBindUi(this));
   String urlDomain = Window.Location.getProtocol() + "//" + Window.Location.getHost();
   style =
       "<link rel='styleSheet' type='text/css' href='"
           + urlDomain
           + "/css/googleVisualization.css'><link href='"
           + urlDomain
           + "/css/printAnalytics.css' rel='stylesheet' type='text/css'>";
   setData();
   printWidget.setVisible(false);
   downloadFile.setVisible(false);
 }
 public void setReportURL(String rptURL) {
   content.setUrl(rptURL);
 }
Exemple #17
0
  private void initButtons() {
    Button buttonBold = new Button("Bold");
    buttonBold.addClickHandler(
        new ClickHandler() {
          @Override
          public void onClick(ClickEvent event) {
            SelectedText selectedText = rawEditor.getSelectedTextObj();
            selectedText.text = "[b]" + selectedText.text + "[/b]";
            rawEditor.setSelectedText(selectedText);
          }
        });
    buttonPanel.add(buttonBold);

    Button buttonItalic = new Button("Italic");
    buttonItalic.addClickHandler(
        new ClickHandler() {
          @Override
          public void onClick(ClickEvent event) {
            SelectedText selectedText = rawEditor.getSelectedTextObj();
            selectedText.text = "[i]" + selectedText.text + "[/i]";
            rawEditor.setSelectedText(selectedText);
          }
        });
    buttonPanel.add(buttonItalic);

    Button buttonImg = new Button("Bild");
    buttonImg.addClickHandler(
        new ClickHandler() {
          @Override
          public void onClick(ClickEvent event) {
            ImagePickerPopup imagePicker = new ImagePickerPopup(800, 800, false);
            imagePicker.center();
            imagePicker.show();
            imagePicker.addSaveHandler(
                new ImagePickerPopup.SaveHandler() {

                  public void saved(String value) {
                    SelectedText selectedText = rawEditor.getSelectedTextObj();
                    selectedText.text = "[img]" + value + "[/img]";
                    rawEditor.setSelectedText(selectedText);
                  }
                });
          }
        });
    buttonPanel.add(buttonImg);

    Button buttonLink = new Button("Link");
    buttonLink.addClickHandler(
        new ClickHandler() {
          @Override
          public void onClick(ClickEvent event) {
            BBUrlPanel panel = new BBUrlPanel(rawEditor);
            panel.show();
          }
        });
    buttonPanel.add(buttonLink);

    Button buttonYoutube = new Button("Youtube");
    buttonYoutube.addClickHandler(
        new ClickHandler() {
          @Override
          public void onClick(ClickEvent event) {
            BBYoutubePanel youtubePanel = new BBYoutubePanel(rawEditor);
            youtubePanel.show();
          }
        });
    buttonPanel.add(buttonYoutube);

    for (BBCodeEditorPlugin plugin : pluggedInButtons) {
      plugin.setTextArea(rawEditor);
      buttonPanel.add(plugin.getButton());
    }

    errorMessage.setStyleName("validationError");
    errorMessage.setVisible(false);
    rawPanel.add(errorMessage);
    rawPanel.add(buttonPanel);
    rawPanel.add(rawEditor);

    preview.setSize("960px", "700px");
    rawEditor.setSize("960px", "700px");
    tabPanel.setSize("960px", "700px");

    tabPanel.add(rawPanel, "RAW");
    tabPanel.add(preview, "Preview");
    tabPanel.selectTab(0);

    tabPanel.addBeforeSelectionHandler(
        new BeforeSelectionHandler<Integer>() {
          @Override
          public void onBeforeSelection(BeforeSelectionEvent<Integer> event) {

            bbCodeService.generateBBCodePreview(
                rawEditor.getText(),
                new AsyncCallback<String>() {
                  @Override
                  public void onSuccess(String key) {
                    preview.setUrl("/burrito/bbCodePreview?key=" + key);
                  }

                  @Override
                  public void onFailure(Throwable caught) {
                    Window.alert("Could not create preview! " + caught.getMessage());
                  }
                });
          }
        });

    add(tabPanel);
  }
 /**
  * Sets the URL of the resource to be downloaded.
  *
  * @param url the resource's new URL
  */
 public void setUrl(String url) {
   frame.setUrl(url);
 }