Esempio n. 1
0
  /**
   * ************************************* Creates an information string for the user that is
   * currently logging in.
   *
   * @return The user info string
   */
  protected String createLoginUserInfo() {
    StringBuilder aLoginUserInfo = new StringBuilder();

    aLoginUserInfo.append("UserAgent: ");
    aLoginUserInfo.append(Window.Navigator.getUserAgent());
    aLoginUserInfo.append("\nApp: ");
    aLoginUserInfo.append(Window.Navigator.getAppName());
    aLoginUserInfo.append(" (");
    aLoginUserInfo.append(Window.Navigator.getAppCodeName());
    aLoginUserInfo.append(")\nVersion: ");
    aLoginUserInfo.append(Window.Navigator.getAppVersion());
    aLoginUserInfo.append("\nPlatform: ");
    aLoginUserInfo.append(Window.Navigator.getPlatform());

    return aLoginUserInfo.toString();
  }
Esempio n. 2
0
  /**
   * **************************************************** Constructs AppW for applets
   *
   * @param undoActive if true you can undo by CTRL+Z and redo by CTRL+Y
   * @param ae article element
   * @param gf frame
   * @param dimension 3 for 3d, 2 otherwise
   * @param laf look and feel
   */
  public AppWapplet(
      ArticleElement ae,
      GeoGebraFrameBoth gf,
      final boolean undoActive,
      int dimension,
      GLookAndFeel laf) {
    super(ae, dimension, laf, null);
    this.frame = gf;
    setAppletHeight(frame.getComputedHeight());
    setAppletWidth(frame.getComputedWidth());

    this.useFullGui =
        !isApplet()
            || ae.getDataParamShowAlgebraInput(false)
            || ae.getDataParamShowToolBar(false)
            || ae.getDataParamShowMenuBar(false)
            || ae.getDataParamEnableRightClick();

    Log.info(
        "GeoGebra "
            + GeoGebraConstants.VERSION_STRING
            + " "
            + GeoGebraConstants.BUILD_DATE
            + " "
            + Window.Navigator.getUserAgent());
    initCommonObjects();
    initing = true;

    this.euclidianViewPanel = new EuclidianDockPanelW(this, allowStylebar());
    // (EuclidianDockPanelW)getGuiManager().getLayout().getDockManager().getPanel(App.VIEW_EUCLIDIAN);
    this.canvas = this.euclidianViewPanel.getCanvas();
    canvas.setWidth("1px");
    canvas.setHeight("1px");
    canvas.setCoordinateSpaceHeight(1);
    canvas.setCoordinateSpaceWidth(1);
    initCoreObjects(undoActive, this);
    afterCoreObjectsInited();
    resetFonts();
    Browser.removeDefaultContextMenu(this.getArticleElement());
    if (ae.getDataParamApp() && !this.getLAF().isSmart()) {
      RootPanel.getBodyElement().addClassName("application");
    }
    if (this.showMenuBar()) {
      // opening file -> this was inited before
      if (getLoginOperation() == null) {
        initSignInEventFlow(new LoginOperationW(this), ae.isEnableUsageStats());
      }
    } else {
      if (Browser.runningLocal() && ae.isEnableUsageStats()) {
        new GeoGebraTubeAPIWSimple(has(Feature.TUBE_BETA)).checkAvailable(null);
      }
    }
  }
 @Override
 public SafeHtml about(
     AboutApplicationData data, String userAgent, SafeHtml copyright, SafeHtml nsfProject) {
   return template.about(
       Strings.nullToEmpty(data.getReleaseVersion()),
       Strings.nullToEmpty(data.getBuild()),
       Strings.nullToEmpty(data.getBuildNumber()),
       Strings.nullToEmpty(data.getBuildId()),
       Strings.nullToEmpty(data.getBuildBranch()),
       Strings.nullToEmpty(data.getBuildCommit()),
       Strings.nullToEmpty(data.getBuildJdk()),
       Window.Navigator.getUserAgent(),
       I18N.DISPLAY.projectCopyrightStatement(),
       I18N.DISPLAY.nsfProjectText());
 }
 public static boolean isInternetExplorerMobile() {
   String userAgent = Window.Navigator.getUserAgent().toLowerCase();
   return (userAgent.indexOf("iemobile") > 0);
 }