private void showConfirmDialog(String file) { FragmentManager fm = getSupportFragmentManager(); Log.i("SHOWFILEACTIVITY", file); ConfirmDialog dialog = ConfirmDialog.newInstance(file); dialog.show(fm, "fragment_confirm_dialog"); }
.... final ConfirmDialog myDialog = new ConfirmDialog(initialText); myDialog.show(); ....
@Override public void success() { ConfirmDialog.show(getUI(), "Graph Templates", "Do you want to generate the default graph templates?\nAll the existing templates will be overriden.", "Yes", "No", new ConfirmDialog.Listener() { public void onClose(ConfirmDialog dialog) { if (dialog.isConfirmed()) { generateGraphTemplates(parser, logger); } close(); } }); } @Override
@Override public void success() { ConfirmDialog.show(getUI(), "Graph Templates", "Do you want to generate the default graph templates?\nAll the existing templates will be overriden.", "Yes", "No", new ConfirmDialog.Listener() { public void onClose(ConfirmDialog dialog) { if (dialog.isConfirmed()) { generateGraphTemplates(parser, logger); } close(); } }); } @Override
ConfirmDialog confirmDialog = new ConfirmDialog(); confirmDialog.show(getSupportFragmentManager(), "dialog");
@Override public void buttonClick(Button.ClickEvent event) { ConfirmDialog.show(getUI(), "Are you sure?", "By doing this all unsaved changes on the SNMP collection will be lost.", "Yes", "No", new ConfirmDialog.Listener() { public void onClose(ConfirmDialog dialog) { if (dialog.isConfirmed()) { final List<SnmpCollection> snmpCollections = dataCollectionConfigDao.getRootDataCollection().getSnmpCollections(); snmpCollectionTable.setSnmpCollections(snmpCollections); snmpCollectionTable.select(null); snmpCollectionForm.setVisible(false); } } }); } });
@Override public void buttonClick(Button.ClickEvent event) { ConfirmDialog.show(getUI(), "Are you sure?", "By doing this all unsaved changes on the SNMP collection will be lost.", "Yes", "No", new ConfirmDialog.Listener() { public void onClose(ConfirmDialog dialog) { if (dialog.isConfirmed()) { final List<SnmpCollection> snmpCollections = dataCollectionConfigDao.getRootDataCollection().getSnmpCollections(); snmpCollectionTable.setSnmpCollections(snmpCollections); snmpCollectionTable.select(null); snmpCollectionForm.setVisible(false); } } }); } });
holder.btn_start.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { /** Start the Dialog Here **/ ConfirmDialog confirmDialog = ConfirmDialog.newInstance("Titile of Dialog","Content or Description of Dialog"); //Setup Dialog confirmDialog.show(((AppCompatActivity)contextView).getSupportFragmentManager(), "confirmDialog"); //Show the Dialog confirmDialog.setOnContinueCancelClick(new ConfirmDialog.OnContinueCancelClick(){ //listen on Clicked Button @Override public void onContinueClicked() { //Do some operation or call some functions when Continue button is Clicked } @Override public void onCancelClicked() { //Do Nothing or Do some operation or call some functions when Cancel button is Clicked } }); /** END **/ } );
@Override public void run() { ConfirmDialog.show(app.getMainWindow(), windowCaption, message, getLocalizedMessage("confirm.yes"), getLocalizedMessage("confirm.no"), new ConfirmDialog.Listener() { @Override public void onClose(ConfirmDialog confirmDialog) { if (confirmDialog.isConfirmed()) { runnable.run(); } } }); } };
/** * Delete handler. */ private void deleteHandler() { final Object itemId = table.getValue(); if (itemId == null) { Notification.show("Please select a Varbind Decode from the table."); } else { ConfirmDialog.show(getUI(), "Are you sure?", "Do you really want to remove the selected Varbinds Decode field?\nThis action cannot be undone.", "Yes", "No", new ConfirmDialog.Listener() { public void onClose(ConfirmDialog dialog) { if (dialog.isConfirmed()) { table.removeItem(itemId); } } }); } }
/** * Delete handler. */ private void deleteHandler() { final Object itemId = table.getValue(); if (itemId == null) { Notification.show("Please select a Mask Element from the table."); } else { ConfirmDialog.show(getUI(), "Are you sure?", "Do you really want to remove the selected Mask Element field ?\nThis action cannot be undone.", "Yes", "No", new ConfirmDialog.Listener() { public void onClose(ConfirmDialog dialog) { if (dialog.isConfirmed()) { table.removeItem(itemId); } } }); } }
/** * Delete handler. */ private void deleteHandler() { final Object itemId = table.getValue(); if (itemId == null) { Notification.show("Please select a IncludeCollection from the table."); return; } ConfirmDialog.show(getUI(), "Are you sure?", "Do you really want to remove the selected Include Collection field?\nThis action cannot be undone.", "Yes", "No", new ConfirmDialog.Listener() { public void onClose(ConfirmDialog dialog) { if (dialog.isConfirmed()) { table.removeItem(itemId); } } }); }
/** * Delete handler. */ private void deleteHandler() { final Object itemId = table.getValue(); if (itemId == null) { Notification.show("Please select a MIB Object from the table."); } else { ConfirmDialog.show(getUI(), "Are you sure?", "Do you really want to remove the selected MIB Object?\nThis action cannot be undone.", "Yes", "No", new ConfirmDialog.Listener() { public void onClose(ConfirmDialog dialog) { if (dialog.isConfirmed()) { table.removeItem(itemId); } } }); } }
/** * Delete handler. */ private void deleteHandler() { final Object itemId = table.getValue(); if (itemId == null) { Notification.show("Please select a Parameter from the table."); } else { ConfirmDialog.show(getUI(), "Are you sure?", "Do you really want to remove the selected parameter from the strategy?\nThis action cannot be undone.", "Yes", "No", new ConfirmDialog.Listener() { public void onClose(ConfirmDialog dialog) { if (dialog.isConfirmed()) { table.removeItem(itemId); } } }); } }
/** * Delete handler. */ private void deleteHandler() { final Object itemId = table.getValue(); if (itemId == null) { Notification.show("Please select a Parameter from the table."); } else { ConfirmDialog.show(getUI(), "Are you sure?", "Do you really want to remove the selected parameter from the strategy?\nThis action cannot be undone.", "Yes", "No", new ConfirmDialog.Listener() { public void onClose(ConfirmDialog dialog) { if (dialog.isConfirmed()) { table.removeItem(itemId); } } }); } }
/** * Delete handler. */ private void deleteHandler() { final Object itemId = table.getValue(); if (itemId == null) { Notification.show("Please select a Mask Element from the table."); } else { ConfirmDialog.show(getUI(), "Are you sure?", "Do you really want to remove the selected Mask Element field ?\nThis action cannot be undone.", "Yes", "No", new ConfirmDialog.Listener() { public void onClose(ConfirmDialog dialog) { if (dialog.isConfirmed()) { table.removeItem(itemId); } } }); } }
private void onReset(ClickEvent event) { if (form.isModified()) { ConfirmDialog.show( UI.getCurrent(), "Confirmation", "Would you like to discard you changes?", "Yes", "No", (ConfirmDialog.Listener) dialog -> { if (dialog.isConfirmed()) { onEnter(this.entityId, new String[0]); } }); } else { onEnter(this.entityId, new String[0]); } }
protected void add( final ClickEvent event) { if (form.isModified()) { ConfirmDialog.show( UI.getCurrent(), "Confirmation", "Would you like to discard you changes?", "Yes", "No", (ConfirmDialog.Listener) dialog -> { if (dialog.isConfirmed()) { //Load and enter a new entity id onEnter(NEW_ENTITY_ID, new String[0]); } }); } else { onEnter(NEW_ENTITY_ID, new String[0]); } }
public void deleteTreeItem(final Object widget) { I18NSource messages = I18NSource.ThreadUtil.getThreadI18nSource(); ConfirmDialog.show(application.getMainWindow(), messages.getMessage("dialog.delete.title"), messages.getMessage("dialog.delete.question"), messages.getMessage("dialog.delete.confirm"), messages.getMessage("dialog.delete.cancel"), new ConfirmDialog.Listener() { public void onClose(ConfirmDialog dialog) { if (dialog.isConfirmed()) { HierarchicalContainer hc = (HierarchicalContainer) stepTree.getContainerDataSource(); hc.removeItemRecursively(widget); showParams(null); } } } ); }
@Override protected void fireClick(final MouseEventDetails details) { ConfirmDialog dialog = ConfirmDialog.show(getUI(), getConfirmWindowCaption(), getConfirmationText(), getOkCaption(), getCancelCaption(), new Runnable() { @Override public void run() { doFireClickListener(details); } }); dialog.getOkButton().addStyleName(confirmWindowOkButtonStyle); }