本文整理汇总了Java中java.awt.Component.addMouseMotionListener方法的典型用法代码示例。如果您正苦于以下问题:Java Component.addMouseMotionListener方法的具体用法?Java Component.addMouseMotionListener怎么用?Java Component.addMouseMotionListener使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类java.awt.Component
的用法示例。
在下文中一共展示了Component.addMouseMotionListener方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: EventBinding
import java.awt.Component; //导入方法依赖的package包/类
/**
* Creates a new Binding.
* @param c the JOGLUI canvas
* @param d the FengGUI Display
*/
public EventBinding(Component c, Display d)
{
display = d;
// makes FengGUI listen to tab keys
// http://answers.google.com/answers/threadview?id=126916
c.setFocusTraversalKeysEnabled(false);
c.addMouseListener(this);
c.addMouseMotionListener(this);
c.addMouseWheelListener(this);
c.addKeyListener(this);
}
示例2: subscribeActual
import java.awt.Component; //导入方法依赖的package包/类
@Override
protected void subscribeActual(Observer<? super MouseEvent> observer) {
Component w = widget;
int f = flags;
MouseEventConsumer aec = new MouseEventConsumer(observer, w, f);
observer.onSubscribe(aec);
if ((f & 1) != 0) {
w.addMouseListener(aec);
}
if ((f & 2) != 0) {
w.addMouseMotionListener(aec);
}
if ((f & 4) != 0) {
w.addMouseWheelListener(aec);
}
if (aec.get() == null) {
aec.onDispose(w);
}
}
示例3: addToComponent
import java.awt.Component; //导入方法依赖的package包/类
public void addToComponent(final Component c) {
c.addMouseListener(listener);
c.addMouseMotionListener(listener);
}
示例4: MouseManager
import java.awt.Component; //导入方法依赖的package包/类
public MouseManager(Component component, G3DSys gs) {
component.addMouseListener(this);
component.addMouseMotionListener(this);
c = component;
gsys = gs;
}
示例5: addListeners
import java.awt.Component; //导入方法依赖的package包/类
private void addListeners(Component com) {
com.addMouseListener(ma);
com.addMouseMotionListener(mma);
}