本文整理匯總了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();
}