use of com.jgoodies.application.Action 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.application.Action in project kindergarten by clear-group-ausbildung.
the class PurchaseEditorModel method addLineItem.
// Actions ****************************************************************
@Action
public void addLineItem(final ActionEvent e) {
TextComponentUtils.commitImmediately();
triggerCommit();
if (checkBeanContent()) {
getSelectionInList().getList().add(getBean());
refreshSummary();
setBean(new PurchaseBean());
}
}
use of com.jgoodies.application.Action in project kindergarten by clear-group-ausbildung.
the class PurchaseHomeModel method newItem.
@Action
public void newItem(final ActionEvent e) {
final String title = RESOURCES.getString("newPurchase.title");
editItem(e, title, new PurchaseBean(), true);
}
use of com.jgoodies.application.Action 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.application.Action 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