Example #1
0
 public void addToToolbar(int mode) {
   this.toolbarString = ToolBar.addMode(toolbarString, mode);
 }
Example #2
0
  @Override
  public void afterLoadFileAppOrNot() {
    closePerspectivesPopup();
    if (!getLAF().isSmart()) {
      removeSplash();
    }
    String perspective = getArticleElement().getDataParamPerspective();
    if (!isUsingFullGui()) {
      if (showConsProtNavigation() || !isJustEuclidianVisible() || perspective.length() > 0) {
        useFullGui = true;
      }
    }
    frame.setApplication(this);
    if (!isUsingFullGui()) {
      buildSingleApplicationPanel();
    } else {
      ((DockManagerW) getGuiManager().getLayout().getDockManager()).init(frame);
      Perspective p = null;
      if (perspective != null) {
        p =
            PerspectiveDecoder.decode(
                perspective,
                this.getKernel().getParser(),
                ToolBar.getAllToolsNoMacros(true, false, this));
      }
      getGuiManager().updateFrameSize();
      if (articleElement.getDataParamShowAlgebraInput(false)) {
        Perspective p2 = getTmpPerspective(p);
        if (!algebraVisible(p2) && getInputPosition() == InputPosition.algebraView) {
          setInputPosition(InputPosition.bottom, false);
          p2.setInputPosition(InputPosition.bottom);
        }
      }
      getGuiManager().getLayout().setPerspectives(getTmpPerspectives(), p);
    }

    getScriptManager().ggbOnInit(); // put this here from Application
    // constructor because we have to delay
    // scripts until the EuclidianView is
    // shown

    initUndoInfoSilent();

    getEuclidianView1().synCanvasSize();

    getAppletFrame().resetAutoSize();

    getEuclidianView1().doRepaint2();
    stopCollectingRepaints();
    frame.splash.canNowHide();
    if (!articleElement.preventFocus()) {
      requestFocusInWindow();
    }

    if (isUsingFullGui()) {
      if (needsSpreadsheetTableModel()) {
        getSpreadsheetTableModel();
      }
      refreshSplitLayoutPanel();

      // probably this method can be changed by more,
      // to be more like AppWapplication's method with the same name,
      // but preferring to change what is needed only to avoid new unknown
      // bugs
      if (getGuiManager().hasSpreadsheetView()) {
        DockPanel sp = getGuiManager().getLayout().getDockManager().getPanel(App.VIEW_SPREADSHEET);
        if (sp != null) {
          sp.deferredOnResize();
        }
      }
    }

    if (isUsingFullGui()) {
      updateNavigationBars();
    }
    this.setPreferredSize(new GDimensionW((int) this.getWidth(), (int) this.getHeight()));
    setDefaultCursor();
    GeoGebraFrameW.useDataParamBorder(getArticleElement(), frame);
    GeoGebraProfiler.getInstance().profileEnd();
    onOpenFile();
    showStartTooltip(0);
    setAltText();
    adjustViews();
    kernel.notifyScreenChanged();
  }