Example #1
0
  public void init(BlackBoard blackboard) {
    new graphtea.plugins.main.core.Init().init(blackboard);
    new graphtea.plugins.main.select.Init().init(blackboard);
    new graphtea.plugins.main.saveload.Init().init(blackboard);
    // init the setting
    Edge em = new Edge(new Vertex(), new Vertex());
    SETTINGS.registerSetting(em, "Graph Drawings");
    GTabbedGraphPane gtgp = GTabbedGraphPane.getCurrentGTabbedGraphPane(blackboard);
    //        GHTMLPageComponent pc = new GHTMLPageComponent(blackboard);
    //        try {
    //            pc.setPage(new File("doc/welcome_page.html").toURL());
    //            gtgp.jtp.addTab("Welcome!", pc);
    //        } catch (MalformedURLException e) {
    //            ExceptionHandler.catchException(e);
    //        }
    gtgp.addGraph(new GraphModel(false));
    gtgp.jtp.setSelectedIndex(0);
    try {
      GTabbedGraphPane.getCurrentGHTMLPageComponent(blackboard)
          .setPage(new URL(Application.WELCOME_URL));
    } catch (MalformedURLException e) {
      e.printStackTrace();
    }

    track("App", "Started");
    blackboard.addListener(
        ExceptionOccuredData.EVENT_KEY,
        new Listener() {
          public void keyChanged(String key, Object value) {
            trackError(((ExceptionOccuredData) value).e.getMessage());
          }
        });
  }