本文整理汇总了Java中java.awt.AWTEventMulticaster.add方法的典型用法代码示例。如果您正苦于以下问题:Java AWTEventMulticaster.add方法的具体用法?Java AWTEventMulticaster.add怎么用?Java AWTEventMulticaster.add使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类java.awt.AWTEventMulticaster
的用法示例。
在下文中一共展示了AWTEventMulticaster.add方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: addLocalMouseListenerFirst
import java.awt.AWTEventMulticaster; //导入方法依赖的package包/类
public void addLocalMouseListenerFirst(MouseListener l) {
multicaster = AWTEventMulticaster.add(l, multicaster);
}
示例2: addActionListener
import java.awt.AWTEventMulticaster; //导入方法依赖的package包/类
public void addActionListener (ActionListener actionListener)
{
actionListenerList = AWTEventMulticaster.add (actionListenerList, actionListener);
}
示例3: addActionListener
import java.awt.AWTEventMulticaster; //导入方法依赖的package包/类
@Override
public void addActionListener (ActionListener actionListener)
{
actionListenerList = AWTEventMulticaster.add (actionListenerList, actionListener);
}
示例4: addActionListener
import java.awt.AWTEventMulticaster; //导入方法依赖的package包/类
public synchronized void addActionListener(ActionListener l) {
_listener = AWTEventMulticaster.add(_listener, l);
}
示例5: addActionListener
import java.awt.AWTEventMulticaster; //导入方法依赖的package包/类
public void addActionListener( ActionListener l )
{
synchronized( sync ) {
actionListener = AWTEventMulticaster.add( actionListener, l );
}
}
示例6: 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);
}
示例7: addMouseMotionListener
import java.awt.AWTEventMulticaster; //导入方法依赖的package包/类
/**
* Adds the specified mouse listener to receive mouse-motion
* 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_DRAGGED</code> mouse event is 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.MouseMotionListener
* @see #removeMouseMotionListener(MouseMotionListener)
* @see #getMouseMotionListeners
*/
public synchronized void addMouseMotionListener(MouseMotionListener listener) {
if (listener == null) {
return;
}
mouseMotionListener = AWTEventMulticaster.add(mouseMotionListener, listener);
}
示例8: addActionListener
import java.awt.AWTEventMulticaster; //导入方法依赖的package包/类
/**
* Adds the specified action listener to receive
* <code>ActionEvent</code>s from this <code>TrayIcon</code>.
* Action events usually occur when a user selects the tray icon,
* using either the mouse or keyboard. The conditions in which
* action events are generated are platform-dependent.
*
* <p>Calling this method with a <code>null</code> value has no
* effect.
* <p>Refer to <a href="doc-files/AWTThreadIssues.html#ListenersThreads"
* >AWT Threading Issues</a> for details on AWT's threading model.
*
* @param listener the action listener
* @see #removeActionListener
* @see #getActionListeners
* @see java.awt.event.ActionListener
* @see #setActionCommand(String)
*/
public synchronized void addActionListener(ActionListener listener) {
if (listener == null) {
return;
}
actionListener = AWTEventMulticaster.add(actionListener, listener);
}
示例9: 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);
}
示例10: addLocalMouseListener
import java.awt.AWTEventMulticaster; //导入方法依赖的package包/类
/**
* Because MouseEvents are received in component coordinates, it is inconvenient for MouseListeners on the map to have
* to translate to map coordinates. MouseListeners added with this method will receive mouse events with points
* already translated into map coordinates.
* addLocalMouseListenerFirst inserts the new listener at the start of the chain.
*/
public void addLocalMouseListener(MouseListener l) {
multicaster = AWTEventMulticaster.add(multicaster, l);
}
示例11: addSortActionListener
import java.awt.AWTEventMulticaster; //导入方法依赖的package包/类
/**
* Registers the specified {@link ActionListener} to receive notification whenever
* the {@link JTable} is sorted by this {@link TableComparatorChooser}.
*/
public void addSortActionListener(final ActionListener sortActionListener) {
sortListener = AWTEventMulticaster.add(sortListener, sortActionListener);
}