Search in sources :

Example 1 with CommitCallback

use of com.jgoodies.desktop.CommitCallback in project kindergarten by clear-group-ausbildung.

the class VendorAppliance method newVendor.

// Public API *************************************************************
public void newVendor(String title, final CommitCallback<VendorBean> outerCallback) {
    final VendorBean newVendor = new VendorBean();
    final CommitCallback<CommandValue> callback = result -> outerCallback.committed(result == CommandValue.OK ? newVendor : null);
    VendorEditorModel model = new VendorEditorModel(newVendor, callback);
    openVendorEditor(title, model);
}
Also used : ResourceMap(com.jgoodies.application.ResourceMap) Format(java.text.Format) CommandValue(com.jgoodies.jsdl.core.CommandValue) DesktopManager(com.jgoodies.desktop.DesktopManager) ParsePosition(java.text.ParsePosition) Collectors(java.util.stream.Collectors) Application(com.jgoodies.application.Application) DefaultAppliance(de.clearit.kindergarten.desktop.DefaultAppliance) CommitCallback(com.jgoodies.desktop.CommitCallback) VendorBean(de.clearit.kindergarten.domain.VendorBean) DesktopFrame(com.jgoodies.desktop.DesktopFrame) FieldPosition(java.text.FieldPosition) DefaultDesktopFrame(de.clearit.kindergarten.desktop.DefaultDesktopFrame) VendorBean(de.clearit.kindergarten.domain.VendorBean) CommandValue(com.jgoodies.jsdl.core.CommandValue)

Example 2 with CommitCallback

use of com.jgoodies.desktop.CommitCallback in project kindergarten by clear-group-ausbildung.

the class PurchaseAppliance method newPurchase.

// Public API *************************************************************
public void newPurchase(String title, final CommitCallback<PurchaseBean> outerCallback) {
    final PurchaseBean newPurchase = new PurchaseBean();
    final CommitCallback<CommandValue> callback = result -> outerCallback.committed(result == CommandValue.OK ? newPurchase : null);
    PurchaseEditorModel model = new PurchaseEditorModel(newPurchase, callback);
    openPurchaseEditor(title, model);
}
Also used : DesktopFrame(com.jgoodies.desktop.DesktopFrame) ResourceMap(com.jgoodies.application.ResourceMap) CommandValue(com.jgoodies.jsdl.core.CommandValue) PurchaseBean(de.clearit.kindergarten.domain.PurchaseBean) DesktopManager(com.jgoodies.desktop.DesktopManager) DefaultDesktopFrame(de.clearit.kindergarten.desktop.DefaultDesktopFrame) Application(com.jgoodies.application.Application) DefaultAppliance(de.clearit.kindergarten.desktop.DefaultAppliance) CommitCallback(com.jgoodies.desktop.CommitCallback) PurchaseBean(de.clearit.kindergarten.domain.PurchaseBean) CommandValue(com.jgoodies.jsdl.core.CommandValue)

Aggregations

Application (com.jgoodies.application.Application)2 ResourceMap (com.jgoodies.application.ResourceMap)2 CommitCallback (com.jgoodies.desktop.CommitCallback)2 DesktopFrame (com.jgoodies.desktop.DesktopFrame)2 DesktopManager (com.jgoodies.desktop.DesktopManager)2 CommandValue (com.jgoodies.jsdl.core.CommandValue)2 DefaultAppliance (de.clearit.kindergarten.desktop.DefaultAppliance)2 DefaultDesktopFrame (de.clearit.kindergarten.desktop.DefaultDesktopFrame)2 PurchaseBean (de.clearit.kindergarten.domain.PurchaseBean)1 VendorBean (de.clearit.kindergarten.domain.VendorBean)1 FieldPosition (java.text.FieldPosition)1 Format (java.text.Format)1 ParsePosition (java.text.ParsePosition)1 Collectors (java.util.stream.Collectors)1