package edu.kit.iks.Cryptographics;

import javax.swing.JButton;
import javax.swing.JLabel;
import javax.swing.JPanel;

/**
 * An instance of this class represents the view of container controller
 * beside the actual visualization
 * 
 * @author Christian Dreher
 */
public class VisualizationContainerView extends JPanel {
	
	/**
	 * Serial Version UID
	 */
	private static final long serialVersionUID = 2802070691102616667L;

	/**
	 * Name of the current visualization
	 */
	private JLabel nameLabel;
	
	/**
	 * Button to exit the current visualization
	 */
	private JButton exitButton;
	
	/**
	 * Button to access interactive help for the current step inside the
	 * visualization
	 */
	private JButton helpButton;
	
	/**
	 * The content view that contains the actual visualization 
	 */
	private JPanel contentView;
	
	/**
	 * Constructor initializing a new instance of {VisualizationContainerView}
	 */
	public VisualizationContainerView() {
	    this.exitButton = new JButton("Exit");
	    this.add(this.exitButton);
	    
	    this.helpButton = new JButton("Help");
	    this.add(this.helpButton);
	    
	    this.nameLabel = new JLabel();
	    this.add(this.nameLabel);
	    
	    this.contentView = new JPanel();
	    this.add(this.contentView);
	    
	    this.validate();
	}

	/**
	 * @return the nameLabel
	 */
	public JLabel getNameLabel() {
		return nameLabel;
	}

	/**
	 * @return the exitButton
	 */
	public JButton getExitButton() {
		return exitButton;
	}

	/**
	 * @return the helpButton
	 */
	public JButton getHelpButton() {
		return helpButton;
	}
	
	/**
	 * @return the contentView
	 * @return
	 */
	public JPanel getContentView() {
		return contentView;
	}
}

@@ -30,16 +30,107 @@
 phics;%0A%0A
+import java.awt.Color;%0Aimport java.awt.GridBagConstraints;%0Aimport java.awt.GridBagLayout;%0A%0A
 import j
@@ -1033,20 +1033,190 @@
 ew() %7B%0A%09
-    
+%09super(new GridBagLayout());%0A%09%09GridBagConstraints constraints = new GridBagConstraints();%0A%09%09%0A%09%09// Create the exit button.%0A%09%09constraints.gridx = 0;%0A%09%09constraints.gridy = 0;%0A%09%09
 this.exi
@@ -1243,28 +1243,25 @@
 n(%22Exit%22);%0A%09
-    
+%09
 this.add(thi
@@ -1276,171 +1276,471 @@
 tton
-);%0A%09    %0A%09    this.helpButton = new JButton(%22Help%22);%0A%09    this.add(this.helpButton);%0A%09    %0A%09    this.nameLabel = new JLabel();%0A%09    this.add(this.nameLabel);%0A%09    
+, constraints);%0A%09%09%0A%09%09// Create the name label.%0A%09%09constraints.gridx = 1;%0A%09%09constraints.gridy = 0;%0A%09%09this.nameLabel = new JLabel();%0A%09%09this.add(this.nameLabel, constraints);%0A%09%09%0A%09%09// Create the help button.%0A%09%09constraints.gridx = 2;%0A%09%09constraints.gridy = 0;%0A%09%09this.helpButton = new JButton(%22Help%22);%0A%09%09this.add(this.helpButton, constraints);%0A%09%09%0A%09%09constraints.gridx = 0;%0A%09%09constraints.gridy = 1;%0A%09%09constraints.fill = GridBagConstraints.BOTH;%0A%09%09constraints.gridwidth = 3;
 %0A%09  
@@ -1774,16 +1774,64 @@
 anel();%0A
+%09    this.contentView.setBackground(Color.red);%0A
 %09    thi
@@ -1852,16 +1852,29 @@
 tentView
+, constraints
 );%0A%09    

Add basic GirdBagLayout.