use of javax.swing.GroupLayout in project EnrichmentMapApp by BaderLab.
the class LegendPanel method getNodeLegendPanel.
BasicCollapsiblePanel getNodeLegendPanel() {
if (nodeLegendPanel == null) {
nodeLegendPanel = new BasicCollapsiblePanel("Nodes (Gene Sets)");
nodeLegendPanel.setCollapsed(false);
final GroupLayout layout = new GroupLayout(nodeLegendPanel.getContentPane());
nodeLegendPanel.getContentPane().setLayout(layout);
layout.setAutoCreateContainerGaps(false);
layout.setAutoCreateGaps(true);
layout.setHorizontalGroup(layout.createParallelGroup(Alignment.CENTER, true).addComponent(getNodeColorPanel(), DEFAULT_SIZE, DEFAULT_SIZE, Short.MAX_VALUE).addComponent(getNodeShapePanel(), DEFAULT_SIZE, DEFAULT_SIZE, Short.MAX_VALUE).addComponent(getNodeChartPanel(), DEFAULT_SIZE, DEFAULT_SIZE, Short.MAX_VALUE));
layout.setVerticalGroup(layout.createSequentialGroup().addComponent(getNodeColorPanel(), PREFERRED_SIZE, DEFAULT_SIZE, PREFERRED_SIZE).addComponent(getNodeShapePanel(), PREFERRED_SIZE, DEFAULT_SIZE, PREFERRED_SIZE).addComponent(getNodeChartPanel(), PREFERRED_SIZE, DEFAULT_SIZE, PREFERRED_SIZE));
if (isAquaLAF())
nodeLegendPanel.setOpaque(false);
}
return nodeLegendPanel;
}
use of javax.swing.GroupLayout 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();
}
use of javax.swing.GroupLayout in project EnrichmentMapApp by BaderLab.
the class LegendPanel method getNodeShapePanel.
JPanel getNodeShapePanel() {
if (nodeShapePanel == null) {
nodeShapePanel = createStyleLegendPanel(null);
nodeShapePanel.setToolTipText("Node Shape");
GroupLayout layout = (GroupLayout) nodeShapePanel.getLayout();
layout.setHorizontalGroup(layout.createSequentialGroup().addGap(0, 0, Short.MAX_VALUE).addComponent(nodeShapeIcon1, PREFERRED_SIZE, DEFAULT_SIZE, PREFERRED_SIZE).addComponent(nodeShapeDesc1, PREFERRED_SIZE, DEFAULT_SIZE, PREFERRED_SIZE).addPreferredGap(ComponentPlacement.UNRELATED).addComponent(nodeShapeIcon2, PREFERRED_SIZE, DEFAULT_SIZE, PREFERRED_SIZE).addComponent(nodeShapeDesc2, PREFERRED_SIZE, DEFAULT_SIZE, PREFERRED_SIZE).addGap(0, 0, Short.MAX_VALUE));
layout.setVerticalGroup(layout.createParallelGroup(Alignment.CENTER, false).addComponent(nodeShapeIcon1).addComponent(nodeShapeDesc1).addComponent(nodeShapeIcon2).addComponent(nodeShapeDesc2));
}
return nodeShapePanel;
}
use of javax.swing.GroupLayout in project EnrichmentMapApp by BaderLab.
the class MasterDetailDialogPage method createTitlePanel.
private JPanel createTitlePanel() {
JLabel label = new JLabel("Data Sets:");
SwingUtil.makeSmall(label);
JButton addButton = SwingUtil.createIconButton(iconManager, IconManager.ICON_PLUS, "Add Data Set");
scanButton = SwingUtil.createIconButton(iconManager, IconManager.ICON_FOLDER_O, "Scan Folder for Data Sets");
deleteButton = SwingUtil.createIconButton(iconManager, IconManager.ICON_TRASH_O, "Delete Data Set");
addButton.addActionListener(e -> addNewDataSetToList());
deleteButton.addActionListener(e -> deleteSelectedItems());
scanButton.addActionListener(e -> scan());
JPanel panel = new JPanel();
GroupLayout layout = new GroupLayout(panel);
panel.setLayout(layout);
layout.setAutoCreateGaps(true);
layout.setAutoCreateContainerGaps(false);
layout.setHorizontalGroup(layout.createSequentialGroup().addComponent(label).addPreferredGap(LayoutStyle.ComponentPlacement.RELATED, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE).addComponent(scanButton).addComponent(addButton).addComponent(deleteButton));
layout.setVerticalGroup(layout.createParallelGroup(Alignment.BASELINE).addComponent(label).addComponent(scanButton).addComponent(addButton).addComponent(deleteButton));
return panel;
}
use of javax.swing.GroupLayout in project EnrichmentMapApp by BaderLab.
the class HeatMapMainPanel method createToolbarPanel.
private JPanel createToolbarPanel() {
gradientLegendPanel = new GradientLegendPanel(table);
showValuesCheck = new JCheckBox("Show Values");
JLabel operatorLabel = new JLabel("Genes:");
operatorCombo = new JComboBox<>();
JLabel normLabel = new JLabel("Expressions:");
normCombo = new JComboBox<>();
SwingUtil.makeSmall(operatorLabel, operatorCombo, normLabel, normCombo, showValuesCheck);
operatorCombo.addItem(new ComboItem<>(Operator.UNION, "Union"));
operatorCombo.addItem(new ComboItem<>(Operator.INTERSECTION, "Intersection"));
operatorCombo.setSelectedItem(ComboItem.of(Operator.UNION));
normCombo.addItem(new ComboItem<>(Transform.AS_IS, "Expression Values"));
normCombo.addItem(new ComboItem<>(Transform.ROW_NORMALIZE, "Row Normalize"));
normCombo.addItem(new ComboItem<>(Transform.LOG_TRANSFORM, "Log Transform"));
normCombo.addItem(new ComboItem<>(Transform.COMPRESS_MEDIAN, "Compress (Median)"));
normCombo.addItem(new ComboItem<>(Transform.COMPRESS_MIN, "Compress (Min)"));
normCombo.addItem(new ComboItem<>(Transform.COMPRESS_MAX, "Compress (Max)"));
normCombo.setSelectedItem(ComboItem.of(Transform.COMPRESS_MEDIAN));
operatorCombo.addActionListener(operatorActionListener = e -> updateSetting_Operator(getOperator()));
normCombo.addActionListener(normActionListener = e -> updateSetting_Transform(getTransform()));
showValuesCheck.addActionListener(showValueActionListener = e -> updateSetting_ShowValues(isShowValues()));
JButton plusButton = SwingUtil.createIconButton(iconManager, IconManager.ICON_PLUS, "Add Rankings...");
JButton gearButton = SwingUtil.createIconButton(iconManager, IconManager.ICON_GEAR, "Settings");
JButton menuButton = SwingUtil.createIconButton(iconManager, IconManager.ICON_EXTERNAL_LINK, "Export");
LookAndFeelUtil.equalizeSize(gearButton, menuButton);
plusButton.addActionListener(e -> addRankings());
gearButton.addActionListener(e -> settingsPanel.popup(gearButton));
menuButton.addActionListener(this::showExportMenu);
JPanel panel = new JPanel();
GroupLayout layout = new GroupLayout(panel);
panel.setLayout(layout);
layout.setAutoCreateContainerGaps(false);
layout.setAutoCreateGaps(!LookAndFeelUtil.isAquaLAF());
layout.setHorizontalGroup(layout.createSequentialGroup().addComponent(gradientLegendPanel, 180, 180, 180).addGap(0, 0, Short.MAX_VALUE).addComponent(operatorLabel).addComponent(operatorCombo, PREFERRED_SIZE, DEFAULT_SIZE, PREFERRED_SIZE).addGap(5).addComponent(normLabel).addComponent(normCombo, PREFERRED_SIZE, DEFAULT_SIZE, PREFERRED_SIZE).addGap(5).addComponent(showValuesCheck).addGap(5).addComponent(plusButton).addComponent(gearButton).addComponent(menuButton));
layout.setVerticalGroup(layout.createParallelGroup(Alignment.BASELINE).addComponent(gradientLegendPanel).addComponent(operatorLabel).addComponent(operatorCombo).addComponent(normLabel).addComponent(normCombo).addComponent(showValuesCheck).addComponent(plusButton).addComponent(gearButton).addComponent(menuButton));
panel.setOpaque(false);
return panel;
}
Aggregations