本文整理了Java中javax.swing.JCheckBox.removeActionListener()
方法的一些代码示例,展示了JCheckBox.removeActionListener()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JCheckBox.removeActionListener()
方法的具体详情如下:
包路径:javax.swing.JCheckBox
类名称:JCheckBox
方法名:removeActionListener
暂无
代码示例来源:origin: libgdx/libgdx
protected static void setValue(JCheckBox checkBox, boolean isSelected){
ActionListener[] listeners = checkBox.getActionListeners();
ActionListener listener = null;
if(listeners != null && listeners.length >0){
listener = listeners[0];
checkBox.removeActionListener(listener);
}
checkBox.setSelected(isSelected);
if(listener != null) checkBox.addActionListener(listener);
}
代码示例来源:origin: libgdx/libgdx
protected static void setValue(JCheckBox checkBox, boolean isSelected){
ActionListener[] listeners = checkBox.getActionListeners();
ActionListener listener = null;
if(listeners != null && listeners.length >0){
listener = listeners[0];
checkBox.removeActionListener(listener);
}
checkBox.setSelected(isSelected);
if(listener != null) checkBox.addActionListener(listener);
}
代码示例来源:origin: winterDroid/android-drawable-importer-intellij-plugin
private void updateTargetResolutions() {
final Set<Resolution> resolutions = controller.getTargetResolutions();
for (JCheckBox checkBox : Arrays.asList(LDPICheckBox,
MDPICheckBox,
HDPICheckBox,
XHDPICheckBox,
XXHDPICheckBox,
XXXHDPICheckBox,
TVDPICheckBox)) {
checkBox.removeActionListener(resolutionActionListener);
final Resolution resolution = ((ResolutionButtonModel) checkBox.getModel()).getResolution();
checkBox.setSelected(resolutions.contains(resolution));
checkBox.addActionListener(resolutionActionListener);
}
}
代码示例来源:origin: winterDroid/android-drawable-importer-intellij-plugin
private void updateExportResolutions() {
final Set<Resolution> resolutions = controller.getExportResolutions();
for (JCheckBox checkBox : Arrays.asList(LDPICheckBox,
MDPICheckBox,
HDPICheckBox,
XHDPICheckBox,
XXHDPICheckBox,
XXXHDPICheckBox,
TVDPICheckBox)) {
checkBox.removeActionListener(resolutionActionListener);
final Resolution resolution = ((ResolutionButtonModel) checkBox.getModel()).getResolution();
checkBox.setSelected(resolutions.contains(resolution));
checkBox.addActionListener(resolutionActionListener);
}
}
代码示例来源:origin: winterDroid/android-drawable-importer-intellij-plugin
private void updateTargetResolutions() {
final Set<Resolution> resolutions = controller.getTargetResolutions();
for (JCheckBox checkBox : Arrays.asList(LDPICheckBox,
MDPICheckBox,
HDPICheckBox,
XHDPICheckBox,
XXHDPICheckBox,
XXXHDPICheckBox,
TVDPICheckBox)) {
checkBox.removeActionListener(resolutionActionListener);
final Resolution resolution = ((ResolutionButtonModel) checkBox.getModel()).getResolution();
checkBox.setSelected(resolutions.contains(resolution));
final int[] sizes = controller.getScaledSize(resolution);
checkBox.setText(String.format("%s (%d px x %d px)", resolution, sizes[0], sizes[1]));
checkBox.addActionListener(resolutionActionListener);
}
}
代码示例来源:origin: atdl4j/atdl4j
public void removeListener(SwingListener listener) {
for ( JCheckBox b : multiCheckBox )
{
b.removeActionListener(listener);
}
}
代码示例来源:origin: org.codehaus.mevenide/nb-project
public void ancestorRemoved(AncestorEvent event) {
component.removeActionListener(this);
}
代码示例来源:origin: antlr/antlrworks
public void unbindFromPreferences(JCheckBox component, String key) {
ActionListener actionListener = (ActionListener) bindings.remove(key);
if(actionListener != null) {
component.removeActionListener(actionListener);
}
}
代码示例来源:origin: com.badlogicgames.gdx/gdx-tools
protected static void setValue(JCheckBox checkBox, boolean isSelected){
ActionListener[] listeners = checkBox.getActionListeners();
ActionListener listener = null;
if(listeners != null && listeners.length >0){
listener = listeners[0];
checkBox.removeActionListener(listener);
}
checkBox.setSelected(isSelected);
if(listener != null) checkBox.addActionListener(listener);
}
代码示例来源:origin: org.netbeans.api/org-netbeans-modules-vmd-midp
void cleanUp() {
checkBox.removeActionListener(this);
checkBox = null;
this.removeAll();
}
代码示例来源:origin: org.netbeans.api/org-netbeans-modules-vmd-midp
void cleanUp() {
if (checkBox != null) {
checkBox.removeActionListener(this);
checkBox = null;
}
this.removeAll();
}
代码示例来源:origin: MegaMek/megamek
private void refreshSpaceGround() {
chkIncludeGround.removeActionListener(this);
chkIncludeSpace.removeActionListener(this);
boolean inSpace = mapSettings.getMedium() == MapSettings.MEDIUM_SPACE;
chkIncludeSpace.setSelected(inSpace);
chkIncludeGround.setSelected(!inSpace);
comboMapType.setEnabled(!inSpace);
butMapSize.setEnabled(!inSpace);
comboMapSizes.setEnabled(!inSpace);
buttonBoardPreview.setEnabled(!inSpace);
lisBoardsSelected.setEnabled(!inSpace);
butChange.setEnabled(!inSpace);
lisBoardsAvailable.setEnabled(!inSpace);
chkRotateBoard.setEnabled(!inSpace);
butSpaceSize.setEnabled(inSpace);
chkIncludeGround.addActionListener(this);
chkIncludeSpace.addActionListener(this);
}
代码示例来源:origin: org.netbeans.api/org-netbeans-modules-vmd-midp
void cleanUp() {
if (textField != null && textField.getDocument() != null) {
textField.getDocument().removeDocumentListener(this);
}
textField = null;
unlockedCheckBox.removeActionListener(this);
unlockedCheckBox = null;
this.removeAll();
}
代码示例来源:origin: org.boofcv/boofcv-swing
private void handleModeChange( boolean relative , boolean updateValues) {
if( modeRelative == relative )
return;
this.modeRelative = relative;
toggleFixed.removeActionListener(this);
toggleFixed.setSelected(relative);
toggleFixed.addActionListener(this);
if( updateValues ) {
if (modeRelative) {
updateValues(valueFraction.fraction, valueFraction.length);
} else {
updateValues(valueFixed.fraction, valueFixed.length);
}
}
}
代码示例来源:origin: t28hub/json2java4idea
@Override
public void dispose() {
Collections.list(styleGroup.getElements()).forEach(button -> button.removeActionListener(this));
classNamePrefixField.getDocument().removeDocumentListener(this);
classNameSuffixField.getDocument().removeDocumentListener(this);
generatedAnnotationCheckBox.removeActionListener(this);
suppressWarningsAnnotationCheckBox.removeActionListener(this);
if (previewEditor == null || previewEditor.isDisposed()) {
return;
}
EditorFactory.getInstance().releaseEditor(previewEditor);
}
代码示例来源:origin: org.japura/japura-gui
@Override
protected void unregisterModel() {
if (checkBoxListener != null) {
getCheckBox().removeActionListener(checkBoxListener);
}
if (modelListener != null) {
getModel().removeListCheckListener(modelListener);
}
checkBoxListener = null;
modelListener = null;
}
代码示例来源:origin: org.boofcv/demonstrations
public void setConfiguration(ConfigThreshold configuration) {
comboType.removeActionListener(this);
spinnerScale.removeChangeListener(this);
buttonUpDown.removeActionListener(this);
checkOtsu2.removeActionListener(this);
comboType.setSelectedIndex(configuration.type.ordinal());
controlWidth.setValue(configuration.width);
spinnerScale.setValue(configuration.scale);
buttonUpDown.setSelected(configuration.down);
type = configuration.type;
regionWidth = configuration.width.copy();
scale = configuration.scale;
down = configuration.down;
if( type == ThresholdType.FIXED ) {
fixedThreshold = (int)configuration.fixedThreshold;
} else if( type == ThresholdType.BLOCK_MIN_MAX) {
minimumSpread = ((ConfigThresholdBlockMinMax)configuration).minimumSpread;
} else if( type == ThresholdType.BLOCK_OTSU ||
type == ThresholdType.LOCAL_OTSU ) {
otsuTuning = (int)((ConfigThresholdLocalOtsu)configuration).tuning;
useOtsu2 = ((ConfigThresholdLocalOtsu)configuration).useOtsu2;
}
comboType.addActionListener(this);
spinnerScale.addChangeListener(this);
buttonUpDown.addActionListener(this);
checkOtsu2.addActionListener(this);
updateThresholdValue();
}
代码示例来源:origin: MegaMek/megamek
/**
* Remove thsi SkinSpecEditor as a listener from all components.
*/
private void removeListeners() {
skinSpecCompList.removeListSelectionListener(this);
enableBorders.removeActionListener(this);
currSkinCombo.removeActionListener(this);
addButton.removeActionListener(this);
addCompButton.removeActionListener(this);
removeCompButton.removeActionListener(this);
saveSkinButton.removeActionListener(this);
resetSkinButton.removeActionListener(this);
}
代码示例来源:origin: ijpb/MorphoLibJ
/**
* Overwrite windowClosing to display the input image after closing
* the GUI and shut down the executor service
*/
@Override
public void windowClosing( WindowEvent e )
{
super.windowClosing( e );
if( null != inputImage )
{
if( null != displayImage )
inputImage.setSlice( displayImage.getCurrentSlice() );
// display input image
inputImage.getWindow().setVisible( true );
}
// remove listeners
segmentButton.removeActionListener( listener );
resultDisplayList.removeActionListener( listener );
toggleOverlayCheckBox.removeActionListener( listener );
resultButton.removeActionListener( listener );
if( null != displayImage )
{
//displayImage.close();
displayImage = null;
}
// shut down executor service
exec.shutdownNow();
}
代码示例来源:origin: nroduit/Weasis
@Override
public void initValues(AcquireImageInfo info, AcquireImageValues values) {
ViewCanvas<ImageElement> view = EventManager.getInstance().getSelectedViewPane();
info.clearPreProcess();
AcquireImageValues next = info.getNextValues();
next.setContrast(values.getContrast());
next.setBrightness(values.getBrightness());
next.setAutoLevel(values.isAutoLevel());
autoLevelBtn.removeActionListener(autoLevelListener);
contrastPanel.removeChangeListener(this);
brightnessPanel.removeChangeListener(this);
contrastPanel.setSliderValue(next.getContrast());
brightnessPanel.setSliderValue(next.getBrightness());
autoLevelBtn.setSelected(next.isAutoLevel());
autoLevelBtn.addActionListener(autoLevelListener);
contrastPanel.addChangeListener(this);
brightnessPanel.addChangeListener(this);
repaint();
applyNextValues();
autoLevelListener.applyNextValues();
info.applyPreProcess(view);
}
内容来源于网络,如有侵权,请联系作者删除!