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


Java AWTEventMulticaster.getListeners方法代码示例

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


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

示例1: getListeners

import java.awt.AWTEventMulticaster; //导入方法依赖的package包/类
<T extends EventListener> T[] getListeners(Class<T> listenerType) { 
    EventListener l = null; 
    if (listenerType == MouseListener.class) {
        l = mouseListener;
    } else if (listenerType == MouseMotionListener.class) {
        l = mouseMotionListener; 
    } else if (listenerType == ActionListener.class) { 
        l = actionListener;
    }
    return AWTEventMulticaster.getListeners(l, listenerType);
}
 
开发者ID:jgaltidor,项目名称:VarJ,代码行数:12,代码来源:TrayIcon.java

示例2: test_getListeners

import java.awt.AWTEventMulticaster; //导入方法依赖的package包/类
public void test_getListeners() {
    DefaultEditorKit.PasteAction pa = new DefaultEditorKit.PasteAction();
    DefaultEditorKit.PasteAction[] result = AWTEventMulticaster.getListeners(pa, DefaultEditorKit.PasteAction.class);
    assertNotNull(result);
}
 
开发者ID:shannah,项目名称:cn1,代码行数:6,代码来源:AWTEventMulticasterTest.java

示例3: getMouseListeners

import java.awt.AWTEventMulticaster; //导入方法依赖的package包/类
/**
 * Returns an array of all the mouse listeners
 * registered on this <code>TrayIcon</code>.
 *
 * @return all of the <code>MouseListeners</code> registered on
 * this <code>TrayIcon</code> or an empty array if no mouse
 * listeners are currently registered
 *
 * @see      #addMouseListener(MouseListener)
 * @see      #removeMouseListener(MouseListener)
 * @see      java.awt.event.MouseListener
 */
public synchronized MouseListener[] getMouseListeners() {
    return AWTEventMulticaster.getListeners(mouseListener, MouseListener.class);
}
 
开发者ID:openjdk,项目名称:jdk7-jdk,代码行数:16,代码来源:TrayIcon.java

示例4: getMouseMotionListeners

import java.awt.AWTEventMulticaster; //导入方法依赖的package包/类
/**
 * Returns an array of all the mouse-motion listeners
 * registered on this <code>TrayIcon</code>.
 *
 * @return all of the <code>MouseInputListeners</code> registered on
 * this <code>TrayIcon</code> or an empty array if no mouse
 * listeners are currently registered
 *
 * @see      #addMouseMotionListener(MouseMotionListener)
 * @see      #removeMouseMotionListener(MouseMotionListener)
 * @see      java.awt.event.MouseMotionListener
 */
public synchronized MouseMotionListener[] getMouseMotionListeners() {
    return AWTEventMulticaster.getListeners(mouseMotionListener, MouseMotionListener.class);
}
 
开发者ID:openjdk,项目名称:jdk7-jdk,代码行数:16,代码来源:TrayIcon.java

示例5: getActionListeners

import java.awt.AWTEventMulticaster; //导入方法依赖的package包/类
/**
 * Returns an array of all the action listeners
 * registered on this <code>TrayIcon</code>.
 *
 * @return all of the <code>ActionListeners</code> registered on
 * this <code>TrayIcon</code> or an empty array if no action
 * listeners are currently registered
 *
 * @see      #addActionListener(ActionListener)
 * @see      #removeActionListener(ActionListener)
 * @see      java.awt.event.ActionListener
 */
public synchronized ActionListener[] getActionListeners() {
    return AWTEventMulticaster.getListeners(actionListener, ActionListener.class);
}
 
开发者ID:openjdk,项目名称:jdk7-jdk,代码行数:16,代码来源:TrayIcon.java


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