Skip to content

Commit a1c4aab

Browse files
committed
Hide hypergeometric 'n' behind advanced panel. Refs #317
1 parent 7d3716c commit a1c4aab

File tree

1 file changed

+10
-6
lines changed
  • EnrichmentMapPlugin/src/main/java/org/baderlab/csplugins/enrichmentmap/view/postanalysis

1 file changed

+10
-6
lines changed

EnrichmentMapPlugin/src/main/java/org/baderlab/csplugins/enrichmentmap/view/postanalysis/PAWeightPanel.java

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@
4646
import org.baderlab.csplugins.enrichmentmap.view.EnablementComboBoxRenderer;
4747
import org.baderlab.csplugins.enrichmentmap.view.util.GBCFactory;
4848
import org.baderlab.csplugins.enrichmentmap.view.util.SwingUtil;
49+
import org.cytoscape.util.swing.BasicCollapsiblePanel;
4950
import org.cytoscape.util.swing.IconManager;
5051
import org.cytoscape.util.swing.LookAndFeelUtil;
5152

@@ -341,28 +342,31 @@ private JPanel createHypergeomCard() {
341342
}
342343

343344
private JPanel createHypergeomSamplePanel() {
345+
JLabel title = new JLabel("Genes in sample (n)");
344346
hyperIntersectButton = new JRadioButton("Intersection");
345347
JRadioButton hyperSigButton = new JRadioButton("Signature gene set");
346-
makeSmall(hyperSigButton, hyperIntersectButton);
348+
makeSmall(title, hyperSigButton, hyperIntersectButton);
347349

348350
ButtonGroup buttonGroup = new ButtonGroup();
349351
buttonGroup.add(hyperSigButton);
350352
buttonGroup.add(hyperIntersectButton);
351353
hyperIntersectButton.setSelected(true);
352354

353-
JPanel panel = new JPanel();
354-
panel.setBorder(LookAndFeelUtil.createTitledBorder("Genes in sample (n)"));
355-
356-
final GroupLayout layout = new GroupLayout(panel);
357-
panel.setLayout(layout);
355+
BasicCollapsiblePanel panel = new BasicCollapsiblePanel("Advanced");
356+
panel.setCollapsed(true);
357+
358+
final GroupLayout layout = new GroupLayout(panel.getContentPane());
359+
panel.getContentPane().setLayout(layout);
358360
layout.setAutoCreateContainerGaps(true);
359361
layout.setAutoCreateGaps(!LookAndFeelUtil.isAquaLAF());
360362

361363
layout.setHorizontalGroup(layout.createParallelGroup(Alignment.LEADING, true)
364+
.addComponent(title)
362365
.addComponent(hyperIntersectButton)
363366
.addComponent(hyperSigButton)
364367
);
365368
layout.setVerticalGroup(layout.createSequentialGroup()
369+
.addComponent(title)
366370
.addComponent(hyperIntersectButton, PREFERRED_SIZE, DEFAULT_SIZE, PREFERRED_SIZE)
367371
.addComponent(hyperSigButton, PREFERRED_SIZE, DEFAULT_SIZE, PREFERRED_SIZE)
368372
);

0 commit comments

Comments
 (0)