本文整理汇总了Java中org.uberfire.ext.widgets.common.client.common.popups.YesNoCancelPopup类的典型用法代码示例。如果您正苦于以下问题:Java YesNoCancelPopup类的具体用法?Java YesNoCancelPopup怎么用?Java YesNoCancelPopup使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
YesNoCancelPopup类属于org.uberfire.ext.widgets.common.client.common.popups包,在下文中一共展示了YesNoCancelPopup类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getYesNoCancelPopup
import org.uberfire.ext.widgets.common.client.common.popups.YesNoCancelPopup; //导入依赖的package包/类
protected YesNoCancelPopup getYesNoCancelPopup(final String gridHeader,
final String key) {
return YesNoCancelPopup.newYesNoCancelPopup(CommonConstants.INSTANCE.RemoveTabTitle(),
CommonConstants.INSTANCE.RemoveTabConfirm(gridHeader),
new Command() {
@Override
public void execute() {
removeTab(key);
}
},
null,
new Command() {
@Override
public void execute() {
}
});
}
示例2: testRemoveTab
import org.uberfire.ext.widgets.common.client.common.popups.YesNoCancelPopup; //导入依赖的package包/类
@Test
public void testRemoveTab() throws Exception {
final Element element = mock(Element.class);
when(element.getStyle()).thenReturn(mock(Style.class));
when(button.getElement()).thenReturn(element);
when(button.addClickHandler(any(ClickHandler.class))).thenAnswer(new Answer() {
public Object answer(InvocationOnMock aInvocation) throws Throwable {
clickHandler = (ClickHandler) aInvocation.getArguments()[0];
return null;
}
});
final YesNoCancelPopup yesNoCancelPopup = mock(YesNoCancelPopup.class);
doReturn(yesNoCancelPopup).when(filterPagedTable).getYesNoCancelPopup(anyString(), anyString());
filterPagedTable.addTab(mock(PagedTable.class), "", mock(Command.class));
clickHandler.onClick(new ClickEvent() {
});
verify(yesNoCancelPopup).show();
verify(filterPagedTable, never()).removeTab(anyInt());
verify(filterPagedTable, never()).removeTab(anyString());
}
示例3: showSaveBeforeContinue
import org.uberfire.ext.widgets.common.client.common.popups.YesNoCancelPopup; //导入依赖的package包/类
@Override
public void showSaveBeforeContinue(org.uberfire.mvp.Command yesCommand,
org.uberfire.mvp.Command noCommand,
org.uberfire.mvp.Command cancelCommand) {
YesNoCancelPopup popup = YesNoCancelPopup.newYesNoCancelPopup(
org.uberfire.ext.widgets.common.client.resources.i18n.CommonConstants.INSTANCE.Information(),
ProjectEditorResources.CONSTANTS.SaveBeforeBuildAndDeploy(),
yesCommand,
org.uberfire.ext.widgets.common.client.resources.i18n.CommonConstants.INSTANCE.YES(),
ButtonType.PRIMARY,
IconType.SAVE,
noCommand,
org.uberfire.ext.widgets.common.client.resources.i18n.CommonConstants.INSTANCE.NO(),
ButtonType.DANGER,
IconType.WARNING,
cancelCommand,
org.uberfire.ext.widgets.common.client.resources.i18n.CommonConstants.INSTANCE.Cancel(),
ButtonType.DEFAULT,
null
);
popup.setClosable(false);
popup.show();
}
示例4: showYesNoCancelPopup
import org.uberfire.ext.widgets.common.client.common.popups.YesNoCancelPopup; //导入依赖的package包/类
@Override
public void showYesNoCancelPopup(String title,
String message,
Command yesCommand,
Command noCommand) {
YesNoCancelPopup yesNoCancelPopup = YesNoCancelPopup.newYesNoCancelPopup(title,
message,
yesCommand,
noCommand,
new Command() {
@Override
public void execute() {
//do nothing, but let the cancel button be shown.
}
});
yesNoCancelPopup.setClosable(false);
yesNoCancelPopup.show();
}
示例5: showParseErrorsDialog
import org.uberfire.ext.widgets.common.client.common.popups.YesNoCancelPopup; //导入依赖的package包/类
@Override
public void showParseErrorsDialog(String title,
String message,
Command onCloseCommand) {
YesNoCancelPopup yesNoCancelPopup = YesNoCancelPopup.newYesNoCancelPopup(title,
message,
onCloseCommand,
CommonConstants.INSTANCE.OK(),
null,
null,
null,
null,
null,
null,
null);
yesNoCancelPopup.setClosable(false);
yesNoCancelPopup.show();
}
示例6: showYesNoPopup
import org.uberfire.ext.widgets.common.client.common.popups.YesNoCancelPopup; //导入依赖的package包/类
public void showYesNoPopup( final String title,
final String message,
final Command yesCommand,
final String yesButtonText,
final ButtonType yesButtonType,
final Command noCommand,
final String noButtonText,
final ButtonType noButtonType ) {
YesNoCancelPopup yesNoCancelPopup = YesNoCancelPopup.newYesNoCancelPopup( title,
message,
yesCommand,
yesButtonText,
yesButtonType,
noCommand,
noButtonText,
noButtonType,
null,
null,
null );
yesNoCancelPopup.setClosable( false );
yesNoCancelPopup.show();
}
示例7: showOkButtonPopup
import org.uberfire.ext.widgets.common.client.common.popups.YesNoCancelPopup; //导入依赖的package包/类
private static void showOkButtonPopup( final String title, final String message ) {
YesNoCancelPopup yesNoCancelPopup = YesNoCancelPopup.newYesNoCancelPopup( title,
message,
new Command() {
@Override public void execute() {
}
},
CommonConstants.INSTANCE.OK(),
null,
null,
null,
null );
yesNoCancelPopup.setClosable( false );
yesNoCancelPopup.show();
}
示例8: onForceUnlock
import org.uberfire.ext.widgets.common.client.common.popups.YesNoCancelPopup; //导入依赖的package包/类
@UiHandler("unlock")
public void onForceUnlock(ClickEvent e) {
final YesNoCancelPopup yesNoCancelPopup =
YesNoCancelPopup.newYesNoCancelPopup(MetadataConstants.INSTANCE.ForceUnlockConfirmationTitle(),
MetadataConstants.INSTANCE.ForceUnlockConfirmationText(metadata.getLockInfo().lockedBy()),
new Command() {
@Override
public void execute() {
forceUnlockHandler.run();
unlock.setEnabled(false);
}
},
new Command() {
@Override
public void execute() {
}
},
null);
yesNoCancelPopup.setClosable(false);
yesNoCancelPopup.show();
}
示例9: show
import org.uberfire.ext.widgets.common.client.common.popups.YesNoCancelPopup; //导入依赖的package包/类
@Override
public void show(final String title,
final String message,
final Command yesCommand,
final Command noCommand,
final Command cancelCommand) {
YesNoCancelPopup.newYesNoCancelPopup(title,
message,
yesCommand,
noCommand,
cancelCommand).show();
}
示例10: getShowDeletePopupCommand
import org.uberfire.ext.widgets.common.client.common.popups.YesNoCancelPopup; //导入依赖的package包/类
private Command getShowDeletePopupCommand() {
return new Command() {
public void execute() {
deleteDashboardPopup = YesNoCancelPopup.newYesNoCancelPopup(
AppConstants.INSTANCE.dashboard_delete_popup_title(),
AppConstants.INSTANCE.dashboard_delete_popup_content(),
getDoDeleteCommand(),
getCancelDeleteCommand(),
null);
deleteDashboardPopup.show();
}
};
}
示例11: showDeletePopup
import org.uberfire.ext.widgets.common.client.common.popups.YesNoCancelPopup; //导入依赖的package包/类
public static void showDeletePopup(final String contentText,
final Command yesCommand) {
YesNoCancelPopup yesNoCancelPopup = YesNoCancelPopup.newYesNoCancelPopup(CommonConstants.INSTANCE.Information(),
contentText,
yesCommand,
CommonConstants.INSTANCE.YES(),
ButtonType.DANGER,
IconType.TRASH,
new Command() {
@Override
public void execute() {
//do nothing
}
},
null,
ButtonType.DEFAULT,
null,
new Command() {
@Override
public void execute() {
//do nothing.
}
},
null,
ButtonType.DEFAULT,
null
);
yesNoCancelPopup.setClosable(false);
yesNoCancelPopup.show();
}
示例12: initWidget
import org.uberfire.ext.widgets.common.client.common.popups.YesNoCancelPopup; //导入依赖的package包/类
private void initWidget(final boolean readOnly,
final VersionRecord versionRecord,
final ParameterizedCommand<VersionRecord> onRevertCommand) {
message.setText(versionRecord.comment());
author.setText(versionRecord.author() + " - ");
date.setText(fmt.format(versionRecord.date()));
if (onRevertCommand != null) {
revertButtonContainer.setWidget(new Button(CoreConstants.INSTANCE.RevertToThis()) {{
setEnabled(!readOnly);
setBlock(true);
setType(ButtonType.DANGER);
addClickHandler(new ClickHandler() {
@Override
public void onClick(final ClickEvent event) {
final YesNoCancelPopup yesNoCancelPopup = YesNoCancelPopup.newYesNoCancelPopup(CommonConstants.INSTANCE.Warning(),
CoreConstants.INSTANCE.ConfirmStateRevert(),
new Command() {
@Override
public void execute() {
onRevertCommand.execute(versionRecord);
}
},
new Command() {
@Override
public void execute() {
}
},
null
);
yesNoCancelPopup.setClosable(false);
yesNoCancelPopup.show();
}
});
}});
}
}
示例13: showYesNoCancelPopup
import org.uberfire.ext.widgets.common.client.common.popups.YesNoCancelPopup; //导入依赖的package包/类
@Override
public void showYesNoCancelPopup( String title,
String message,
Command yesCommand,
String yesButtonText,
ButtonType yesButtonType,
Command noCommand,
String noButtonText,
ButtonType noButtonType,
Command cancelCommand,
String cancelButtonText,
ButtonType cancelButtonType ) {
YesNoCancelPopup yesNoCancelPopup = YesNoCancelPopup.newYesNoCancelPopup( title,
message,
yesCommand,
yesButtonText,
yesButtonType,
noCommand,
noButtonText,
noButtonType,
cancelCommand,
cancelButtonText,
cancelButtonType );
yesNoCancelPopup.setClosable( false );
yesNoCancelPopup.show();
}
示例14: showYesNoDialog
import org.uberfire.ext.widgets.common.client.common.popups.YesNoCancelPopup; //导入依赖的package包/类
@Override
public void showYesNoDialog(String message,
Command yesCommand,
Command noCommand,
Command cancelCommand) {
YesNoCancelPopup yesNoCancelPopup = YesNoCancelPopup.newYesNoCancelPopup(
CommonConstants.INSTANCE.Information(), message, yesCommand, noCommand, cancelCommand);
yesNoCancelPopup.setClosable(false);
yesNoCancelPopup.show();
}
示例15: showYesNoCancelPopup
import org.uberfire.ext.widgets.common.client.common.popups.YesNoCancelPopup; //导入依赖的package包/类
@Override
public void showYesNoCancelPopup(final String title,
final String content,
final Command yesCommand,
final String yesButtonText,
final ButtonType yesButtonType,
final Command noCommand,
final String noButtonText,
final ButtonType noButtonType,
final Command cancelCommand,
final String cancelButtonText,
final ButtonType cancelButtonType) {
YesNoCancelPopup yesNoCancelPopup = YesNoCancelPopup.newYesNoCancelPopup(title,
content,
yesCommand,
yesButtonText,
yesButtonType,
noCommand,
noButtonText,
noButtonType,
cancelCommand,
cancelButtonText,
cancelButtonType);
yesNoCancelPopup.setClosable(false);
yesNoCancelPopup.show();
}