package devopsdistilled.operp.client.items;

import javax.swing.JComponent;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JTable;
import javax.swing.table.DefaultTableModel;

import devopsdistilled.operp.client.abstracts.SubTaskPane;

public class ListItemPane extends SubTaskPane implements ListItemModelObserver {

	private final ListItemPaneController controller;
	private final ListItemModel model;

	private JPanel pane;
	private JTable table;
	private DefaultTableModel tableModel;

	public ListItemPane(ListItemPaneController controller, ListItemModel model) {
		this.controller = controller;

		this.model = model;
		model.registerObserver(this);
	}

	/**
	 * @wbp.parser.entryPoint
	 */
	public void init() {
		pane = new JPanel();
		Object[][] data = { { 1.0, 0.0, 0.0 }, { 0.0, 1.0, 0.0 },
				{ 0.0, 0.0, 1.0 } };

		Object[] columnNames = { "First", "Second", "Third" };
		tableModel = new DefaultTableModel(data, columnNames);
		table = new JTable(tableModel);

		table.setShowHorizontalLines(true);
		pane.add(new JScrollPane(table));
		pane.add(new JLabel("Label in Pane"));

		// controller.loadData();
	}

	@Override
	public void updateAll() {
		// TODO Auto-generated method stub

	}

	@Override
	public JComponent getPane() {
		return pane;
	}

	@Override
	public void updateItemList() {
		// TODO Auto-generated method stub

	}

	@Override
	public void updateColumnNames() {
		tableModel.setColumnIdentifiers(model.getTableColumnNames());
	}
}

@@ -53,27 +53,22 @@
 java
-x.swing.JComponent;
+.util.Vector;%0A
 %0Aimp
@@ -84,21 +84,25 @@
 .swing.J
-Label
+Component
 ;%0Aimport
@@ -284,16 +284,76 @@
 askPane;
+%0Aimport devopsdistilled.operp.server.data.entity.items.Item;
 %0A%0Apublic
@@ -856,151 +856,8 @@
 ();%0A
-%09%09Object%5B%5D%5B%5D data = %7B %7B 1.0, 0.0, 0.0 %7D, %7B 0.0, 1.0, 0.0 %7D,%0A%09%09%09%09%7B 0.0, 0.0, 1.0 %7D %7D;%0A%0A%09%09Object%5B%5D columnNames = %7B %22First%22, %22Second%22, %22Third%22 %7D;%0A
 %09%09ta
@@ -893,25 +893,8 @@
 del(
-data, columnNames
 );%0A%09
@@ -930,130 +930,47 @@
 l);%0A
-%0A%09%09table.setShowHorizontalLines(true);%0A%09%09pane.add(new JScrollPane(table));%0A%09%09pane.add(new JLabel(%22Label in Pane%22));%0A%0A%09%09// 
+%09%09pane.add(new JScrollPane(table));%0A%0A%09%09
 cont
@@ -1182,43 +1182,124 @@
 %7B%0A%09%09
-// TODO Auto-generated method stub%0A
+Vector%3CItem%3E items = new Vector%3C%3E(model.getItems());%0A%09%09tableModel.setDataVector(items, model.getTableColumnNames());
 %0A%09%7D%0A

Define updateItemList()