本文整理汇总了Java中com.jme3.input.event.MouseButtonEvent.setTime方法的典型用法代码示例。如果您正苦于以下问题:Java MouseButtonEvent.setTime方法的具体用法?Java MouseButtonEvent.setTime怎么用?Java MouseButtonEvent.setTime使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.jme3.input.event.MouseButtonEvent
的用法示例。
在下文中一共展示了MouseButtonEvent.setTime方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: mousePressed
import com.jme3.input.event.MouseButtonEvent; //导入方法依赖的package包/类
public void mousePressed(MouseEvent awtEvt) {
int actualX = awtEvt.getX();
int actualY = component.getHeight() - awtEvt.getY();
MouseButtonEvent evt = new MouseButtonEvent(getJMEButtonIndex(awtEvt), true, actualX, actualY);
evt.setTime(awtEvt.getWhen());
synchronized (eventQueue) {
eventQueue.add(evt);
}
}
示例2: mouseReleased
import com.jme3.input.event.MouseButtonEvent; //导入方法依赖的package包/类
public void mouseReleased(MouseEvent awtEvt) {
int actualX = awtEvt.getX();
int actualY = component.getHeight() - awtEvt.getY();
MouseButtonEvent evt = new MouseButtonEvent(getJMEButtonIndex(awtEvt), false, actualX, actualY);
evt.setTime(awtEvt.getWhen());
synchronized (eventQueue) {
eventQueue.add(evt);
}
}
示例3: mousePressed
import com.jme3.input.event.MouseButtonEvent; //导入方法依赖的package包/类
public void mousePressed(MouseEvent arg0) {
MouseButtonEvent evt = new MouseButtonEvent(getJMEButtonIndex(arg0), true, arg0.getX(), arg0.getY());
evt.setTime(arg0.getWhen());
synchronized (eventQueue){
eventQueue.add(evt);
}
}
示例4: mouseReleased
import com.jme3.input.event.MouseButtonEvent; //导入方法依赖的package包/类
public void mouseReleased(MouseEvent arg0) {
MouseButtonEvent evt = new MouseButtonEvent(getJMEButtonIndex(arg0), false, arg0.getX(), arg0.getY());
evt.setTime(arg0.getWhen());
synchronized (eventQueue){
eventQueue.add(evt);
}
}
示例5: mousePressed
import com.jme3.input.event.MouseButtonEvent; //导入方法依赖的package包/类
public void mousePressed(MouseEvent arg0) {
MouseButtonEvent evt = new MouseButtonEvent(getJMEButtonIndex(arg0), true, arg0.getX(), arg0.getY());
evt.setTime(arg0.getWhen());
eventQueue.add(evt);
}
示例6: mouseReleased
import com.jme3.input.event.MouseButtonEvent; //导入方法依赖的package包/类
public void mouseReleased(MouseEvent arg0) {
MouseButtonEvent evt = new MouseButtonEvent(getJMEButtonIndex(arg0), false, arg0.getX(), arg0.getY());
evt.setTime(arg0.getWhen());
eventQueue.add(evt);
}