Search in sources :

Example 16 with OkCancelDialog

use of eu.ggnet.dwoss.util.OkCancelDialog in project dwoss by gg-net.

the class CreateCustomerTryout method main.

public static void main(String[] args) {
    Dl.remote().add(Mandators.class, mock(Mandators.class));
    Dl.local().add(Guardian.class, new AbstractGuardian() {

        {
            setAllUsersnames(Arrays.asList("hans", "claus", "peter"));
        }

        @Override
        public void login(String user, char[] pass) throws AuthenticationException {
        }
    });
    Dl.remote().add(OldCustomerAgent.class, new OldCustomerAgent() {

        @Override
        public OldCustomer findById(long id) {
            OldCustomer customer = new OldCustomer("Die Firma", "Herr", "Max", "Mustermann", "Keine Bemerkungen die ganz lang sein muss um zu testen ob die tabelle richtig funzt, was erst bei richtig richtig langem text auffällt und olli sicher nervt xD", "Helle Strasse 22", "12345", "Musterhausen", "LIStraße", "LIPLZ", "LIOrt");
            customer.setKundenID(1);
            customer.setTelefonnummer("0190 666666");
            customer.setHandynummer("0123456789");
            customer.setPaymentMethod(PaymentMethod.ADVANCE_PAYMENT);
            customer.setPaymentCondition(PaymentCondition.DEALER);
            customer.setShippingCondition(ShippingCondition.DEALER_ONE);
            customer.setAllowedSalesChannels(EnumSet.of(SalesChannel.CUSTOMER, SalesChannel.RETAILER));
            customer.addFlag(CustomerFlag.CONFIRMS_DOSSIER);
            customer.setHaendler(true);
            return customer;
        }

        @Override
        public OldCustomer store(OldCustomer old) {
            // To change body of generated methods, choose Tools | Templates.
            throw new UnsupportedOperationException("Not supported yet.");
        }
    });
    Dl.remote().add(CustomerService.class, new CustomerService() {

        @Override
        public List<UiCustomer> asUiCustomers(String company, String firstName, String lastName, String email, boolean appendWildcard) {
            L.info("call of asUiCustomers(company={},firstName={},lastName={},email={},wildCard={}", company, firstName, lastName, email, appendWildcard);
            return new ArrayList<>();
        }

        // <editor-fold defaultstate="collapsed" desc="Unused Methods">
        @Override
        public CustomerMetaData asCustomerMetaData(long customerId) {
            // To change body of generated methods, choose Tools | Templates.
            throw new UnsupportedOperationException("Not supported yet.");
        }

        @Override
        public UiCustomer asUiCustomer(long customerId) {
            // To change body of generated methods, choose Tools | Templates.
            throw new UnsupportedOperationException("Not supported yet.");
        }

        @Override
        public List<UiCustomer> asUiCustomers(String search) {
            // To change body of generated methods, choose Tools | Templates.
            throw new UnsupportedOperationException("Not supported yet.");
        }

        @Override
        public String asHtmlHighDetailed(long id) {
            // To change body of generated methods, choose Tools | Templates.
            throw new UnsupportedOperationException("Not supported yet.");
        }

        @Override
        public String findComment(long id) {
            // To change body of generated methods, choose Tools | Templates.
            throw new UnsupportedOperationException("Not supported yet.");
        }

        @Override
        public void updateCustomerFlags(long customerId, Set<CustomerFlag> flags) {
            // To change body of generated methods, choose Tools | Templates.
            throw new UnsupportedOperationException("Not supported yet.");
        }

        @Override
        public List<CustomerMetaData> allAsCustomerMetaData() {
            // To change body of generated methods, choose Tools | Templates.
            throw new UnsupportedOperationException("Not supported yet.");
        }

        @Override
        public List<Long> allSystemCustomerIds() {
            // To change body of generated methods, choose Tools | Templates.
            throw new UnsupportedOperationException("Not supported yet.");
        }

        @Override
        public String asNewHtmlHighDetailed(long id) {
            // To change body of generated methods, choose Tools | Templates.
            throw new UnsupportedOperationException("Not supported yet.");
        }
    });
    CustomerCreateWithSearchView view = new CustomerCreateWithSearchView();
    CustomerCreateWithSearchController controller = new CustomerCreateWithSearchController();
    controller.setView(view);
    view.setController(controller);
    OkCancelDialog<CustomerCreateWithSearchView> dialog = new OkCancelDialog<>("Kundenmanagement", view);
    dialog.setVisible(true);
    System.out.println(view.getCustomer());
    System.exit(0);
}
Also used : CustomerService(eu.ggnet.dwoss.customer.opi.CustomerService) OldCustomer(eu.ggnet.dwoss.customer.ee.priv.OldCustomer) OldCustomerAgent(eu.ggnet.dwoss.customer.ee.priv.OldCustomerAgent) AuthenticationException(eu.ggnet.saft.core.auth.AuthenticationException) CustomerMetaData(eu.ggnet.dwoss.customer.opi.CustomerMetaData) OkCancelDialog(eu.ggnet.dwoss.util.OkCancelDialog) AbstractGuardian(eu.ggnet.dwoss.common.AbstractGuardian) CustomerCreateWithSearchController(eu.ggnet.dwoss.customer.ui.old.CustomerCreateWithSearchController) CustomerCreateWithSearchView(eu.ggnet.dwoss.customer.ui.old.CustomerCreateWithSearchView) Mandators(eu.ggnet.dwoss.mandator.Mandators) UiCustomer(eu.ggnet.dwoss.customer.opi.UiCustomer)

Example 17 with OkCancelDialog

use of eu.ggnet.dwoss.util.OkCancelDialog in project dwoss by gg-net.

the class CpuListPanel method main.

// End of variables declaration//GEN-END:variables
public static void main(String[] args) {
    CpuListController controller;
    ProductProcessorStub stub = new ProductProcessorStub();
    controller = new CpuListController(stub.getSpecAgentStub());
    OkCancelDialog<CpuListPanel> panel = new OkCancelDialog<>("blub", new CpuListPanel(controller));
    panel.setVisible(true);
    System.exit(0);
}
Also used : OkCancelDialog(eu.ggnet.dwoss.util.OkCancelDialog) ProductProcessorStub(eu.ggnet.dwoss.receipt.stub.ProductProcessorStub)

Example 18 with OkCancelDialog

use of eu.ggnet.dwoss.util.OkCancelDialog in project dwoss by gg-net.

the class DisplayAbleView method main.

// End of variables declaration//GEN-END:variables
public static void main(String[] args) throws Exception {
    UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
    ProductProcessorStub receipt = new ProductProcessorStub();
    DisplayAbleView view = new DisplayAbleView(receipt.getSpecAgentStub(), ProductGroup.NOTEBOOK);
    view.setSpec(receipt.allInOne);
    OkCancelDialog<DisplayAbleView> create = new OkCancelDialog<>("Spezifikationen", view);
    create.setVisible(true);
    System.out.println(SpecFormater.toSingleLine(view.getSpec()));
    System.exit(0);
}
Also used : OkCancelDialog(eu.ggnet.dwoss.util.OkCancelDialog) ProductProcessorStub(eu.ggnet.dwoss.receipt.stub.ProductProcessorStub)

Example 19 with OkCancelDialog

use of eu.ggnet.dwoss.util.OkCancelDialog in project dwoss by gg-net.

the class GpuListController method editSelected.

/**
 * Open EditCpuPanel via table selection
 */
public void editSelected() {
    EditGpuPanel gpuPanel = new EditGpuPanel(allGpus);
    gpuPanel.setGpu(model.getSelected());
    OkCancelDialog<EditGpuPanel> dialog = new OkCancelDialog<>(SwingUtilities.getWindowAncestor(this.view), "GPU bearbeiten", gpuPanel);
    dialog.setVisible(true);
    if (dialog.getCloseType() == CloseType.OK) {
        model.remove(model.getSelected());
        Gpu editGpu = gpuPanel.getGpu();
        model.add(editGpu);
    }
}
Also used : OkCancelDialog(eu.ggnet.dwoss.util.OkCancelDialog) Gpu(eu.ggnet.dwoss.spec.ee.entity.piece.Gpu)

Example 20 with OkCancelDialog

use of eu.ggnet.dwoss.util.OkCancelDialog in project dwoss by gg-net.

the class GpuListPanel method main.

// End of variables declaration//GEN-END:variables
public static void main(String[] args) {
    GpuListController controller;
    ProductProcessorStub stub = new ProductProcessorStub();
    controller = new GpuListController(stub.getSpecAgentStub());
    OkCancelDialog<GpuListPanel> panel = new OkCancelDialog<>("blub", new GpuListPanel(controller));
    panel.setVisible(true);
    System.exit(0);
}
Also used : OkCancelDialog(eu.ggnet.dwoss.util.OkCancelDialog) ProductProcessorStub(eu.ggnet.dwoss.receipt.stub.ProductProcessorStub)

Aggregations

OkCancelDialog (eu.ggnet.dwoss.util.OkCancelDialog)20 ProductProcessorStub (eu.ggnet.dwoss.receipt.stub.ProductProcessorStub)6 Position (eu.ggnet.dwoss.redtape.ee.entity.Position)5 Document (eu.ggnet.dwoss.redtape.ee.entity.Document)4 AfterInvoicePosition (eu.ggnet.dwoss.redtapext.ui.cao.document.AfterInvoicePosition)4 RedTapeWorker (eu.ggnet.dwoss.redtapext.ee.RedTapeWorker)3 CreditMemoView (eu.ggnet.dwoss.redtapext.ui.cao.document.annulation.CreditMemoView)3 OldCustomer (eu.ggnet.dwoss.customer.ee.priv.OldCustomer)2 OldCustomerAgent (eu.ggnet.dwoss.customer.ee.priv.OldCustomerAgent)2 Mandators (eu.ggnet.dwoss.mandator.Mandators)2 SalesProduct (eu.ggnet.dwoss.redtape.ee.entity.SalesProduct)2 SpecAgent (eu.ggnet.dwoss.spec.ee.SpecAgent)2 ProductSpec (eu.ggnet.dwoss.spec.ee.entity.ProductSpec)2 ArrayList (java.util.ArrayList)2 AbstractGuardian (eu.ggnet.dwoss.common.AbstractGuardian)1 AddressService (eu.ggnet.dwoss.customer.opi.AddressService)1 CustomerMetaData (eu.ggnet.dwoss.customer.opi.CustomerMetaData)1 CustomerService (eu.ggnet.dwoss.customer.opi.CustomerService)1 UiCustomer (eu.ggnet.dwoss.customer.opi.UiCustomer)1 CustomerCreateWithSearchController (eu.ggnet.dwoss.customer.ui.old.CustomerCreateWithSearchController)1