本文整理汇总了Java中java.awt.AWTEventMulticaster类的典型用法代码示例。如果您正苦于以下问题:Java AWTEventMulticaster类的具体用法?Java AWTEventMulticaster怎么用?Java AWTEventMulticaster使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
AWTEventMulticaster类属于java.awt包,在下文中一共展示了AWTEventMulticaster类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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);
}
示例2: addLocalMouseListenerFirst
import java.awt.AWTEventMulticaster; //导入依赖的package包/类
public void addLocalMouseListenerFirst(MouseListener l) {
multicaster = AWTEventMulticaster.add(l, multicaster);
}
示例3: removeLocalMouseListener
import java.awt.AWTEventMulticaster; //导入依赖的package包/类
public void removeLocalMouseListener(MouseListener l) {
multicaster = AWTEventMulticaster.remove(multicaster, l);
}
示例4: save
import java.awt.AWTEventMulticaster; //导入依赖的package包/类
protected static void save(ObjectOutputStream s, String k, EventListener l)
throws IOException {
AWTEventMulticaster.save(s, k, l);
}
示例5: save
import java.awt.AWTEventMulticaster; //导入依赖的package包/类
protected static void save(ObjectOutputStream s, String k, EventListener l)
throws IOException {
AWTEventMulticaster.save(s, k, l);
}
示例6: addActionListener
import java.awt.AWTEventMulticaster; //导入依赖的package包/类
public void addActionListener (ActionListener actionListener)
{
actionListenerList = AWTEventMulticaster.add (actionListenerList, actionListener);
}
示例7: removeActionListener
import java.awt.AWTEventMulticaster; //导入依赖的package包/类
public void removeActionListener (ActionListener actionListener)
{
actionListenerList = AWTEventMulticaster.remove (actionListenerList, actionListener);
}
示例8: addActionListener
import java.awt.AWTEventMulticaster; //导入依赖的package包/类
@Override
public void addActionListener (ActionListener actionListener)
{
actionListenerList = AWTEventMulticaster.add (actionListenerList, actionListener);
}
示例9: removeActionListener
import java.awt.AWTEventMulticaster; //导入依赖的package包/类
@Override
public void removeActionListener (ActionListener actionListener)
{
actionListenerList = AWTEventMulticaster.remove (actionListenerList, actionListener);
}
示例10: addActionListener
import java.awt.AWTEventMulticaster; //导入依赖的package包/类
public synchronized void addActionListener(ActionListener l) {
_listener = AWTEventMulticaster.add(_listener, l);
}
示例11: removeActionListener
import java.awt.AWTEventMulticaster; //导入依赖的package包/类
public synchronized void removeActionListener(ActionListener l) {
_listener = AWTEventMulticaster.remove(_listener, l);
}
示例12: addActionListener
import java.awt.AWTEventMulticaster; //导入依赖的package包/类
public void addActionListener( ActionListener l )
{
synchronized( sync ) {
actionListener = AWTEventMulticaster.add( actionListener, l );
}
}
示例13: removeActionListener
import java.awt.AWTEventMulticaster; //导入依赖的package包/类
public void removeActionListener( ActionListener l )
{
synchronized( sync ) {
actionListener = AWTEventMulticaster.remove( actionListener, l );
}
}
示例14: 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);
}
示例15: addMouseListener
import java.awt.AWTEventMulticaster; //导入依赖的package包/类
/**
* Adds the specified mouse listener to receive mouse events from
* this <code>TrayIcon</code>. Calling this method with a
* <code>null</code> value has no effect.
*
* <p><b>Note</b>: The {@code MouseEvent}'s coordinates (received
* from the {@code TrayIcon}) are relative to the screen, not the
* {@code TrayIcon}.
*
* <p> <b>Note: </b>The <code>MOUSE_ENTERED</code> and
* <code>MOUSE_EXITED</code> mouse events are not supported.
* <p>Refer to <a href="doc-files/AWTThreadIssues.html#ListenersThreads"
* >AWT Threading Issues</a> for details on AWT's threading model.
*
* @param listener the mouse listener
* @see java.awt.event.MouseEvent
* @see java.awt.event.MouseListener
* @see #removeMouseListener(MouseListener)
* @see #getMouseListeners
*/
public synchronized void addMouseListener(MouseListener listener) {
if (listener == null) {
return;
}
mouseListener = AWTEventMulticaster.add(mouseListener, listener);
}