private JCheckBox makeOptionsCheckBox(String name, final SearchOptions opt) { final JCheckBox chBox = new JCheckBox(name); chBox.setAlignmentX(LEFT_ALIGNMENT); chBox.setSelected(options.contains(opt)); chBox.addItemListener(e -> { if (chBox.isSelected()) { options.add(opt); } else { options.remove(opt); } searchEmitter.emitSearch(); }); return chBox; }
protected JPanel createControls() { JPanel controls = new JPanel(); JCheckBox checkPhasogram = new JCheckBox("Show phasogram"); checkPhasogram.setAlignmentX(CENTER_ALIGNMENT); checkPhasogram.setSelected(show); checkPhasogram.addItemListener(new ItemListener() { public void itemStateChanged(ItemEvent e) { if (e.getStateChange() == ItemEvent.DESELECTED) { show = false; if (graph != null) graph.getTopLevelAncestor().setVisible(false); } else if (e.getStateChange() == ItemEvent.SELECTED) { show = true; update(positionCursor.x); if (graph != null) graph.getTopLevelAncestor().setVisible(true); } } }); controls.add(checkPhasogram); return controls; } }
protected JPanel createControls() { JPanel controls = new JPanel(); JCheckBox checkSpectrum = new JCheckBox("Show spectrum"); checkSpectrum.setAlignmentX(CENTER_ALIGNMENT); checkSpectrum.setSelected(show); checkSpectrum.addItemListener(new ItemListener() { public void itemStateChanged(ItemEvent e) { if (e.getStateChange() == ItemEvent.DESELECTED) { show = false; if (graph != null) graph.getTopLevelAncestor().setVisible(false); } else if (e.getStateChange() == ItemEvent.SELECTED) { show = true; update(positionCursor.x); if (graph != null) { graph.getTopLevelAncestor().setVisible(true); } } } }); controls.add(checkSpectrum); return controls; } }
protected JPanel createControls() { JPanel controls = new JPanel(); JCheckBox checkSpectrum = new JCheckBox("Show spectrum"); checkSpectrum.setAlignmentX(CENTER_ALIGNMENT); checkSpectrum.setSelected(show); checkSpectrum.addItemListener(new ItemListener() { public void itemStateChanged(ItemEvent e) { if (e.getStateChange() == ItemEvent.DESELECTED) { show = false; if (graph != null) graph.getTopLevelAncestor().setVisible(false); } else if (e.getStateChange() == ItemEvent.SELECTED) { show = true; update(positionCursor.x); if (graph != null) { graph.getTopLevelAncestor().setVisible(true); } } } }); controls.add(checkSpectrum); return controls; } }
protected JPanel createControls() { JPanel controls = new JPanel(); JCheckBox checkPhasogram = new JCheckBox("Show phasogram"); checkPhasogram.setAlignmentX(CENTER_ALIGNMENT); checkPhasogram.setSelected(show); checkPhasogram.addItemListener(new ItemListener() { public void itemStateChanged(ItemEvent e) { if (e.getStateChange() == ItemEvent.DESELECTED) { show = false; if (graph != null) graph.getTopLevelAncestor().setVisible(false); } else if (e.getStateChange() == ItemEvent.SELECTED) { show = true; update(positionCursor.x); if (graph != null) graph.getTopLevelAncestor().setVisible(true); } } }); controls.add(checkPhasogram); return controls; } }
controls.setLayout(new BoxLayout(controls, BoxLayout.Y_AXIS)); JCheckBox checkCepstrum = new JCheckBox("Show Cepstrum"); checkCepstrum.setAlignmentX(CENTER_ALIGNMENT); checkCepstrum.setSelected(show); checkCepstrum.addItemListener(new ItemListener() {
controls.setLayout(new BoxLayout(controls, BoxLayout.Y_AXIS)); JCheckBox checkCepstrum = new JCheckBox("Show Cepstrum"); checkCepstrum.setAlignmentX(CENTER_ALIGNMENT); checkCepstrum.setSelected(show); checkCepstrum.addItemListener(new ItemListener() {
controls.setLayout(new BoxLayout(controls, BoxLayout.Y_AXIS)); JCheckBox checkLPC = new JCheckBox("Show LPC"); checkLPC.setAlignmentX(CENTER_ALIGNMENT); checkLPC.setSelected(show); checkLPC.addItemListener(new ItemListener() {
controls.setLayout(new BoxLayout(controls, BoxLayout.Y_AXIS)); JCheckBox checkLPC = new JCheckBox("Show LPC"); checkLPC.setAlignmentX(CENTER_ALIGNMENT); checkLPC.setSelected(show); checkLPC.addItemListener(new ItemListener() {
box.setAlignmentX(Component.LEFT_ALIGNMENT); optionPanel.add(box);
enableDeviceSupportCheck.setAlignmentX(Component.LEFT_ALIGNMENT); contentPanel.add(enableDeviceSupportCheck);
@Override protected JComponent init() { interlock.setAlignmentX(Component.LEFT_ALIGNMENT); JPanel valuePanel = new JPanel(); valuePanel.setLayout(new BoxLayout(valuePanel, BoxLayout.PAGE_AXIS)); valuePanel.add(interlock); valuePanel.add(synchron); return valuePanel; }
@Override protected JComponent init() { dataChange.setAlignmentX(Component.LEFT_ALIGNMENT); JPanel valuePanel = new JPanel(); valuePanel.setLayout(new BoxLayout(valuePanel, BoxLayout.PAGE_AXIS)); valuePanel.add(dataChange); valuePanel.add(dataUpdate); valuePanel.add(generalInterrogation); valuePanel.add(integrity); valuePanel.add(qualityChange); return valuePanel; }
@Override protected JComponent init() { interlock.setAlignmentX(Component.LEFT_ALIGNMENT); JPanel valuePanel = new JPanel(); valuePanel.setLayout(new BoxLayout(valuePanel, BoxLayout.PAGE_AXIS)); valuePanel.add(interlock); valuePanel.add(synchron); return valuePanel; }
@Override protected JComponent init() { dataChange.setAlignmentX(Component.LEFT_ALIGNMENT); JPanel valuePanel = new JPanel(); valuePanel.setLayout(new BoxLayout(valuePanel, BoxLayout.PAGE_AXIS)); valuePanel.add(dataChange); valuePanel.add(dataUpdate); valuePanel.add(generalInterrogation); valuePanel.add(integrity); valuePanel.add(qualityChange); return valuePanel; }
private JCheckBox createOnlySelectedNodesCheckBox() { final JCheckBox checkBoxOnlySpecificNodes = createCheckBox("slide.showonlyselected"); checkBoxOnlySpecificNodes.setAlignmentX(Component.CENTER_ALIGNMENT); checkBoxOnlySpecificNodes.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { UndoableSlide.of(slide).setShowsOnlySpecificNodes(! slide.showsOnlySpecificNodes()); } }); return checkBoxOnlySpecificNodes; }
private JCheckBox createShowAncestorsCheckBox() { final JCheckBox checkBoxShowAncestors = createCheckBox("slide.showancestors"); checkBoxShowAncestors.setAlignmentX(Component.CENTER_ALIGNMENT); checkBoxShowAncestors.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { UndoableSlide.of(slide).setShowsAncestors(! slide.showsAncestors()); } }); return checkBoxShowAncestors; }
private JCheckBox createShowDescendantsCheckBox() { final JCheckBox checkBoxShowDescendants = createCheckBox("slide.descendants"); checkBoxShowDescendants.setAlignmentX(Component.CENTER_ALIGNMENT); checkBoxShowDescendants.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { UndoableSlide.of(slide).setShowsDescendants(! slide.showsDescendants()); } }); return checkBoxShowDescendants; }
public JComponent createCustomizedImportsComponent() { JPanel panel = new JPanel(); panel.setLayout(new BoxLayout(panel, BoxLayout.Y_AXIS)); customizeImports = new JCheckBox("Manually specify import declarations."); panel.add(customizeImports); customizeImports.setAlignmentX(LEFT_ALIGNMENT); customizeImports.addActionListener(e -> { getWizard().setCustomizeImports(customizeImports.isSelected()); }); JLabel label1 = new JLabel("This is generally not needed as Protege will choose a reasonable default."); label1.setAlignmentX(LEFT_ALIGNMENT); panel.add(label1); return panel; }
private void addBooleanProperty(String com){ JCheckBox checkbox=new JCheckBox(ENVIRONMENT.getTranslation(com),ENVIRONMENT.getBoolean(com)); checkbox.setAlignmentX(0); checkbox.setActionCommand(com); checkbox.addActionListener(this); add(checkbox); } private void addIntegerProperty(String com){