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


Java AWTEventMulticaster类代码示例

本文整理汇总了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);
}
 
开发者ID:jgaltidor,项目名称:VarJ,代码行数:12,代码来源:TrayIcon.java

示例2: addLocalMouseListenerFirst

import java.awt.AWTEventMulticaster; //导入依赖的package包/类
public void addLocalMouseListenerFirst(MouseListener l) {
  multicaster = AWTEventMulticaster.add(l, multicaster);
}
 
开发者ID:ajmath,项目名称:VASSAL-src,代码行数:4,代码来源:Map.java

示例3: removeLocalMouseListener

import java.awt.AWTEventMulticaster; //导入依赖的package包/类
public void removeLocalMouseListener(MouseListener l) {
  multicaster = AWTEventMulticaster.remove(multicaster, l);
}
 
开发者ID:ajmath,项目名称:VASSAL-src,代码行数:4,代码来源:Map.java

示例4: save

import java.awt.AWTEventMulticaster; //导入依赖的package包/类
protected static void save(ObjectOutputStream s, String k, EventListener l)
  throws IOException {
    AWTEventMulticaster.save(s, k, l);
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:5,代码来源:DnDEventMulticaster.java

示例5: save

import java.awt.AWTEventMulticaster; //导入依赖的package包/类
protected static void save(ObjectOutputStream s, String k, EventListener l)
  throws IOException { 
    AWTEventMulticaster.save(s, k, l);
}
 
开发者ID:jgaltidor,项目名称:VarJ,代码行数:5,代码来源:DnDEventMulticaster.java

示例6: addActionListener

import java.awt.AWTEventMulticaster; //导入依赖的package包/类
public void addActionListener (ActionListener actionListener)
{
  actionListenerList = AWTEventMulticaster.add (actionListenerList, actionListener);
}
 
开发者ID:dmolony,项目名称:DiskBrowser,代码行数:5,代码来源:AbstractFormattedDisk.java

示例7: removeActionListener

import java.awt.AWTEventMulticaster; //导入依赖的package包/类
public void removeActionListener (ActionListener actionListener)
{
  actionListenerList = AWTEventMulticaster.remove (actionListenerList, actionListener);
}
 
开发者ID:dmolony,项目名称:DiskBrowser,代码行数:5,代码来源:AbstractFormattedDisk.java

示例8: addActionListener

import java.awt.AWTEventMulticaster; //导入依赖的package包/类
@Override
public void addActionListener (ActionListener actionListener)
{
  actionListenerList = AWTEventMulticaster.add (actionListenerList, actionListener);
}
 
开发者ID:dmolony,项目名称:DiskBrowser,代码行数:6,代码来源:AppleDisk.java

示例9: removeActionListener

import java.awt.AWTEventMulticaster; //导入依赖的package包/类
@Override
public void removeActionListener (ActionListener actionListener)
{
  actionListenerList = AWTEventMulticaster.remove (actionListenerList, actionListener);
}
 
开发者ID:dmolony,项目名称:DiskBrowser,代码行数:6,代码来源:AppleDisk.java

示例10: addActionListener

import java.awt.AWTEventMulticaster; //导入依赖的package包/类
public synchronized void addActionListener(ActionListener l) {
  _listener = AWTEventMulticaster.add(_listener, l);
}
 
开发者ID:DiamondLightSource,项目名称:daq-eclipse,代码行数:4,代码来源:CategoryExplorerModel.java

示例11: removeActionListener

import java.awt.AWTEventMulticaster; //导入依赖的package包/类
public synchronized void removeActionListener(ActionListener l) {
  _listener = AWTEventMulticaster.remove(_listener, l);
}
 
开发者ID:DiamondLightSource,项目名称:daq-eclipse,代码行数:4,代码来源:CategoryExplorerModel.java

示例12: addActionListener

import java.awt.AWTEventMulticaster; //导入依赖的package包/类
public void addActionListener( ActionListener l )
{
	synchronized( sync ) {
		actionListener = AWTEventMulticaster.add( actionListener, l );
	}
}
 
开发者ID:Sciss,项目名称:JCollider,代码行数:7,代码来源:EZSlider.java

示例13: removeActionListener

import java.awt.AWTEventMulticaster; //导入依赖的package包/类
public void removeActionListener( ActionListener l )
{
	synchronized( sync ) {
		actionListener = AWTEventMulticaster.remove( actionListener, l );
	}
    }
 
开发者ID:Sciss,项目名称:JCollider,代码行数:7,代码来源:EZSlider.java

示例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);
}
 
开发者ID:shannah,项目名称:cn1,代码行数:6,代码来源:AWTEventMulticasterTest.java

示例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);
}
 
开发者ID:jgaltidor,项目名称:VarJ,代码行数:27,代码来源:TrayIcon.java


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