org.drools.workbench.screens.scenariosimulation.client.popup.YesNoConfirmPopupView类的使用及代码示例

x33g5p2x  于2022-02-05 转载在 其他  
字(8.7k)|赞(0)|评价(0)|浏览(110)

本文整理了Java中org.drools.workbench.screens.scenariosimulation.client.popup.YesNoConfirmPopupView类的一些代码示例,展示了YesNoConfirmPopupView类的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。YesNoConfirmPopupView类的具体详情如下:
包路径:org.drools.workbench.screens.scenariosimulation.client.popup.YesNoConfirmPopupView
类名称:YesNoConfirmPopupView

YesNoConfirmPopupView介绍

暂无

代码示例

代码示例来源:origin: kiegroup/drools-wb

@Override
  public void hide() {
    yesNoConfirmPopupView.hide();
  }
}

代码示例来源:origin: kiegroup/drools-wb

@Override
public void show(final String title,
         final String inlineNotificationMessage,
         final InlineNotification.InlineNotificationType inlineNotificationType,
         final String okButtonText,
         final Button.ButtonStyleType okButtonType,
         final String confirmMessage,
         final Command okCommand) {
  yesNoConfirmPopupView.show(title, inlineNotificationMessage, inlineNotificationType, okButtonText, okButtonType, confirmMessage, okCommand);
}

代码示例来源:origin: kiegroup/drools-wb

@Test
public void showOkCancel() {
  yesNoConfirmPopupView.show(TITLE, OK_BUTTON_TEXT, CONFIRM_MESSAGE, okCommandMock);
  verify(yesNoConfirmPopupView, times(1)).show(TITLE, null, null, OK_BUTTON_TEXT, Button.ButtonStyleType.DANGER, CONFIRM_MESSAGE, okCommandMock);
  verify(yesNoConfirmPopupView, times(1)).commonShow(eq(TITLE), any(), any(), eq(CONFIRM_MESSAGE));
}

代码示例来源:origin: kiegroup/drools-wb

@Test
public void onOkClick() {
  yesNoConfirmPopupView.okCommand = null;
  yesNoConfirmPopupView.onOkClick(mouseEventMock);
  verify(okCommandMock, never()).execute();
  verify(yesNoConfirmPopupView, times(1)).hide();
  reset(yesNoConfirmPopupView);
  yesNoConfirmPopupView.yesCommand = okCommandMock;
  yesNoConfirmPopupView.onYesClick(mouseEventMock);
  verify(okCommandMock, times(1)).execute();
  verify(yesNoConfirmPopupView, times(1)).hide();
}

代码示例来源:origin: kiegroup/drools-wb

@Test
public void onCloseClick() {
  yesNoConfirmPopupView.onCancelClick(mouseEventMock);
  verify(yesNoConfirmPopupView, times(1)).hide();
}

代码示例来源:origin: kiegroup/drools-wb

@Test
public void onNoClick() {
  yesNoConfirmPopupView.noCommand = null;
  yesNoConfirmPopupView.onNoClick(mouseEventMock);
  verify(noCommandMock, never()).execute();
  verify(yesNoConfirmPopupView, times(1)).hide();
  reset(yesNoConfirmPopupView);
  yesNoConfirmPopupView.noCommand = noCommandMock;
  yesNoConfirmPopupView.onNoClick(mouseEventMock);
  verify(noCommandMock, times(1)).execute();
  verify(yesNoConfirmPopupView, times(1)).hide();
}

代码示例来源:origin: kiegroup/drools-wb

@Test
public void onYesClick() {
  yesNoConfirmPopupView.yesCommand = null;
  yesNoConfirmPopupView.onYesClick(mouseEventMock);
  verify(yesCommandMock, never()).execute();
  verify(yesNoConfirmPopupView, times(1)).hide();
  reset(yesNoConfirmPopupView);
  yesNoConfirmPopupView.yesCommand = yesCommandMock;
  yesNoConfirmPopupView.onYesClick(mouseEventMock);
  verify(yesCommandMock, times(1)).execute();
  verify(yesNoConfirmPopupView, times(1)).hide();
}

代码示例来源:origin: kiegroup/drools-wb

@Test
  public void commonShow() {
    yesNoConfirmPopupView.commonShow(TITLE, null, null, CONFIRM_MESSAGE);
    verify(modalTitleMock, times(1)).setTextContent(eq(TITLE));
    verify(confirmInlineNotificationMock, never()).setMessage(anyString());
    verify(confirmInlineNotificationMock, never()).setType(eq(INLINE_NOTIFICATION_TYPE));
    verify(styleMock, never()).removeProperty(eq("display"));
    verify(styleMock, times(1)).setProperty(eq("display"), eq("none"));
    verify(modalConfirmationMessageLabelMock, times(1)).setTextContent(eq(CONFIRM_MESSAGE));
    verify(modalMock, times(1)).show();

    reset(modalTitleMock);
    reset(confirmInlineNotificationMock);
    when(elementMock.getStyle()).thenReturn(styleMock);
    when(confirmInlineNotificationMock.getElement()).thenReturn(elementMock);
    reset(styleMock);
    reset(modalConfirmationMessageLabelMock);
    reset(modalMock);

    yesNoConfirmPopupView.commonShow(TITLE, INLINE_NOTIFICATION_MESSAGE, INLINE_NOTIFICATION_TYPE, CONFIRM_MESSAGE);
    verify(modalTitleMock, times(1)).setTextContent(eq(TITLE));
    verify(confirmInlineNotificationMock, times(1)).setMessage(eq(INLINE_NOTIFICATION_MESSAGE));
    verify(confirmInlineNotificationMock, times(1)).setType(eq(INLINE_NOTIFICATION_TYPE));
    verify(styleMock, times(1)).removeProperty(eq("display"));
    verify(styleMock, never()).setProperty(eq("display"), eq("none"));
    verify(modalConfirmationMessageLabelMock, times(1)).setTextContent(eq(CONFIRM_MESSAGE));
    verify(modalMock, times(1)).show();
  }
}

代码示例来源:origin: kiegroup/drools-wb

@Test
public void showYesNoCancel() {
  yesNoConfirmPopupView.show(TITLE, YES_BUTTON_TEXT, NO_BUTTON_TEXT, CONFIRM_MESSAGE, yesCommandMock, noCommandMock);
  verify(yesNoConfirmPopupView, times(1)).show(TITLE, null, null, YES_BUTTON_TEXT, NO_BUTTON_TEXT, Button.ButtonStyleType.DANGER, Button.ButtonStyleType.DEFAULT, CONFIRM_MESSAGE, yesCommandMock, noCommandMock);
  verify(yesNoConfirmPopupView, times(1)).commonShow(eq(TITLE), any(), any(), eq(CONFIRM_MESSAGE));
}

代码示例来源:origin: kiegroup/drools-wb

@Test
public void onCancelClick() {
  yesNoConfirmPopupView.onCancelClick(mouseEventMock);
  verify(yesNoConfirmPopupView, times(1)).hide();
}

代码示例来源:origin: kiegroup/drools-wb

@Override
public void show(final String title,
         final String inlineNotificationMessage,
         final InlineNotification.InlineNotificationType inlineNotificationType,
         final String okButtonText,
         final Button.ButtonStyleType okButtonType,
         final String confirmMessage,
         final Command okCommand) {
  this.okCommand = okCommand;
  okButton.show();
  yesButton.hide();
  noButton.hide();
  okButton.setText(okButtonText);
  if (okButtonType != null) {
    okButton.setButtonStyleType(okButtonType);
  }
  commonShow(title, inlineNotificationMessage, inlineNotificationType, confirmMessage);
}

代码示例来源:origin: kiegroup/drools-wb

@Test
public void showOkCancelFull() {
  yesNoConfirmPopupView.show(TITLE, INLINE_NOTIFICATION_MESSAGE, INLINE_NOTIFICATION_TYPE, OK_BUTTON_TEXT, BUTTON_STYLE_TYPE, CONFIRM_MESSAGE, okCommandMock);
  verify(okButtonMock, never()).hide();
  verify(okButtonMock, times(1)).show();
  verify(yesButtonMock, times(1)).hide();
  verify(noButtonMock, times(1)).hide();
  verify(okButtonMock, times(1)).setText(eq(OK_BUTTON_TEXT));
  verify(okButtonMock, times(1)).setButtonStyleType(eq(BUTTON_STYLE_TYPE));
  verify(yesNoConfirmPopupView, times(1)).commonShow(eq(TITLE), eq(INLINE_NOTIFICATION_MESSAGE), eq(INLINE_NOTIFICATION_TYPE), eq(CONFIRM_MESSAGE));
}

代码示例来源:origin: kiegroup/drools-wb

@EventHandler("confirm-close")
public void onCloseClick(final @ForEvent("click") MouseEvent event) {
  hide();
}

代码示例来源:origin: kiegroup/drools-wb

@Override
public void show(final String title,
         final String okButtonText,
         final String confirmMessage,
         final Command okCommand) {
  show(title,
     null,
     null,
     okButtonText,
     Button.ButtonStyleType.DANGER,
     confirmMessage,
     okCommand);
}

代码示例来源:origin: kiegroup/drools-wb

noButton.setButtonStyleType(noButtonType);
commonShow(title, inlineNotificationMessage, inlineNotificationType, confirmMessage);

代码示例来源:origin: kiegroup/drools-wb

@Test
public void showYesNoCancelFull() {
  yesNoConfirmPopupView.show(TITLE, INLINE_NOTIFICATION_MESSAGE, INLINE_NOTIFICATION_TYPE, YES_BUTTON_TEXT, NO_BUTTON_TEXT, BUTTON_STYLE_TYPE, BUTTON_STYLE_TYPE, CONFIRM_MESSAGE, yesCommandMock, noCommandMock);
  verify(okButtonMock, times(1)).hide();
  verify(yesButtonMock, times(1)).show();
  verify(noButtonMock, times(1)).show();
  verify(yesButtonMock, never()).hide();
  verify(noButtonMock, never()).hide();
  verify(yesButtonMock, times(1)).setText(eq(YES_BUTTON_TEXT));
  verify(noButtonMock, times(1)).setText(eq(NO_BUTTON_TEXT));
  verify(yesButtonMock, times(1)).setButtonStyleType(eq(BUTTON_STYLE_TYPE));
  verify(noButtonMock, times(1)).setButtonStyleType(eq(BUTTON_STYLE_TYPE));
  verify(yesNoConfirmPopupView, times(1)).commonShow(eq(TITLE), eq(INLINE_NOTIFICATION_MESSAGE), eq(INLINE_NOTIFICATION_TYPE), eq(CONFIRM_MESSAGE));
}

代码示例来源:origin: kiegroup/drools-wb

@EventHandler("confirm-cancel")
public void onCancelClick(final @ForEvent("click") MouseEvent event) {
  hide();
}

代码示例来源:origin: kiegroup/drools-wb

@Override
public void show(String title, String inlineNotificationMessage, InlineNotification.InlineNotificationType inlineNotificationType, String yesButtonText, String noButtonText, Button.ButtonStyleType yesButtonType, Button.ButtonStyleType noButtonType, String confirmMessage, Command yesCommand, Command noCommand) {
  yesNoConfirmPopupView.show(title, inlineNotificationMessage, inlineNotificationType, yesButtonText, noButtonText, yesButtonType,  noButtonType, confirmMessage, yesCommand, noCommand);
}

代码示例来源:origin: kiegroup/drools-wb

@EventHandler("confirm-no")
public void onNoClick(final @ForEvent("click") MouseEvent event) {
  if (noCommand != null) {
    noCommand.execute();
  }
  this.hide();
}

代码示例来源:origin: kiegroup/drools-wb

@Override
public void show(final String title,
         final String yesButtonText,
         final String noButtonText,
         final String confirmMessage,
         final Command yesCommand,
         final Command noCommand) {
  show(title,
     null,
     null,
     yesButtonText,
     noButtonText,
     Button.ButtonStyleType.DANGER,
     Button.ButtonStyleType.DEFAULT,
     confirmMessage,
     yesCommand,
     noCommand);
}

相关文章