@Override
  public void newSample(State state, int no, int total) {
    //    	System.out.println("CurrentTreeVisualizer: New sample.");
    String sampledTree = state.getNewickString();

    // TODO: START OF FIX
    NewickParser parser = new NewickParser(sampledTree);
    TreeNode node = parser.parse();

    if (show) {
      for (TreeView view : treeViews) {
        view.newSample(node);
      }

      refreshGUI();
    }
    // TODO: END OF FIX

    newickTrees.add(sampledTree);
    if (sampling) {
      try {
        file.write("Sample " + no + "\tTree:\t" + sampledTree + "\n");
      } catch (IOException e) {
        e.printStackTrace();
      }
    }
  }
  @Override
  public void newPeek(State state) {
    //    	System.out.println("CurrentTreeVisualizer: New peek.");
    String treeString = state.getNewickString();
    NewickParser parser = new NewickParser(treeString);
    TreeNode node = parser.parse();

    if (show) {
      for (TreeView view : treeViews) {
        view.newSample(node);
      }

      refreshGUI();
    }
  }