Ejemplo n.º 1
0
  /**
   * Method that makes the necessary JComponents for the SettingsPanel. The used JComponents are: a
   * textfield for the cluster name, a TextOrGraphPanel for choosing between text and graph input,
   * two comboboxes for the distributions and the corrections, a textfield for the alpha, two
   * comboboxes for the option against what cluster should be tested and one for the option how many
   * categories must be displayed int the graph, two SettingsOpenPanels for choosing the annotation
   * and ontology file, a SettingsSavePanel for the data-file and a button to start the
   * calculations.
   */
  public void makeJComponents() {

    helpButton = new JButton("Help");
    helpButton.setMnemonic(KeyEvent.VK_H);
    helpButton.addActionListener(new HelpButtonActionListener(this, openBrowserService));

    saveSettingsButton = new JButton("Save settings as default");
    saveSettingsButton.setMnemonic(KeyEvent.VK_S);
    saveSettingsButton.addActionListener(new SaveSettingsButtonActionListener(this));

    // JComboboxes.
    testBox = new JComboBox(testsArray);
    testBox.setSelectedItem(bingo_props.getProperty("tests_def"));
    correctionBox = new JComboBox(correctionArray);
    correctionBox.setSelectedItem(bingo_props.getProperty("correction_def"));
    categoriesBox = new JComboBox(categoriesArray);
    categoriesBox.setSelectedItem(bingo_props.getProperty("categories_def"));
    clusterVsPanel =
        new ChooseRefSetPanel(
            this, bingoDir, clusterVsArray, bingo_props.getProperty("refset_def"));

    // JTextField.
    alphaField = new JTextField(bingo_props.getProperty("signif_def"));
    nameField = new JTextField("");

    // OverUnderPanel
    overUnderPanel = new OverUnderPanel();

    // OverUnderPanel
    vizPanel = new VizPanel();

    // TextOrGraphPanel
    textOrGraphPanel = new TextOrGraphPanel();

    // JLabels.
    overUnderLabel = new JLabel(overunder_label);
    nameLabel = new JLabel(clustername_label);
    testLabel = new JLabel(test_label);
    correctionLabel = new JLabel(correction_label);
    alphaLabel = new JLabel(sig_label);
    categoriesLabel = new JLabel(category_label);
    clusterVsLabel = new JLabel(ref_label);
    testLabel.setForeground(Color.black);
    correctionLabel.setForeground(Color.black);
    alphaLabel.setForeground(Color.black);
    categoriesLabel.setForeground(Color.black);
    clusterVsLabel.setForeground(Color.black);
    ecLabel = new JLabel(ec_label);

    // annotationPanel.
    annotationLabel = new JLabel(annotation_label);
    annotationPanel =
        new ChooseAnnotationPanel(
            this, bingoDir, params.getSpeciesLabels(), bingo_props.getProperty("species_def"));

    // evidence code Field
    ecField = new JTextField();

    // ontologyPanel.
    namespaceLabel = new JLabel(namespace_label);
    namespacePanel =
        new ChooseNamespacePanel(
            this, bingoDir, params.getNamespaceLabels(), bingo_props.getProperty("namespace_def"));

    ontologyLabel = new JLabel(ontology_label);
    ontologyPanel =
        new ChooseOntologyPanel(
            this,
            bingoDir,
            params.getOntologyLabels(),
            bingo_props.getProperty("ontology_file_def"));

    // Creating SettingsSavePanels.
    dataPanel = new SaveResultsPanel("Data", this, bingoDir);

    // the bingo-button to start the calculations.
    bingoButton = new JButton("Start bingo");
    bingoButton.setMnemonic(KeyEvent.VK_B);
    bingoButton.addActionListener(new SettingsPanelActionListener(params, this, adapter));
  }