@@ -0,0 +1,2326 @@
+package devopsdistilled.operp.client.party.panes;%0A%0Aimport java.awt.event.MouseAdapter;%0Aimport java.awt.event.MouseEvent;%0Aimport java.util.List;%0A%0Aimport javax.inject.Inject;%0Aimport javax.swing.JComponent;%0Aimport javax.swing.JPanel;%0Aimport javax.swing.JScrollPane;%0Aimport javax.swing.JTable;%0Aimport javax.swing.ListSelectionModel;%0Aimport javax.swing.SwingUtilities;%0A%0Aimport net.miginfocom.swing.MigLayout;%0Aimport devopsdistilled.operp.client.abstracts.SubTaskPane;%0Aimport devopsdistilled.operp.client.abstracts.libs.BeanTableModel;%0Aimport devopsdistilled.operp.client.party.controllers.CustomerController;%0Aimport devopsdistilled.operp.client.party.models.observers.CustomerModelObserver;%0Aimport devopsdistilled.operp.client.party.panes.models.observers.ListCustomerPaneModelObserver;%0Aimport devopsdistilled.operp.server.data.entity.party.Customer;%0Aimport devopsdistilled.operp.server.data.entity.party.Party;%0A%0Apublic class ListCustomerPane extends SubTaskPane implements%0A%09%09ListCustomerPaneModelObserver, CustomerModelObserver %7B%0A%0A%09@Inject%0A%09private CustomerController customerController;%0A%0A%09private final JPanel pane;%0A%09private final JTable table;%0A%09BeanTableModel%3CCustomer%3E tableModel;%0A%0A%09public ListCustomerPane() %7B%0A%09%09pane = new JPanel();%0A%09%09pane.setLayout(new MigLayout(%22fill%22));%0A%09%09table = new JTable(tableModel);%0A%09%09table.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);%0A%09%09table.addMouseListener(new MouseAdapter() %7B%0A%09%09%09@Override%0A%09%09%09public void mousePressed(MouseEvent e) %7B%0A%09%09%09%09if (SwingUtilities.isLeftMouseButton(e)%0A%09%09%09%09%09%09&& e.getClickCount() == 2%0A%09%09%09%09%09%09&& table.getSelectedRow() != -1) %7B%0A%09%09%09%09%09Customer customer = tableModel.getRow(table%0A%09%09%09%09%09%09%09.getSelectedRow());%0A%0A%09%09%09%09%09customerController.showDetails(customer);%0A%0A%09%09%09%09%7D%0A%09%09%09%7D%0A%09%09%7D);%0A%0A%09%09final JScrollPane scrollPane = new JScrollPane(table,%0A%09%09%09%09JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED,%0A%09%09%09%09JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);%0A%09%09pane.add(scrollPane, %22grow%22);%0A%09%7D%0A%0A%09@Override%0A%09public JComponent getPane() %7B%0A%09%09return pane;%0A%09%7D%0A%0A%09@Override%0A%09public void updateCustomers(List%3CCustomer%3E customers) %7B%0A%0A%09%09tableModel = null;%0A%09%09tableModel = new BeanTableModel%3C%3E(Customer.class, Party.class,%0A%09%09%09%09customers);%0A%0A%09%09for (int i = 0; i %3C table.getColumnCount(); i++) %7B%0A%09%09%09tableModel.setColumnEditable(i, false);%0A%09%09%7D%0A%09%09tableModel.setModelEditable(false);%0A%09%09table.setModel(tableModel);%0A%09%7D%0A%7D

Add ListCustomerPane