backFolderStack.push(currentFolder);
	public static void main(String[] args) {		IconsManager im = new IconsManager();		final JFrame mainFrame = new JFrame(" - Anaconda - ");		mainFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);		mainFrame.setSize(800, 600);		oldCurrentFolder = newCurrentFolder = currentFolder;		/* INITIALISATION DE L'ARBRE ET DE LA TABLE */		initTree();		initTable();/*****/tableModel.setDimmension(50, 5);				JScrollPane scrollTree = new JScrollPane(tree);		final JPanel infoPanel = new JPanel();		JSplitPane splitTreeInfo =			new JSplitPane(JSplitPane.VERTICAL_SPLIT, scrollTree, info_panel);		splitTreeInfo.setOneTouchExpandable(true);		splitTreeInfo.setDividerLocation(260);		splitTreeInfo.setResizeWeight(1);		splitTreeInfo.setDividerSize(2);		Dimension size = new Dimension(200, 200);//		Dimension size = new Dimension(IconsManager.LOGO.getIconWidth(), IconsManager.LOGO.getIconHeight()+200);		infoPanel.setMinimumSize(size);		infoPanel.setMaximumSize(size);		/******************************/		//JTabbedPane tabb = new JTabbedPane();		JSplitPane splitPane =			new JSplitPane(				JSplitPane.HORIZONTAL_SPLIT,				splitTreeInfo, tabb);		splitPane.setOneTouchExpandable(true);		splitPane.setDividerLocation(mainFrame.getWidth() / 3);		splitPane.setDividerSize(2);		/**********************************/		/* LES ACTIONS */		final Action refreshAction = AllCommand.getAction("refresh");		final Action createFile = AllCommand.getAction("createfile");		final Action createFolder = AllCommand.getAction("createfolder");		final Action copyAction = AllCommand.getAction("copy");		final Action cutAction = AllCommand.getAction("cut");		final Action pasteAction = AllCommand.getAction("paste");		final Action dupAction = AllCommand.getAction("clone");		final Action moveAction = AllCommand.getAction("move");		final Action selectAllAction =			new AbstractAction("Selectionner tout") {			public void actionPerformed(ActionEvent e) {				table.selectAll();				info_panel.setAsGeneral(null, tableModel.getSize() - 1);			}		};		final Action renameAction = AllCommand.getAction("rename");		final Action deleteAction = AllCommand.getAction("delete");		final Action findAction = new AbstractAction("Rechercher") {			public void actionPerformed(ActionEvent e) {				//FindPanel find_panel = new FindPanel(find_model);				//info_panel.setPanel(FindPanel.getPanel());				info_panel.setAsFind(find_model);			}					};		final Action bigIconsAction = new AbstractAction("Grandes Icones") {			public void actionPerformed(ActionEvent e) {				TableRenderer.setIconsSize(IconsManager.BIG_ICONS);				tableModel.setDimmension(tableModel.getRowCount(), tableModel.getColumnCount());				refresh();			}		};		final Action smallIconsAction = new AbstractAction("Petites Icones") {			public void actionPerformed(ActionEvent e) {				TableRenderer.setIconsSize(IconsManager.SMALL_ICONS);				tableModel.setDimmension(tableModel.getRowCount(), tableModel.getColumnCount());				refresh();			}		};		final Action showPropertiesAction = AllCommand.getAction("showproperties");		final Action aboutAction = AllCommand.getAction("about");		final Action helpAction = AllCommand.getAction("help");		final Action showByNameAction = new AbstractAction("Nom") {					public void actionPerformed(ActionEvent e) {						ComparatorsManager.addCmp("by_name");						setFolder(newCurrentFolder);					}				};		final Action showBySizeAction = new AbstractAction("Taille") {			public void actionPerformed(ActionEvent e) {				ComparatorsManager.addCmp("by_size");				setFolder(newCurrentFolder);			}		};		final Action showByTypeAction = new AbstractAction("Type") {			public void actionPerformed(ActionEvent e) {				ComparatorsManager.addCmp("by_type");				setFolder(newCurrentFolder);			}		};		final Action showByDateAction = new AbstractAction("Date") {			public void actionPerformed(ActionEvent e) {				ComparatorsManager.addCmp("by_date");				setFolder(newCurrentFolder);			}		};		final Action undoAction = new AbstractAction("Annuler") {			public void actionPerformed(ActionEvent e) {				AllCommand.undoLastCommand();			}		};		final Action redoAction = new AbstractAction("Refaire") {			public void actionPerformed(ActionEvent e) {				AllCommand.redoLastCommand();			}		};		/* MENUBAR */		JMenuBar menuBar = new JMenuBar();		JMenu file = new JMenu("Fichier");		JMenu edit = new JMenu("Edition");		JMenu disp = new JMenu("Affichage");		JMenu help = new JMenu("?");		/* Fichier */		JMenu subMenuNew = new JMenu("Nouveau...");		JMenuItem newFileItem = new JMenuItem("Fichier    Ctrl+T");		newFileItem.addActionListener(createFile);		JMenuItem newFolderItem = new JMenuItem("Repertoire    Ctrl+R");		newFolderItem.addActionListener(createFolder);		JMenuItem newFrameItem =			new JMenuItem("Fenetre d'exploration    Ctrl+E");		subMenuNew.add(newFileItem);		subMenuNew.add(newFolderItem);		subMenuNew.add(newFrameItem);		file.add(subMenuNew);		JMenuItem findItem = new JMenuItem("Rechercher    Ctrl+F");		findItem.addActionListener(findAction);		JMenuItem propertiesItem = new JMenuItem("Proprietes    Ctrl+P");		propertiesItem.addActionListener(showPropertiesAction);		JMenuItem quitter = new JMenuItem("Quitter");		quitter.addActionListener(new ActionListener() {			public void actionPerformed(ActionEvent e) {				goOut();			}		});		file.add(findItem);		file.add(propertiesItem);		file.add(quitter);		/* Edition */		JMenuItem undoItem = new JMenuItem(undoAction);		JMenuItem redoItem = new JMenuItem(redoAction);		JMenuItem copyItem = new JMenuItem(copyAction);		JMenuItem cutItem = new JMenuItem(cutAction);		JMenuItem pasteItem = new JMenuItem(pasteAction);		JMenuItem dupItem = new JMenuItem(dupAction);		JMenuItem moveItem = new JMenuItem(moveAction);		JMenuItem selectAllItem = new JMenuItem(selectAllAction);		JMenuItem renameItem = new JMenuItem(renameAction);		JMenuItem deleteItem = new JMenuItem(deleteAction);		edit.add(undoItem);		edit.add(redoItem);		edit.add(copyItem);		edit.add(cutItem);		edit.add(pasteItem);		edit.add(dupItem);		edit.add(moveItem);		edit.add(selectAllItem);		edit.add(renameItem);		edit.add(deleteItem);		/* Affichage */		JMenuItem reloadItem = new JMenuItem(refreshAction);		JMenu subMenuTri = new JMenu("Organiser par...");		JCheckBoxMenuItem triName = new JCheckBoxMenuItem(showByNameAction);		JCheckBoxMenuItem triType = new JCheckBoxMenuItem(showByTypeAction);		JCheckBoxMenuItem triSize = new JCheckBoxMenuItem(showBySizeAction);		JCheckBoxMenuItem triDate = new JCheckBoxMenuItem(showByDateAction);		subMenuTri.add(triName);		subMenuTri.add(triType);		subMenuTri.add(triSize);		subMenuTri.add(triDate);		JMenu subMenuType = new JMenu("Type d'affichage...");		ButtonGroup grpType = new ButtonGroup(); // pour activer un seul a la fois		JCheckBoxMenuItem typeBig = new JCheckBoxMenuItem("Grandes icones");		grpType.add(typeBig);		typeBig.setState(true);		typeBig.addActionListener(bigIconsAction);		JCheckBoxMenuItem typeSmall = new JCheckBoxMenuItem("Petites icones");		grpType.add(typeSmall);		typeSmall.addActionListener(smallIconsAction);		JCheckBoxMenuItem typeList = new JCheckBoxMenuItem("Liste");		grpType.add(typeList);		JCheckBoxMenuItem typeDetail = new JCheckBoxMenuItem("Detail");		grpType.add(typeDetail);		subMenuType.add(typeBig);		subMenuType.add(typeSmall);		subMenuType.add(typeList);		subMenuType.add(typeDetail);		JMenu subMenuBar = new JMenu("Barres...");		JMenuItem barTools = new JMenuItem("Barre d'outils");		JMenuItem barAdr = new JMenuItem("Barre d'adresse");		subMenuBar.add(barTools);		subMenuBar.add(barAdr);		JMenu subMenuLangue = new JMenu("Langue...");		JMenuItem french = new JMenuItem("Francais");		JMenuItem english = new JMenuItem("Anglais");		JMenuItem spanish = new JMenuItem("Espagnol");		subMenuLangue.add(french);		subMenuLangue.add(english);		subMenuLangue.add(spanish);		disp.add(reloadItem);		disp.add(subMenuTri);		disp.add(subMenuType);		disp.add(subMenuBar);		disp.add(subMenuLangue);		/* ? */		JMenuItem itemHelp = new JMenuItem("Aide");		itemHelp.addActionListener(helpAction);		help.add(itemHelp);		JMenuItem itemAbout = new JMenuItem("A propos");		itemAbout.addActionListener(aboutAction);		help.add(itemAbout);		menuBar.add(file);		menuBar.add(edit);		menuBar.add(disp);		menuBar.add(help);		/* TOOLBAR */		JToolBar toolBar = new JToolBar();		toolBar.setFloatable(false);		toolBar.setBorderPainted(false);		final JButton back = new JButton(IconsManager.BACK);		back.setRolloverIcon(IconsManager.ONFOCUSBACK);		final JButton refresh = new JButton(IconsManager.REFRESH);		refresh.setRolloverIcon(IconsManager.ONFOCUSREFRESH);		final JButton next = new JButton(IconsManager.NEXT);		next.setRolloverIcon(IconsManager.ONFOCUSNEXT);		final JButton cut = new JButton(IconsManager.CUT);		cut.setRolloverIcon(IconsManager.ONFOCUSCUT);		final JButton copy = new JButton(IconsManager.COPY);		copy.setRolloverIcon(IconsManager.ONFOCUSCOPY);		final JButton paste = new JButton(IconsManager.PASTE);	//	final JButton paste = new JButton(pasteAction);		paste.setRolloverIcon(IconsManager.ONFOCUSPASTE);		paste.addActionListener(pasteAction); // ne prend pas en compte l'tat !	//	paste.setAction(pasteAction);	//	paste.setIcon(IconsManager.PASTE);		final JButton find = new JButton(IconsManager.FIND);		find.setRolloverIcon(IconsManager.ONFOCUSFIND);		final JButton home = new JButton(IconsManager.HOME);		home.setRolloverIcon(IconsManager.ONFOCUSHOME);		final JButton garbage = new JButton(IconsManager.GARBAGE);		garbage.setRolloverIcon(IconsManager.ONFOCUSGARBAGE);		find.addActionListener(findAction);		toolBar.add(home);		toolBar.add(back);		toolBar.add(refresh);		toolBar.add(next);		toolBar.add(cut);		toolBar.add(copy);		toolBar.add(paste);		toolBar.add(garbage);		toolBar.add(find);		toolBar.setRollover(true);		toolBar.setFloatable(true);		/* ADRESSBAR */		JToolBar adressBar = new JToolBar();		adressBar.setFloatable(false);		JButton delAdr = new JButton("effacer");		JLabel adr = new JLabel("adresse");		JButton openAdr = new JButton("ouvrir");		String fileName = currentFolder.getAbsolutePath();		adrZone =			new AddressBar(				fileName					+ ((fileName.endsWith(File.separator))						? ""						: File.separator));		adrZone.setActionCommand("test");		adressBar.add(delAdr);		adressBar.add(adr);		adressBar.add(adrZone);		adressBar.add(openAdr);		/* PANELBAR */		JPanel panelBar = new JPanel();		panelBar.setLayout(new BorderLayout());		panelBar.add(toolBar, BorderLayout.NORTH);		panelBar.add(adressBar, BorderLayout.CENTER);		/* Listeners des BAR */		home.addActionListener(new ActionListener() {			public void actionPerformed(ActionEvent e) {				setFolder(root);			}		});		back.setEnabled(false);		next.setEnabled(false);		back.addActionListener(new ActionListener() {			public void actionPerformed(ActionEvent e) {				oldCurrentFolder = (File) backFolderStack.pop();				nextFolderStack.push(currentFolder);				next.setEnabled(true);				setFolder(oldCurrentFolder);		/*		String fileName = oldCurrentFolder.getAbsolutePath();				adrZone.setText(					fileName						+ ((fileName.endsWith(File.separator))							? ""							: File.separator)); */				if (backFolderStack.empty())					back.setEnabled(false);			}		});		next.addActionListener(new ActionListener() {			public void actionPerformed(ActionEvent e) {				newCurrentFolder = (File) nextFolderStack.pop();				backFolderStack.push(currentFolder);				back.setEnabled(true);				setFolder(newCurrentFolder);	/*			String fileName = newCurrentFolder.getAbsolutePath();				adrZone.setText(					fileName						+ ((fileName.endsWith(File.separator))							? ""							: File.separator));*/				if (nextFolderStack.empty())					next.setEnabled(false);			}		});		adrZone.addActionListener(new ActionListener() {			public void actionPerformed(ActionEvent e) {				System.out.println(e.getActionCommand());				System.out.println(e.paramString());				File file = new File(adrZone.getText());				if (file.exists()) {					oldCurrentFolder = currentFolder;					newCurrentFolder = file;					setFolder(file);					back.setEnabled(true);					next.setEnabled(false);					adrZone.addItem(new String(file.getAbsolutePath()));				} else					JOptionPane.showMessageDialog(						null,						"Le fichier/repertoire <"							+ file.getAbsolutePath()							+ "> n'a pas ete trouve.",						"Fichier/repertoire non trouve",						JOptionPane.ERROR_MESSAGE);				String fileName = currentFolder.getAbsolutePath();				adrZone.setText(					fileName						+ ((fileName.endsWith(File.separator))							? ""							: File.separator));			}		});		adrZone.addKeyListener(adrZone.listenerFactory());		adrZone.getEditor().addActionListener(adrZone.actionListenerFactory());		openAdr.addActionListener((adrZone.getActionListeners())[0]); //TODO		delAdr.addActionListener(new ActionListener() {			public void actionPerformed(ActionEvent e) {				adrZone.setText("");			}		});		mainFrame.setJMenuBar(menuBar);		mainFrame.getContentPane().add(panelBar, BorderLayout.NORTH);		mainFrame.getContentPane().add(splitPane, BorderLayout.CENTER);		/***********************************************/		/* MENU DEROULANT */		//final JPopupMenu clickInFile = new JPopupMenu();		clickInFile.add(new JMenuItem("Nouveau Fichier    Ctrl+T"));		clickInFile.add(new JMenuItem("Nouveau Repertoire    Ctrl+R"));		clickInFile.add(			new JMenuItem("Nouvelle Fenetre d'exploration    Ctrl+E"));		//final JPopupMenu clickOutFile = new JPopupMenu();		clickOutFile.add(new JMenuItem(copyAction));		clickOutFile.add(new JMenuItem(cutAction));		clickOutFile.add(new JMenuItem(pasteAction));		clickOutFile.add(new JMenuItem(dupAction));		clickOutFile.add(new JMenuItem(moveAction));		clickOutFile.add(new JMenuItem(selectAllAction));		clickOutFile.add(new JMenuItem(renameAction));		clickOutFile.add(new JMenuItem(deleteAction));		clickOutFile.add(new JMenuItem(showPropertiesAction));		/***********************************************/		/* LISTERNER SUR L'ARBRE ET LA LISTE */		tree.addMouseListener(new MouseAdapter() {			public void mouseClicked(MouseEvent e) {				lastFocused = TREE_FOCUS;				selectAllAction.setEnabled(false);				pasteAction.setEnabled(true);				TreePath path = tree.getPathForLocation(e.getX(), e.getY());				File file = null;				if (path != null)					file = (File) path.getLastPathComponent();				switch (e.getButton()) {					case MouseEvent.BUTTON1 :						if (file != null && e.getClickCount() == 1) {							if (!tree.isExpanded(path))								tree.expandPath(path);							else if (								!((File) path.getLastPathComponent()).equals(									treeModel.getRoot()))								tree.collapsePath(path);							tree.setSelectionPath(path);							tree.scrollPathToVisible(path);							oldCurrentFolder = currentFolder;							backFolderStack.push(oldCurrentFolder);							back.setEnabled(true);							next.setEnabled(false);							if (ComparatorsManager.cmp.compare(oldCurrentFolder, file)								!= 0) {								String fileName = file.getAbsolutePath();								adrZone.setText(									fileName										+ ((fileName.endsWith(File.separator))											? ""											: File.separator));							}						}						break;				}			}		});		table.addMouseListener(new MouseAdapter() {			public void mouseClicked(MouseEvent e) {				lastFocused = TABLE_FOCUS;				selectAllAction.setEnabled(true);				pasteAction.setEnabled(false);				switch (e.getButton()) {					case MouseEvent.BUTTON1 :					Point p = new Point(e.getX(), e.getY());					int row = table.rowAtPoint(p);					int column = table.columnAtPoint(p);					File file = (File)tableModel.getValueAt(row, column);					if(file == null || file.equals(currentFolder)) break;						info_panel.setAsGeneral( file, getSelectionItems().size());						if (e.getClickCount() == 2) {							oldCurrentFolder = currentFolder;							backFolderStack.push(oldCurrentFolder);							back.setEnabled(true);							next.setEnabled(false);							if (file.isDirectory()) {								String fileName = file.getAbsolutePath();								adrZone.setText(									fileName										+ ((fileName.endsWith(File.separator))											? ""											: File.separator));							} else {								new Launch().run(file);							}						}						break;				}			}		});		tree.setForeground(Themes.getBgColor());		tree.setBackground(Themes.getBgColor());		mainFrame.show();	}