use of org.uberfire.ext.widgets.common.client.common.popups.YesNoCancelPopup in project kie-wb-common by kiegroup.
the class DataModelerScreenViewImpl method showParseErrorsDialog.
@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();
}
use of org.uberfire.ext.widgets.common.client.common.popups.YesNoCancelPopup in project kie-wb-common by kiegroup.
the class DataModelerScreenViewImpl method showYesNoCancelPopup.
@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();
}
use of org.uberfire.ext.widgets.common.client.common.popups.YesNoCancelPopup in project kie-wb-common by kiegroup.
the class ImportsWidgetViewImpl method setup.
private void setup() {
// Setup table
table.setStriped(true);
table.setCondensed(true);
table.setBordered(true);
table.setEmptyTableWidget(new Label(ImportConstants.INSTANCE.noImportsDefined()));
// Columns
final TextColumn<Import> importTypeColumn = new TextColumn<Import>() {
@Override
public String getValue(final Import importType) {
return importType.getType();
}
};
final ButtonCell deleteImportButton = new ButtonCell(IconType.TRASH, ButtonType.DANGER, ButtonSize.SMALL) {
@Override
public void render(final com.google.gwt.cell.client.Cell.Context context, final SafeHtml data, final SafeHtmlBuilder sb) {
// Don't render a "Delete" button for "internal" Fact Types
if (isExternalImport(context.getIndex())) {
super.render(context, data, sb);
}
}
@Override
public void onBrowserEvent(final Context context, final Element parent, final String value, final NativeEvent event, final ValueUpdater<String> valueUpdater) {
// Don't act on cell interactions for "internal" Fact Types
if (isExternalImport(context.getIndex())) {
super.onBrowserEvent(context, parent, value, event, valueUpdater);
}
}
@Override
protected void onEnterKeyDown(final Context context, final Element parent, final String value, final NativeEvent event, final ValueUpdater<String> valueUpdater) {
// Don't act on cell interactions for "internal" Fact Types
if (isExternalImport(context.getIndex())) {
super.onEnterKeyDown(context, parent, value, event, valueUpdater);
}
}
};
final Column<Import, String> deleteImportColumn = new Column<Import, String>(deleteImportButton) {
@Override
public String getValue(final Import importType) {
return ImportConstants.INSTANCE.remove();
}
};
deleteImportColumn.setFieldUpdater((index, importType, value) -> {
if (isReadOnly) {
return;
}
final YesNoCancelPopup confirm = YesNoCancelPopup.newYesNoCancelPopup(ImportConstants.INSTANCE.remove(), ImportConstants.INSTANCE.promptForRemovalOfImport0(importType.getType()), () -> getRemoveImportCommand().execute(importType), () -> {
/*Nothing*/
}, null);
confirm.show();
});
table.addColumn(importTypeColumn, new TextHeader(ImportConstants.INSTANCE.importType()));
table.addColumn(deleteImportColumn, ImportConstants.INSTANCE.remove());
// Link display
getDataProvider().addDataDisplay(table);
}
use of org.uberfire.ext.widgets.common.client.common.popups.YesNoCancelPopup in project kie-wb-common by kiegroup.
the class AbstractProjectDiagramEditor method executeWithConfirm.
private void executeWithConfirm(final String message, final Command command) {
final Command yesCommand = command::execute;
final Command noCommand = () -> {
};
final YesNoCancelPopup popup = YesNoCancelPopup.newYesNoCancelPopup(message, null, yesCommand, noCommand, noCommand);
popup.show();
}
use of org.uberfire.ext.widgets.common.client.common.popups.YesNoCancelPopup in project kie-wb-common by kiegroup.
the class PopupHelper method showYesNoPopup.
public void showYesNoPopup(final String title, final String message, final Command yesCommand, final Command noCommand) {
YesNoCancelPopup popup = newYesNoPopup(title, message, yesCommand, noCommand);
popup.setClosable(false);
popup.clearScrollHeight();
popup.show();
}
Aggregations