use of javax.swing.JPanel in project EnrichmentMapApp by BaderLab.
the class EdgeWidthDialog method createSignatureSetPanel.
private JPanel createSignatureSetPanel() {
JPanel panel = new JPanel();
panel.setBorder(LookAndFeelUtil.createTitledBorder("Signature Set (Post Analysis)"));
panel.setLayout(new GridBagLayout());
GridBagConstraints gbc;
JLabel pValueLabel = new JLabel("p-value: ");
gbc = gridBagConstraints(0, 0);
gbc.weightx = 1.0;
panel.add(pValueLabel, gbc);
JLabel lessThan100 = new JLabel("<= cutoff/100 ");
gbc = gridBagConstraints(1, 0);
panel.add(lessThan100, gbc);
JLabel lessThan10 = new JLabel("<= cutoff/10 ");
gbc = gridBagConstraints(2, 0);
panel.add(lessThan10, gbc);
JLabel greaterThan = new JLabel("> cutoff/10 ");
gbc = gridBagConstraints(3, 0);
panel.add(greaterThan, gbc);
// Width
JLabel widthLabel = new JLabel("Width:");
gbc = gridBagConstraints(0, 1);
panel.add(widthLabel, gbc);
lessThan100Text = new JFormattedTextField(new DecimalFormat());
lessThan100Text.setPreferredSize(new Dimension(50, lessThan100Text.getPreferredSize().height));
lessThan100Text.setHorizontalAlignment(JTextField.RIGHT);
gbc = gridBagConstraints(1, 1);
gbc.insets = new Insets(5, 5, 5, 0);
panel.add(lessThan100Text, gbc);
lessThan10Text = new JFormattedTextField(new DecimalFormat());
lessThan10Text.setPreferredSize(new Dimension(50, lessThan10Text.getPreferredSize().height));
lessThan10Text.setHorizontalAlignment(JTextField.RIGHT);
gbc = gridBagConstraints(2, 1);
gbc.insets = new Insets(5, 5, 5, 0);
panel.add(lessThan10Text, gbc);
greaterThanText = new JFormattedTextField(new DecimalFormat());
greaterThanText.setPreferredSize(new Dimension(50, greaterThanText.getPreferredSize().height));
greaterThanText.setHorizontalAlignment(JTextField.RIGHT);
gbc = gridBagConstraints(3, 1);
gbc.insets = new Insets(5, 5, 5, 0);
panel.add(greaterThanText, gbc);
makeSmall(pValueLabel, lessThan100, lessThan10, greaterThan, widthLabel, lessThan100Text, lessThan10Text, greaterThanText);
return panel;
}
use of javax.swing.JPanel in project EnrichmentMapApp by BaderLab.
the class EdgeWidthDialog method createGenesetOverlapPanel.
private JPanel createGenesetOverlapPanel() {
JPanel panel = new JPanel();
panel.setBorder(LookAndFeelUtil.createTitledBorder("Geneset Overlap"));
panel.setLayout(new GridBagLayout());
GridBagConstraints gbc;
// Similarity Coefficient
JLabel similarityLabel = new JLabel("Similarity Coefficient: ");
gbc = gridBagConstraints(0, 0);
gbc.weightx = 1.0;
panel.add(similarityLabel, gbc);
JLabel lowerBound = new JLabel(String.format("%.1f", similarityCutoff));
lowerBound.setHorizontalAlignment(JLabel.RIGHT);
gbc = gridBagConstraints(1, 0);
panel.add(lowerBound, gbc);
// hardcoded
JLabel upperBound = new JLabel("1.0");
upperBound.setHorizontalAlignment(JLabel.RIGHT);
gbc = gridBagConstraints(2, 0);
panel.add(upperBound, gbc);
JLabel spacer = new JLabel("");
gbc = gridBagConstraints(3, 0);
panel.add(spacer, gbc);
// Width
JLabel widthLabel = new JLabel("Width:");
gbc = gridBagConstraints(0, 1);
panel.add(widthLabel, gbc);
emLowerWidthText = new JFormattedTextField(new DecimalFormat());
emLowerWidthText.setPreferredSize(new Dimension(50, emLowerWidthText.getPreferredSize().height));
emLowerWidthText.setHorizontalAlignment(JTextField.RIGHT);
gbc = gridBagConstraints(1, 1);
gbc.insets = new Insets(5, 5, 5, 0);
panel.add(emLowerWidthText, gbc);
emUpperWidthText = new JFormattedTextField(new DecimalFormat());
emUpperWidthText.setPreferredSize(new Dimension(50, emUpperWidthText.getPreferredSize().height));
emUpperWidthText.setHorizontalAlignment(JTextField.RIGHT);
gbc = gridBagConstraints(2, 1);
gbc.insets = new Insets(5, 5, 5, 0);
panel.add(emUpperWidthText, gbc);
JLabel mappingText = new JLabel("(continuous mapping) ");
gbc = gridBagConstraints(3, 1);
panel.add(mappingText, gbc);
makeSmall(similarityLabel, lowerBound, upperBound, spacer, widthLabel, emLowerWidthText, emUpperWidthText, mappingText);
return panel;
}
use of javax.swing.JPanel in project EnrichmentMapApp by BaderLab.
the class EdgeWidthDialog method createContents.
private void createContents() {
JPanel genesetOverlapPanel = createGenesetOverlapPanel();
JPanel signatureSetPanel = createSignatureSetPanel();
JPanel widthPanel = new JPanel();
widthPanel.setLayout(new BoxLayout(widthPanel, BoxLayout.Y_AXIS));
widthPanel.add(genesetOverlapPanel);
widthPanel.add(Box.createVerticalStrut(5));
widthPanel.add(signatureSetPanel);
JPanel buttonPanel = createButtonPanel();
JPanel panel = new JPanel();
final GroupLayout layout = new GroupLayout(panel);
panel.setLayout(layout);
layout.setAutoCreateContainerGaps(true);
layout.setAutoCreateGaps(!LookAndFeelUtil.isAquaLAF());
layout.setHorizontalGroup(layout.createParallelGroup(Alignment.CENTER, true).addComponent(widthPanel, DEFAULT_SIZE, DEFAULT_SIZE, Short.MAX_VALUE).addComponent(buttonPanel, DEFAULT_SIZE, DEFAULT_SIZE, Short.MAX_VALUE));
layout.setVerticalGroup(layout.createSequentialGroup().addComponent(widthPanel, PREFERRED_SIZE, DEFAULT_SIZE, PREFERRED_SIZE).addComponent(buttonPanel, PREFERRED_SIZE, DEFAULT_SIZE, PREFERRED_SIZE));
add(panel);
}
use of javax.swing.JPanel in project EnrichmentMapApp by BaderLab.
the class LegendPanel method updateNodeColorPanel.
private void updateNodeColorPanel(Collection<EMDataSet> dataSets, EnrichmentMap map) {
JPanel p = getNodeColorPanel();
p.removeAll();
if (dataSets != null && dataSets.size() == 1) {
EMDataSet ds = dataSets.iterator().next();
ColorLegendPanel clp = new ColorLegendPanel(Colors.MAX_PHENOTYPE_1, Colors.MAX_PHENOTYPE_2, ds.getEnrichments().getPhenotype1(), ds.getEnrichments().getPhenotype2());
GroupLayout layout = (GroupLayout) p.getLayout();
layout.setHorizontalGroup(layout.createSequentialGroup().addGap(0, 0, Short.MAX_VALUE).addComponent(clp, PREFERRED_SIZE, DEFAULT_SIZE, PREFERRED_SIZE).addGap(0, 0, Short.MAX_VALUE));
layout.setVerticalGroup(layout.createParallelGroup(Alignment.CENTER, false).addComponent(clp));
p.setVisible(true);
} else {
p.setVisible(false);
}
}
use of javax.swing.JPanel 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();
}
Aggregations