Search in sources :

Example 1 with ProductProcessorStub

use of eu.ggnet.dwoss.receipt.stub.ProductProcessorStub in project dwoss by gg-net.

the class EditCpuPanel method main.

// End of variables declaration//GEN-END:variables
public static void main(String[] args) throws Exception {
    UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
    Cpu cpu = new Cpu(Cpu.Series.CORE_I7, "930", Cpu.Type.DESKTOP, 3.00, 4);
    EditCpuPanel view = new EditCpuPanel(new ProductProcessorStub(), new ArrayList<Cpu>());
    view.setCpu(cpu);
    OkCancelDialog<EditCpuPanel> create = new OkCancelDialog<>("Spezifikationen", view);
    create.setVisible(true);
    if (create.getCloseType() == CloseType.OK) {
        System.out.println(view.getCpu());
    }
    System.exit(0);
}
Also used : Cpu(eu.ggnet.dwoss.spec.ee.entity.piece.Cpu) ProductProcessorStub(eu.ggnet.dwoss.receipt.stub.ProductProcessorStub)

Example 2 with ProductProcessorStub

use of eu.ggnet.dwoss.receipt.stub.ProductProcessorStub in project dwoss by gg-net.

the class DesktopBundleViewTryout method tryoutView.

@Test
public void tryoutView() throws InterruptedException {
    final ProductSpec spec = new SpecGenerator().makeSpec();
    DesktopBundleView view = new DesktopBundleView(new Mandators() {

        @Override
        public Mandator loadMandator() {
            return Mandator.builder().defaultMailSignature(null).smtpConfiguration(null).mailTemplateLocation(null).company(CompanyGen.makeCompany()).dossierPrefix("DW").documentIntermix(null).documentIdentifierGeneratorConfigurations(new EnumMap<>(DocumentType.class)).build();
        }

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

        @Override
        public ReceiptCustomers loadReceiptCustomers() {
            return ReceiptCustomers.builder().build();
        }

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

        @Override
        public Contractors loadContractors() {
            return new Contractors(EnumSet.of(TradeName.ALSO, TradeName.ACER), EnumSet.of(TradeName.ACER));
        }

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

        @Override
        public ShippingTerms loadShippingTerms() {
            // To change body of generated methods, choose Tools | Templates.
            throw new UnsupportedOperationException("loadShippingTerms - Not supported yet.");
        }
    }, new SpecAgent() {

        @Override
        public ProductSpec findProductSpecByPartNoEager(String partNo) {
            if (partNo == null)
                return null;
            if (partNo.startsWith("X"))
                return null;
            spec.setPartNo(partNo);
            return spec;
        }

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

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

        @Override
        public <T> List<T> findAll(Class<T> entityClass, int start, int amount) {
            // To change body of generated methods, choose Tools | Templates.
            throw new UnsupportedOperationException("Not supported yet.");
        }

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

        @Override
        public <T> List<T> findAllEager(Class<T> entityClass, int start, int amount) {
            // To change body of generated methods, choose Tools | Templates.
            throw new UnsupportedOperationException("Not supported yet.");
        }

        @Override
        public <T> T findById(Class<T> entityClass, Object id) {
            // To change body of generated methods, choose Tools | Templates.
            throw new UnsupportedOperationException("Not supported yet.");
        }

        @Override
        public <T> T findById(Class<T> entityClass, Object id, LockModeType lockModeType) {
            // To change body of generated methods, choose Tools | Templates.
            throw new UnsupportedOperationException("Not supported yet.");
        }

        @Override
        public <T> T findByIdEager(Class<T> entityClass, Object id) {
            // To change body of generated methods, choose Tools | Templates.
            throw new UnsupportedOperationException("Not supported yet.");
        }

        @Override
        public <T> T findByIdEager(Class<T> entityClass, Object id, LockModeType lockModeType) {
            // To change body of generated methods, choose Tools | Templates.
            throw new UnsupportedOperationException("Not supported yet.");
        }
    }, new ProductProcessorStub(), TradeName.ACER, TradeName.ACER, ProductGroup.DESKTOP, ProductGroup.MONITOR);
    view.setSpec(new DesktopBundle());
    OkCancelDialog<DesktopBundleView> dialog = new OkCancelDialog<>("BundleView", view);
    dialog.setVisible(true);
    dialog.dispose();
}
Also used : ProductProcessorStub(eu.ggnet.dwoss.receipt.stub.ProductProcessorStub) SpecAgent(eu.ggnet.dwoss.spec.ee.SpecAgent) SpecGenerator(eu.ggnet.dwoss.spec.ee.assist.gen.SpecGenerator) OkCancelDialog(eu.ggnet.dwoss.util.OkCancelDialog) ProductSpec(eu.ggnet.dwoss.spec.ee.entity.ProductSpec) DesktopBundle(eu.ggnet.dwoss.spec.ee.entity.DesktopBundle) DesktopBundleView(eu.ggnet.dwoss.receipt.product.DesktopBundleView) Mandators(eu.ggnet.dwoss.mandator.Mandators) LockModeType(javax.persistence.LockModeType) Test(org.junit.Test)

Example 3 with ProductProcessorStub

use of eu.ggnet.dwoss.receipt.stub.ProductProcessorStub in project dwoss by gg-net.

the class MonitorView method main.

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

Example 4 with ProductProcessorStub

use of eu.ggnet.dwoss.receipt.stub.ProductProcessorStub in project dwoss by gg-net.

the class SpecListPanel method main.

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

Example 5 with ProductProcessorStub

use of eu.ggnet.dwoss.receipt.stub.ProductProcessorStub 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)

Aggregations

ProductProcessorStub (eu.ggnet.dwoss.receipt.stub.ProductProcessorStub)10 OkCancelDialog (eu.ggnet.dwoss.util.OkCancelDialog)6 Mandators (eu.ggnet.dwoss.mandator.Mandators)2 SpecAgent (eu.ggnet.dwoss.spec.ee.SpecAgent)2 SpecGenerator (eu.ggnet.dwoss.spec.ee.assist.gen.SpecGenerator)2 ProductSpec (eu.ggnet.dwoss.spec.ee.entity.ProductSpec)2 LockModeType (javax.persistence.LockModeType)2 eu.ggnet.dwoss.mandator.api.value (eu.ggnet.dwoss.mandator.api.value)1 ProductProcessor (eu.ggnet.dwoss.receipt.ee.ProductProcessor)1 UnitSupporter (eu.ggnet.dwoss.receipt.ee.UnitSupporter)1 DesktopBundleView (eu.ggnet.dwoss.receipt.product.DesktopBundleView)1 DocumentType (eu.ggnet.dwoss.rules.DocumentType)1 TradeName (eu.ggnet.dwoss.rules.TradeName)1 ACER (eu.ggnet.dwoss.rules.TradeName.ACER)1 ONESELF (eu.ggnet.dwoss.rules.TradeName.ONESELF)1 DesktopBundle (eu.ggnet.dwoss.spec.ee.entity.DesktopBundle)1 ProductFamily (eu.ggnet.dwoss.spec.ee.entity.ProductFamily)1 ProductModel (eu.ggnet.dwoss.spec.ee.entity.ProductModel)1 ProductSeries (eu.ggnet.dwoss.spec.ee.entity.ProductSeries)1 Cpu (eu.ggnet.dwoss.spec.ee.entity.piece.Cpu)1