package devopsdistilled.operp.client.stock.panes;

import javax.swing.JComponent;

import devopsdistilled.operp.client.abstracts.SubTaskPane;
import devopsdistilled.operp.client.stock.panes.models.observers.ListStockActivitiesPaneModelObserver;

public class ListStockActivitiesPane extends SubTaskPane implements
		ListStockActivitiesPaneModelObserver {

	@Override
	public JComponent getPane() {
		// TODO Auto-generated method stub
		return null;
	}

}

@@ -59,82 +59,636 @@
 java
-x.swing.JComponent;%0A%0Aimport devopsdistilled.operp.client.abstracts.SubTask
+.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.stock.models.observers.StockKeeperModelObserver;%0Aimport devopsdistilled.operp.client.stock.panes.details.StockKeepingDetails
 Pane
@@ -791,16 +791,83 @@
 bserver;
+%0Aimport devopsdistilled.operp.server.data.entity.stock.StockKeeper;
 %0A%0Apublic
@@ -970,108 +970,1367 @@
 rver
- %7B%0A%0A%09@Override%0A%09public JComponent getPane() %7B%0A%09%09// TODO Auto-generated method stub%0A%09%09return null
+, StockKeeperModelObserver %7B%0A%0A%09@Inject%0A%09private StockKeepingDetailsPane stockKeepingDetailsPane;%0A%0A%09private final JPanel pane;%0A%09private final JTable table;%0A%09BeanTableModel%3CStockKeeper%3E tableModel;%0A%0A%09public ListStockActivitiesPane() %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%09StockKeeper stockKeeper = tableModel.getRow(table%0A%09%09%09%09%09%09%09.getSelectedRow());%0A%09%09%09%09%09stockKeepingDetailsPane.show(stockKeeper);%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%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 updateStockActivities(List%3CStockKeeper%3E stockActivities) %7B%0A%09%09tableModel = null;%0A%09%09tableModel = new BeanTableModel%3C%3E(StockKeeper.class, stockActivities);%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%0A

Configure Stock Activities list to display