Index: buix/src/java/org/codelutin/buix/Buix.java diff -u buix/src/java/org/codelutin/buix/Buix.java:1.44 buix/src/java/org/codelutin/buix/Buix.java:1.45 --- buix/src/java/org/codelutin/buix/Buix.java:1.44 Tue Aug 10 17:08:59 2004 +++ buix/src/java/org/codelutin/buix/Buix.java Wed Aug 11 07:58:17 2004 @@ -23,9 +23,9 @@ * * @author Benjamin Poussin * Copyright Code Lutin -* @version $Revision: 1.44 $ +* @version $Revision: 1.45 $ * -* Mise a jour: $Date: 2004/08/10 17:08:59 $ +* Mise a jour: $Date: 2004/08/11 07:58:17 $ * par : $Author: mazelier $ */ @@ -182,7 +182,7 @@ String packageName = (String)option.getArguments()[0]; String filename = (String)option.getArguments()[1]; System.out.println("Export vers le fichier: " + filename); - exportBuixUIModel(packageName, new File(filename)); + exportBuixXml(packageName, new File(filename)); System.exit(0); } } @@ -397,32 +397,6 @@ } /** - * Methode appelee dans le menu pour exporter le fichier avec BuixUIModelEncoder: appel de la methode exportBuixUIModel - */ - public void askExportBuixUIModel() throws IOException { - - String packageName = pref.getPrefExportPackageName(); - - // boite de dialogue pour demander le package - packageName = (String)JOptionPane.showInputDialog( - null, - "Veuillez saisir le nom du package", - "Buix", - JOptionPane.QUESTION_MESSAGE, - null, - null, - packageName); - - if (packageName != null){ - pref.setExportPackageName(packageName); - String filename = MessageDialog.getFile("Export"); - if(filename != null && packageName != "" ){ - exportBuixUIModel(packageName, new File(filename)); - } - } - } - - /** * Exportation du fichier sous format uimodel (BuixXmlEncoder) */ public void exportBuixXml(String packageName, File file) throws IOException { @@ -437,21 +411,6 @@ } /** - * Exportation du fichier sous format uimodel (BuixUIModelEncoder) - */ - public void exportBuixUIModel(String packageName, File file) throws IOException { - try{ - - BuixUIModelEncoder encoder = new BuixUIModelEncoder (packageName, - new BufferedOutputStream(new FileOutputStream(file)), getRootComponent()); - - }catch(Exception eee){ - Logger.getLogger(getClass().getName() + ".export").log(Level.WARNING, "Impossible d'exporter cet objet", eee); - MessageDialog.error("Error", "Impossible d'exporter cet objet", eee); - } - } - - /** * Sauvegarde du fichier */ public void save(File file) throws IOException { @@ -630,17 +589,6 @@ public void on_exportBuixXml(){ try{ askExportBuixXml(); - }catch(IOException eee){ - MessageDialog.error("Erreur durant l'export", "", eee); - } - } - - /** - * Methode appelee dans le menu pour exporter un fichier (BuixUIModel) - */ - public void on_exportBuixUIModel(){ - try{ - askExportBuixUIModel(); }catch(IOException eee){ MessageDialog.error("Erreur durant l'export", "", eee); } Index: buix/src/java/org/codelutin/buix/BuixUI.java diff -u buix/src/java/org/codelutin/buix/BuixUI.java:1.17 buix/src/java/org/codelutin/buix/BuixUI.java:1.18 --- buix/src/java/org/codelutin/buix/BuixUI.java:1.17 Wed Jul 28 16:06:25 2004 +++ buix/src/java/org/codelutin/buix/BuixUI.java Wed Aug 11 07:58:17 2004 @@ -23,9 +23,9 @@ * * @author Benjamin Poussin * Copyright Code Lutin - * @version $Revision: 1.17 $ + * @version $Revision: 1.18 $ * - * Mise a jour: $Date: 2004/07/28 16:06:25 $ + * Mise a jour: $Date: 2004/08/11 07:58:17 $ * par : $Author: mazelier $ */ @@ -329,12 +329,13 @@ new JScrollPane(layoutProperties)); propPane.add(I18n._("Event"), getBeanEventPanel()); - + // partie superieure JSplitPane split1 = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, new JScrollPane(tree), new JScrollPane(clipBoardTree)); split1.setName("split1"); split1.setDividerLocation(0.5); + // partie inferieure JSplitPane split2 = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, widgetShelves, propPane); split2.setName("split2"); @@ -355,6 +356,7 @@ JMenu menuFile = new JMenu("File"); menuBar.add(menuFile); + // new JMenuItem menuNew = new JMenuItem("New"); menuFile.add(menuNew); @@ -363,12 +365,14 @@ menuFile.addSeparator(); + // chargement JMenuItem menuLoad = new JMenuItem("Load"); menuFile.add(menuLoad); l = EventHandler.create(ActionListener.class, this, "on_load"); menuLoad.addActionListener((ActionListener)l); + // Encoder Java JMenuItem menuSave = new JMenuItem("Save"); menuFile.add(menuSave); @@ -383,12 +387,22 @@ menuFile.addSeparator(); + // export BuixXMLEncoder + JMenuItem menuExport = new JMenuItem("Export"); + menuFile.add(menuExport); + + l = EventHandler.create(ActionListener.class, this, "on_exportBuixXml"); + menuExport.addActionListener((ActionListener)l); + + menuFile.addSeparator(); + // Preview JMenuItem menuPreview = new JMenuItem("Preview"); menuFile.add(menuPreview); l = EventHandler.create(ActionListener.class, this, "on_preview"); menuPreview.addActionListener((ActionListener)l); + // clipboard JMenuItem menuClipBoard = new JMenuItem("ClipBoard"); menuFile.add(menuClipBoard); @@ -397,27 +411,12 @@ menuFile.addSeparator(); + //quit JMenuItem menuQuit = new JMenuItem("Quit"); menuFile.add(menuQuit); l = EventHandler.create(ActionListener.class, this, "on_quit"); menuQuit.addActionListener((ActionListener)l); - - // menu Import - JMenu menuImportExport = new JMenu("Import/Export"); - menuBar.add(menuImportExport); - - JMenuItem menuExportBuixXml = new JMenuItem("Export BuixXML"); - menuImportExport.add(menuExportBuixXml); - - l = EventHandler.create(ActionListener.class, this, "on_exportBuixXml"); - menuExportBuixXml.addActionListener((ActionListener)l); - - JMenuItem menuExportBuixUIModel = new JMenuItem("Export BuixUIModel"); - menuImportExport.add(menuExportBuixUIModel); - - l = EventHandler.create(ActionListener.class, this, "on_exportBuixUIModel"); - menuExportBuixUIModel.addActionListener((ActionListener)l); //menu Configuration JMenu menuConfig = new JMenu("Configuration"); Index: buix/src/java/org/codelutin/buix/BuixUICallback.java diff -u buix/src/java/org/codelutin/buix/BuixUICallback.java:1.5 buix/src/java/org/codelutin/buix/BuixUICallback.java:1.6 --- buix/src/java/org/codelutin/buix/BuixUICallback.java:1.5 Wed Jul 28 16:06:25 2004 +++ buix/src/java/org/codelutin/buix/BuixUICallback.java Wed Aug 11 07:58:17 2004 @@ -23,9 +23,9 @@ * * @author Benjamin Poussin * Copyright Code Lutin - * @version $Revision: 1.5 $ + * @version $Revision: 1.6 $ * - * Mise a jour: $Date: 2004/07/28 16:06:25 $ + * Mise a jour: $Date: 2004/08/11 07:58:17 $ * par : $Author: mazelier $ */ @@ -50,7 +50,6 @@ public void on_save(); public void on_saveAs(); public void on_exportBuixXml(); - public void on_exportBuixUIModel(); public void on_preview(); public void on_treeClicked(MouseEvent e); public void on_treeKeyPress(KeyEvent e);