本文整理了Java中javax.swing.Timer.getListeners()
方法的一些代码示例,展示了Timer.getListeners()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Timer.getListeners()
方法的具体详情如下:
包路径:javax.swing.Timer
类名称:Timer
方法名:getListeners
暂无
代码示例来源:origin: net.sf.squirrel-sql.thirdparty-non-maven/openide
/** Removes timer and all listeners. */
private void removeTimer () {
if (timer!=null) {
ActionListener[] l = (ActionListener[])timer.getListeners (ActionListener.class);
for (int i=0; i<l.length; i++) {
timer.removeActionListener (l[i]);
}
timer.stop ();
timer = null;
}
}
代码示例来源:origin: org.netbeans.api/org-openide-explorer
/** Removes timer and all listeners. */
private void removeTimer() {
if (timer != null) {
ActionListener[] l = timer.getListeners (ActionListener.class);
for (int i = 0; i < l.length; i++) {
timer.removeActionListener(l[i]);
}
timer.stop();
timer = null;
}
}
代码示例来源:origin: org.netbeans.api/org-openide-explorer
/** Removes timer and all listeners. */
private void removeTimer() {
if (timer != null) {
ActionListener[] l = timer.getListeners(ActionListener.class);
for (int i = 0; i < l.length; i++) {
timer.removeActionListener(l[i]);
}
timer.stop();
timer = null;
}
}
代码示例来源:origin: net.sf.squirrel-sql.thirdpary-non-maven/openide
/** Removes timer and all listeners. */
private void removeTimer () {
if (timer!=null) {
ActionListener[] l = (ActionListener[])timer.getListeners (ActionListener.class);
for (int i=0; i<l.length; i++) {
timer.removeActionListener (l[i]);
}
timer.stop ();
timer = null;
}
}
代码示例来源:origin: net.java.abeille/abeille
/**
* Dispose the dialog
*/
public void dispose() {
super.dispose();
JETAComponentCleanser cleanser = new JETAComponentCleanser();
cleanser.cleanse(this);
m_timer.stop();
ActionListener[] als = (ActionListener[]) (m_timer.getListeners(ActionListener.class));
if (als != null) {
for (int index = 0; index < als.length; index++) {
m_timer.removeActionListener(als[index]);
}
}
m_cmdListener = null;
m_controller = null;
if (m_validators != null)
m_validators.clear();
m_initialFocusComponent = null;
if (m_listeners != null)
m_listeners.clear();
if (m_contentpane != null) {
m_contentpane.removeAll();
m_contentpane = null;
}
m_primaryPanel = null;
}
代码示例来源:origin: LibraryOfCongress/bagger
@Override
public void actionPerformed(ActionEvent evt) {
// check if task is completed or user has clicked cancel button
if (task.hasUserTriedToCancel() || task.isDone()) {
// we are done
progressMonitor.close();
Toolkit.getDefaultToolkit().beep();
timer.stop();
log.info("Stopped the timer");
// getting an array of Action Listeners from Timer Listener (will have
// only one element)
ActionListener[] als = timer.getListeners(ActionListener.class);
// Removing Action Listener from timer
if (als.length > 0){
timer.removeActionListener(als[0]);
}
if (longRunningProcess != null && !task.isDone()) {
log.info("Trying to cancel the long running process: {}", longRunningProcess);
longRunningProcess.cancel();
}
}
}
}
内容来源于网络,如有侵权,请联系作者删除!