コード例 #1
0
  private void opcaoExibirGrafico4() {
    String json = Facade.getInstanceFacade().visualizarGraficoCandidatos();
    System.out.println(json);
    Gson gson = new Gson();
    GraficoFinal graficoParse = gson.fromJson(json, GraficoFinal.class);
    System.out.println(graficoParse.getClass());

    System.out.println(graficoParse.getNome());
    GraficoBarra view1 = new GraficoBarra(graficoParse);
    view1.pack();
    RefineryUtilities.centerFrameOnScreen(view1);
    view1.setVisible(true);
  }
コード例 #2
0
  private void opcaoExibirGrafico2() {
    String json = Facade.getInstanceFacade().visualizarGraficoDoadoresPF();

    Gson gson = new Gson();
    GraficoFinal graficoParse = gson.fromJson(json, GraficoFinal.class);
    System.out.println(graficoParse.getClass());

    System.out.println(graficoParse.getNome());
    GraficoPizza view2 = new GraficoPizza(graficoParse);
    view2.pack();
    RefineryUtilities.centerFrameOnScreen(view2);
    view2.setVisible(true);
  }