Search in sources :

Example 6 with AfterInjection

use of org.baderlab.csplugins.enrichmentmap.AfterInjection in project EnrichmentMapApp by BaderLab.

the class PostAnalysisInputPanel method createContent.

@AfterInjection
private void createContent() {
    JPanel analysisTypePanel = createAnalysisTypePanel();
    JPanel namePanel = createNamePanel();
    final GroupLayout layout = new GroupLayout(this);
    setLayout(layout);
    layout.setAutoCreateContainerGaps(false);
    layout.setAutoCreateGaps(false);
    layout.setHorizontalGroup(layout.createParallelGroup(Alignment.CENTER, true).addComponent(analysisTypePanel, DEFAULT_SIZE, DEFAULT_SIZE, Short.MAX_VALUE).addComponent(namePanel, DEFAULT_SIZE, DEFAULT_SIZE, Short.MAX_VALUE).addComponent(getUserInputScrollPane(), DEFAULT_SIZE, DEFAULT_SIZE, Short.MAX_VALUE));
    layout.setVerticalGroup(layout.createSequentialGroup().addComponent(analysisTypePanel, PREFERRED_SIZE, DEFAULT_SIZE, PREFERRED_SIZE).addComponent(namePanel, PREFERRED_SIZE, DEFAULT_SIZE, PREFERRED_SIZE).addComponent(getUserInputScrollPane(), DEFAULT_SIZE, DEFAULT_SIZE, Short.MAX_VALUE));
    if (LookAndFeelUtil.isAquaLAF())
        setOpaque(false);
    initialize();
}
Also used : JPanel(javax.swing.JPanel) GroupLayout(javax.swing.GroupLayout) AfterInjection(org.baderlab.csplugins.enrichmentmap.AfterInjection)

Example 7 with AfterInjection

use of org.baderlab.csplugins.enrichmentmap.AfterInjection in project EnrichmentMapApp by BaderLab.

the class CutoffPropertiesPanel method createContents.

@AfterInjection
public void createContents() {
    cutoffValues = new EnumMap<>(SimilarityMetric.class);
    cutoffValues.put(SimilarityMetric.JACCARD, propertyManager.getDefaultCutOff(SimilarityMetric.JACCARD));
    cutoffValues.put(SimilarityMetric.OVERLAP, propertyManager.getDefaultCutOff(SimilarityMetric.OVERLAP));
    cutoffValues.put(SimilarityMetric.COMBINED, propertyManager.getDefaultCutOff(SimilarityMetric.COMBINED));
    setBorder(LookAndFeelUtil.createPanelBorder());
    JPanel filterNodesPanel = createFilterNodesPanel();
    JPanel filterEdgesPanel = createFilterEdgesPanel();
    notationCheckBox = new JCheckBox("Scientific Notation");
    notationCheckBox.addActionListener(e -> {
        boolean scientific = notationCheckBox.isSelected();
        AbstractFormatterFactory factory = getFormatterFactory(scientific);
        pvalueText.setFormatterFactory(factory);
        qvalueText.setFormatterFactory(factory);
        similarityCutoffText.setFormatterFactory(factory);
    });
    advancedCheckBox = new JCheckBox("Show Advanced Options");
    advancedCheckBox.addActionListener(e -> showAdvancedOptions(advancedCheckBox.isSelected()));
    SwingUtil.makeSmall(notationCheckBox, advancedCheckBox);
    final GroupLayout layout = new GroupLayout(this);
    setLayout(layout);
    layout.setAutoCreateContainerGaps(true);
    layout.setAutoCreateGaps(true);
    layout.setHorizontalGroup(layout.createParallelGroup().addGroup(layout.createSequentialGroup().addComponent(filterNodesPanel).addComponent(filterEdgesPanel)).addGroup(layout.createSequentialGroup().addGap(0, 0, Short.MAX_VALUE).addComponent(notationCheckBox).addGap(10).addComponent(advancedCheckBox)));
    layout.setVerticalGroup(layout.createSequentialGroup().addGroup(layout.createParallelGroup().addComponent(filterNodesPanel).addComponent(filterEdgesPanel)).addGroup(layout.createParallelGroup().addComponent(notationCheckBox).addComponent(advancedCheckBox)));
}
Also used : JCheckBox(javax.swing.JCheckBox) JPanel(javax.swing.JPanel) GroupLayout(javax.swing.GroupLayout) SimilarityMetric(org.baderlab.csplugins.enrichmentmap.model.EMCreationParameters.SimilarityMetric) AbstractFormatterFactory(javax.swing.JFormattedTextField.AbstractFormatterFactory) AfterInjection(org.baderlab.csplugins.enrichmentmap.AfterInjection)

Example 8 with AfterInjection

use of org.baderlab.csplugins.enrichmentmap.AfterInjection in project EnrichmentMapApp by BaderLab.

the class EditCommonPanel method createContents.

@AfterInjection
private void createContents() {
    gmtText = pathTextFactory.create("GMT File:", FileBrowser.Filter.GMT);
    expressionsText = pathTextFactory.create("Expressions:", FileBrowser.Filter.EXPRESSION);
    GroupLayout layout = new GroupLayout(this);
    setLayout(layout);
    layout.setAutoCreateContainerGaps(true);
    layout.setAutoCreateGaps(true);
    layout.setHorizontalGroup(layout.createSequentialGroup().addGroup(layout.createParallelGroup(Alignment.TRAILING).addComponent(gmtText.getLabel()).addComponent(expressionsText.getLabel())).addGroup(layout.createParallelGroup(Alignment.LEADING, true).addComponent(gmtText.getTextField()).addComponent(expressionsText.getTextField())).addGroup(layout.createParallelGroup().addComponent(gmtText.getBrowseButton()).addComponent(expressionsText.getBrowseButton())));
    layout.setVerticalGroup(layout.createSequentialGroup().addGroup(layout.createParallelGroup(Alignment.BASELINE).addComponent(gmtText.getLabel()).addComponent(gmtText.getTextField()).addComponent(gmtText.getBrowseButton())).addGroup(layout.createParallelGroup(Alignment.BASELINE).addComponent(expressionsText.getLabel()).addComponent(expressionsText.getTextField()).addComponent(expressionsText.getBrowseButton())));
    if (LookAndFeelUtil.isAquaLAF())
        setOpaque(false);
}
Also used : GroupLayout(javax.swing.GroupLayout) AfterInjection(org.baderlab.csplugins.enrichmentmap.AfterInjection)

Example 9 with AfterInjection

use of org.baderlab.csplugins.enrichmentmap.AfterInjection in project EnrichmentMapApp by BaderLab.

the class ErrorMessageDialog method createContents.

@AfterInjection
private void createContents() {
    messagePanel = new JPanel(new GridBagLayout());
    JPanel buttonPanel = createButtonPanel();
    messagePanel.setBorder(BorderFactory.createEmptyBorder(8, 8, 8, 8));
    buttonPanel.setBorder(BorderFactory.createMatteBorder(1, 0, 0, 0, UIManager.getColor("Separator.foreground")));
    JPanel panel = new JPanel(new BorderLayout());
    panel.add(messagePanel, BorderLayout.CENTER);
    panel.add(buttonPanel, BorderLayout.SOUTH);
    setContentPane(panel);
}
Also used : JPanel(javax.swing.JPanel) GridBagLayout(java.awt.GridBagLayout) BorderLayout(java.awt.BorderLayout) AfterInjection(org.baderlab.csplugins.enrichmentmap.AfterInjection)

Example 10 with AfterInjection

use of org.baderlab.csplugins.enrichmentmap.AfterInjection in project EnrichmentMapApp by BaderLab.

the class PostAnalysisSignatureDiscoveryPanel method createContents.

@AfterInjection
private void createContents() {
    JPanel gmtPanel = createSignatureDiscoveryGMTPanel();
    JPanel sigGenesetsPanel = createSignatureGenesetsPanel();
    weightPanel = new PostAnalysisWeightPanel(serviceRegistrar);
    final GroupLayout layout = new GroupLayout(this);
    setLayout(layout);
    layout.setAutoCreateContainerGaps(false);
    layout.setAutoCreateGaps(false);
    layout.setHorizontalGroup(layout.createParallelGroup(Alignment.CENTER, true).addComponent(gmtPanel, DEFAULT_SIZE, DEFAULT_SIZE, Short.MAX_VALUE).addComponent(sigGenesetsPanel, DEFAULT_SIZE, DEFAULT_SIZE, Short.MAX_VALUE).addComponent(weightPanel, DEFAULT_SIZE, DEFAULT_SIZE, Short.MAX_VALUE));
    layout.setVerticalGroup(layout.createSequentialGroup().addComponent(gmtPanel, PREFERRED_SIZE, DEFAULT_SIZE, PREFERRED_SIZE).addComponent(sigGenesetsPanel, PREFERRED_SIZE, DEFAULT_SIZE, PREFERRED_SIZE).addComponent(weightPanel, PREFERRED_SIZE, DEFAULT_SIZE, PREFERRED_SIZE));
}
Also used : JPanel(javax.swing.JPanel) GroupLayout(javax.swing.GroupLayout) AfterInjection(org.baderlab.csplugins.enrichmentmap.AfterInjection)

Aggregations

AfterInjection (org.baderlab.csplugins.enrichmentmap.AfterInjection)12 JPanel (javax.swing.JPanel)8 GroupLayout (javax.swing.GroupLayout)6 BorderLayout (java.awt.BorderLayout)4 Dimension (java.awt.Dimension)2 JButton (javax.swing.JButton)2 GridBagLayout (java.awt.GridBagLayout)1 ActionEvent (java.awt.event.ActionEvent)1 AbstractAction (javax.swing.AbstractAction)1 JCheckBox (javax.swing.JCheckBox)1 JDialog (javax.swing.JDialog)1 AbstractFormatterFactory (javax.swing.JFormattedTextField.AbstractFormatterFactory)1 SimilarityMetric (org.baderlab.csplugins.enrichmentmap.model.EMCreationParameters.SimilarityMetric)1 EMViewControlPanel (org.baderlab.csplugins.enrichmentmap.view.control.ControlPanel.EMViewControlPanel)1 CyNetworkView (org.cytoscape.view.model.CyNetworkView)1