コード例 #1
0
ファイル: InputFileCard.java プロジェクト: koyousun/iMRMC
    public void actionPerformed(ActionEvent e) {
      // System.out.println("study design button pressed");
      if (InputFile1.isLoaded()) {
        JComboBox<String> choose1 = new JComboBox<String>();

        for (String Modality : InputFile1.getModalityIDs()) {
          choose1.addItem(Modality);
        }
        choose1.setSelectedIndex(0);
        Object[] message = {"Which modality would you like view?\n", choose1};
        JOptionPane.showMessageDialog(
            GUI.MRMCobject.getFrame(),
            message,
            "Choose Modality",
            JOptionPane.INFORMATION_MESSAGE,
            null);
        designMod1 = (String) choose1.getSelectedItem();
        TreeMap<String, String[][]> StudyDesignData =
            InputFile1.getStudyDesign((String) choose1.getSelectedItem());
        final StudyDesignPlot chart =
            new StudyDesignPlot(
                "Study Design: Modality " + designMod1,
                designMod1,
                "Case Index",
                "Reader",
                StudyDesignData,
                InputFile1.filename);
        chart.pack();
        RefineryUtilities.centerFrameOnScreen(chart);
        chart.setVisible(true);

      } else {
        JOptionPane.showMessageDialog(
            GUI.MRMCobject.getFrame(),
            "Pilot study data has not yet been input.",
            "Error",
            JOptionPane.ERROR_MESSAGE);
      }
    }