本文整理汇总了Java中de.lessvoid.nifty.controls.ButtonClickedEvent类的典型用法代码示例。如果您正苦于以下问题:Java ButtonClickedEvent类的具体用法?Java ButtonClickedEvent怎么用?Java ButtonClickedEvent使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ButtonClickedEvent类属于de.lessvoid.nifty.controls包,在下文中一共展示了ButtonClickedEvent类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onWindowButton
import de.lessvoid.nifty.controls.ButtonClickedEvent; //导入依赖的package包/类
@NiftyEventSubscriber(pattern="bt.*")
public void onWindowButton(String id, ButtonClickedEvent e) {
String windowId = "wd" + id.substring(2);
for (WindowController wc : windowControllers) {
Window window = wc.getWindow();
if (window.getId().equals(windowId)) {
Element windowElement = window.getElement();
if (windowElement.isVisible()) {
break;
}
// move the selected window to the top layer
windowElement.markForMove(windowElement.getParent());
windowElement.reactivate();
windowElement.startEffect(EffectEventId.onCustom);
windowElement.show();
for (Element elm : windowElement.getElements()) {
// have to do this after markForMove(), otherwise radio button selections
// are not displayed properly
elm.show();
}
break;
}
}
}
示例2: onPanelPortalEnterClick
import de.lessvoid.nifty.controls.ButtonClickedEvent; //导入依赖的package包/类
@NiftyEventSubscriber(id="panelPortalEnter")
public void onPanelPortalEnterClick(String st, ButtonClickedEvent evt) {
String text = panelPortal.findNiftyControl("panelPortalLabel", Label.class).getText();
WorldState ws = app.getStateManager().getState(WorldState.class);
UsePortalPacket pkt = new UsePortalPacket();
pkt.objectId = portalStatus.data.objectId;
try {
ws.getClient().sendSyncPacket(pkt);
} catch (IOException e) {
e.printStackTrace();
}
}
示例3: errorOkay
import de.lessvoid.nifty.controls.ButtonClickedEvent; //导入依赖的package包/类
@NiftyEventSubscriber(id="buttonOkay")
public void errorOkay(String next, ButtonClickedEvent event) {
closeErrorPopup();
}