本文整理汇总了Java中de.lessvoid.nifty.elements.events.NiftyMousePrimaryClickedEvent类的典型用法代码示例。如果您正苦于以下问题:Java NiftyMousePrimaryClickedEvent类的具体用法?Java NiftyMousePrimaryClickedEvent怎么用?Java NiftyMousePrimaryClickedEvent使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
NiftyMousePrimaryClickedEvent类属于de.lessvoid.nifty.elements.events包,在下文中一共展示了NiftyMousePrimaryClickedEvent类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onMouseDown
import de.lessvoid.nifty.elements.events.NiftyMousePrimaryClickedEvent; //导入依赖的package包/类
@NiftyEventSubscriber(pattern=".*AnalogPad")
public void onMouseDown(String id, NiftyMousePrimaryClickedEvent e) {
if (e.getElement() != pad) {
return;
}
anchored = true;
anchorX = e.getMouseX();
anchorY = e.getMouseY();
x = anchorX;
y = anchorY;
}
示例2: onNavAltClicked
import de.lessvoid.nifty.elements.events.NiftyMousePrimaryClickedEvent; //导入依赖的package包/类
@NiftyEventSubscriber(pattern="(btAscend|btDescend)")
public void onNavAltClicked(String id, NiftyMousePrimaryClickedEvent e) {
if (id.equals("btAscend")) {
altitudeChange = 1;
} else {
altitudeChange = -1;
}
}
示例3: onBtPlaneRotClicked
import de.lessvoid.nifty.elements.events.NiftyMousePrimaryClickedEvent; //导入依赖的package包/类
@NiftyEventSubscriber(pattern="btPlaneRot(L|R)")
public void onBtPlaneRotClicked(String id, NiftyMousePrimaryClickedEvent e) {
if (e.getElement() == btPlaneRotL.getElement()) {
planeRotDir = 1;
} else if (e.getElement() == btPlaneRotR.getElement()) {
planeRotDir = -1;
}
}
示例4: onBtRobotJointClicked
import de.lessvoid.nifty.elements.events.NiftyMousePrimaryClickedEvent; //导入依赖的package包/类
@NiftyEventSubscriber(pattern="btRobotJoint.?")
public void onBtRobotJointClicked(String id, NiftyMousePrimaryClickedEvent e) {
if (id.equals("btRobotJointL")) {
jointVelocity = 1;
ddRobotJointInd = ddRobotJoint.getSelectedIndex();
} else if (id.equals("btRobotJointR")) {
jointVelocity = -1;
ddRobotJointInd = ddRobotJoint.getSelectedIndex();
}
}
示例5: onClick8
import de.lessvoid.nifty.elements.events.NiftyMousePrimaryClickedEvent; //导入依赖的package包/类
/**Sets the current item id for use when processing drops **/
@NiftyEventSubscriber(pattern="ItemVal.*")
public void onClick8(String id, NiftyMousePrimaryClickedEvent event) {
currentElementId = id;
}