use of com.jgoodies.jsdl.core.pane.TaskPane in project kindergarten by clear-group-ausbildung.
the class PurchaseEditorModel method removeLineItem.
@Action(enabled = false)
public void removeLineItem(final ActionEvent e) {
final PurchaseBean purchase = getSelection();
final String mainInstruction = RESOURCES.getString("deleteItem.mainInstruction", "Artikel-Nr: " + purchase.getItemNumber() + ", Verk\u00e4fernummer: " + purchase.getVendorNumber());
final TaskPane pane = new TaskPane(MessageType.QUESTION, mainInstruction, CommandValue.YES, CommandValue.NO);
pane.setPreferredWidth(PreferredWidth.MEDIUM);
pane.showDialog(e, RESOURCES.getString("deleteItem.title"));
if (pane.getCommitValue() == CommandValue.YES) {
getSelectionInList().getList().remove(purchase);
refreshSummary();
}
}
use of com.jgoodies.jsdl.core.pane.TaskPane in project kindergarten by clear-group-ausbildung.
the class VendorHomeModel method deleteItem.
@Action(enabled = false)
public void deleteItem(ActionEvent e) {
VendorBean vendor = getSelection();
String mainInstruction = RESOURCES.getString("deleteItem.mainInstruction", vendor.getLastName() + ", " + vendor.getFirstName());
TaskPane pane = new TaskPane(MessageType.QUESTION, mainInstruction, CommandValue.YES, CommandValue.NO);
pane.setPreferredWidth(PreferredWidth.MEDIUM);
pane.showDialog(e, RESOURCES.getString("deleteItem.title"));
if (pane.getCommitValue() == CommandValue.YES) {
SERVICE.delete(vendor);
postChangeHandler.onPostDelete();
}
}
use of com.jgoodies.jsdl.core.pane.TaskPane in project kindergarten by clear-group-ausbildung.
the class Dialogs method purchaseHasErrors.
/**
* @return {@code true} if canceled, {@code false} otherwise
*/
public static boolean purchaseHasErrors(EventObject e, PurchaseBean purchase) {
String title = RESOURCES.getString("dialogs.documentHasErrors.title");
String mainInstruction = RESOURCES.getString("dialogs.documentHasErrors.mainInstruction", purchase.getItemNumber());
String contentText = RESOURCES.getString("dialogs.documentHasErrors.content", purchase.getItemNumber());
TaskPane pane = new TaskPane(MessageType.WARNING, mainInstruction, contentText, CommandValue.DISCARD, CommandValue.CANCEL);
pane.setMarginContentTop(4);
pane.setMarginContentBottom(14);
pane.showDialog(e, title);
return pane.isCancelled();
}
use of com.jgoodies.jsdl.core.pane.TaskPane in project kindergarten by clear-group-ausbildung.
the class DefaultDesktopFrame method rejectFrameClosing.
// Helper Code ************************************************************
/**
* Handles the case where a frame close request has been rejected. Opens a task
* dialog that informs about the rejected request.
*
* @param e
* describes the rejected event
*
* @see #modalFrameClosing(EventObject, Runnable)
*/
private void rejectFrameClosing(EventObject e) {
TaskPane pane = new TaskPane(MessageType.INFORMATION, RESOURCES.getString("desktop.rejectFrameClosing.mainInstructionText"), RESOURCES.getString("desktop.rejectFrameClosing.contentText"), CommandValue.OK);
pane.setPreferredWidth(PreferredWidth.MEDIUM);
pane.showDialog(e, RESOURCES.getString("desktop.rejectFrameClosing.title"));
}
use of com.jgoodies.jsdl.core.pane.TaskPane in project kindergarten by clear-group-ausbildung.
the class PurchaseHomeModel method deleteItem.
@Action(enabled = false)
public void deleteItem(final ActionEvent e) {
final PurchaseBean purchase = getSelection();
final String mainInstruction = RESOURCES.getString("deleteItem.mainInstruction", "Artikel-Nr: " + purchase.getItemNumber());
final TaskPane pane = new TaskPane(MessageType.QUESTION, mainInstruction, CommandValue.YES, CommandValue.NO);
pane.setPreferredWidth(PreferredWidth.MEDIUM);
pane.showDialog(e, RESOURCES.getString("deleteItem.title"));
if (pane.getCommitValue() == CommandValue.YES) {
SERVICE.delete(purchase);
filterPurchases();
}
}
Aggregations