package simogl.gui;
import javax.swing.BorderFactory;
import javax.swing.JComponent;

import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.SwingConstants;
import javax.swing.border.BevelBorder;
import org.jdesktop.layout.GroupLayout;
import org.jdesktop.layout.LayoutStyle;

/**
* This code was edited or generated using CloudGarden's Jigloo
* SWT/Swing GUI Builder, which is free for non-commercial
* use. If Jigloo is being used commercially (ie, by a corporation,
* company or business for any purpose whatever) then you
* should purchase a license for each developer using Jigloo.
* Please visit www.cloudgarden.com for details.
* Use of Jigloo implies acceptance of these licensing terms.
* A COMMERCIAL LICENSE HAS NOT BEEN PURCHASED FOR
* THIS MACHINE, SO JIGLOO OR THIS CODE CANNOT BE USED
* LEGALLY FOR ANY CORPORATE OR COMMERCIAL PURPOSE.
*/
public class ControlsDialog extends javax.swing.JDialog {
	private JLabel labelHeadline;
	private JLabel labelForward;
	private JLabel labelLeft;
	private JLabel labelMapModeKey;
	private JLabel labelMapMode;
	private JLabel labelSwitchKey;
	private JLabel labelPickKey;
	private JLabel labelConstructKey;
	private JLabel labelRotCamKey;
	private JLabel labelDownKey;
	private JLabel labelUpKey;
	private JLabel labelRightKey;
	private JLabel labelLeftKey;
	private JLabel labelBackKey;
	private JLabel labelForwKey;
	private JLabel labelPick;
	private JLabel labelSwitchFreeLook;
	private JLabel lableConstruct;
	private JLabel labelRotate;
	private JLabel labelDown;
	private JLabel labelUp;
	private JLabel labelRight;
	private JLabel labelBackwards;
	
	public ControlsDialog(JFrame frame) {
		super(frame);
		initGUI();
	}
	
	private void initGUI() {
		try {
			GroupLayout thisLayout = new GroupLayout(
				(JComponent) getContentPane());
			getContentPane().setLayout(thisLayout);
			this.setModal(true);
			this.setName("SimoGL - Controls");
			this.setResizable(false);
			{
				labelHeadline = new JLabel();
				GroupLayout labelHeadlineLayout = new GroupLayout(
					(JComponent) labelHeadline);
				labelHeadline.setText("SimoGL - Controls");
				labelHeadline.setFont(new java.awt.Font("Tahoma",0,20));
				labelHeadline.setHorizontalAlignment(SwingConstants.CENTER);
				labelHeadline.setBorder(BorderFactory.createBevelBorder(BevelBorder.RAISED));
				labelHeadlineLayout.setVerticalGroup(labelHeadlineLayout
					.createParallelGroup());
				labelHeadlineLayout.setHorizontalGroup(labelHeadlineLayout
					.createParallelGroup());
			}
			{
				labelForward = new JLabel();
				labelForward.setText("Forward:");
			}
			{
				labelBackwards = new JLabel();
				labelBackwards.setText("Backwards:");
			}
			{
				labelLeft = new JLabel();
				labelLeft.setText("Left:");
			}
			{
				labelRight = new JLabel();
				labelRight.setText("Right:");
			}
			{
				labelUp = new JLabel();
				labelUp.setText("Up (in free look mode):");
			}
			{
				labelDown = new JLabel();
				labelDown.setText("Down (in free look mode):");
			}
			{
				labelRotate = new JLabel();
				labelRotate.setText("Rotate Camera:");
			}
			{
				lableConstruct = new JLabel();
				lableConstruct.setText("Construct Building");
			}
			{
				labelSwitchFreeLook = new JLabel();
				labelSwitchFreeLook.setText("Toggle free look:");
			}
			{
				labelPick = new JLabel();
				labelPick.setText("Pick building:");
			}
			{
				labelForwKey = new JLabel();
				labelForwKey.setText("W");
			}
			{
				labelBackKey = new JLabel();
				labelBackKey.setText("S");
			}
			{
				labelLeftKey = new JLabel();
				labelLeftKey.setText("A");
			}
			{
				labelRightKey = new JLabel();
				labelRightKey.setText("D");
			}
			{
				labelUpKey = new JLabel();
				labelUpKey.setText("E");
			}
			{
				labelDownKey = new JLabel();
				labelDownKey.setText("Q");
			}
			{
				labelRotCamKey = new JLabel();
				labelRotCamKey.setText("Press & hold RMB and move the mouse");
			}
			{
				labelConstructKey = new JLabel();
				labelConstructKey.setText("Space");
			}
			{
				labelPickKey = new JLabel();
				labelPickKey.setText("LMB");
			}
			{
				labelSwitchKey = new JLabel();
				labelSwitchKey.setText("V");
			}
			{
				labelMapMode = new JLabel();
				labelMapMode.setText("Switch to map mode:");
			}
			{
				labelMapModeKey = new JLabel();
				labelMapModeKey.setText("C");
			}
			this.setSize(500, 380);
			thisLayout.setHorizontalGroup(thisLayout.createSequentialGroup()
			    .addContainerGap(42, 42)
			    .add(thisLayout.createParallelGroup()
			        .add(GroupLayout.LEADING, thisLayout.createSequentialGroup()
			            .add(labelHeadline, GroupLayout.PREFERRED_SIZE, 350, GroupLayout.PREFERRED_SIZE)
			            .addContainerGap(100, 100))
			        .add(thisLayout.createSequentialGroup()
			            .add(thisLayout.createParallelGroup()
			                .add(GroupLayout.LEADING, labelDown, GroupLayout.PREFERRED_SIZE, 154, GroupLayout.PREFERRED_SIZE)
			                .add(GroupLayout.LEADING, thisLayout.createSequentialGroup()
			                    .add(labelForward, GroupLayout.PREFERRED_SIZE, 127, GroupLayout.PREFERRED_SIZE)
			                    .add(27))
			                .add(GroupLayout.LEADING, thisLayout.createSequentialGroup()
			                    .add(labelBackwards, GroupLayout.PREFERRED_SIZE, 127, GroupLayout.PREFERRED_SIZE)
			                    .add(27))
			                .add(GroupLayout.LEADING, thisLayout.createSequentialGroup()
			                    .add(labelLeft, GroupLayout.PREFERRED_SIZE, 127, GroupLayout.PREFERRED_SIZE)
			                    .add(27))
			                .add(GroupLayout.LEADING, thisLayout.createSequentialGroup()
			                    .add(labelRight, GroupLayout.PREFERRED_SIZE, 127, GroupLayout.PREFERRED_SIZE)
			                    .add(27))
			                .add(GroupLayout.LEADING, thisLayout.createSequentialGroup()
			                    .add(labelUp, GroupLayout.PREFERRED_SIZE, 127, GroupLayout.PREFERRED_SIZE)
			                    .add(27))
			                .add(GroupLayout.LEADING, thisLayout.createSequentialGroup()
			                    .add(labelRotate, GroupLayout.PREFERRED_SIZE, 127, GroupLayout.PREFERRED_SIZE)
			                    .add(27))
			                .add(GroupLayout.LEADING, thisLayout.createSequentialGroup()
			                    .add(lableConstruct, GroupLayout.PREFERRED_SIZE, 127, GroupLayout.PREFERRED_SIZE)
			                    .add(27))
			                .add(GroupLayout.LEADING, thisLayout.createSequentialGroup()
			                    .add(labelPick, GroupLayout.PREFERRED_SIZE, 127, GroupLayout.PREFERRED_SIZE)
			                    .add(27))
			                .add(GroupLayout.LEADING, thisLayout.createSequentialGroup()
			                    .add(labelSwitchFreeLook, GroupLayout.PREFERRED_SIZE, 127, GroupLayout.PREFERRED_SIZE)
			                    .add(27))
			                .add(GroupLayout.LEADING, thisLayout.createSequentialGroup()
			                    .add(labelMapMode, GroupLayout.PREFERRED_SIZE, 127, GroupLayout.PREFERRED_SIZE)
			                    .add(27)))
			            .addPreferredGap(LayoutStyle.RELATED)
			            .add(thisLayout.createParallelGroup()
			                .add(GroupLayout.LEADING, thisLayout.createSequentialGroup()
			                    .add(labelForwKey, GroupLayout.PREFERRED_SIZE, 34, GroupLayout.PREFERRED_SIZE)
			                    .add(191))
			                .add(GroupLayout.LEADING, thisLayout.createSequentialGroup()
			                    .add(labelBackKey, GroupLayout.PREFERRED_SIZE, 34, GroupLayout.PREFERRED_SIZE)
			                    .add(191))
			                .add(GroupLayout.LEADING, thisLayout.createSequentialGroup()
			                    .add(labelLeftKey, GroupLayout.PREFERRED_SIZE, 34, GroupLayout.PREFERRED_SIZE)
			                    .add(191))
			                .add(GroupLayout.LEADING, thisLayout.createSequentialGroup()
			                    .add(labelRightKey, GroupLayout.PREFERRED_SIZE, 34, GroupLayout.PREFERRED_SIZE)
			                    .add(191))
			                .add(GroupLayout.LEADING, thisLayout.createSequentialGroup()
			                    .add(labelUpKey, GroupLayout.PREFERRED_SIZE, 34, GroupLayout.PREFERRED_SIZE)
			                    .add(191))
			                .add(GroupLayout.LEADING, thisLayout.createSequentialGroup()
			                    .add(labelDownKey, GroupLayout.PREFERRED_SIZE, 34, GroupLayout.PREFERRED_SIZE)
			                    .add(191))
			                .add(GroupLayout.LEADING, labelRotCamKey, GroupLayout.PREFERRED_SIZE, 225, GroupLayout.PREFERRED_SIZE)
			                .add(GroupLayout.LEADING, thisLayout.createSequentialGroup()
			                    .add(labelConstructKey, GroupLayout.PREFERRED_SIZE, 182, GroupLayout.PREFERRED_SIZE)
			                    .add(43))
			                .add(GroupLayout.LEADING, thisLayout.createSequentialGroup()
			                    .add(labelPickKey, GroupLayout.PREFERRED_SIZE, 190, GroupLayout.PREFERRED_SIZE)
			                    .add(35))
			                .add(GroupLayout.LEADING, thisLayout.createSequentialGroup()
			                    .add(labelSwitchKey, GroupLayout.PREFERRED_SIZE, 34, GroupLayout.PREFERRED_SIZE)
			                    .add(191))
			                .add(GroupLayout.LEADING, thisLayout.createSequentialGroup()
			                    .add(labelMapModeKey, GroupLayout.PREFERRED_SIZE, 34, GroupLayout.PREFERRED_SIZE)
			                    .add(191)))
			            .addContainerGap(65, 65))));
			thisLayout.setVerticalGroup(thisLayout.createSequentialGroup()
			    .addContainerGap()
			    .add(labelHeadline, GroupLayout.PREFERRED_SIZE, 27, GroupLayout.PREFERRED_SIZE)
			    .add(38)
			    .add(thisLayout.createParallelGroup()
			        .add(GroupLayout.BASELINE, labelForward)
			        .add(GroupLayout.BASELINE, labelForwKey))
			    .addPreferredGap(LayoutStyle.RELATED)
			    .add(thisLayout.createParallelGroup()
			        .add(GroupLayout.BASELINE, labelBackwards)
			        .add(GroupLayout.BASELINE, labelBackKey))
			    .addPreferredGap(LayoutStyle.RELATED)
			    .add(thisLayout.createParallelGroup()
			        .add(GroupLayout.BASELINE, labelLeft)
			        .add(GroupLayout.BASELINE, labelLeftKey))
			    .addPreferredGap(LayoutStyle.RELATED)
			    .add(thisLayout.createParallelGroup()
			        .add(GroupLayout.BASELINE, labelRight)
			        .add(GroupLayout.BASELINE, labelRightKey))
			    .addPreferredGap(LayoutStyle.RELATED)
			    .add(thisLayout.createParallelGroup()
			        .add(GroupLayout.BASELINE, labelUp)
			        .add(GroupLayout.BASELINE, labelUpKey))
			    .addPreferredGap(LayoutStyle.RELATED)
			    .add(thisLayout.createParallelGroup()
			        .add(GroupLayout.BASELINE, labelDown)
			        .add(GroupLayout.BASELINE, labelDownKey))
			    .addPreferredGap(LayoutStyle.RELATED)
			    .add(thisLayout.createParallelGroup()
			        .add(GroupLayout.BASELINE, labelRotate)
			        .add(GroupLayout.BASELINE, labelRotCamKey))
			    .addPreferredGap(LayoutStyle.RELATED)
			    .add(thisLayout.createParallelGroup()
			        .add(GroupLayout.BASELINE, lableConstruct)
			        .add(GroupLayout.BASELINE, labelConstructKey))
			    .addPreferredGap(LayoutStyle.RELATED)
			    .add(thisLayout.createParallelGroup()
			        .add(GroupLayout.BASELINE, labelPick)
			        .add(GroupLayout.BASELINE, labelPickKey))
			    .addPreferredGap(LayoutStyle.RELATED)
			    .add(thisLayout.createParallelGroup()
			        .add(GroupLayout.BASELINE, labelSwitchFreeLook)
			        .add(GroupLayout.BASELINE, labelSwitchKey))
			    .addPreferredGap(LayoutStyle.RELATED)
			    .add(thisLayout.createParallelGroup()
			        .add(GroupLayout.BASELINE, labelMapMode)
			        .add(GroupLayout.BASELINE, labelMapModeKey))
			    .addContainerGap(55, 55));
		} catch (Exception e) {
			e.printStackTrace();
		}
	}

}
