use of javax.swing.JCheckBox 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;
}
use of javax.swing.JCheckBox in project EnrichmentMapApp by BaderLab.
the class DataSetSelector method updateTable.
private void updateTable() {
final Object[][] data = new Object[items.size()][HEARDER_NAMES.length];
int i = 0;
for (AbstractDataSet ds : items) {
data[i][SELECTED_COL_IDX] = checkedItems.get(ds);
data[i][TYPE_COL_IDX] = ds;
data[i][NAME_COL_IDX] = ds;
data[i][GENES_COL_IDX] = ds.getGeneSetsOfInterest().size();
i++;
}
final DefaultTableModel model = new DefaultTableModel(data, HEARDER_NAMES) {
@Override
public boolean isCellEditable(int row, int column) {
// TODO Allow renaming?
return false;
}
};
getTable().setModel(model);
JCheckBox tmpField = new JCheckBox();
makeSmall(tmpField);
getTable().getColumnModel().getColumn(TYPE_COL_IDX).setMaxWidth(16);
getTable().getColumnModel().getColumn(SELECTED_COL_IDX).setMaxWidth(tmpField.getPreferredSize().width);
getTable().getColumnModel().getColumn(GENES_COL_IDX).setMaxWidth(48);
getTable().getColumnModel().getColumn(TYPE_COL_IDX).setResizable(false);
getTable().getColumnModel().getColumn(SELECTED_COL_IDX).setResizable(false);
}
use of javax.swing.JCheckBox in project zaproxy by zaproxy.
the class OptionsSpiderPanel method getChkPostForm.
/**
* This method initializes the checkbox for POST form option. This option should not be enabled if the
* forms are not processed at all.
*
* @return javax.swing.JCheckBox
*/
private JCheckBox getChkPostForm() {
if (chkPostForm == null) {
chkPostForm = new JCheckBox();
chkPostForm.setText(Constant.messages.getString("spider.options.label.post"));
if (!getChkProcessForm().isSelected()) {
chkPostForm.setEnabled(false);
}
}
return chkPostForm;
}
use of javax.swing.JCheckBox in project zaproxy by zaproxy.
the class OptionsSpiderPanel method getChkParseSitemapXml.
/**
* This method initializes the Parse sitemap.xml checkbox.
*
* @return javax.swing.JCheckBox
*/
private JCheckBox getChkParseSitemapXml() {
if (parseSitemapXml == null) {
parseSitemapXml = new JCheckBox();
parseSitemapXml.setText(Constant.messages.getString("spider.options.label.sitemapxml"));
}
return parseSitemapXml;
}
use of javax.swing.JCheckBox in project zaproxy by zaproxy.
the class OptionsSpiderPanel method getChkParseRobotsTxt.
/**
* This method initializes the Parse robots.txt checkbox.
*
* @return javax.swing.JCheckBox
*/
private JCheckBox getChkParseRobotsTxt() {
if (parseRobotsTxt == null) {
parseRobotsTxt = new JCheckBox();
parseRobotsTxt.setText(Constant.messages.getString("spider.options.label.robotstxt"));
}
return parseRobotsTxt;
}
Aggregations