package com.redpois0n.gitj.ui;

import com.redpois0n.git.Repository;
import java.awt.BorderLayout;
import javax.swing.JSplitPane;

@SuppressWarnings("serial")
public class CommitPanel extends AbstractPanel {
	
	private PanelUncommited panelList;

	public CommitPanel(Repository repo) {
		super(repo);
		setLayout(new BorderLayout(0, 0));
		
		JSplitPane splitPane = new JSplitPane();
		splitPane.setResizeWeight(0.5);
		splitPane.setOrientation(JSplitPane.VERTICAL_SPLIT);
		
		add(splitPane, BorderLayout.CENTER);
		
		JSplitPane topSplitPane = new JSplitPane();
		topSplitPane.setResizeWeight(0.5);
		panelList = new PanelUncommited(repo);
		topSplitPane.setRightComponent(panelList);
		
		splitPane.setLeftComponent(topSplitPane);
	}
	
	public PanelUncommited getListPanel() {
		return panelList;
	}

}

@@ -62,16 +62,49 @@
 sitory;%0A
+import com.redpois0n.gitj.Main;%0A%0A
 import j
@@ -125,16 +125,17 @@
 Layout;%0A
+%0A
 import j
@@ -237,16 +237,43 @@
 nel %7B%0A%09%0A
+%09private MainFrame parent;%0A
 %09private
@@ -321,16 +321,34 @@
 itPanel(
+MainFrame parent, 
 Reposito
@@ -373,16 +373,40 @@
 (repo);%0A
+%09%09this.parent = parent;%0A
 %09%09setLay
@@ -738,16 +738,126 @@
 (repo);%0A
+%09%09try %7B%0A%09%09%09panelList.reload();%0A%09%09%7D catch (Exception e) %7B%0A%09%09%09e.printStackTrace();%0A%09%09%09Main.displayError(e);%0A%09%09%7D%0A
 %09%09topSpl
@@ -870,12 +870,11 @@
 .set
-Righ
+Lef
 tCom
@@ -1007,12 +1007,69 @@
 List;%0A%09%7D
+%0A%09%0A%09public void cancel() %7B%0A%09%09parent.removePanel(this);%0A%09%7D
 %0A%0A%7D%0A

Correct layout