當前位置: 首頁>>代碼示例>>Java>>正文


Java ForEvent類代碼示例

本文整理匯總了Java中org.jboss.errai.ui.shared.api.annotations.ForEvent的典型用法代碼示例。如果您正苦於以下問題:Java ForEvent類的具體用法?Java ForEvent怎麽用?Java ForEvent使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


ForEvent類屬於org.jboss.errai.ui.shared.api.annotations包,在下文中一共展示了ForEvent類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: onOkClick

import org.jboss.errai.ui.shared.api.annotations.ForEvent; //導入依賴的package包/類
@EventHandler("confirm-ok")
public void onOkClick(final @ForEvent("click") MouseEvent event) {
    if (okCommand != null) {
        okCommand.execute();
    }
    hide();
}
 
開發者ID:kiegroup,項目名稱:appformer,代碼行數:8,代碼來源:ConfirmPopup.java

示例2: onModalSubmitClick

import org.jboss.errai.ui.shared.api.annotations.ForEvent; //導入依賴的package包/類
/**
 * This is an Errai UI event handler. The element for which this handler is regsitered is in this class's HTML
 * template file and has the {@code modal-submit} CSS class.
 * <p>
 * The parameter is a JS interop wrapper for a native DOM {@link MouseEvent}. The {@code MouseEvent} interface like many
 * DOM event interfaces is used for multiple browser event types (i.e. "click", "dblclick", "mouseover", etc.). In order
 * to only listen for "click" events we use the {@link ForEvent} annotation.
 * <p>
 * This method displays and persists changes made to a {@link Contact} in the {@link ContactEditor}, whether it is a
 * newly created or an previously existing {@link Contact}.
 */
@EventHandler("modal-submit")
public void onModalSubmitClick(final @ForEvent("click") MouseEvent event) {
  if (modal.checkValidity()) {

    modal.classList.remove("displayed");

    if (binder.getModel().contains(editor.getValue())) {
      updateContactFromEditor();
    } else {
      createNewContactFromEditor();
    }
  }
}
 
開發者ID:errai,項目名稱:errai-tutorial,代碼行數:25,代碼來源:ContactListPage.java

示例3: onModalDeleteClick

import org.jboss.errai.ui.shared.api.annotations.ForEvent; //導入依賴的package包/類
/**
 * This is an Errai UI native event handler. The element for which this handler is regsitered is in this class's HTML
 * template file and has the {@code modal-delete} CSS class.
 * <p>
 * The parameter is a JS interop wrapper for a native DOM {@link MouseEvent}. The {@code MouseEvent} interface like many
 * DOM event interfaces is used for multiple browser event types (i.e. "click", "dblclick", "mouseover", etc.). In order
 * to only listen for "click" events we use the {@link ForEvent} annotation.
 * <p>
 * This method removes a {@link Contact} from the displayed table and makes an HTTP request to delete the contact from
 * persistent storage on the server.
 */
@EventHandler("modal-delete")
public void onModalDeleteClick(final @ForEvent("click") MouseEvent event) {
  if (binder.getModel().contains(editor.getValue())) {
    final Contact deleted = editor.getValue();
    contactService.call((final Response response) -> {
      if (response.getStatusCode() >= 200 && response.getStatusCode() < 300) {
        binder.getModel().remove(deleted);
      }
    }).delete(editor.getValue().getId());
    editor.setValue(new Contact());

    modal.classList.remove("displayed");
  }
}
 
開發者ID:errai,項目名稱:errai-tutorial,代碼行數:26,代碼來源:ContactListPage.java

示例4: onScroll

import org.jboss.errai.ui.shared.api.annotations.ForEvent; //導入依賴的package包/類
@EventHandler("sessionContainer")
protected void onScroll(@ForEvent("scroll") ScrollEvent e) {
    // on the editor scroll recalculate palette position to be fixed on the screen
    palettePanel.getElement().getStyle().setTop(paletteInitialTop + e.getRelativeElement().getScrollTop(), Style.Unit.PX);
    palettePanel.getElement().getStyle().setLeft(paletteInitialLeft + e.getRelativeElement().getScrollLeft(), Style.Unit.PX);

    e.preventDefault();
}
 
開發者ID:kiegroup,項目名稱:kie-wb-common,代碼行數:9,代碼來源:SessionPresenterView.java

示例5: onOkClick

import org.jboss.errai.ui.shared.api.annotations.ForEvent; //導入依賴的package包/類
@EventHandler("ok-button")
private void onOkClick(final @ForEvent("click") MouseEvent event) {
    presenter.onOk();
}
 
開發者ID:kiegroup,項目名稱:appformer,代碼行數:5,代碼來源:ErrorPopupView.java

示例6: onCloseClick

import org.jboss.errai.ui.shared.api.annotations.ForEvent; //導入依賴的package包/類
@EventHandler("close-button")
private void onCloseClick(final @ForEvent("click") MouseEvent event) {
    presenter.onClose();
}
 
開發者ID:kiegroup,項目名稱:appformer,代碼行數:5,代碼來源:ErrorPopupView.java

示例7: onDetailClick

import org.jboss.errai.ui.shared.api.annotations.ForEvent; //導入依賴的package包/類
@EventHandler("detail-anchor")
private void onDetailClick(final @ForEvent("click") MouseEvent event) {
    presenter.onDetail();
}
 
開發者ID:kiegroup,項目名稱:appformer,代碼行數:5,代碼來源:ErrorPopupView.java

示例8: onCancelClick

import org.jboss.errai.ui.shared.api.annotations.ForEvent; //導入依賴的package包/類
@EventHandler("confirm-cancel")
public void onCancelClick(final @ForEvent("click") MouseEvent event) {
    hide();
}
 
開發者ID:kiegroup,項目名稱:appformer,代碼行數:5,代碼來源:ConfirmPopup.java

示例9: onCloseClick

import org.jboss.errai.ui.shared.api.annotations.ForEvent; //導入依賴的package包/類
@EventHandler("confirm-close")
public void onCloseClick(final @ForEvent("click") MouseEvent event) {
    hide();
}
 
開發者ID:kiegroup,項目名稱:appformer,代碼行數:5,代碼來源:ConfirmPopup.java

示例10: onClick

import org.jboss.errai.ui.shared.api.annotations.ForEvent; //導入依賴的package包/類
/**
 * Called for single-click events on the {@link DataField @DataField} {@link #contact}. The CDI event fired here is
 * observed by {@link ContactListPage#selectComponent(ContactDisplay)}.
 */
@EventHandler("contact")
public void onClick(final @ForEvent("click") MouseEvent event) {
  click.fire(this);
}
 
開發者ID:errai,項目名稱:errai-tutorial,代碼行數:9,代碼來源:ContactDisplay.java

示例11: onDoubleClick

import org.jboss.errai.ui.shared.api.annotations.ForEvent; //導入依賴的package包/類
/**
 * Called for double-click events on the {@link DataField @DataField} {@link #contact}. The CDI event fired here is
 * observed by {@link ContactListPage#editComponent(ContactDisplay)}.
 */
@EventHandler("contact")
public void onDoubleClick(final @ForEvent("dblclick") MouseEvent event) {
  dblClick.fire(this);
}
 
開發者ID:errai,項目名稱:errai-tutorial,代碼行數:9,代碼來源:ContactDisplay.java

示例12: onAddNewDataSource

import org.jboss.errai.ui.shared.api.annotations.ForEvent; //導入依賴的package包/類
@EventHandler("add-new-datasource")
private void onAddNewDataSource(@ForEvent("click") Event event) {
    presenter.onAddDataSource();
}
 
開發者ID:kiegroup,項目名稱:kie-wb-common,代碼行數:5,代碼來源:DefExplorerContentViewImpl.java

示例13: onAddNewDriver

import org.jboss.errai.ui.shared.api.annotations.ForEvent; //導入依賴的package包/類
@EventHandler("add-new-driver")
private void onAddNewDriver(@ForEvent("click") Event event) {
    presenter.onAddDriver();
}
 
開發者ID:kiegroup,項目名稱:kie-wb-common,代碼行數:5,代碼來源:DefExplorerContentViewImpl.java

示例14: onItemClick

import org.jboss.errai.ui.shared.api.annotations.ForEvent; //導入依賴的package包/類
@EventHandler("item")
private void onItemClick(@ForEvent("click") Event event) {
    presenter.onClick();
}
 
開發者ID:kiegroup,項目名稱:kie-wb-common,代碼行數:5,代碼來源:DefItemViewImpl.java

示例15: onNameChange

import org.jboss.errai.ui.shared.api.annotations.ForEvent; //導入依賴的package包/類
@EventHandler("name")
private void onNameChange(@ForEvent("change") final Event event) {
    presenter.onNameChange();
}
 
開發者ID:kiegroup,項目名稱:kie-wb-common,代碼行數:5,代碼來源:DataSourceDefMainPanelViewImpl.java


注:本文中的org.jboss.errai.ui.shared.api.annotations.ForEvent類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。