|
46 | 46 | import org.baderlab.csplugins.enrichmentmap.view.EnablementComboBoxRenderer;
|
47 | 47 | import org.baderlab.csplugins.enrichmentmap.view.util.GBCFactory;
|
48 | 48 | import org.baderlab.csplugins.enrichmentmap.view.util.SwingUtil;
|
| 49 | +import org.cytoscape.util.swing.BasicCollapsiblePanel; |
49 | 50 | import org.cytoscape.util.swing.IconManager;
|
50 | 51 | import org.cytoscape.util.swing.LookAndFeelUtil;
|
51 | 52 |
|
@@ -341,28 +342,31 @@ private JPanel createHypergeomCard() {
|
341 | 342 | }
|
342 | 343 |
|
343 | 344 | private JPanel createHypergeomSamplePanel() {
|
| 345 | + JLabel title = new JLabel("Genes in sample (n)"); |
344 | 346 | hyperIntersectButton = new JRadioButton("Intersection");
|
345 | 347 | JRadioButton hyperSigButton = new JRadioButton("Signature gene set");
|
346 |
| - makeSmall(hyperSigButton, hyperIntersectButton); |
| 348 | + makeSmall(title, hyperSigButton, hyperIntersectButton); |
347 | 349 |
|
348 | 350 | ButtonGroup buttonGroup = new ButtonGroup();
|
349 | 351 | buttonGroup.add(hyperSigButton);
|
350 | 352 | buttonGroup.add(hyperIntersectButton);
|
351 | 353 | hyperIntersectButton.setSelected(true);
|
352 | 354 |
|
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); |
358 | 360 | layout.setAutoCreateContainerGaps(true);
|
359 | 361 | layout.setAutoCreateGaps(!LookAndFeelUtil.isAquaLAF());
|
360 | 362 |
|
361 | 363 | layout.setHorizontalGroup(layout.createParallelGroup(Alignment.LEADING, true)
|
| 364 | + .addComponent(title) |
362 | 365 | .addComponent(hyperIntersectButton)
|
363 | 366 | .addComponent(hyperSigButton)
|
364 | 367 | );
|
365 | 368 | layout.setVerticalGroup(layout.createSequentialGroup()
|
| 369 | + .addComponent(title) |
366 | 370 | .addComponent(hyperIntersectButton, PREFERRED_SIZE, DEFAULT_SIZE, PREFERRED_SIZE)
|
367 | 371 | .addComponent(hyperSigButton, PREFERRED_SIZE, DEFAULT_SIZE, PREFERRED_SIZE)
|
368 | 372 | );
|
|
0 commit comments