public void showDialog () { JCheckBox checkBox = new JCheckBox(); checkBox.setSelected(currentValue); if (showValueDialog(checkBox, description)) value = String.valueOf(checkBox.isSelected()); }
@Override public void mouseClicked(MouseEvent me) { if(jcb_preemptive.isSelected()) { jcb_preemptive.setSelected(false); } else { jcb_preemptive.setSelected(true); } } });
private boolean search(String bulk) { String a = textField.getText(); String b = bulk; if (regex.isSelected()) return Pattern.matches(a, b); if (wholew.isSelected()) a = " " + a + " "; if (!mcase.isSelected()) { a = a.toLowerCase(); b = b.toLowerCase(); } if (b.contains(a)) return true; return false; }
private void runActionPerformed(java.awt.event.ActionEvent evt) {// GEN-FIRST:event_runActionPerformed return; boolean bestOnly = cbBestOnly.isSelected(); boolean stereoMono = cbStereoMono.isSelected(); int whichChannel = AudioPlayer.LEFT_ONLY; if (rbRight.isSelected()) whichChannel = AudioPlayer.STEREO; boolean downSample = cbDownsample.isSelected(); int targetSampleRate = Integer.parseInt((String) comboSampleRate.getSelectedItem()); String soxPath = tfSoxPath.getText(); if (downSample && !new File(soxPath).exists()) { JOptionPane.showConfirmDialog(this, "Please indicate location of 'sox' tool\n" boolean highPassFilter = cbHighPassFilter.isSelected(); boolean powerNormalise = cbPowerNormalise.isSelected(); boolean maximiseAmplitude = cbGlobalAmplitude.isSelected(); double targetMaxAmplitude = Double.parseDouble(((String) comboMaxAmplitude.getSelectedItem()).substring(0, 3)); boolean trimSilences = cbTrimSilences.isSelected();
@Override public void actionPerformed(ActionEvent actionEvent) { final JCheckBox source = (JCheckBox) actionEvent.getSource(); final Resolution resolution = ((ResolutionButtonModel) source.getModel()).getResolution(); controller.setExportResolution(resolution, source.isSelected()); } };
@Override public void actionPerformed (ActionEvent e) { File file = editor.showFileLoadDialog(); if(file != null){ TextureParameter params = new TextureParameter(); params.genMipMaps = genMipMaps.isSelected(); params.minFilter = (TextureFilter)minFilterBox.getSelectedItem(); params.magFilter = (TextureFilter)magFilterBox.getSelectedItem(); Texture texture = editor.load(file.getAbsolutePath(), Texture.class, null, params); if(texture != null){ editor.setTexture(texture); } } } });
listFieldsPanel.add(teamListField); listFieldsPanel.add(new JLabel("Pinned:")); JCheckBox pinnedField = new JCheckBox("immovable during solving"); pinnedField.setSelected(teamAssignment.isPinned()); listFieldsPanel.add(pinnedField); int result = JOptionPane.showConfirmDialog(TennisPanel.this.getRootPane(), listFieldsPanel, "Select team", JOptionPane.OK_CANCEL_OPTION); if (result == JOptionPane.OK_OPTION) { Team toTeam = (Team) teamListField.getSelectedItem(); if (teamAssignment.getTeam() != toTeam) { solutionBusiness.doChangeMove(teamAssignment, "team", toTeam); boolean toPinned = pinnedField.isSelected(); if (teamAssignment.isPinned() != toPinned) { if (solutionBusiness.isSolving()) {
labelIsTamperingBase64.setToolTipText(tooltipIsTamperingBase64); labelIsTamperingBase64.addActionListener(actionEvent -> { this.checkboxIsTamperingBase64.setSelected(!this.checkboxIsTamperingBase64.isSelected()); this.actionListenerSave.actionPerformed(null); }); labelIsTamperingFunctionComment.setToolTipText(tooltipIsTamperingFunctionComment); labelIsTamperingFunctionComment.addActionListener(actionEvent -> { this.checkboxIsTamperingFunctionComment.setSelected(!this.checkboxIsTamperingFunctionComment.isSelected()); this.actionListenerSave.actionPerformed(null); }); labelIsTamperingEqualToLike.setToolTipText(tooltipIsTamperingEqualToLike); labelIsTamperingEqualToLike.addActionListener(actionEvent -> { this.checkboxIsTamperingEqualToLike.setSelected(!this.checkboxIsTamperingEqualToLike.isSelected()); this.actionListenerSave.actionPerformed(null); }); labelIsTamperingRandomCase.setToolTipText(tooltipIsTamperingRandomCase); labelIsTamperingRandomCase.addActionListener(actionEvent -> { this.checkboxIsTamperingRandomCase.setSelected(!this.checkboxIsTamperingRandomCase.isSelected()); this.actionListenerSave.actionPerformed(null); }); labelIsTamperingVersionComment.setToolTipText(tooltipIsTamperingVersionComment); labelIsTamperingVersionComment.addActionListener(actionEvent -> { this.checkboxIsTamperingVersionComment.setSelected(!this.checkboxIsTamperingVersionComment.isSelected()); this.actionListenerSave.actionPerformed(null); });
bottomPanel.add(refreshWidgetsBtn); alwaysOnTop = new JCheckBox("Always on top"); alwaysOnTop.addItemListener(ev -> config.inspectorAlwaysOnTop(alwaysOnTop.isSelected())); onConfigChanged(null); bottomPanel.add(alwaysOnTop);
public void actionPerformed(ActionEvent e) { Port port = getPort(); if (e.getSource() == labelField) { if (labelField.getText().equals(port.getDisplayLabel())) return; nodeAttributesDialog.setPortLabel(portName, labelField.getText()); } else if (e.getSource() == descriptionField) { nodeAttributesDialog.setPortDescription(portName, descriptionField.getText()); } else if (e.getSource() == widgetBox) { HumanizedObject newWidget = (HumanizedObject) widgetBox.getSelectedItem(); if (port.getWidget() == newWidget.getObject()) return; nodeAttributesDialog.setPortWidget(portName, (Port.Widget) newWidget.getObject()); } else if (e.getSource() == rangeBox) { HumanizedObject newRange = (HumanizedObject) rangeBox.getSelectedItem(); if (port.getRange() == newRange.getObject()) return; nodeAttributesDialog.setPortRange(portName, (Port.Range) newRange.getObject()); } else if (e.getSource() == minimumValueCheck) { if (minimumValueCheck.isSelected() && port.getMinimumValue() != null) return; nodeAttributesDialog.setPortMinimumValue(portName, minimumValueCheck.isSelected() ? (double) 0f : null); } else if (e.getSource() == minimumValueField) { try { } else if (e.getSource() == maximumValueCheck) { if (maximumValueCheck.isSelected() && port.getMaximumValue() != null) return; nodeAttributesDialog.setPortMaximumValue(portName, maximumValueCheck.isSelected() ? (double) 0f : null); } else if (e.getSource() == maximumValueField) { try {
}); configLogLevelCombobox.addActionListener(arg0 -> { String level = ((JComboBox) arg0.getSource()).getSelectedItem().toString(); setLogLevel(level); }); configSelectLangComboBox.addActionListener(arg0 -> { String level = ((JComboBox) arg0.getSource()).getSelectedItem().toString(); rb = Utils.getResourceBundle(level); changeLocale(); Utils.setConfigBoolean("clipboard.autorip", configClipboardAutorip.isSelected()); ClipboardUtils.setClipboardAutoRip(configClipboardAutorip.isSelected()); trayMenuAutorip.setState(configClipboardAutorip.isSelected()); Utils.configureLogger(); });
private void initWithDispatchersCheckBox() { boolean enable = false; String selected = (String) railsVersionComboBox.getSelectedItem(); if (selected != null) { RailsVersion version23 = new RailsVersion(2, 3); enable = RailsProjectUtil.versionFor(selected).compareTo(version23) >= 0; } withDispatchersCheckBox.setSelected(withDispatchersCheckBox.isSelected() && enable); withDispatchersCheckBox.setEnabled(enable); }
private void runActionPerformed(java.awt.event.ActionEvent evt) {// GEN-FIRST:event_runActionPerformed return; boolean bestOnly = cbBestOnly.isSelected(); boolean stereoMono = cbStereoMono.isSelected(); int whichChannel = AudioPlayer.LEFT_ONLY; if (rbRight.isSelected()) whichChannel = AudioPlayer.STEREO; boolean downSample = cbDownsample.isSelected(); int targetSampleRate = Integer.parseInt((String) comboSampleRate.getSelectedItem()); String soxPath = tfSoxPath.getText(); if (downSample && !new File(soxPath).exists()) { JOptionPane.showConfirmDialog(this, "Please indicate location of 'sox' tool\n" boolean highPassFilter = cbHighPassFilter.isSelected(); boolean powerNormalise = cbPowerNormalise.isSelected(); boolean maximiseAmplitude = cbGlobalAmplitude.isSelected(); double targetMaxAmplitude = Double.parseDouble(((String) comboMaxAmplitude.getSelectedItem()).substring(0, 3)); boolean trimSilences = cbTrimSilences.isSelected();
private boolean export(){ lastSupportVectorCompat = checkVectorCompat.isSelected(); lastDuration = txtDuration.getText(); if(lastOuputDir != null){ //Chose prefix String defaultPrefix = "vectalign"; String prefix = txtPrefix.getText(); if(prefix == null || prefix.trim().equals("")){ prefix = ""; } lastPrefix = prefix.toLowerCase(); //Export boolean success = AnimatedVectorDrawableUtils.export(lastOuputDir, lastDuration, lastSupportVectorCompat, lastPrefix, solution, stroke, fill, strokeColor, strokeWidth, fillColor, DEFAULT_EXPORT_SIZE, DEFAULT_EXPORT_SIZE, viewPortWidth, viewPortHeight); if(success) JOptionPane.showMessageDialog(VectAlignExportDialog.this, "Export completed ("+lastOuputDir.getAbsolutePath() +")", "VectAlign Export", JOptionPane.INFORMATION_MESSAGE); else JOptionPane.showMessageDialog(VectAlignExportDialog.this, "Unable to export files to "+lastOuputDir.getAbsolutePath() , "VectAlign Export", JOptionPane.ERROR_MESSAGE); return success; } else JOptionPane.showMessageDialog(VectAlignExportDialog.this, "Specify a valid ouput directory." , "VectAlign Export", JOptionPane.ERROR_MESSAGE); return false; }
public void showDialog () { JCheckBox checkBox = new JCheckBox(); checkBox.setSelected(currentValue); if (showValueDialog(checkBox, description)) value = String.valueOf(checkBox.isSelected()); }
@Override public void actionPerformed(ActionEvent actionEvent) { final JCheckBox source = (JCheckBox) actionEvent.getSource(); final Resolution resolution = ((ResolutionButtonModel) source.getModel()).getResolution(); if (source.isSelected()) { controller.addTargetResolution(resolution); } else { controller.removeTargetResolution(resolution); } } };
@Override public void actionPerformed (ActionEvent e) { File file = editor.showFileLoadDialog(); if(file != null){ TextureParameter params = new TextureParameter(); params.genMipMaps = genMipMaps.isSelected(); params.minFilter = (TextureFilter)minFilterBox.getSelectedItem(); params.magFilter = (TextureFilter)magFilterBox.getSelectedItem(); Texture texture = editor.load(file.getAbsolutePath(), Texture.class, null, params); if(texture != null){ editor.setTexture(texture); } } } });
public void setActive(boolean active) { if(check != null && (check.isSelected() != active)) { check.setSelected(active); sendToListeners(); } }
listFieldsPanel.add(roomListField); listFieldsPanel.add(new JLabel("Pinned:")); JCheckBox pinnedField = new JCheckBox("immovable during solving"); pinnedField.setSelected(lecture.isPinned()); listFieldsPanel.add(pinnedField); int result = JOptionPane.showConfirmDialog(CurriculumCoursePanel.this.getRootPane(), listFieldsPanel, "Select period and room", JOptionPane.OK_CANCEL_OPTION); if (result == JOptionPane.OK_OPTION) { Period toPeriod = (Period) periodListField.getSelectedItem(); if (lecture.getPeriod() != toPeriod) { solutionBusiness.doChangeMove(lecture, "period", toPeriod); Room toRoom = (Room) roomListField.getSelectedItem(); if (lecture.getRoom() != toRoom) { solutionBusiness.doChangeMove(lecture, "room", toRoom); boolean toPinned = pinnedField.isSelected(); if (lecture.isPinned() != toPinned) { if (solutionBusiness.isSolving()) {
@Override public void actionPerformed(ActionEvent ae) { JCheckBox sender = (JCheckBox)ae.getSource(); for (JCheckBox dep: dependents) { dep.setSelected(sender.isSelected()); } } }