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);
}
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);
}
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);
}
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);
}
}
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);
}
Aggregations