use of eu.ggnet.dwoss.customer.ee.entity.Address in project dwoss by gg-net.
the class AddressUpdateController method getAddress.
/**
* Get the Address back
*/
private Address getAddress() {
Address a = new Address();
a.setStreet(street.getText());
a.setZipCode(zipcode.getText());
a.setCity(city.getText());
a.setIsoCountry(countrybox.getSelectionModel().getSelectedItem());
return a;
}
use of eu.ggnet.dwoss.customer.ee.entity.Address in project dwoss by gg-net.
the class AddressUpdateTryout method main.
public static void main(String[] args) {
CustomerGenerator gen = new CustomerGenerator();
Address address = gen.makeAddress();
JButton close = new JButton("Schliessen");
close.addActionListener(e -> Ui.closeWindowOf(close));
JButton editButton = new JButton("Edit");
editButton.addActionListener(ev -> {
if (address.getViolationMessage() != null) {
System.out.println("Address ViolationMessages: " + address.getViolationMessage());
}
Ui.exec(() -> {
Ui.build().fxml().eval(() -> address, AddressUpdateController.class).opt().ifPresent(System.out::println);
});
});
JButton addButton = new JButton("Add");
addButton.addActionListener(ev -> {
Ui.exec(() -> {
Ui.build().fxml().eval(() -> new Address(), AddressUpdateController.class).opt().ifPresent(System.out::println);
});
});
JPanel p = new JPanel();
p.add(editButton);
p.add(addButton);
p.add(close);
UiCore.startSwing(() -> p);
}
use of eu.ggnet.dwoss.customer.ee.entity.Address in project dwoss by gg-net.
the class ContactTest method testGetViolationMessagesNonValid2.
@Test
public void testGetViolationMessagesNonValid2() {
contact.getAddresses().add(new Address());
assertThat(contact.getViolationMessage()).as("Contact with invalid address").isNotBlank();
}
Aggregations