public LeftPanelImpl()
	{
		i = 2;
		groups = new HashMap<String, DefaultMutableTreeNode>();
		tree = new JTree();
		GlobalsVars.getInstance().setTree(tree);
		TreeCellRenderer r = tree.getCellRenderer();
		((DefaultTreeCellRenderer) r).setBackgroundNonSelectionColor(Color.DARK_GRAY);
		((DefaultTreeCellRenderer) r).setBackgroundSelectionColor(Color.white);
		((DefaultTreeCellRenderer) r).setTextSelectionColor(Color.DARK_GRAY); 
		((DefaultTreeCellRenderer) r).setTextNonSelectionColor(Color.white);
		((DefaultTreeCellRenderer) r).setIcon(null);
		((DefaultTreeCellRenderer) r).setLabelFor(null);
		tree.setEditable(true);
		root = new DefaultMutableTreeNode("Project");
		treeModel = new DefaultTreeModel(root);
		tree.setModel(treeModel);
		this.setLayout(new BorderLayout());
		tree.setBackground(Color.WHITE);
		this.add(tree,BorderLayout.CENTER);
		this.setBackground(Color.DARK_GRAY);
		tree.setBackground(Color.DARK_GRAY);
		tree.setForeground(Color.WHITE);
		JPanel buttonPanel = new JPanel();
		buttonPanel.setLayout(new BoxLayout(buttonPanel, BoxLayout.LINE_AXIS));
		buttonPanel.setBackground(Color.DARK_GRAY);
		JButton xbutton = HudWidgetFactory.createHudButton("   + Add    ");
		JButton ybutton = HudWidgetFactory.createHudButton("- Remove ");
		buttonPanel.add(xbutton);
		buttonPanel.add(Box.createRigidArea(new Dimension(5,10)));
		buttonPanel.add(ybutton);
		this.add(buttonPanel,BorderLayout.SOUTH);
		this.setBorder(BorderFactory.createLineBorder(Color.black));
		this.setBorder(BorderFactory.createEtchedBorder());
		
		//Events
		xbutton.addActionListener(new ActionListener()
		{
			@Override
			public void actionPerformed(ActionEvent arg0) 
			{
				addNewGroup("Group " + Integer.toString(i));
				i = i +1;
			}
			
		});
		
		ybutton.addActionListener(new ActionListener()
		{

			@Override
			public void actionPerformed(ActionEvent arg0) 
			{
				if(root.getChildCount() != 1)
				{
					TreePath path = tree.getSelectionPath();
					treeModel.removeNodeFromParent((DefaultMutableTreeNode)path.getLastPathComponent());
				}
			}
			
		});
		
		treeModel.addTreeModelListener(new TreeModelListener()
		{

			@Override
			public void treeNodesChanged(TreeModelEvent arg0) {
				if(arg0.getChildIndices() != null && arg0.getChildIndices()[0] != -1)
				{
					DefaultMutableTreeNode node = (DefaultMutableTreeNode)arg0.getTreePath().getLastPathComponent();
					node = (DefaultMutableTreeNode)node.getChildAt(arg0.getChildIndices()[0]);
					String newName = (String)node.getUserObject();
					PropertiesTab panel = (PropertiesTab)GlobalsVars.getInstance().getPropertyPane();
					panel.changeName(newName);
				}
			}

			@Override
			public void treeNodesInserted(TreeModelEvent arg0) {
				repaint();
			}

			@Override
			public void treeNodesRemoved(TreeModelEvent arg0) {
				repaint();				
			}

			@Override
			public void treeStructureChanged(TreeModelEvent arg0) {
				// TODO Auto-generated method stub
				
			}
			
		});
		
		tree.addTreeSelectionListener(new TreeSelectionListener()
		{

			@Override
			public void valueChanged(TreeSelectionEvent arg0) {
				DefaultMutableTreeNode node = (DefaultMutableTreeNode)tree.getLastSelectedPathComponent();
				if(node == null)
				{
					return;
				}
				int i = 0;
				if(root.getUserObject().equals(node.getUserObject()))
					return;
				for(;i<root.getChildCount();i++)
				{
					if(((DefaultMutableTreeNode) ((DefaultMutableTreeNode)root).getChildAt(i)).getUserObject().equals(node.getUserObject()))
					{
						break;
					}
				}
				GlobalsVars.getInstance().setCurrIndex(i);
				GlobalsVars.getInstance().notifyMainWindow();
			}
			
		});
		
	}