当前位置: 首页>>代码示例>>Java>>正文


Java AbstractButton.removeActionListener方法代码示例

本文整理汇总了Java中javax.swing.AbstractButton.removeActionListener方法的典型用法代码示例。如果您正苦于以下问题:Java AbstractButton.removeActionListener方法的具体用法?Java AbstractButton.removeActionListener怎么用?Java AbstractButton.removeActionListener使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在javax.swing.AbstractButton的用法示例。


在下文中一共展示了AbstractButton.removeActionListener方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: subscribeActual

import javax.swing.AbstractButton; //导入方法依赖的package包/类
@Override
protected void subscribeActual(Observer<? super ActionEvent> observer) {
    AbstractButton w = widget;

    ActionEventConsumer aec = new ActionEventConsumer(observer, w);
    observer.onSubscribe(aec);

    w.addActionListener(aec);
    if (aec.get() == null) {
        w.removeActionListener(aec);
    }
}
 
开发者ID:akarnokd,项目名称:RxJava2Swing,代码行数:13,代码来源:ActionEventObservable.java

示例2: buttonRemoveAllActionListeners

import javax.swing.AbstractButton; //导入方法依赖的package包/类
/**
 * Removes all Action-Listeners from Buttons
 *
 * @param abstractButton - Button where to remove all ActionListeners
 */
public static void buttonRemoveAllActionListeners(AbstractButton abstractButton) {
	ActionListener[] actionListeners = abstractButton.getActionListeners();

	for(ActionListener al : actionListeners) {
		abstractButton.removeActionListener(al);
	}
}
 
开发者ID:Petschko,项目名称:Java-RPG-Maker-MV-Decrypter,代码行数:13,代码来源:Functions.java

示例3: detachButton

import javax.swing.AbstractButton; //导入方法依赖的package包/类
/** Detaches given button from this recognizer, it means stops listening
 * on its various mouse and action events
 */
public void detachButton (AbstractButton button) {
    button.removeActionListener(this);
    button.removeMouseListener(this);
    button.addMouseMotionListener(this);
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:9,代码来源:SlideGestureRecognizer.java

示例4: onDispose

import javax.swing.AbstractButton; //导入方法依赖的package包/类
@Override
protected void onDispose(AbstractButton component) {
    component.removeActionListener(this);
}
 
开发者ID:akarnokd,项目名称:RxJava2Swing,代码行数:5,代码来源:ActionEventObservable.java


注:本文中的javax.swing.AbstractButton.removeActionListener方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。