From: <had...@us...> - 2008-10-22 17:31:00
|
Revision: 4089 http://fudaa.svn.sourceforge.net/fudaa/?rev=4089&view=rev Author: hadouxad Date: 2008-10-22 17:30:54 +0000 (Wed, 22 Oct 2008) Log Message: ----------- - modifier la pr?\195?\169sentation des donn?\195?\169es - virer fichier setup - transformer fichier source.post en setup.post - ajouter path relatif et absolu au fichiers r?\195?\169sultats et tester les 2 possibilit?\195?\169s - ajouter des commentaires dans les fichiers qui seront explicatifs balise README (j'ai pas trouv?\195?\169 le moyen de faire des <!-- -->) - tests avec les @XStreamAlias("type") pour que les balises soient plus parlantes .... (pour que ce soit + propre encore Il faudrait ?\195?\169crire ses propres converter ) - int?\195?\169grer le viewer pdf Modified Paths: -------------- branches/Prepro-0.92-SNAPSHOT/ctulu/src/org/fudaa/ctulu/ctulu_en.fr_txt branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/persist/EbliWidgetSerializeXml.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/persist/TrPostPersistenceManager.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/persist/TrPostSourcePersist.java Added Paths: ----------- branches/Prepro-0.92-SNAPSHOT/ctulu/lib/PDFRenderer.jar branches/Prepro-0.92-SNAPSHOT/ctulu/lib/PDFRenderer_src.zip branches/Prepro-0.92-SNAPSHOT/ctulu/src/com/memoire/bu/Thumbs.db branches/Prepro-0.92-SNAPSHOT/ctulu/src/org/fudaa/ctulu/pdf/ branches/Prepro-0.92-SNAPSHOT/ctulu/src/org/fudaa/ctulu/pdf/CtuluFramePdfCustomViewer.java branches/Prepro-0.92-SNAPSHOT/ctulu/src/org/fudaa/ctulu/pdf/CtuluPanelPdfViewer.java branches/Prepro-0.92-SNAPSHOT/ctulu/test/org/fudaa/ctulu/TestCtuluPdf.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/persist/LayoutDescriptor.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/persist/XmlCommentaire.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/persist/XstreamListLayoutDescriptor.java Added: branches/Prepro-0.92-SNAPSHOT/ctulu/lib/PDFRenderer.jar =================================================================== (Binary files differ) Property changes on: branches/Prepro-0.92-SNAPSHOT/ctulu/lib/PDFRenderer.jar ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: branches/Prepro-0.92-SNAPSHOT/ctulu/lib/PDFRenderer_src.zip =================================================================== (Binary files differ) Property changes on: branches/Prepro-0.92-SNAPSHOT/ctulu/lib/PDFRenderer_src.zip ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: branches/Prepro-0.92-SNAPSHOT/ctulu/src/com/memoire/bu/Thumbs.db =================================================================== (Binary files differ) Property changes on: branches/Prepro-0.92-SNAPSHOT/ctulu/src/com/memoire/bu/Thumbs.db ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Modified: branches/Prepro-0.92-SNAPSHOT/ctulu/src/org/fudaa/ctulu/ctulu_en.fr_txt =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ctulu/src/org/fudaa/ctulu/ctulu_en.fr_txt 2008-10-21 15:38:05 UTC (rev 4088) +++ branches/Prepro-0.92-SNAPSHOT/ctulu/src/org/fudaa/ctulu/ctulu_en.fr_txt 2008-10-22 17:30:54 UTC (rev 4089) @@ -267,4 +267,7 @@ Constantes=Constants Ajouter un nouvel \xE9l\xE9ment=Add an new item Ins\xE9rer un nouveau \xE9l\xE9ment=Insert a new item -Supprimer les \xE9l\xE9ments s\xE9lectionn\xE9s=Delete selected items \ No newline at end of file +Supprimer les \xE9l\xE9ments s\xE9lectionn\xE9s=Delete selected items +Erreur fichier inexistant= Error file is missing +Erreur lors de la lecture du fichier= Error while reading the file +Chapitres=Chapters \ No newline at end of file Added: branches/Prepro-0.92-SNAPSHOT/ctulu/src/org/fudaa/ctulu/pdf/CtuluFramePdfCustomViewer.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ctulu/src/org/fudaa/ctulu/pdf/CtuluFramePdfCustomViewer.java (rev 0) +++ branches/Prepro-0.92-SNAPSHOT/ctulu/src/org/fudaa/ctulu/pdf/CtuluFramePdfCustomViewer.java 2008-10-22 17:30:54 UTC (rev 4089) @@ -0,0 +1,127 @@ +package org.fudaa.ctulu.pdf; + +import java.awt.BorderLayout; +import java.awt.GridLayout; +import java.awt.event.WindowAdapter; +import java.awt.event.WindowEvent; +import java.io.File; +import java.io.FileNotFoundException; +import java.io.IOException; +import java.io.RandomAccessFile; +import java.nio.ByteBuffer; +import java.nio.channels.FileChannel; + +import javax.swing.BorderFactory; +import javax.swing.JDialog; +import javax.swing.JFrame; +import javax.swing.JMenu; +import javax.swing.JMenuBar; +import javax.swing.JScrollPane; + +import org.fudaa.ctulu.CtuluResource; +import org.fudaa.ctulu.CtuluUI; + +import com.memoire.bu.BuPanel; +import com.sun.pdfview.PDFFile; + +/** + * Fenetre viewer pdf custom + * @author Adrien Hadoux + * + */ +public class CtuluFramePdfCustomViewer extends JFrame{ + + CtuluPanelPdfViewer pdfViewer; + CtuluUI ui_; + BuPanel outlinePanel; + BuPanel thumbscrollContainer; + public CtuluFramePdfCustomViewer(String title,boolean useThumbs,CtuluUI ui){ + this(title,useThumbs,null,ui); + + } + + public CtuluFramePdfCustomViewer(String title,boolean useThumbs, File pdfFile,CtuluUI ui){ + super(title) ; + ui_=ui; + init(useThumbs,pdfFile); + + } + + + /** + * initialisation du lecteur de pdf. + * @param useThumbs + * @param initFile + */ + private void init(boolean useThumbs,File initFile){ + this.setLayout(new BorderLayout()); + outlinePanel=new BuPanel(); + outlinePanel.setBorder(BorderFactory.createTitledBorder("Pages")); + thumbscrollContainer=new BuPanel(); + thumbscrollContainer.setBorder(BorderFactory.createTitledBorder(CtuluResource.CTULU.getString("Chapitres"))); + + pdfViewer=new CtuluPanelPdfViewer(useThumbs,ui_,outlinePanel,thumbscrollContainer); + + addWindowListener(new WindowAdapter() { + public void windowClosing(WindowEvent evt) { + pdfViewer.doQuit(); + } + }); + + //-- menus --// + JMenuBar mb = new JMenuBar(); + JMenu file = new JMenu("File"); + file.add(pdfViewer.openAction); + file.add(pdfViewer.closeAction); + file.addSeparator(); + file.add(pdfViewer.pageSetupAction); + file.add(pdfViewer.printAction); + file.addSeparator(); + file.add(pdfViewer.quitAction); + mb.add(file); + JMenu view = new JMenu("View"); + JMenu zoom = new JMenu("Zoom"); + zoom.add(pdfViewer.zoomInAction); + zoom.add(pdfViewer.zoomOutAction); + zoom.add(pdfViewer.fitInWindowAction); + zoom.setEnabled(false); + view.add(zoom); + view.add(pdfViewer.fullScreenAction); + + if (pdfViewer.doThumb) { + view.addSeparator(); + view.add(pdfViewer.thumbAction); + } + + mb.add(view); + setJMenuBar(mb); + + + + + this.add(pdfViewer,BorderLayout.CENTER); + + this.add(outlinePanel,BorderLayout.EAST); + this.add(thumbscrollContainer,BorderLayout.WEST); + + + setSize(650,650); + outlinePanel.setSize(100,650); + thumbscrollContainer.setSize(100,650); + if(initFile!=null){ + //-- tentative de transformation en pdf --// + try { + pdfViewer.openFile(initFile); + } catch (FileNotFoundException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + ui_.error(CtuluResource.CTULU.getString("Erreur fichier inexistant")); + } catch (IOException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + ui_.error(CtuluResource.CTULU.getString("Erreur lors de la lecture du fichier")); + } + } + + } +} Added: branches/Prepro-0.92-SNAPSHOT/ctulu/src/org/fudaa/ctulu/pdf/CtuluPanelPdfViewer.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ctulu/src/org/fudaa/ctulu/pdf/CtuluPanelPdfViewer.java (rev 0) +++ branches/Prepro-0.92-SNAPSHOT/ctulu/src/org/fudaa/ctulu/pdf/CtuluPanelPdfViewer.java 2008-10-22 17:30:54 UTC (rev 4089) @@ -0,0 +1,1054 @@ +package org.fudaa.ctulu.pdf; + +import java.awt.BorderLayout; +import java.awt.Color; +import java.awt.Dimension; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import java.awt.event.KeyEvent; +import java.awt.event.KeyListener; +import java.awt.event.WindowAdapter; +import java.awt.event.WindowEvent; +import java.awt.geom.Rectangle2D; +import java.awt.print.Book; +import java.awt.print.PageFormat; +import java.awt.print.PrinterException; +import java.awt.print.PrinterJob; +import java.awt.Toolkit; +import java.beans.PropertyChangeEvent; +import java.beans.PropertyChangeListener; +import java.io.File; +import java.io.FileOutputStream; +import java.io.IOException; +import java.io.RandomAccessFile; +import java.net.Socket; +import java.net.URL; +import java.nio.ByteBuffer; +import java.nio.channels.FileChannel; +import java.util.Date; +import java.util.HashMap; + +import javax.swing.AbstractAction; +import javax.swing.Action; +import javax.swing.BorderFactory; +import javax.swing.Box; +import javax.swing.ButtonGroup; +import javax.swing.Icon; +import javax.swing.ImageIcon; +import javax.swing.JButton; +import javax.swing.JCheckBox; +import javax.swing.JCheckBoxMenuItem; +import javax.swing.JDialog; +import javax.swing.JFileChooser; +import javax.swing.JFrame; +import javax.swing.JMenu; +import javax.swing.JMenuBar; +import javax.swing.JMenuItem; +import javax.swing.JOptionPane; +import javax.swing.JScrollPane; +import javax.swing.JSplitPane; +import javax.swing.JTextField; +import javax.swing.JToggleButton; +import javax.swing.JToolBar; +import javax.swing.JTree; +import javax.swing.event.TreeSelectionEvent; +import javax.swing.event.TreeSelectionListener; +import javax.swing.filechooser.FileFilter; +import javax.swing.SwingUtilities; + +import org.fudaa.ctulu.CtuluResource; +import org.fudaa.ctulu.CtuluUI; + +import com.memoire.bu.BuPanel; +import com.sun.pdfview.Flag; +import com.sun.pdfview.FullScreenWindow; +import com.sun.pdfview.OutlineNode; +import com.sun.pdfview.PDFDestination; +import com.sun.pdfview.PDFFile; +import com.sun.pdfview.PDFObject; +import com.sun.pdfview.PDFPage; +import com.sun.pdfview.PDFPrintPage; +import com.sun.pdfview.PDFViewer; +import com.sun.pdfview.PageChangeListener; +import com.sun.pdfview.PagePanel; +import com.sun.pdfview.ThumbPanel; +import com.sun.pdfview.action.GoToAction; +import com.sun.pdfview.action.PDFAction; +import java.lang.reflect.InvocationTargetException; +/** + * Classe qui g\xE9n\xE8re un panel disposant de toutes les fonctionnalit\xE9 du lecteur pdf. + * Ce panel s'autosuffie pour la gestion des pdfs + * + * Il a \xE9t\xE9 modifi\xE9 pour int\xE9grer le panel d'outline sur le cot\xE9 droit et les d\xE9filement d images sur le cot\xE9 gauche. + * + * Gestion et visualisation des chapitres. + * @author Adrien Hadoux + * + */ +public class CtuluPanelPdfViewer extends BuPanel implements KeyListener, TreeSelectionListener, PageChangeListener{ + + + + + public final static String TITLE = " PDF Viewer"; + CtuluUI ui_; + /** The current PDFFile */ + PDFFile curFile; + /** the name of the current document */ + String docName; + /** The split between thumbs and page */ + //JSplitPane split; + /**Panel outline **/ + BuPanel outlinePanel; + /** container du thumbdefiler **/ + BuPanel thumbscrollContainer; + /** The thumbnail scroll pane */ + JScrollPane thumbscroll; + /** The thumbnail display */ + ThumbPanel thumbs; + /** The page display */ + PagePanel page; + /** The full screen page display, or null if not in full screen mode */ + PagePanel fspp; + + // Thread anim; + /** The current page number (starts at 0), or -1 if no page */ + int curpage = -1; + /** the full screen button */ + JToggleButton fullScreenButton; + /** the current page number text field */ + JTextField pageField; + /** the full screen window, or null if not in full screen mode */ + FullScreenWindow fullScreen; + /** the root of the outline, or null if there is no outline */ + OutlineNode outline = null; + /** The page format for printing */ + PageFormat pformat = PrinterJob.getPrinterJob().defaultPage(); + /** true if the thumb panel should exist at all */ + boolean doThumb = true; + /** flag to indicate when a newly added document has been announced */ + Flag docWaiter; + /** a thread that pre-loads the next page for faster response */ + PagePreparer pagePrep; + /** the window containing the pdf outline, or null if one doesn't exist */ + JDialog olf; + /** the document menu */ + JMenu docMenu; + + /** + * utility method to get an icon from the resources of this class + * @param name the name of the icon + * @return the icon, or null if the icon wasn't found. + */ + + + + public Icon getIcon(String name) { + Icon icon = null; + URL url = null; + try { + url = PDFViewer.class.getResource(name); + + icon = new ImageIcon(url); + if (icon == null) { + System.out.println("Couldn't find " + url); + } + } catch (Exception e) { + System.out.println("Couldn't find " + getClass().getName() + "/" + name); + e.printStackTrace(); + } + return icon; + } + + /// FILE MENU + Action openAction = new AbstractAction("Open...") { + + public void actionPerformed(ActionEvent evt) { + doOpen(); + } + }; + Action pageSetupAction = new AbstractAction("Page setup...") { + + public void actionPerformed(ActionEvent evt) { + doPageSetup(); + } + }; + Action printAction = new AbstractAction("Print...", getIcon("gfx/print.gif")) { + + public void actionPerformed(ActionEvent evt) { + doPrint(); + } + }; + Action closeAction = new AbstractAction("Close") { + + public void actionPerformed(ActionEvent evt) { + doClose(); + } + }; + Action quitAction = new AbstractAction("Quit") { + + public void actionPerformed(ActionEvent evt) { + doQuit(); + } + }; + + class ZoomAction extends AbstractAction { + + double zoomfactor = 1.0; + + public ZoomAction(String name, double factor) { + super(name); + zoomfactor = factor; + } + + public ZoomAction(String name, Icon icon, double factor) { + super(name, icon); + zoomfactor = factor; + } + + public void actionPerformed(ActionEvent evt) { + doZoom(zoomfactor); + } + } + ZoomAction zoomInAction = new ZoomAction("Zoom in", + getIcon("gfx/zoomin.gif"), + 2.0); + ZoomAction zoomOutAction = new ZoomAction("Zoom out", + getIcon("gfx/zoomout.gif"), + 0.5); + Action zoomToolAction = new AbstractAction("", getIcon("gfx/zoom.gif")) { + + public void actionPerformed(ActionEvent evt) { + doZoomTool(); + } + }; + Action fitInWindowAction = new AbstractAction("Fit in window", + getIcon("gfx/fit.gif")) { + + public void actionPerformed(ActionEvent evt) { + doFitInWindow(); + } + }; + + class ThumbAction extends AbstractAction + implements PropertyChangeListener { + + boolean isOpen = true; + + public ThumbAction() { + super("Hide thumbnails"); + } + + public void propertyChange(PropertyChangeEvent evt) { + int v = ((Integer) evt.getNewValue()).intValue(); + if (v <= 1) { + isOpen = false; + putValue(ACTION_COMMAND_KEY, "Show thumbnails"); + putValue(NAME, "Show thumbnails"); + } else { + isOpen = true; + putValue(ACTION_COMMAND_KEY, "Hide thumbnails"); + putValue(NAME, "Hide thumbnails"); + } + } + + public void actionPerformed(ActionEvent evt) { + doThumbs(!isOpen); + } + } + ThumbAction thumbAction = new ThumbAction(); + Action fullScreenAction = new AbstractAction("Full screen", + getIcon("gfx/fullscrn.gif")) { + + public void actionPerformed(ActionEvent evt) { + doFullScreen((evt.getModifiers() & evt.SHIFT_MASK) != 0); + } + }; + Action nextAction = new AbstractAction("Next", getIcon("gfx/next.gif")) { + + public void actionPerformed(ActionEvent evt) { + doNext(); + } + }; + Action firstAction = new AbstractAction("First", getIcon("gfx/first.gif")) { + + public void actionPerformed(ActionEvent evt) { + doFirst(); + } + }; + Action lastAction = new AbstractAction("Last", getIcon("gfx/last.gif")) { + + public void actionPerformed(ActionEvent evt) { + doLast(); + } + }; + Action prevAction = new AbstractAction("Prev", getIcon("gfx/prev.gif")) { + + public void actionPerformed(ActionEvent evt) { + doPrev(); + } + }; + + /** + * Create a new PDFViewer based on a user, with or without a thumbnail + * panel. + * @param useThumbs true if the thumb panel should exist, false if not. + */ + public CtuluPanelPdfViewer(boolean useThumbs,CtuluUI ui,BuPanel outlinePanel,BuPanel thumbscrollContainer) { + ui_=ui; + doThumb = useThumbs; + this.outlinePanel=outlinePanel; + this.thumbscrollContainer=thumbscrollContainer; + init(); + } + + /** + * Initialize this PDFViewer by creating the GUI. + */ + protected void init() { + setSize(600,600); + page = new PagePanel(); + page.addKeyListener(this); + + if (doThumb) { + //split = new JSplitPane(split.HORIZONTAL_SPLIT); + // split.addPropertyChangeListener(split.DIVIDER_LOCATION_PROPERTY, + // thumbAction); + // split.setOneTouchExpandable(true); + thumbs = new ThumbPanel(null); + thumbscroll = new JScrollPane(thumbs, + thumbscroll.VERTICAL_SCROLLBAR_ALWAYS, + thumbscroll.HORIZONTAL_SCROLLBAR_NEVER); + // split.setLeftComponent(thumbscroll); + //split.setRightComponent(page); + thumbscrollContainer.add(thumbscroll, BorderLayout.CENTER); + } + //else { + add(page, BorderLayout.CENTER); + //} + + //-- ajout du panel outline --// + //outlinePanel=new BuPanel(); + //this.add(outlinePanel,BorderLayout.EAST); + //outlinePanel.setBorder(BorderFactory.createTitledBorder("Outline")); + JToolBar toolbar = new JToolBar(); + toolbar.setFloatable(false); + + JButton jb; + + jb = new JButton(firstAction); + jb.setText(""); + toolbar.add(jb); + jb = new JButton(prevAction); + jb.setText(""); + toolbar.add(jb); + pageField = new JTextField("-", 3); + // pageField.setEnabled(false); + pageField.setMaximumSize(new Dimension(45, 32)); + pageField.addActionListener(new ActionListener() { + + public void actionPerformed(ActionEvent evt) { + doPageTyped(); + } + }); + toolbar.add(pageField); + jb = new JButton(nextAction); + jb.setText(""); + toolbar.add(jb); + jb = new JButton(lastAction); + jb.setText(""); + toolbar.add(jb); + + toolbar.add(Box.createHorizontalGlue()); + + fullScreenButton = new JToggleButton(fullScreenAction); + fullScreenButton.setText(""); + toolbar.add(fullScreenButton); + fullScreenButton.setEnabled(true); + + toolbar.add(Box.createHorizontalGlue()); + + JToggleButton jtb; + ButtonGroup bg = new ButtonGroup(); + + jtb = new JToggleButton(zoomToolAction); + jtb.setText(""); + bg.add(jtb); + toolbar.add(jtb); + jtb = new JToggleButton(fitInWindowAction); + jtb.setText(""); + bg.add(jtb); + jtb.setSelected(true); + toolbar.add(jtb); + + toolbar.add(Box.createHorizontalGlue()); + + jb = new JButton(printAction); + jb.setText(""); + toolbar.add(jb); + + add(toolbar, BorderLayout.NORTH); + + setEnabling(); + + Dimension screen = Toolkit.getDefaultToolkit().getScreenSize(); + int x = (screen.width - getWidth()) / 2; + int y = (screen.height - getHeight()) / 2; + setLocation(x, y); + if (SwingUtilities.isEventDispatchThread()) { + show(); + } else { + try { + SwingUtilities.invokeAndWait(new Runnable() { + + public void run() { + show(); + } + }); + } catch (InvocationTargetException ie) { + // ignore + } catch (InterruptedException ie) { + // ignore + } + } + } + + /** + * Changes the displayed page, desyncing if we're not on the + * same page as a presenter. + * @param pagenum the page to display + */ + public void gotoPage(int pagenum) { + if (pagenum < 0) { + pagenum = 0; + } else if (pagenum >= curFile.getNumPages()) { + pagenum = curFile.getNumPages() - 1; + } + forceGotoPage(pagenum); + } + + /** + * Changes the displayed page. + * @param pagenum the page to display + */ + public void forceGotoPage(int pagenum) { + if (pagenum <= 0) { + pagenum = 0; + } else if (pagenum >= curFile.getNumPages()) { + pagenum = curFile.getNumPages() - 1; + } +// System.out.println("Going to page " + pagenum); + curpage = pagenum; + + // update the page text field + pageField.setText(String.valueOf(curpage + 1)); + + // fetch the page and show it in the appropriate place + PDFPage pg = curFile.getPage(pagenum + 1); + if (fspp != null) { + fspp.showPage(pg); + fspp.requestFocus(); + } else { + page.showPage(pg); + page.requestFocus(); + } + + // update the thumb panel + if (doThumb) { + thumbs.pageShown(pagenum); + } + + // stop any previous page prepper, and start a new one + if (pagePrep != null) { + pagePrep.quit(); + } + pagePrep = new PagePreparer(pagenum); + pagePrep.start(); + + setEnabling(); + } + + /** + * A class to pre-cache the next page for better UI response + */ + class PagePreparer extends Thread { + + int waitforPage; + int prepPage; + + /** + * Creates a new PagePreparer to prepare the page after the current + * one. + * @param waitforPage the current page number, 0 based + */ + public PagePreparer(int waitforPage) { + setDaemon(true); + + this.waitforPage = waitforPage; + this.prepPage = waitforPage + 1; + } + + public void quit() { + waitforPage = -1; + } + + public void run() { + Dimension size = null; + Rectangle2D clip = null; + + // wait for the current page + // System.out.println("Preparer waiting for page " + (waitforPage + 1)); + if (fspp != null) { + fspp.waitForCurrentPage(); + size = fspp.getCurSize(); + clip = fspp.getCurClip(); + } else if (page != null) { + page.waitForCurrentPage(); + size = page.getCurSize(); + clip = page.getCurClip(); + } + + if (waitforPage == curpage) { + // don't go any further if the user changed pages. + // System.out.println("Preparer generating page " + (prepPage + 2)); + PDFPage pdfPage = curFile.getPage(prepPage + 1, true); + if (pdfPage != null && waitforPage == curpage) { + // don't go any further if the user changed pages + // System.out.println("Generating image for page " + (prepPage + 2)); + + pdfPage.getImage(size.width, size.height, clip, null, true, true); + // System.out.println("Generated image for page "+ (prepPage+2)); + } + } + } + } + + /** + * Enable or disable all of the actions based on the current state. + */ + public void setEnabling() { + boolean fileavailable = curFile != null; + boolean pageshown = ((fspp != null) ? fspp.getPage() != null : page.getPage() != null); + boolean printable = fileavailable && curFile.isPrintable(); + + pageField.setEnabled(fileavailable); + printAction.setEnabled(printable); + closeAction.setEnabled(fileavailable); + fullScreenAction.setEnabled(pageshown); + prevAction.setEnabled(pageshown); + nextAction.setEnabled(pageshown); + firstAction.setEnabled(fileavailable); + lastAction.setEnabled(fileavailable); + zoomToolAction.setEnabled(pageshown); + fitInWindowAction.setEnabled(pageshown); + zoomInAction.setEnabled(pageshown); + zoomOutAction.setEnabled(pageshown); + } + + /** + * Open a specific pdf file. Creates a DocumentInfo from the file, + * and opens that. + * @param file the file to open + */ + public void openFile(File file) throws IOException { + // first open the file for random access + RandomAccessFile raf = new RandomAccessFile(file, "r"); + + // extract a file channel + FileChannel channel = raf.getChannel(); + + // now memory-map a byte-buffer + ByteBuffer buf = + channel.map(FileChannel.MapMode.READ_ONLY, 0, channel.size()); + + // create a PDFFile from the data + PDFFile newfile = null; + try { + newfile = new PDFFile(buf); + } catch (IOException ioe) { + openError(file.getPath() + " doesn't appear to be a PDF file."); + return; + } + + // Now that we're reasonably sure this document is real, close the + // old one. + doClose(); + + // set up our document + this.curFile = newfile; + docName = file.getName(); + + + // set up the thumbnails + if (doThumb) { + thumbs = new ThumbPanel(curFile); + thumbs.addPageChangeListener(this); + thumbscroll.getViewport().setView(thumbs); + thumbscroll.getViewport().setBackground(Color.gray); + } + + setEnabling(); + + // display page 1. + forceGotoPage(0); + + // if the PDF has an outline, display it. + try { + outline = curFile.getOutline(); + } catch (IOException ioe) { + } + if (outline != null) { + if (outline.getChildCount() > 0) { +// olf = new JDialog();// "Outline" +// olf.setDefaultCloseOperation(JDialog.DO_NOTHING_ON_CLOSE); +// olf.setLocation(this.getLocation()); + JTree jt = new JTree(outline); + jt.setRootVisible(false); + jt.addTreeSelectionListener(this); + JScrollPane jsp = new JScrollPane(jt); + + //-- ajout dans le outline panel --// + outlinePanel.add(jsp); + this.revalidate(); + + +// olf.getContentPane().add(jsp); +// olf.pack(); +// olf.setVisible(true); + } else { + if (olf != null) { + olf.setVisible(false); + olf = null; + } + } + } + } + + /** + * Display a dialog indicating an error. + */ + public void openError(String message) { + JOptionPane.showMessageDialog(/*split*/this, message, "Error opening file", + JOptionPane.ERROR_MESSAGE); + } + + /** + * A file filter for PDF files. + */ + FileFilter pdfFilter = new FileFilter() { + + public boolean accept(File f) { + return f.isDirectory() || f.getName().endsWith(".pdf"); + } + + public String getDescription() { + return "Choose a PDF file"; + } + }; + private File prevDirChoice; + + /** + * Ask the user for a PDF file to open from the local file system + */ + public void doOpen() { + try { + JFileChooser fc = new JFileChooser(); + fc.setCurrentDirectory(prevDirChoice); + fc.setFileFilter(pdfFilter); + fc.setMultiSelectionEnabled(false); + int returnVal = fc.showOpenDialog(this); + if (returnVal == JFileChooser.APPROVE_OPTION) { + try { + prevDirChoice = fc.getSelectedFile(); + openFile(fc.getSelectedFile()); + } catch (IOException ioe) { + ioe.printStackTrace(); + } + } + } catch (Exception e) { + JOptionPane.showMessageDialog(/*split*/this, + "Opening files from your local " + + "disk is not available\nfrom the " + + "Java Web Start version of this " + + "program.\n", + "Error opening directory", + JOptionPane.ERROR_MESSAGE); + e.printStackTrace(); + } + } + + /** + * Open a local file, given a string filename + * @param name the name of the file to open + */ + public void doOpen(String name) { + try { + openFile(new File(name)); + } catch (IOException ioe) { + } + } + + /** + * Posts the Page Setup dialog + */ + public void doPageSetup() { + PrinterJob pjob = PrinterJob.getPrinterJob(); + pformat = pjob.pageDialog(pformat); + } + + /** + * A thread for printing in. + */ + class PrintThread extends Thread { + + PDFPrintPage ptPages; + PrinterJob ptPjob; + + public PrintThread(PDFPrintPage pages, PrinterJob pjob) { + ptPages = pages; + ptPjob = pjob; + } + + public void run() { + try { + ptPages.show(ptPjob); + ptPjob.print(); + } catch (PrinterException pe) { + JOptionPane.showMessageDialog(CtuluPanelPdfViewer.this, + "Printing Error: " + pe.getMessage(), + "Print Aborted", + JOptionPane.ERROR_MESSAGE); + } + ptPages.hide(); + } + } + + /** + * Print the current document. + */ + public void doPrint() { + PrinterJob pjob = PrinterJob.getPrinterJob(); + pjob.setJobName(docName); + Book book = new Book(); + PDFPrintPage pages = new PDFPrintPage(curFile); + book.append(pages, pformat, curFile.getNumPages()); + + pjob.setPageable(book); + if (pjob.printDialog()) { + new PrintThread(pages, pjob).start(); + } + } + + /** + * Close the current document. + */ + public void doClose() { + if (thumbs != null) { + thumbs.stop(); + } + if (olf != null) { + olf.setVisible(false); + olf = null; + } + if (doThumb) { + thumbs = new ThumbPanel(null); + thumbscroll.getViewport().setView(thumbs); + } + + setFullScreenMode(false, false); + page.showPage(null); + curFile = null; + + setEnabling(); + } + + /** + * Shuts down all known threads. This ought to cause the JVM to quit + * if the PDFViewer is the only application running. + */ + public void doQuit() { + // if (thumbs != null) { + // thumbs.stop(); + // } + doClose(); + + } + + /** + * Turns on zooming + */ + public void doZoomTool() { + if (fspp == null) { + page.useZoomTool(true); + } + } + + /** + * Turns off zooming; makes the page fit in the window + */ + public void doFitInWindow() { + if (fspp == null) { + page.useZoomTool(false); + page.setClip(null); + } + } + + /** + * Shows or hides the thumbnails by moving the split pane divider + */ + public void doThumbs(boolean show) { + if (show) { + /*split.setDividerLocation((int) thumbs.getPreferredSize().width + + (int) thumbscroll.getVerticalScrollBar(). + getWidth() + 4);*/ + thumbscrollContainer.removeAll(); + this.revalidate(); + } else { + //split.setDividerLocation(0); + thumbscrollContainer.add(thumbscroll); + this.revalidate(); + } + } + + /** + * Enter full screen mode + * @param force true if the user should be prompted for a screen to + * use in a multiple-monitor setup. If false, the user will only be + * prompted once. + */ + public void doFullScreen(boolean force) { + setFullScreenMode(fullScreen == null, force); + } + + public void doZoom(double factor) { + } + // public void doOpenMeetingDoc(DocumentInfo doc) { + // } + + /** + * Goes to the next page + */ + public void doNext() { + gotoPage(curpage + 1); + } + + /** + * Goes to the previous page + */ + public void doPrev() { + gotoPage(curpage - 1); + } + + /** + * Goes to the first page + */ + public void doFirst() { + gotoPage(0); + } + + /** + * Goes to the last page + */ + public void doLast() { + gotoPage(curFile.getNumPages() - 1); + } + + /** + * Goes to the page that was typed in the page number text field + */ + public void doPageTyped() { + int pagenum = -1; + try { + pagenum = Integer.parseInt(pageField.getText()) - 1; + } catch (NumberFormatException nfe) { + } + if (pagenum >= curFile.getNumPages()) { + pagenum = curFile.getNumPages() - 1; + } + if (pagenum >= 0) { + if (pagenum != curpage) { + gotoPage(pagenum); + } + } else { + pageField.setText(String.valueOf(curpage)); + } + } + + /** + * Runs the FullScreenMode change in another thread + */ + class PerformFullScreenMode implements Runnable { + + boolean force; + + public PerformFullScreenMode(boolean forcechoice) { + force = forcechoice; + } + + public void run() { + fspp = new PagePanel(); + fspp.setBackground(Color.black); + page.showPage(null); + fullScreen = new FullScreenWindow(fspp, force); + fspp.addKeyListener(CtuluPanelPdfViewer.this); + gotoPage(curpage); + fullScreenAction.setEnabled(true); + } + } + + /** + * Starts or ends full screen mode. + * @param full true to enter full screen mode, false to leave + * @param force true if the user should be prompted for a screen + * to use the second time full screen mode is entered. + */ + public void setFullScreenMode(boolean full, boolean force) { + // curpage= -1; + if (full && fullScreen == null) { + fullScreenAction.setEnabled(false); + new Thread(new PerformFullScreenMode(force)).start(); + fullScreenButton.setSelected(true); + } else if (!full && fullScreen != null) { + fullScreen.close(); + fspp = null; + fullScreen = null; + gotoPage(curpage); + fullScreenButton.setSelected(false); + } + } + + + + /** + * Handle a key press for navigation + */ + public void keyPressed(KeyEvent evt) { + int code = evt.getKeyCode(); + if (code == evt.VK_LEFT) { + doPrev(); + } else if (code == evt.VK_RIGHT) { + doNext(); + } else if (code == evt.VK_UP) { + doPrev(); + } else if (code == evt.VK_DOWN) { + doNext(); + } else if (code == evt.VK_HOME) { + doFirst(); + } else if (code == evt.VK_END) { + doLast(); + } else if (code == evt.VK_PAGE_UP) { + doPrev(); + } else if (code == evt.VK_PAGE_DOWN) { + doNext(); + } else if (code == evt.VK_SPACE) { + doNext(); + } else if (code == evt.VK_ESCAPE) { + setFullScreenMode(false, false); + } + } + + /** + * Combines numeric key presses to build a multi-digit page number. + */ + class PageBuilder implements Runnable { + + int value = 0; + long timeout; + Thread anim; + static final long TIMEOUT = 500; + + /** add the digit to the page number and start the timeout thread */ + public synchronized void keyTyped(int keyval) { + value = value * 10 + keyval; + timeout = System.currentTimeMillis() + TIMEOUT; + if (anim == null) { + anim = new Thread(this); + anim.start(); + } + } + + /** + * waits for the timeout, and if time expires, go to the specified + * page number + */ + public void run() { + long now, then; + synchronized (this) { + now = System.currentTimeMillis(); + then = timeout; + } + while (now < then) { + try { + Thread.sleep(timeout - now); + } catch (InterruptedException ie) { + } + synchronized (this) { + now = System.currentTimeMillis(); + then = timeout; + } + } + synchronized (this) { + gotoPage(value - 1); + anim = null; + value = 0; + } + } + } + PageBuilder pb = new PageBuilder(); + + public void keyReleased(KeyEvent evt) { + } + + /** + * gets key presses and tries to build a page if they're numeric + */ + public void keyTyped(KeyEvent evt) { + char key = evt.getKeyChar(); + if (key >= '0' && key <= '9') { + int val = key - '0'; + pb.keyTyped(val); + } + } + + /** + * Someone changed the selection of the outline tree. Go to the new + * page. + */ + public void valueChanged(TreeSelectionEvent e) { + if (e.isAddedPath()) { + OutlineNode node = (OutlineNode) e.getPath().getLastPathComponent(); + if (node == null) { + return; + } + + try { + PDFAction action = node.getAction(); + if (action == null) { + return; + } + + if (action instanceof GoToAction) { + PDFDestination dest = ((GoToAction) action).getDestination(); + if (dest == null) { + return; + } + + PDFObject page = dest.getPage(); + if (page == null) { + return; + } + + int pageNum = curFile.getPageNumber(page); + if (pageNum >= 0) { + gotoPage(pageNum); + } + } + } catch (IOException ioe) { + ioe.printStackTrace(); + } + } + } + + + +} Added: branches/Prepro-0.92-SNAPSHOT/ctulu/test/org/fudaa/ctulu/TestCtuluPdf.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ctulu/test/org/fudaa/ctulu/TestCtuluPdf.java (rev 0) +++ branches/Prepro-0.92-SNAPSHOT/ctulu/test/org/fudaa/ctulu/TestCtuluPdf.java 2008-10-22 17:30:54 UTC (rev 4089) @@ -0,0 +1,85 @@ +package org.fudaa.ctulu; + +import java.io.File; +import java.io.IOException; +import java.io.RandomAccessFile; +import java.nio.ByteBuffer; +import java.nio.channels.FileChannel; + +import javax.swing.JFileChooser; +import javax.swing.JFrame; +import javax.swing.SwingUtilities; + +import org.fudaa.ctulu.gui.CtuluFileChooser; +import org.fudaa.ctulu.pdf.CtuluFramePdfCustomViewer; + + +import com.sun.pdfview.PDFFile; +import com.sun.pdfview.PDFPage; +import com.sun.pdfview.PDFViewer; +import com.sun.pdfview.PagePanel; + +/** + * classe de test poru voir le fonctionnement du renderer de pdf + * pour plus d exemples : https://pdf-renderer.dev.java.net/examples.html + * @author Adrien Hadoux + * + */ +public class TestCtuluPdf { + + public static void setup() throws IOException { + + //set up the frame and panel + javax.swing.JFrame frame = new JFrame("PDF Test"); + frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); + PagePanel panel = new PagePanel(); + frame.add(panel); + frame.pack(); + frame.setVisible(true); + + //load a pdf from a byte buffer + CtuluFileChooser chooser=new CtuluFileChooser(true); + int reponse=chooser.showOpenDialog(frame); + if(reponse!=JFileChooser.APPROVE_OPTION) + return; + File file = chooser.getSelectedFile(); + + + RandomAccessFile raf = new RandomAccessFile(file, "r"); + FileChannel channel = raf.getChannel(); + ByteBuffer buf = channel.map(FileChannel.MapMode.READ_ONLY, + 0, channel.size()); + PDFFile pdffile = new PDFFile(buf); + + // show the first page + PDFPage page = pdffile.getPage(0); + panel.showPage(page); + + + + } + + + public static void afficheViewerCompletement(){ + + // PDFViewer viewer=new PDFViewer(true); + // viewer.setVisible(true); + CtuluFramePdfCustomViewer viewer=new CtuluFramePdfCustomViewer("Test viewer",true,null); + viewer.setVisible(true); + // viewer.setSize(400,400); + } + + public static void main(final String[] args) { + SwingUtilities.invokeLater(new Runnable() { + public void run() { + + TestCtuluPdf.afficheViewerCompletement(); + + } + }); + } + } + + + + Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/persist/EbliWidgetSerializeXml.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/persist/EbliWidgetSerializeXml.java 2008-10-21 15:38:05 UTC (rev 4088) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/persist/EbliWidgetSerializeXml.java 2008-10-22 17:30:54 UTC (rev 4089) @@ -18,6 +18,8 @@ import org.fudaa.ebli.visuallibrary.creator.EbliWidgetCreator; import org.fudaa.ebli.visuallibrary.creator.EbliWidgetCreatorClassLoader; +import com.thoughtworks.xstream.annotations.XStreamAlias; + /** * Classe utilisation pour la serialization des donn\xE9es widget * @@ -36,7 +38,9 @@ } } - + @XStreamAlias("warning") + String warning="ID unique"; + /** * Important: l'id de la widget pour avoir des references . */ Added: branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/persist/LayoutDescriptor.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/persist/LayoutDescriptor.java (rev 0) +++ branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/persist/LayoutDescriptor.java 2008-10-22 17:30:54 UTC (rev 4089) @@ -0,0 +1,16 @@ +package org.fudaa.fudaa.tr.post.persist; + +/** + * classe utiliseer pour donner des noms potable poru le xml parser + * @author Adrien Hadoux + * + */ +public class LayoutDescriptor { + + public String pathRelatifLayout; + + public LayoutDescriptor(String pathRelatifLayout) { + super(); + this.pathRelatifLayout = pathRelatifLayout; + } +} Modified: branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/persist/TrPostPersistenceManager.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/persist/TrPostPersistenceManager.java 2008-10-21 15:38:05 UTC (rev 4088) +++ branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/persist/TrPostPersistenceManager.java 2008-10-22 17:30:54 UTC (rev 4089) @@ -9,6 +9,7 @@ import java.io.IOException; import java.io.ObjectInputStream; import java.io.ObjectOutputStream; +import java.io.OutputStream; import java.util.ArrayList; import java.util.HashMap; import java.util.HashSet; @@ -51,6 +52,8 @@ import com.memoire.fu.FuLog; import com.thoughtworks.xstream.XStream; +import com.thoughtworks.xstream.annotations.XStreamAlias; +import com.thoughtworks.xstream.io.HierarchicalStreamWriter; import com.thoughtworks.xstream.io.xml.DomDriver; import com.thoughtworks.xstream.persistence.FileStreamStrategy; import com.thoughtworks.xstream.persistence.XmlArrayList; @@ -90,7 +93,7 @@ /** * Attributs pour le ficheirs des sources */ - public final static String DESCRIPTORSOURCE = "sources" + EXTENSION; + //public final static String DESCRIPTORSOURCE = "sources" + EXTENSION; public final static String BALISESOURCES = "SourcesList"; public static String ATTRIBUTESOURCE = "FICHIER"; public final static String FileWidgetNames = "FramesNames"+ EXTENSION; @@ -107,6 +110,11 @@ File projet_; TrPostCommonImplementation ui_; + + //-- elements de base tagg\xE9s par xstream pour etre plus explicites dans les fichiers --// + + + public TrPostPersistenceManager(final TrPostProjet projet) { super(); trprojet_ = projet; @@ -214,84 +222,101 @@ } else { // -- tentative d'ouverture du projet --// - ObjectInputStream in = null; - try { - in = getParser().createObjectInputStream(new FileReader(fichierSetup)); + + //-- on a le chemin vers le fichier setup.POST, il suffit d4enlever le no; du fichier et on obtient le che;in du rep total --// + String path=fichierSetup.getAbsolutePath(); + path=path.substring(0, path.lastIndexOf(this.setupProject)); + + //-- verification que le fichier est bien un repertoire --// + File candidat=new File(path); + + if(candidat.isDirectory()){ + projet_=candidat; + return true; + }else + return false; + + +// ObjectInputStream in = null; +// try { +// in = getParser().createObjectInputStream(new FileReader(fichierSetup)); +// +// // -- Recuperation du path du projet --// +// final String pathRelatifProjet = (String) in.readObject(); +// final String pathAbsoluProjet = (String) in.readObject(); +// +// if (pathRelatifProjet == null) { +// try { +// in.close(); +// return false; +// } catch (final IOException e) { +// // TODO Auto-generated catch block +// e.printStackTrace(); +// messageError(false); +// } +// } +// +// //-- tetative de recollage du path relatif avec le path du fichier du chooser --// +// File fichierDirectory=CtuluLibFile.getAbsolutePathnameTo(fichierSetup, new File(pathRelatifProjet)); +// +// if(fichierDirectory!=null && fichierDirectory.canRead()){ +// projet_=fichierDirectory; +// } +// else +// projet_ = new File(pathAbsoluProjet); +// try { +// in.close(); +// return true; +// } catch (final IOException e) { +// // TODO Auto-generated catch block +// e.printStackTrace(); +// messageError(false); +// in.close(); +// return false; +// } +// +// } catch (final FileNotFoundException eft) { +// // TODO Auto-generated catch block +// eft.printStackTrace(); +// try { +// in.close(); +// } catch (final IOException e) { +// // TODO Auto-generated catch block +// e.printStackTrace(); +// } +// return false; +// +// } catch (final IOException eft) { +// // TODO Auto-generated catch block +// eft.printStackTrace(); +// messageError(false); +// try { +// in.close(); +// } catch (final IOException e) { +// // TODO Auto-generated catch block +// e.printStackTrace(); +// } +// return false; +// +// } catch (final ClassNotFoundException eft) { +// // TODO Auto-generated catch block +// eft.printStackTrace(); +// messageError(false); +// try { +// in.close(); +// } catch (final IOException e) { +// // TODO Auto-generated catch block +// e.printStackTrace(); +// } +// return false; +// } - // -- Recuperation du path du projet --// - final String pathRelatifProjet = (String) in.readObject(); - final String pathAbsoluProjet = (String) in.readObject(); - - if (pathRelatifProjet == null) { - try { - in.close(); - return false; - } catch (final IOException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - messageError(false); - } - } - - //-- tetative de recollage du path relatif avec le path du fichier du chooser --// - File fichierDirectory=CtuluLibFile.getAbsolutePathnameTo(fichierSetup, new File(pathRelatifProjet)); - - if(fichierDirectory!=null && fichierDirectory.canRead()){ - projet_=fichierDirectory; - } - else - projet_ = new File(pathAbsoluProjet); - try { - in.close(); - return true; - } catch (final IOException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - messageError(false); - in.close(); - return false; - } - - } catch (final FileNotFoundException eft) { - // TODO Auto-generated catch block - eft.printStackTrace(); - try { - in.close(); - } catch (final IOException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - return false; - - } catch (final IOException eft) { - // TODO Auto-generated catch block - eft.printStackTrace(); - messageError(false); - try { - in.close(); - } catch (final IOException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - return false; - - } catch (final ClassNotFoundException eft) { - // TODO Auto-generated catch block - eft.printStackTrace(); - messageError(false); - try { - in.close(); - } catch (final IOException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - return false; - } - } } + + /** * Fichier qui cree le fichier qui indique les diff\xE9rents fichiers layout a lire. Cela permettra pour la lecture de * proposer de charger ou non certains layout @@ -301,21 +326,30 @@ */ public void saveDescriptorScenes(final File file) { // -- outputstream du xstream --// - ObjectOutputStream out = null; - try { - out = getParser().createObjectOutputStream(new FileWriter(file)); - + + //-- ecriture de la classe xstream + ObjectOutputStream out = null; + try { + out = getParser().createObjectOutputStream(new FileWriter(file)); + + //-- readme --// + out.writeObject(XmlCommentaire.getCommentaireLayout()); + // -- g\xE9n\xE9ration du xml pour la scene --// final int nbFichiersToGenrate = trprojet_.impl_.getAllLayoutFille().size(); + out.writeInt(nbFichiersToGenrate); for (int i = 0; i < nbFichiersToGenrate; i++) { // creation du fichier de desciption des scenes dans le repertoire de meme nom. - final String nomFichierLayout =/* projet_.getAbsolutePath() + File.separator +*/ DESCRIPTORSCENE + (i + 1) + String nomFichierLayout=/* projet_.getAbsolutePath() + File.separator +*/ DESCRIPTORSCENE + (i + 1) + EXTENSION+ File.separator + DESCRIPTORSCENE + (i + 1) + EXTENSION; - out.writeObject(nomFichierLayout); - } - + out.writeObject(new LayoutDescriptor(nomFichierLayout)); + + + + } + } catch (final IOException e) { // TODO Auto-generated catch block e.printStackTrace(); @@ -343,20 +377,31 @@ // -- outputstream du xstream --// final List<String> listeFiles = new ArrayList<String>(); ObjectInputStream in = null; + try { + in = getParser().createObjectInputStream(new FileReader(file)); + int nbFichiersToGenrate ; + //-- lecture readme --// + Object debutFichier= in.readObject(); + + if(debutFichier instanceof XmlCommentaire) // -- g\xE9n\xE9ration du xml pour la scene --// - final int nbFichiersToGenrate = in.readInt(); - + nbFichiersToGenrate = in.readInt(); + else + nbFichiersToGenrate = ((Integer) debutFichier).intValue(); for (int i = 0; i < nbFichiersToGenrate; i++) { - //-- recuperation du path relatif vers le fichier de la scene --// - String pathRelatif=(String) in.readObject(); - // creation du fichier de desciption des scenes +// //-- recuperation du path relatif vers le fichier de la scene --// + String pathRelatif=((LayoutDescriptor) in.readObject()).pathRelatifLayout; +// // creation du fichier de desciption des scenes final String nomFichierLayout = projet_.getAbsolutePath()+File.separator+pathRelatif; listeFiles.add(nomFichierLayout); } + + // descriptor=(XstreamListLayoutDescriptor) in.readObject(); + } catch (final FileNotFoundException e) { // TODO Auto-generated catch block e.printStackTrace(); @@ -379,6 +424,7 @@ } return listeFiles; + } /** @@ -439,6 +485,9 @@ } } + + + /** * Methode qui g\xE9n\xE8re le fichier contenant toutes les sources ouverts. * @@ -455,7 +504,11 @@ // -- g\xE9n\xE9ration du xml pour la scene --// try { out = getParser().createObjectOutputStream(new FileWriter(file)); - out.writeInt(trprojet_.listeSrc_.size()); + + //-- redame --// + out.writeObject(XmlCommentaire.getCommentaireSources()); + int nbElements=trprojet_.listeSrc_.size(); + out.writeInt(nbElements); final List<TrPostSourcePersist> listeCouplesIdSources = new ArrayList<TrPostSourcePersist>(); final List<TrPostUserVariableSaver> listeVar = getPersitantVariablesList(pathVariables, true); @@ -466,7 +519,7 @@ final File f = src.getFile(); //out.writeObject(f.getAbsolutePath()); trprojet_.deliverSourceId(src); - listeCouplesIdSources.add(new TrPostSourcePersist(src)); + listeCouplesIdSources.add(new TrPostSourcePersist(src,projet_)); // -- sauveagrde de la variable correspondante --// final TrPostUserVariableSaver var = TrPostUserVariableSaver.saveIn((TrPostSourceAbstract) src, null); listeVar.add(var); @@ -510,30 +563,46 @@ // -- recuperation du multiSourceActivator--// final TrPostMultiSourceActivator multiProjectActivator = new TrPostMultiSourceActivator(trprojet_); + //-- lecture des commentaires --// + Object debutFichier=in.readObject(); + int nbSources ; + if(!(debutFichier instanceof XmlCommentaire)){ + nbSources=((Integer)debutFichier).intValue(); + }else // -- lecture nb sources pour les sources --// - final int nbSources = in.readInt(); + nbSources= in.readInt(); //-- lecture de la liste des objets source perssitant --// final List<TrPostSourcePersist> listeCouplesIdSources = (List<TrPostSourcePersist>) in.readObject(); for (int i = 0; i < nbSources; i++) { - //final String path = (String) in.readObject(); - final String path =listeCouplesIdSources.get(i).pathSource; - if (path != null) { + //-- tentative de lecture du path relatif --// + String path=CtuluLibFile.getAbsolutePathnameTo(projet_, new File(listeCouplesIdSources.get(i).pathRelatifSource)).getPath(); + // String path =projet_.getAbsolutePath()+listeCouplesIdSources.get(i).pathRelatifSource; + File f = new File(path); + if (path != null && f!=null && f.canRead()) { if (trprojet_.isSourceLoaded(path)) { trprojet_.getImpl().warn(TrLib.getString("Solution d\xE9j\xE0 charg\xE9e"), TrLib.getString("Le fichier source existe d\xE9j\xE0 et ne peut \xEAtre ajout\xE9 au projet.")); } else { - final File f = new File(path); // -- tentative de chargement du source dans le multi-projet --// - multiProjectActivator.active(f, trprojet_.impl_,listeCouplesIdSources.get(i).IdSource); - // -- notify aux observers --// - // trprojet_.notifyObservers(); - // --ajout des variables user au source --// - - } + } } + else{ + //-- tentative 2 avec le path absolu --// + path =listeCouplesIdSources.get(i).pathSource; + f = new File(path); + if (path != null && f!=null && f.canRead()) { + if (trprojet_.isSourceLoaded(path)) { + trprojet_.getImpl().warn(TrLib.getString("Solution d\xE9j\xE0 charg\xE9e"), + TrLib.getString("Le fichier source existe d\xE9j\xE0 et ne peut \xEAtre ajout\xE9 au projet.")); + } else { + // -- tentative de chargement du source dans le multi-projet --// + multiProjectActivator.active(f, trprojet_.impl_,listeCouplesIdSources.get(i).IdSource); + } + } + } } } catch (final FileNotFoundException e) { @@ -616,12 +685,12 @@ // -- sauvegarde du projet setup --// - saveSetup(projet_.getAbsolutePath()); + // saveSetup(projet_.getAbsolutePath()); File file; // -- etape 2 sauvegarde du fichier contenant tous les sources ouverts progression("Cr\xE9ation du fichier descripteur de sources", 15); - file = new File(projet_.getAbsolutePath() + File.separator + DESCRIPTORSOURCE); + file = new File(projet_.getAbsolutePath() + File.separator + setupProject); saveSourceAndVariables(file, pathVariables); // -- etape 3 sauvegarde des ebliscene unitairement --// @@ -682,6 +751,10 @@ ObjectOutputStream out = null; try { out = getParser().createObjectOutputStream(new FileWriter(file)); + + //--readme --// + out.writeObject(XmlCommentaire.getCommentaireName()); + out.writeObject(liste); } catch (final IOException e) { e.printStackTrace(); @@ -706,17 +779,22 @@ public List<EbliWidgetSerializeXml.CoupleNomId> loadNomsFrames(final File file) { List<EbliWidgetSerializeXml.CoupleNomId> liste = null; // -- outputstream du xstream --// - ObjectInputStream out = null; + ObjectInputStream in = null; try { - out = getParser().createObjectInputStream(new FileReader(file)); - liste = (List<CoupleNomId>) out.readObject(); + in = getParser().createObjectInputStream(new FileReader(file)); + //--readme --// + Object debuTfichier=in.readObject(); + if(debuTfichier instanceof XmlCommentaire) + liste = (List<CoupleNomId>) in.readObject(); + else + liste= (List<CoupleNomId>)debuTfichier; } catch (final IOException e) { e.printStackTrace(); } catch (final ClassNotFoundException e) { e.printStackTrace(); } finally { try { - out.close(); + in.close(); return liste; } catch (final IOException e) { e.printStackTrace(); @@ -749,7 +827,7 @@ // -- etape 2 sauvegarde du fichier contenant tous les sources ouverts progression("Chargement du fichier descripteur de sources", 15); - file = new File(projet_.getAbsolutePath() + File.separator + DESCRIPTORSOURCE); + file = new File(projet_.getAbsolutePath() + File.separator + setupProject); loadSource(file); // -- etape 3: sauvegarde du fichier de descriptions des layout @@ -820,6 +898,11 @@ xstream.alias("GROUPE", EbliWidgetGroupSerializeXml.class); xstream.alias("FRAMESNAME", EbliWidgetSerializeXml.CoupleNomId.class); xstream.alias("SOURCE", TrPostSourcePersist.class); + xstream.alias("LAYOUTDESCRIPTOR", LayoutDescriptor.class); + xstream.alias("README", XmlCommentaire.class); + // xstream.addImplicitCollection(EbliWidgetSerializeXml.CoupleNomId.class, "FRAMENAME"); + // xstream.alias( "NbElements",Integer.class); + return xstream; } @@ -1019,12 +1102,12 @@ // lecture xml de l objet final EbliWidgetSerializeXml widgetXml = (EbliWidgetSerializeXml) in.readObject(); - + if(!widgetXml.isLinked()){ // generation de la widget dans la scene parametres.put("nodeName", getNodeName(listeCouplesNoms, widgetXml.getId())); final EbliNode node = widgetXml.generateWidgetInScene(parametres, scenToUpdate); - if(!widgetXml.isLinked()){ + // ajout des noeuds a ajouter dans la selection if (widgetXml.isSelected()) listeNodeSelect.add(node); @@ -1136,5 +1219,11 @@ } } + + + public void writeCommentaire(OutputStream out){ + + } + } Modified: branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/persist/TrPostSourcePersist.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/persist/TrPostSourcePersist.java 2008-10-21 15:38:05 UTC (rev 4088) +++ branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/persist/TrPostSourcePersist.java 2008-10-22 17:30:54 UTC (rev 4089) @@ -1,7 +1,12 @@ package org.fudaa.fudaa.tr.post.persist; +import java.io.File; + +import org.fudaa.ctulu.CtuluLibFile; import org.fudaa.fudaa.tr.post.TrPostSource; +import com.thoughtworks.xstream.annotations.XStreamAlias; + /** * Couple path source/ID * qui sera persist\xE9 en xml. @@ -12,23 +17,26 @@ */ public class TrPostSourcePersist { + @XStreamAlias("warning") + String warning="ID unique"; String IdSource; String pathSource; - + String pathRelatifSource; public TrPostSourcePersist(){} /** - * Constructeur utilis\xE9 prou la cr\xE9ation de la donn\xE9e persistante. + * Constructeur utilis\xE9 pour la cr\xE9ation de la donn\xE9e persistante. * @param source */ - public TrPostSourcePersist(TrPostSource source){ - fillDataWithSource(source); + public TrPostSourcePersist(TrPostSource source,File projectDirectory){ + fillDataWithSource(source,projectDirectory); } - public void fillDataWithSource(TrPostSource source){ + public void fillDataWithSource(TrPostSource source,File projectDirectory){ IdSource=source.getId(); pathSource=source.getFile().getAbsolutePath(); + pathRelatifSource=CtuluLibFile.getRelativePathnameTo(projectDirectory,source.getFile()).getPath(); } Added: branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/persist/XmlCommentaire.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/persist/XmlCommentaire.java (rev 0) +++ branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/persist/XmlCommentaire.java 2008-10-22 17:30:54 UTC (rev 4089) @@ -0,0 +1,41 @@ +package org.fudaa.fudaa.tr.post.persist; + +import org.fudaa.fudaa.tr.Tr; +import org.fudaa.fudaa.tr.common.TrResource; + + + +/** + * Classe qui contient un commentaire, est ecrit mais non lu + * @author Adrien Hadoux + * + */ +public class XmlCommentaire { + + String readme; + + public XmlCommentaire(String readme) { + super(); + this.readme = readme; + } + + public static XmlCommentaire getCommentaireSources(){ + String buff=TrResource.getS("Fichier listant tous les fichiers r\xE9sultats. Pour modifier un fichier, modifier le chemin contenu dans balise pathSource (le contenu de pathRelatif n'a pas besoin d'etrre modifie).")+ + TrResource.getS("Pour ajouter un fichier de r\xE9sultat dans le projet, copier/coller d... [truncated message content] |
From: <had...@us...> - 2008-10-23 11:18:45
|
Revision: 4091 http://fudaa.svn.sourceforge.net/fudaa/?rev=4091&view=rev Author: hadouxad Date: 2008-10-23 11:14:24 +0000 (Thu, 23 Oct 2008) Log Message: ----------- - phase correction bug Modified Paths: -------------- branches/Prepro-0.92-SNAPSHOT/ctulu/src/org/fudaa/ctulu/pdf/CtuluFramePdfCustomViewer.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/ZCalqueGrille.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetBordureSingle.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetShape.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetControllerCalque.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/graphe/EbliWidgetControllerGraphe.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/tree/EbliWidgetTreeTableNode.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostLayoutPanelController.java Added Paths: ----------- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/creator/ShapeCreatorLine.java Modified: branches/Prepro-0.92-SNAPSHOT/ctulu/src/org/fudaa/ctulu/pdf/CtuluFramePdfCustomViewer.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ctulu/src/org/fudaa/ctulu/pdf/CtuluFramePdfCustomViewer.java 2008-10-23 09:39:33 UTC (rev 4090) +++ branches/Prepro-0.92-SNAPSHOT/ctulu/src/org/fudaa/ctulu/pdf/CtuluFramePdfCustomViewer.java 2008-10-23 11:14:24 UTC (rev 4091) @@ -1,33 +1,27 @@ package org.fudaa.ctulu.pdf; import java.awt.BorderLayout; -import java.awt.GridLayout; import java.awt.event.WindowAdapter; import java.awt.event.WindowEvent; import java.io.File; import java.io.FileNotFoundException; import java.io.IOException; -import java.io.RandomAccessFile; -import java.nio.ByteBuffer; -import java.nio.channels.FileChannel; import javax.swing.BorderFactory; -import javax.swing.JDialog; import javax.swing.JFrame; import javax.swing.JMenu; import javax.swing.JMenuBar; -import javax.swing.JScrollPane; import org.fudaa.ctulu.CtuluResource; import org.fudaa.ctulu.CtuluUI; import com.memoire.bu.BuPanel; -import com.sun.pdfview.PDFFile; /** - * Fenetre viewer pdf custom + * Fenetre viewer pdf custom. Utilise un CtuluPanelPdfViewer + * * @author Adrien Hadoux - * + * */ public class CtuluFramePdfCustomViewer extends JFrame{ Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/ZCalqueGrille.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/ZCalqueGrille.java 2008-10-23 09:39:33 UTC (rev 4090) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/ZCalqueGrille.java 2008-10-23 11:14:24 UTC (rev 4091) @@ -21,20 +21,19 @@ import java.util.ArrayList; import java.util.List; -import com.vividsolutions.jts.geom.Envelope; -import com.vividsolutions.jts.geom.LineString; -import com.vividsolutions.jts.geom.LinearRing; - import org.fudaa.ctulu.CtuluLibString; import org.fudaa.ctulu.CtuluListSelection; import org.fudaa.ctulu.iterator.NumberIterator; - import org.fudaa.ebli.commun.EbliLib; import org.fudaa.ebli.geometrie.GrBoite; import org.fudaa.ebli.geometrie.GrMorphisme; import org.fudaa.ebli.geometrie.GrPoint; import org.fudaa.ebli.trace.TraceLigne; +import com.vividsolutions.jts.geom.Envelope; +import com.vividsolutions.jts.geom.LineString; +import com.vividsolutions.jts.geom.LinearRing; + /** * Un calque d'affichage d'une grille. * @@ -65,7 +64,8 @@ vue_ = _vue; setDestructible(false); setTitle(EbliLib.getS("Grille")); - setForeground(new Color(204, 153, 0)); + // setForeground(new Color(204, 153, 0)); + setForeground(Color.BLACK); } public int getNbXGraduations() { Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetBordureSingle.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetBordureSingle.java 2008-10-23 09:39:33 UTC (rev 4090) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetBordureSingle.java 2008-10-23 11:14:24 UTC (rev 4091) @@ -1,12 +1,15 @@ package org.fudaa.ebli.visuallibrary; +import java.awt.Graphics2D; import java.awt.Insets; +import java.awt.Rectangle; import java.util.HashMap; import java.util.List; import java.util.Map; import org.fudaa.ctulu.CtuluCommandContainer; import org.fudaa.ebli.animation.EbliAnimatedInterface; +import org.fudaa.ebli.trace.TraceLigne; import org.fudaa.ebli.visuallibrary.animation.EbliWidgetAnimatedItem; import org.fudaa.ebli.visuallibrary.layout.OverlayLayoutGap; @@ -81,13 +84,16 @@ return intern_.isInEditMode_; } + OverlayLayoutGap layout_; + public EbliWidgetBordureSingle(final EbliWidget _intern, final boolean canMove, final boolean canResize) { super(_intern.getEbliScene(), false); intern_ = _intern; insets_ = createInset((int) getTraceLigneModel().getEpaisseur()); - setLayout(new OverlayLayoutGap(insets_)); + layout_ = new OverlayLayoutGap(insets_); + setLayout(layout_); // -- ajout du child --// addChild(intern_); @@ -100,6 +106,44 @@ this.setController(controllerBordure_); } + + protected void paintWidget() { + + // -- mise a jour de la fonte que si il y a eu une modification --// + + final Graphics2D g = getGraphics(); + + final Rectangle rec = getClientArea(); + + g.translate(rec.x, rec.y); + + final TraceLigne l = new TraceLigne(getTraceLigneModel()); + + // // --test on autorise que si son widget fils le permet --// + if (this.getIntern().canColorBackground()) { + getGraphics().setColor(getColorFond()); + getGraphics().fillRect(0, 0, (int) (rec.width - l.getEpaisseur()), (int) (rec.height - l.getEpaisseur())); + } + + l.setCouleur(getColorContour()); + l.dessineRectangle(g, (int) (l.getEpaisseur() / 2), (int) (l.getEpaisseur() / 2), (int) (rec.width - l + .getEpaisseur()), (int) (rec.height - l.getEpaisseur())/* + * , rec.width + */); + + g.translate(-rec.x, -rec.y); + + // setBackground(getColorFond()); + + // layout_.justify(intern_); + insets_ = createInset((int) getTraceLigneModel().getEpaisseur()); + + layout_ = new OverlayLayoutGap(insets_); + setLayout(layout_); + revalidate(); + + } + public Insets createInset(final int epaisseur) { return new Insets(epaisseur, epaisseur, epaisseur, epaisseur); Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetShape.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetShape.java 2008-10-23 09:39:33 UTC (rev 4090) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetShape.java 2008-10-23 11:14:24 UTC (rev 4091) @@ -13,6 +13,7 @@ import org.fudaa.ebli.trace.TraceLigne; import org.fudaa.ebli.trace.TraceLigneModel; import org.fudaa.ebli.visuallibrary.creator.ShapeCreator; +import org.fudaa.ebli.visuallibrary.creator.ShapeCreatorLine; /** * Classe qui permet de dessinner des shapes. @@ -90,7 +91,7 @@ // Il faut prendre en compte l'epaisseur de la ligne final Rectangle2D.Float rec = new Rectangle2D.Float(ep / 2, ep / 2, recInit.width - ep, recInit.height - ep); Shape shape = shaper_.createShapeFor(rec, options_, ep); - if (getRotation() != 0) { + if (getRotation() != 0 && !(shaper_ instanceof ShapeCreatorLine)) { AffineTransform tr = AffineTransform.getRotateInstance(getRotation(), rec.getCenterX(), rec.getCenterY()); shape = tr.createTransformedShape(shape); final Rectangle2D newBound = shape.getBounds2D(); @@ -101,6 +102,10 @@ shape = AffineTransform.getScaleInstance(wRatio, hRatio).createTransformedShape(shape); tr = AffineTransform.getTranslateInstance(ep / 2, ep / 2); shape = tr.createTransformedShape(shape); + } else if (getRotation() != 0) { + // cas line + AffineTransform tr = AffineTransform.getRotateInstance(getRotation(), rec.getCenterX(), rec.getCenterY()); + shape = tr.createTransformedShape(shape); } if (fg_ != null) { Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetControllerCalque.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetControllerCalque.java 2008-10-23 09:39:33 UTC (rev 4090) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetControllerCalque.java 2008-10-23 11:14:24 UTC (rev 4091) @@ -150,6 +150,8 @@ } public boolean hasLegende() { + if (getNodeLegende() == null) + return false; return widget_.getEbliScene().isObject(getNodeLegende()); } Added: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/creator/ShapeCreatorLine.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/creator/ShapeCreatorLine.java (rev 0) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/creator/ShapeCreatorLine.java 2008-10-23 11:14:24 UTC (rev 4091) @@ -0,0 +1,26 @@ +package org.fudaa.ebli.visuallibrary.creator; + +import java.awt.Shape; +import java.awt.geom.Line2D; +import java.awt.geom.Rectangle2D.Float; +import java.util.Map; + +/** + * ShapeCreator pour les lignes classiques. + * + * @author Adrien Hadoux + * + */ +public class ShapeCreatorLine implements ShapeCreator { + + public Shape createShapeFor(Float _rec, Map _options, float _largeurTrait) { + // final GeneralPath path = new GeneralPath(); + // path.moveTo(_rec.x, _rec.y + _rec.height / 2f); + // path.lineTo(_rec.x + _rec.width, _rec.y + _rec.height / 2f); + // + // path.closePath(); + // return path; + return new Line2D.Float(_rec.x, _rec.y + _rec.height / 2f, _rec.x + _rec.width, _rec.y + _rec.height / 2f); + } + +} Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/graphe/EbliWidgetControllerGraphe.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/graphe/EbliWidgetControllerGraphe.java 2008-10-23 09:39:33 UTC (rev 4090) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/graphe/EbliWidgetControllerGraphe.java 2008-10-23 11:14:24 UTC (rev 4091) @@ -169,8 +169,10 @@ public void actionPerformed(final ActionEvent e) { // -- si la widget a une bordure c'est la bordure que l on masque --// - final EbliWidget widgetUndo1 = widget_.getParentBordure(); - final EbliWidget widgetUndo2 = widgetGraphe_.getNodeLegende().getWidget().getParentBordure(); + final EbliWidget widgetGrapheBordure = widget_.getParentBordure(); + EbliWidget widgetLegendeBordure = null; + if(widgetGraphe_.getNodeLegende()!=null) + widgetLegendeBordure = widgetGraphe_.getNodeLegende().getWidget().getParentBordure(); // EbliNode n = (EbliNode) widget_.getEbliScene().findObject(widget_); // if (n.getCreator().getBordure() != null) { @@ -180,7 +182,7 @@ // widgetUndo1 = n.getCreator().getBordure(); // // } else { - widgetUndo1.setVisible(false); + widgetGrapheBordure.setVisible(false); // widgetUndo1 = widget_; // } @@ -191,14 +193,17 @@ // widgetUndo2 = widgetGraphe_.getNodeLegende().getCreator().getBordure(); // } else { // widgetGraphe_.getNodeLegende().getWidget().setVisible(false); - // - widgetUndo2.setVisible(false); + // + if(widgetLegendeBordure!=null) + widgetLegendeBordure.setVisible(false); // } // -- creation des comamndes undo/redo pour le masquage --// final ArrayList<EbliWidget> listeWidget = new ArrayList<EbliWidget>(); - listeWidget.add(widgetUndo1); - listeWidget.add(widgetUndo2); + listeWidget.add(widgetGrapheBordure); + + if(widgetLegendeBordure!=null) + listeWidget.add(widgetLegendeBordure); cmd_.addCmd(new CommandMasquer(listeWidget)); @@ -208,6 +213,9 @@ } public boolean hasLegende() { + if (widgetGraphe_.getNodeLegende() == null) + return false; + return widget_.getEbliScene().isObject(widgetGraphe_.getNodeLegende()); } Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/tree/EbliWidgetTreeTableNode.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/tree/EbliWidgetTreeTableNode.java 2008-10-23 09:39:33 UTC (rev 4090) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/tree/EbliWidgetTreeTableNode.java 2008-10-23 11:14:24 UTC (rev 4091) @@ -9,7 +9,9 @@ import org.fudaa.ebli.visuallibrary.EbliWidget; import org.fudaa.ebli.visuallibrary.EbliWidgetBordureSingle; import org.fudaa.ebli.visuallibrary.actions.CommandMasquer; +import org.fudaa.ebli.visuallibrary.calque.EbliWidgetControllerCalque; import org.fudaa.ebli.visuallibrary.calque.EbliWidgetVueCalque; +import org.fudaa.ebli.visuallibrary.graphe.EbliWidgetControllerGraphe; import org.fudaa.ebli.visuallibrary.graphe.EbliWidgetGraphe; import org.jdesktop.swingx.treetable.DefaultMutableTreeTableNode; import org.netbeans.api.visual.model.ObjectScene; @@ -91,21 +93,26 @@ listeWidgetUndo.add(((EbliNode) getUserObject()).getWidget()); // -- cas particulier si il s agit d un calque ou d un graphe, on masque - // les sous fils --// + // aussi + if ((((EbliNode) getUserObject()).getWidget()) instanceof EbliWidgetBordureSingle && (((EbliNode) getUserObject()).getWidget()).getChildren() != null) { if ((((EbliNode) getUserObject()).getWidget()).getChildren().get(0) instanceof EbliWidgetVueCalque) { final EbliWidgetVueCalque wid = (EbliWidgetVueCalque) (((EbliNode) getUserObject()).getWidget()) .getChildren().get(0); + if (((EbliWidgetControllerCalque) wid.getController()).hasLegende()) { wid.nodeLegende.getWidget().setVisible(((Boolean) _value).booleanValue()); listeWidgetUndo.add(wid.nodeLegende.getWidget()); + } } else if ((((EbliNode) getUserObject()).getWidget()).getChildren().get(0) instanceof EbliWidgetGraphe) { final EbliWidgetGraphe wid = (EbliWidgetGraphe) (((EbliNode) getUserObject()).getWidget()).getChildren() .get(0); + if (((EbliWidgetControllerGraphe) wid.getController()).hasLegende()) { wid.getNodeLegende().getWidget().setVisible(((Boolean) _value).booleanValue()); listeWidgetUndo.add(wid.getNodeLegende().getWidget()); + } } } Modified: branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostLayoutPanelController.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostLayoutPanelController.java 2008-10-23 09:39:33 UTC (rev 4090) +++ branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostLayoutPanelController.java 2008-10-23 11:14:24 UTC (rev 4091) @@ -53,6 +53,7 @@ import org.fudaa.ebli.visuallibrary.creator.ShapeCreatorCircle; import org.fudaa.ebli.visuallibrary.creator.ShapeCreatorEllipse; import org.fudaa.ebli.visuallibrary.creator.ShapeCreatorFleche; +import org.fudaa.ebli.visuallibrary.creator.ShapeCreatorLine; import org.fudaa.ebli.visuallibrary.creator.ShapeCreatorRectangle; import org.fudaa.fudaa.tr.common.TrResource; import org.fudaa.fudaa.tr.post.actions.TrPostActionChangeSceneForWidget; @@ -261,6 +262,19 @@ return nodeLegende; } + public EbliNode addLigne() { + // -- ajout du rectangle --// + final EbliNodeDefault nodeLigne = new EbliNodeDefault(); + nodeLigne.setTitle("Ligne"); + nodeLigne.setCreator(new EbliWidgetCreatorShape(new ShapeCreatorLine())); + nodeLigne.setPreferedSize(new Dimension(200, 100)); + nodeLigne.setPreferedLocation(new Point(350, 125)); + // ajout du node au layout + addNode(nodeLigne); + + return nodeLigne; + } + public EbliNode addCercle() { // -- ajout du rectangle --// final EbliNodeDefault nodeCercle = new EbliNodeDefault(); @@ -367,6 +381,15 @@ // TODO a revoir _l.add(new EbliWidgetActiontextEditor(getSceneCourante())); + // -- ligne --// + _l.add(new EbliActionSimple(EbliResource.EBLI.getString("Ligne"), EbliResource.EBLI.getToolIcon("trait"), + "WIDGETLINE") { + @Override + public void actionPerformed(final ActionEvent _evt) { + addLigne(); + } + }); + // -- palette fleche --// _l.add(new EbliActionSimple(EbliResource.EBLI.getString("Fleche"), EbliResource.EBLI.getToolIcon("crystal_bu_link"), "WIDGETFLECHE") { @@ -375,6 +398,16 @@ addFleche(); } }); + + // -- palette double fleche --// + // crystal_bu_scrollpane_corner.png + _l.add(new EbliActionSimple(EbliResource.EBLI.getString("Double Fleche"), EbliResource.EBLI + .getToolIcon("crystal_bu_scrollpane_corner"), "WIDGETDBLFLECHE") { + @Override + public void actionPerformed(final ActionEvent _evt) { + addFleche(); + } + }); // -- palette Ellipse --// _l.add(new EbliActionSimple(EbliResource.EBLI.getString("Ellipse"), EbliResource.EBLI.getToolIcon("ellip"), "WIDGETELLIPSE") { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <had...@us...> - 2008-10-23 16:30:44
|
Revision: 4092 http://fudaa.svn.sourceforge.net/fudaa/?rev=4092&view=rev Author: hadouxad Date: 2008-10-23 16:30:33 +0000 (Thu, 23 Oct 2008) Log Message: ----------- Correction de tout plein de bugs Modified Paths: -------------- branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/h2d/type/H2dVariableType.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetControllerCalque.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetFusionCalques.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetVueCalque.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/graphe/EbliWidgetControllerGraphe.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/graphe/EbliWidgetGraphe.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/graphe/WidgetLegendeManager.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostLayoutPanelController.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostProjet.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/actions/TrPostActionFusionCalques.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/persist/TrPostPersistenceManager.java Added Paths: ----------- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/creator/ShapeCreatorDblFleche.java Modified: branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/h2d/type/H2dVariableType.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/h2d/type/H2dVariableType.java 2008-10-23 11:14:24 UTC (rev 4091) +++ branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/h2d/type/H2dVariableType.java 2008-10-23 16:30:33 UTC (rev 4092) @@ -152,8 +152,8 @@ /** * Cote d'eau. */ - public static final H2dVariableType COTE_EAU = new H2dVariableType(H2dResource.getS("Cote eau"), "SL", "zw") { - + // public static final H2dVariableType COTE_EAU = new H2dVariableType(H2dResource.getS("Cote eau"), "SL", "zw") { + public static final H2dVariableType COTE_EAU = new H2dVariableType(H2dResource.getS("Surface libre"), "SL", "zw") { public boolean canBeTransient() { return true; } Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetControllerCalque.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetControllerCalque.java 2008-10-23 11:14:24 UTC (rev 4091) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetControllerCalque.java 2008-10-23 16:30:33 UTC (rev 4092) @@ -18,6 +18,7 @@ import javax.swing.JScrollPane; import javax.swing.JSplitPane; +import org.fudaa.ctulu.CtuluCommand; import org.fudaa.ctulu.CtuluCommandContainer; import org.fudaa.ctulu.CtuluLibArray; import org.fudaa.ctulu.CtuluResource; @@ -208,18 +209,40 @@ // -- on prend la location du node au moment de la suppression pour // pouvoir la retablir dans le undo --// // n.setPreferedLocation(widget_.getPreferredLocation()); - // -- on enregistre la commande undo redo --// - cmd_ - .addCmd(new CommandSupprimer(n, widget_.getEbliScene(), widget_.convertLocalToScene(widget_.getLocation()))); + // -- on enleve le node de la scene --// widget_.getEbliScene().removeNode(n); // -- on supprime le node legende associe --// - if (widgetCalque_.nodeLegende != null) { + if (hasLegende()) { widget_.getEbliScene().removeNode(widgetCalque_.nodeLegende); legendeWidget_ = null; + + final CtuluCommand commande1= new CommandSupprimer(n, widget_.getEbliScene(), widget_.convertLocalToScene(widget_.getLocation())); + final CtuluCommand commande2= new CommandSupprimer(widgetCalque_.nodeLegende, widget_.getEbliScene(), widget_.convertLocalToScene(widgetCalque_.nodeLegende.getWidget().getLocation())); + cmd_.addCmd(new CtuluCommand(){ + + @Override + public void redo() { + // TODO Auto-generated method stub + commande1.redo(); + commande2.redo(); + } + + @Override + public void undo() { + // TODO Auto-generated method stub + commande1.undo(); + commande2.undo(); + } + + }); } + else{ + // -- on enregistre la commande undo redo unitaire --// + cmd_.addCmd(new CommandSupprimer(n, widget_.getEbliScene(), widget_.convertLocalToScene(widget_.getLocation()))); + } // -- raffraichissement de la scene --// widget_.getEbliScene().refresh(); Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetFusionCalques.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetFusionCalques.java 2008-10-23 11:14:24 UTC (rev 4091) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetFusionCalques.java 2008-10-23 16:30:33 UTC (rev 4092) @@ -22,103 +22,133 @@ */ public final class EbliWidgetFusionCalques extends EbliWidgetGroup implements PropertyChangeListener { - public final ArrayList<EbliWidgetVueCalque> listeWidgetCalque_ = new ArrayList<EbliWidgetVueCalque>(); + public final ArrayList<EbliWidgetVueCalque> listeWidgetCalque_ = new ArrayList<EbliWidgetVueCalque>(); - public EbliWidgetFusionCalques(final EbliScene _scene) { - super(_scene); - // calquePanel_.getVueCalque().getAbstractCalque().addPropertyChangeListener( - // "versReel", listener); + public EbliWidgetFusionCalques(final EbliScene _scene) { + super(_scene); + // calquePanel_.getVueCalque().getAbstractCalque().addPropertyChangeListener( + // "versReel", listener); - } + } - public void addChildCalque(final EbliWidget child) { + public void addChildCalque(final EbliWidget child) { - addChild(child); + addChild(child); - final EbliWidgetVueCalque widgetCalque = (EbliWidgetVueCalque) child.getIntern(); - listeWidgetCalque_.add(widgetCalque); + final EbliWidgetVueCalque widgetCalque = (EbliWidgetVueCalque) child.getIntern(); + listeWidgetCalque_.add(widgetCalque); - // -- ajout du listener des calques sur this --// - widgetCalque.calquePanel_.getVueCalque().addPropertyChangeListener("repere", this); - // widgetCalque.calquePanel_.getVueCalque().getAbstractCalque(). - // addPropertyChangeListener("versReel", this); - } - boolean noCyclePropertieChange = true; - public void propertyChange(final PropertyChangeEvent _evt) { + // widgetCalque.calquePanel_.getVueCalque().getAbstractCalque(). + // addPropertyChangeListener("versReel", this); - if (!noCyclePropertieChange) return; - noCyclePropertieChange = false; - // listeWidgetCalque_.get(0).calquePanel_.getVueCalque().changeViewBoite( - // _source, _boite, _rapide) - final BVueCalque vueCalque = (BVueCalque) _evt.getSource(); - final GrBoite boite = vueCalque.getViewBoite(); - for (final Iterator<Widget> it = getChildren().iterator(); it.hasNext();) { - final EbliWidgetVueCalque widget = (EbliWidgetVueCalque) ((EbliWidget) it.next()).getIntern(); - if (widget.calquePanel_.getVueCalque() != vueCalque) { - widget.calquePanel_.getVueCalque().changeRepere(widget.calquePanel_, boite, 0, 0); - } - widget.image = null; - widget.repaint(); - } - noCyclePropertieChange = true; - getEbliScene().refresh(); - } + } + boolean noCyclePropertieChange = true; - /** - * Surcharge de la methode de ebli, utilisse pour virer les property change listener - */ - @Override - public void removePropertyChangeListenerFormWidget(final EbliWidget child) { - EbliWidgetVueCalque widgetCalque; - if (child instanceof EbliWidgetVueCalque) widgetCalque = (EbliWidgetVueCalque) child; - else widgetCalque = (EbliWidgetVueCalque) ((EbliWidget) child.getChildren().get(0)).getIntern(); - widgetCalque.calquePanel_.getVueCalque().getAbstractCalque().removePropertyChangeListener("repere", this); + /** + * Methode a appelee a la fin des ajout de widget pour synchroniser les zooms de tous les calques du groupe. + * Il faut le faire dans l'ordre inverse afin de pr\xE9server le zoom de la widget initiale. + */ + public void synchronyseZoom(){ + //-- on conserve le zoom du calque initial et on l'appllique avant de synchronizer les zooms --// + EbliWidgetVueCalque calqueInitialeZoom=listeWidgetCalque_.get(listeWidgetCalque_.size()-1); + final GrBoite boite = calqueInitialeZoom.getViewBoite(); + calqueInitialeZoom.calquePanel_.getVueCalque().addPropertyChangeListener("repere", this); + calqueInitialeZoom.calquePanel_.getVueCalque().changeRepere(calqueInitialeZoom.calquePanel_, boite, 0, 0); + + +// for(int i=0;i<listeWidgetCalque_.size();i++){ +// //-- mise a jour de la boite pour le calque originel (le reste suivra) --// +// listeWidgetCalque_.get(i).calquePanel_.getVueCalque().changeRepere(listeWidgetCalque_.get(i).calquePanel_, boite, 0, 0); +// listeWidgetCalque_.get(i).image = null; +// listeWidgetCalque_.get(i).repaint(); +// } + getEbliScene().refresh(); + // -- ajout du listener des calques sur this --// + + for(int i=0;i<listeWidgetCalque_.size()-1;i++){ + EbliWidgetVueCalque widgetCalque=listeWidgetCalque_.get(i); + widgetCalque.calquePanel_.getVueCalque().addPropertyChangeListener("repere", this); + } - } + } - ZCalqueSondeSynchroniserFusion managerSondesFusion_; + - /** - * Methode a appeler a la fin de la creation de la sonde fusion pour ajouter l action sonde fusion dans chaque - * calques. - */ - public void synchroniseSondeFusion() { + public void propertyChange(final PropertyChangeEvent _evt) { - // -- creation du manager de sonde fusion qui synchronise toute ses sondes - // --// - managerSondesFusion_ = new ZCalqueSondeSynchroniserFusion(); + if (!noCyclePropertieChange) return; + noCyclePropertieChange = false; + // listeWidgetCalque_.get(0).calquePanel_.getVueCalque().changeViewBoite( + // _source, _boite, _rapide) + final BVueCalque vueCalque = (BVueCalque) _evt.getSource(); + final GrBoite boite = vueCalque.getViewBoite(); + for (final Iterator<Widget> it = getChildren().iterator(); it.hasNext();) { + final EbliWidgetVueCalque widget = (EbliWidgetVueCalque) ((EbliWidget) it.next()).getIntern(); + if (widget.calquePanel_.getVueCalque() != vueCalque) { + widget.calquePanel_.getVueCalque().changeRepere(widget.calquePanel_, boite, 0, 0); + } + widget.image = null; + widget.repaint(); + } + noCyclePropertieChange = true; + getEbliScene().refresh(); + } - for (final EbliWidgetVueCalque widget : listeWidgetCalque_) { - final ZEbliCalquesPanel panel = widget.calquePanel_; + /** + * Surcharge de la methode de ebli, utilisse pour virer les property change listener + */ + @Override + public void removePropertyChangeListenerFormWidget(final EbliWidget child) { + EbliWidgetVueCalque widgetCalque; + if (child instanceof EbliWidgetVueCalque) widgetCalque = (EbliWidgetVueCalque) child; + else widgetCalque = (EbliWidgetVueCalque) ((EbliWidget) child.getChildren().get(0)).getIntern(); + widgetCalque.calquePanel_.getVueCalque().getAbstractCalque().removePropertyChangeListener("repere", this); - // -- il faut initialiser les actions specifiques si pas deja fait pour - // activer les interactions--// - panel.getController().initSpecificActions(); + } - // --recuperation de la sonde du calque --// - final ZCalqueSondeInteraction sonde = panel.getController().getCalqueSondeInteraction(); + ZCalqueSondeSynchroniserFusion managerSondesFusion_; - // -- ajout de la sonde dans le manager - managerSondesFusion_.addZCalqueSondeInteraction(sonde, widget); - } - // -- ajout dans les toolbars de tous les calques de la meme action --// - // for (EbliWidgetVueCalque widget : listeWidgetCalque_) { - // - // ((EbliWidgetControllerCalque) - // widget.getController()).getToolbarComponent().add( - // new CalqueActionSonde(sondeFusion)); - // - // } - } + /** + * Methode a appeler a la fin de la creation de la sonde fusion pour ajouter l action sonde fusion dans chaque + * calques. + */ + public void synchroniseSondeFusion() { - /** - * Methode a appeler au ungroup ou undo sur la fusion. Desynchronise les sondes des calques. - */ - public void desynchroniseSondeFusion() { - managerSondesFusion_.removeAllListenningSonde(); - } + // -- creation du manager de sonde fusion qui synchronise toute ses sondes + // --// + managerSondesFusion_ = new ZCalqueSondeSynchroniserFusion(); + for (final EbliWidgetVueCalque widget : listeWidgetCalque_) { + final ZEbliCalquesPanel panel = widget.calquePanel_; + + // -- il faut initialiser les actions specifiques si pas deja fait pour + // activer les interactions--// + panel.getController().initSpecificActions(); + + // --recuperation de la sonde du calque --// + final ZCalqueSondeInteraction sonde = panel.getController().getCalqueSondeInteraction(); + + // -- ajout de la sonde dans le manager + managerSondesFusion_.addZCalqueSondeInteraction(sonde, widget); + } + // -- ajout dans les toolbars de tous les calques de la meme action --// + // for (EbliWidgetVueCalque widget : listeWidgetCalque_) { + // + // ((EbliWidgetControllerCalque) + // widget.getController()).getToolbarComponent().add( + // new CalqueActionSonde(sondeFusion)); + // + // } + } + + /** + * Methode a appeler au ungroup ou undo sur la fusion. Desynchronise les sondes des calques. + */ + public void desynchroniseSondeFusion() { + managerSondesFusion_.removeAllListenningSonde(); + } + } Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetVueCalque.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetVueCalque.java 2008-10-23 11:14:24 UTC (rev 4091) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetVueCalque.java 2008-10-23 16:30:33 UTC (rev 4092) @@ -40,210 +40,218 @@ public class EbliWidgetVueCalque extends EbliWidget implements /* EditProvider */InplaceEditorProvider<BuPanel> { - ZEbliCalquesPanel calquePanel_; + ZEbliCalquesPanel calquePanel_; - public EbliNode nodeLegende = null; + public EbliNode nodeLegende = null; - Window frame_; + Window frame_; - BufferedImage image; - public GrBoite initZoom_; + BufferedImage image; + public GrBoite initZoom_; - BuPanel conteneurEditor; + BuPanel conteneurEditor; - // GrBoite zoom_; - public EbliWidgetVueCalque(final EbliScene _scene, final ZEbliCalquesPanel _vue) { - this(_scene, _vue, null); + // GrBoite zoom_; + public EbliWidgetVueCalque(final EbliScene _scene, final ZEbliCalquesPanel _vue) { + this(_scene, _vue, null); - } + } - /** - * TODO a am\xE9liorer avec une Map - * - * @param _scene - * @param _vue - * @param _initZoom - */ - public EbliWidgetVueCalque(final EbliScene _scene, final ZEbliCalquesPanel _vue, final GrBoite _initZoom) { - super(_scene); - calquePanel_ = _vue; - initZoom_ = _initZoom; - calquePanel_.setBorder(null); + /** + * TODO a am\xE9liorer avec une Map + * + * @param _scene + * @param _vue + * @param _initZoom + */ + public EbliWidgetVueCalque(final EbliScene _scene, final ZEbliCalquesPanel _vue, final GrBoite _initZoom) { + super(_scene); + calquePanel_ = _vue; + initZoom_ = _initZoom; + calquePanel_.setBorder(null); - setPreferredSize(new Dimension(500, 400)); - initSize(new Rectangle(0, 0, 500, 400)); - calquePanel_.getArbreCalqueModel().getObservable().addObserver(new Observer() { + setPreferredSize(new Dimension(500, 400)); + initSize(new Rectangle(0, 0, 500, 400)); + calquePanel_.getArbreCalqueModel().getObservable().addObserver(new Observer() { - public void update(final Observable _o, final Object _arg) { - if (!isInEditMode() && "t".equals(_arg)) { - image = null; - // repaint(); - } + public void update(final Observable _o, final Object _arg) { + if (!isInEditMode() && "t".equals(_arg)) { + image = null; + // repaint(); + } - } - }); + } + }); - } + } - public BuPanel createEditorComponent( - final org.netbeans.api.visual.action.InplaceEditorProvider.EditorController controller, final Widget widget) { - return calquePanel_; - } + public BuPanel createEditorComponent( + final org.netbeans.api.visual.action.InplaceEditorProvider.EditorController controller, final Widget widget) { + return calquePanel_; + } - /** - * appel\xE9 lors de la fermeture de l editeur. Il faut redessiner la widget. - */ - public void notifyClosing(final org.netbeans.api.visual.action.InplaceEditorProvider.EditorController controller, - final Widget widget, final BuPanel editor, final boolean commit) { - editingStop(); - // zoom_ = calquePanel_.getVueCalque().getViewBoite(); - image = null; + /** + * appel\xE9 lors de la fermeture de l editeur. Il faut redessiner la widget. + */ + public void notifyClosing(final org.netbeans.api.visual.action.InplaceEditorProvider.EditorController controller, + final Widget widget, final BuPanel editor, final boolean commit) { + editingStop(); + // zoom_ = calquePanel_.getVueCalque().getViewBoite(); + image = null; - getEbliScene().refresh(); - // calquePanel_.setBorder(BuBorders.EMPTY1111); - this.repaint(); - } + getEbliScene().refresh(); + // calquePanel_.setBorder(BuBorders.EMPTY1111); + this.repaint(); + } - /** - * @return une interface non null si la widget peut etre animee - */ - @Override - public EbliAnimatedInterface getAnimatedInterface() { - if (calquePanel_ instanceof EbliAnimatedInterface) return (EbliAnimatedInterface) calquePanel_; - return null; - } + /** + * @return une interface non null si la widget peut etre animee + */ + @Override + public EbliAnimatedInterface getAnimatedInterface() { + if (calquePanel_ instanceof EbliAnimatedInterface) return (EbliAnimatedInterface) calquePanel_; + return null; + } - @Override - public Color getColorFond() { - return null; - } + @Override + public Color getColorFond() { + return null; + } - private void initSize(final Rectangle rec) { - final BCalque[] tousCalques = calquePanel_.getVueCalque().getCalque().getTousCalques(); - calquePanel_.getVueCalque().setSize(rec.width, rec.height); - // calquePanel_.setPreferredSize(new Dimension(rec.width, rec.height)); - calquePanel_.getVueCalque().getCalque().setSize(rec.width, rec.height); - for (int i = 0; i < tousCalques.length; i++) { - tousCalques[i].setSize(rec.width, rec.height); - } - } + private void initSize(final Rectangle rec) { + final BCalque[] tousCalques = calquePanel_.getVueCalque().getCalque().getTousCalques(); + calquePanel_.getVueCalque().setSize(rec.width, rec.height); + // calquePanel_.setPreferredSize(new Dimension(rec.width, rec.height)); + calquePanel_.getVueCalque().getCalque().setSize(rec.width, rec.height); + for (int i = 0; i < tousCalques.length; i++) { + tousCalques[i].setSize(rec.width, rec.height); + } + } - public GrBoite getViewBoite() { - return calquePanel_.getVueCalque().getViewBoite(); - } + public GrBoite getViewBoite() { + return calquePanel_.getVueCalque().getViewBoite(); + } - public EbliWidgetControllerCalque getCalqueController() { - return (EbliWidgetControllerCalque) getController(); - } + public EbliWidgetControllerCalque getCalqueController() { + return (EbliWidgetControllerCalque) getController(); + } - boolean first_ = true; + boolean first_ = true; - @SuppressWarnings("unchecked") - @Override - protected void paintWidget() { + @SuppressWarnings("unchecked") + @Override + protected void paintWidget() { - final Rectangle rec = getClientArea(); - rec.width -= 1; - rec.height -= 1; - final Graphics2D g = getGraphics(); + final Rectangle rec = getClientArea(); - if (frame_ == null) { - initSize(rec); - if (first_) { - first_ = false; - if (initZoom_ != null && initZoom_.getDeltaX() > 0 && initZoom_.getDeltaY() > 0) { - calquePanel_.getVueCalque().changeRepere(this, initZoom_); - initZoom_ = null; - } else calquePanel_.restaurer(); - } - // if (zoom_ != null) { - // // image=null; - // calquePanel_.getVueCalque().changeRepere(this, zoom_); - // - // } else calquePanel_.restaurer(); - } - // mode edition - if (image == null || image.getWidth() != rec.width || image.getHeight() != rec.height) { - FuLog.debug("EWI: recreate image"); - final Map params = new HashMap(); - CtuluLibImage.setCompatibleImageAsked(params); - // a ameliorer: il ne faudrait pas recreer l'image a chaque fois - image = calquePanel_.produceImage(rec.width, rec.height, params); - } - g.drawImage(image, rec.x, rec.y, rec.width, rec.height, null); - } + rec.width -= 1; + rec.height -= 1; - public EnumSet<org.netbeans.api.visual.action.InplaceEditorProvider.ExpansionDirection> getExpansionDirections( - final org.netbeans.api.visual.action.InplaceEditorProvider.EditorController controller, final Widget widget, - final BuPanel editor) { - return null; - } + if(rec.width>0 && rec.height>0){ + final Graphics2D g = getGraphics(); - public Rectangle getInitialEditorComponentBounds( - final org.netbeans.api.visual.action.InplaceEditorProvider.EditorController controller, final Widget widget, - final BuPanel editor, final Rectangle viewBounds) { - return convertLocalToScene(getClientArea()); - } + if (frame_ == null) { + initSize(rec); + if (first_) { + first_ = false; + if (initZoom_ != null && initZoom_.getDeltaX() > 0 && initZoom_.getDeltaY() > 0) { + calquePanel_.getVueCalque().changeRepere(this, initZoom_); + initZoom_ = null; + } else calquePanel_.restaurer(); + } + // if (zoom_ != null) { + // // image=null; + // calquePanel_.getVueCalque().changeRepere(this, zoom_); + // + // } else calquePanel_.restaurer(); + } - public void notifyOpened(final org.netbeans.api.visual.action.InplaceEditorProvider.EditorController controller, - final Widget widget, final BuPanel editor) { - editingStart(); - calquePanel_.setBorder(BorderFactory.createLineBorder(Color.GRAY, 1)); - } + // mode edition + if (image == null || image.getWidth() != rec.width || image.getHeight() != rec.height) { + FuLog.debug("EWI: recreate image"); + final Map params = new HashMap(); + CtuluLibImage.setCompatibleImageAsked(params); + // a ameliorer: il ne faudrait pas recreer l'image a chaque fois - // public void setColorFond(Color newColor) { - // couleurFond = newColor; - // repaint(); - // } - // - // public void update(Observable _o, Object _arg) { - // image = null; - // getEbliScene().refresh(); - // } - @Override - public boolean canRotate() { - return false; - } + image = calquePanel_.produceImage(rec.width, rec.height, params); - @Override - public boolean canColorForeground() { - return false; - } + } + g.drawImage(image, rec.x, rec.y, rec.width, rec.height, null); - @Override - public boolean canColorBackground() { - return false; - } + } + } - @Override - public boolean canTraceLigneModel() { - return false; - } + public EnumSet<org.netbeans.api.visual.action.InplaceEditorProvider.ExpansionDirection> getExpansionDirections( + final org.netbeans.api.visual.action.InplaceEditorProvider.EditorController controller, final Widget widget, + final BuPanel editor) { + return null; + } - @Override - public boolean canFont() { - return false; - } + public Rectangle getInitialEditorComponentBounds( + final org.netbeans.api.visual.action.InplaceEditorProvider.EditorController controller, final Widget widget, + final BuPanel editor, final Rectangle viewBounds) { + return convertLocalToScene(getClientArea()); + } - @Override - public List<EbliWidgetAnimatedItem> getAnimatedItems() { - final BCalque[] cqs = calquePanel_.getVueCalque().getCalque().getTousCalques(); - final List<EbliWidgetAnimatedItem> res = new ArrayList<EbliWidgetAnimatedItem>(20); - for (int i = 0; i < cqs.length; i++) { - if (cqs[i].isVisible() && cqs[i] instanceof EbliAnimationAdapterInterface) { - res.add(new EbliWidgetAnimatedItem((EbliAnimationAdapterInterface) cqs[i], cqs[i], getId(), cqs[i].getName(), - cqs[i].getTitle())); - } - } - return res; - } + public void notifyOpened(final org.netbeans.api.visual.action.InplaceEditorProvider.EditorController controller, + final Widget widget, final BuPanel editor) { + editingStart(); + calquePanel_.setBorder(BorderFactory.createLineBorder(Color.GRAY, 1)); + } - @Override - public boolean isAnimatedItemAlive(final String _id) { - final BCalque cq = calquePanel_.getVueCalque().getCalque().getCalqueParNom(_id); - return cq != null && cq.isVisible(); - } + // public void setColorFond(Color newColor) { + // couleurFond = newColor; + // repaint(); + // } + // + // public void update(Observable _o, Object _arg) { + // image = null; + // getEbliScene().refresh(); + // } + @Override + public boolean canRotate() { + return false; + } + @Override + public boolean canColorForeground() { + return false; + } + + @Override + public boolean canColorBackground() { + return false; + } + + @Override + public boolean canTraceLigneModel() { + return false; + } + + @Override + public boolean canFont() { + return false; + } + + @Override + public List<EbliWidgetAnimatedItem> getAnimatedItems() { + final BCalque[] cqs = calquePanel_.getVueCalque().getCalque().getTousCalques(); + final List<EbliWidgetAnimatedItem> res = new ArrayList<EbliWidgetAnimatedItem>(20); + for (int i = 0; i < cqs.length; i++) { + if (cqs[i].isVisible() && cqs[i] instanceof EbliAnimationAdapterInterface) { + res.add(new EbliWidgetAnimatedItem((EbliAnimationAdapterInterface) cqs[i], cqs[i], getId(), cqs[i].getName(), + cqs[i].getTitle())); + } + } + return res; + } + + @Override + public boolean isAnimatedItemAlive(final String _id) { + final BCalque cq = calquePanel_.getVueCalque().getCalque().getCalqueParNom(_id); + return cq != null && cq.isVisible(); + } + } Added: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/creator/ShapeCreatorDblFleche.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/creator/ShapeCreatorDblFleche.java (rev 0) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/creator/ShapeCreatorDblFleche.java 2008-10-23 16:30:33 UTC (rev 4092) @@ -0,0 +1,45 @@ +package org.fudaa.ebli.visuallibrary.creator; + +import java.awt.Shape; +import java.awt.geom.GeneralPath; +import java.awt.geom.Rectangle2D; +import java.util.Map; + +/** + * Creation de la double fleche. + * @author Adrien Hadoux + * + */ + +public class ShapeCreatorDblFleche implements ShapeCreator { + + public Shape createShapeFor(final Rectangle2D.Float rec, final Map options, final float largeurTrait) { + final Float ratioHeadW = (Float) options.get("arrow.ratioHeadW"); + final Float ratioBaseH = (Float) options.get("arrow.ratioBaseH"); + final float rb = ratioBaseH == null ? 0.3f : ratioBaseH.floatValue(); + final float rh = ratioHeadW == null ? 0.3f : ratioHeadW.floatValue(); + final float middleH = rec.y + rec.height / 2f; + final float hauteurBase = rec.height * rb; + final float largeurHead = rec.width * rh; + final GeneralPath path = new GeneralPath(); + //-- debut pointe fleche --// + path.moveTo(rec.x+ largeurTrait / 2, middleH ); + path.lineTo(rec.x +largeurHead,rec.y+ largeurTrait / 2); + path.lineTo(rec.x +largeurHead, middleH - hauteurBase / 2); + + //-- fleche classique --// + path.lineTo(rec.x + rec.width - largeurHead, middleH - hauteurBase / 2); + path.lineTo(rec.x + rec.width - largeurHead, rec.y + largeurTrait / 2); + path.lineTo(rec.x + rec.width - largeurTrait / 2, middleH); + path.lineTo(rec.x + rec.width - largeurHead, rec.y + rec.height - largeurTrait / 2); + path.lineTo(rec.x + rec.width - largeurHead, middleH + hauteurBase / 2); + + //--fin fleche + path.lineTo(rec.x+largeurHead, middleH + hauteurBase / 2); + path.lineTo(rec.x+largeurHead, rec.y + rec.height - largeurTrait / 2); + path.lineTo(rec.x+ largeurTrait / 2, middleH); + + path.closePath(); + return path; + } + } \ No newline at end of file Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/graphe/EbliWidgetControllerGraphe.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/graphe/EbliWidgetControllerGraphe.java 2008-10-23 11:14:24 UTC (rev 4091) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/graphe/EbliWidgetControllerGraphe.java 2008-10-23 16:30:33 UTC (rev 4092) @@ -13,6 +13,7 @@ import javax.swing.JPopupMenu; import javax.swing.JScrollPane; +import org.fudaa.ctulu.CtuluCommand; import org.fudaa.ctulu.CtuluCommandContainer; import org.fudaa.ctulu.CtuluResource; import org.fudaa.ctulu.gui.CtuluLibSwing; @@ -140,17 +141,36 @@ // -- on prend la location du node au moment de la suppression pour // pouvoir la retablir dans le undo --// // n.setPreferedLocation(widget_.getPreferredLocation()); - // -- on enregistre la commande undo redo --// - cmd_ - .addCmd(new CommandSupprimer(n, widget_.getEbliScene(), widget_.convertLocalToScene(widget_.getLocation()))); + // -- on enleve le node de la scene --// widget_.getEbliScene().removeNode(n); // -- on supprime le node legende associe --// - if (widgetGraphe_.getNodeLegende() != null) { + if (hasLegende()) { widget_.getEbliScene().removeNode(widgetGraphe_.getNodeLegende()); + final CtuluCommand commande1=new CommandSupprimer(n, widget_.getEbliScene(), widget_.convertLocalToScene(widget_.getLocation())); + final CtuluCommand commande2= new CommandSupprimer(widgetGraphe_.getNodeLegende(), widget_.getEbliScene(), widget_.convertLocalToScene(widgetGraphe_.getNodeLegende().getWidget().getLocation())); + cmd_.addCmd(new CtuluCommand(){ + @Override + public void redo() { + // TODO Auto-generated method stub + commande1.redo(); + commande2.redo(); + } + + @Override + public void undo() { + // TODO Auto-generated method stub + commande1.undo(); + commande2.undo(); + } + + }); + }else{ + // -- on enregistre la commande undo redo unitaire --// + cmd_.addCmd(new CommandSupprimer(n, widget_.getEbliScene(), widget_.convertLocalToScene(widget_.getLocation()))); } // -- raffraichissement de la scene --// widget_.getEbliScene().refresh(); Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/graphe/EbliWidgetGraphe.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/graphe/EbliWidgetGraphe.java 2008-10-23 11:14:24 UTC (rev 4091) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/graphe/EbliWidgetGraphe.java 2008-10-23 16:30:33 UTC (rev 4092) @@ -102,7 +102,7 @@ final Rectangle rec = getClientArea(); final Graphics2D g = getGraphics(); // g.translate(rec.x, rec.y); - + if(rec.width>0 && rec.height>0){ if (frame_ == null) { getGraphe().setSize(rec.width - 1, rec.height - 1); // getGraphe().computeMarges(g); @@ -119,7 +119,7 @@ } g.drawImage(imageGraphe, rec.x, rec.y, rec.width - 1, rec.height - 1, null); - + } // g.translate(-rec.x, -rec.y); } Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/graphe/WidgetLegendeManager.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/graphe/WidgetLegendeManager.java 2008-10-23 11:14:24 UTC (rev 4091) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/graphe/WidgetLegendeManager.java 2008-10-23 16:30:33 UTC (rev 4092) @@ -26,243 +26,280 @@ */ public class WidgetLegendeManager { - // public static int LENGHT_PER_LEGENDE = 15; - // public static int WIDTH_PER_LEGENDEICON = 100; - // public static int WIDTH_PER_LEGENDETEXT = 120; - // public static int MAX_BORDURE = 12; + // public static int LENGHT_PER_LEGENDE = 15; + // public static int WIDTH_PER_LEGENDEICON = 100; + // public static int WIDTH_PER_LEGENDETEXT = 120; + // public static int MAX_BORDURE = 12; - // public static Dimension createSizeForWidget(int _nbLibelles){ - // return new Dimension(WIDTH_PER_LEGENDEICON + WIDTH_PER_LEGENDETEXT, _nbLibelles - // * (LENGHT_PER_LEGENDE + MAX_BORDURE / 2)); - // } + // public static Dimension createSizeForWidget(int _nbLibelles){ + // return new Dimension(WIDTH_PER_LEGENDEICON + WIDTH_PER_LEGENDETEXT, _nbLibelles + // * (LENGHT_PER_LEGENDE + MAX_BORDURE / 2)); + // } - /** - * Creation de la classe widget specifique au calque. Permet de gerer le resize via le changement de font - */ - public static class WidgetCalqueLegende extends EbliWidget { + /** + * Creation de la classe widget specifique au calque. Permet de gerer le resize via le changement de font + */ + public static class WidgetCalqueLegende extends EbliWidget { - Font oldFont_; + Font oldFont_; - public WidgetCalqueLegende(final EbliScene scene, final boolean _controller) { - super(scene, _controller); - oldFont_ = getFormeFont(); - } + public WidgetCalqueLegende(final EbliScene scene, final boolean _controller) { + super(scene, _controller); + oldFont_ = getFormeFont(); + } - protected Rectangle resizeMaxLegende() { - this.getGraphics().setFont(getFormeFont()); - int maxHeight = 0; - int maxWidth = 0; - // -- mise a jour de la widget avec la nouvelle font - final List<Widget> listePlage = getChildren(); - for (final Iterator<Widget> it = listePlage.iterator(); it.hasNext();) { - final Widget widget = it.next(); - // -- test si il s agit d un widget plage --// - if (widget instanceof EbliWidget && widget.getChildren().size() == 2) { - final EbliWidget new_widget = (EbliWidget) widget; + protected Rectangle resizeMaxLegende() { + this.getGraphics().setFont(getFormeFont()); + int maxHeight = 0; + int maxWidth = 0; + // -- mise a jour de la widget avec la nouvelle font + final List<Widget> listePlage = getChildren(); + for (final Iterator<Widget> it = listePlage.iterator(); it.hasNext();) { + final Widget widget = it.next(); + // -- test si il s agit d un widget plage --// + if (widget instanceof EbliWidget && widget.getChildren().size() == 2) { + final EbliWidget new_widget = (EbliWidget) widget; - EbliWidgetTitle tw = null; + EbliWidgetTitle tw = null; - if (new_widget.getChildren().get(0) instanceof EbliWidgetTitle) tw = (EbliWidgetTitle) new_widget - .getChildren().get(0); - else if (new_widget.getChildren().get(1) instanceof EbliWidgetTitle) tw = (EbliWidgetTitle) new_widget - .getChildren().get(1); + if (new_widget.getChildren().get(0) instanceof EbliWidgetTitle) tw = (EbliWidgetTitle) new_widget + .getChildren().get(0); + else if (new_widget.getChildren().get(1) instanceof EbliWidgetTitle) tw = (EbliWidgetTitle) new_widget + .getChildren().get(1); - if (tw != null) { - // -- recuperation des tailles des font pour les textes saisies + if (tw != null) { + // -- recuperation des tailles des font pour les textes saisies - final FontMetrics ftm = this.getGraphics().getFontMetrics(); + final FontMetrics ftm = this.getGraphics().getFontMetrics(); - final int newWidth = ftm.stringWidth(tw.intern_.getLabel()); - final int newHeight = ftm.getHeight(); - if (maxWidth < newWidth) maxWidth = newWidth; - maxHeight = newHeight; - } - } + final int newWidth = ftm.stringWidth(tw.intern_.getLabel()); + final int newHeight = ftm.getHeight(); + if (maxWidth < newWidth) maxWidth = newWidth; + maxHeight = newHeight; + } + } - } - final Rectangle newBounds = new Rectangle(); - newBounds.height /* + */= maxHeight; - newBounds.width /* + */= maxWidth; + } + final Rectangle newBounds = new Rectangle(); + newBounds.height /* + */= maxHeight; + newBounds.width /* + */= maxWidth; - return newBounds; - } + return newBounds; + } + + + boolean suppressionOccured=false; + + public void majSuppression(){ + suppressionOccured=true; + repaint(); + } + - @Override - protected void paintWidget() { + @Override + protected void paintWidget() { - // -- mise a jour de la fonte que si il y a eu une modification --// - if (oldFont_ != getFormeFont()) { + // -- mise a jour de la fonte que si il y a eu une modification --// + if (oldFont_ != getFormeFont() || suppressionOccured) { + suppressionOccured=false; + // -- calcul des max height et width pour resize les composants --// + final Rectangle newBounds = resizeMaxLegende(); - // -- calcul des max height et width pour resize les composants --// - final Rectangle newBounds = resizeMaxLegende(); + // -- mise a jour de la widget avec la nouvelle font + final List<Widget> listePlage = getChildren(); + for (final Iterator<Widget> it = listePlage.iterator(); it.hasNext();) { + final Widget widget = it.next(); + // -- test si il s agit d un widget plage --// + if (widget instanceof EbliWidget && widget.getChildren().size() == 2) { + final EbliWidget new_widget = (EbliWidget) widget; - // -- mise a jour de la widget avec la nouvelle font - final List<Widget> listePlage = getChildren(); - for (final Iterator<Widget> it = listePlage.iterator(); it.hasNext();) { - final Widget widget = it.next(); - // -- test si il s agit d un widget plage --// - if (widget instanceof EbliWidget && widget.getChildren().size() == 2) { - final EbliWidget new_widget = (EbliWidget) widget; + EbliWidgetLine lw = null; + EbliWidgetTitle tw = null; - EbliWidgetLine lw = null; - EbliWidgetTitle tw = null; + if (new_widget.getChildren().get(0) instanceof EbliWidgetLine) lw = (EbliWidgetLine) new_widget + .getChildren().get(0); + else tw = (EbliWidgetTitle) new_widget.getChildren().get(0); - if (new_widget.getChildren().get(0) instanceof EbliWidgetLine) lw = (EbliWidgetLine) new_widget - .getChildren().get(0); - else tw = (EbliWidgetTitle) new_widget.getChildren().get(0); + if (new_widget.getChildren().get(1) instanceof EbliWidgetLine) lw = (EbliWidgetLine) new_widget + .getChildren().get(1); + else tw = (EbliWidgetTitle) new_widget.getChildren().get(1); + if (lw != null && tw != null) { - if (new_widget.getChildren().get(1) instanceof EbliWidgetLine) lw = (EbliWidgetLine) new_widget - .getChildren().get(1); - else tw = (EbliWidgetTitle) new_widget.getChildren().get(1); - if (lw != null && tw != null) { + tw.getIntern_().setFont(getFormeFont()); - tw.getIntern_().setFont(getFormeFont()); + // resize du composant texte + final Rectangle internBounds = tw.getIntern_().getBounds(); + // internBounds.height += (getFormeFont().getSize() - + // oldFont_.getSize()) * 2; + // internBounds.width += (getFormeFont().getSize() - + // oldFont_.getSize()) * 12; + internBounds.width = newBounds.width; + internBounds.height = (newBounds.height); + tw.getIntern_().setPreferredBounds(internBounds); - // resize du composant texte - final Rectangle internBounds = tw.getIntern_().getBounds(); - // internBounds.height += (getFormeFont().getSize() - - // oldFont_.getSize()) * 2; - // internBounds.width += (getFormeFont().getSize() - - // oldFont_.getSize()) * 12; - internBounds.width = newBounds.width; - internBounds.height = (newBounds.height); - tw.getIntern_().setPreferredBounds(internBounds); + // resize pour le logo: forme carr\xE9 + final Rectangle boundsLogo = lw.getBounds(); + // boundsLogo.height = internBounds.height; + // boundsLogo.width = internBounds.height; + boundsLogo.height = (newBounds.height); + boundsLogo.width = (newBounds.height); + lw.setPreferredBounds(boundsLogo); - // resize pour le logo: forme carr\xE9 - final Rectangle boundsLogo = lw.getBounds(); - // boundsLogo.height = internBounds.height; - // boundsLogo.width = internBounds.height; - boundsLogo.height = (newBounds.height); - boundsLogo.width = (newBounds.height); - lw.setPreferredBounds(boundsLogo); + } + } - } - } + } + // Resize de la widget - } - // Resize de la widget + // Rectangle newBounds = getParentWidget().getBounds(); + // newBounds.height += (listePlage.size() + 1) * + // (getFormeFont().getSize() - oldFont_.getSize()) * 2; + // newBounds.width += (getFormeFont().getSize() - oldFont_.getSize()) * + // 12; + // getParentWidget().setPreferredBounds(newBounds); + final Rectangle newBoundConteneurs = getParentWidget().getBounds(); + newBoundConteneurs.height = (int) ((listePlage.size() + 1) * newBounds.height * 1.5);// ( + newBoundConteneurs.width = (int) (newBounds.width * 1.5); + getParentWidget().setPreferredBounds(newBoundConteneurs); + getEbliScene().refresh(); + oldFont_ = getFormeFont(); - // Rectangle newBounds = getParentWidget().getBounds(); - // newBounds.height += (listePlage.size() + 1) * - // (getFormeFont().getSize() - oldFont_.getSize()) * 2; - // newBounds.width += (getFormeFont().getSize() - oldFont_.getSize()) * - // 12; - // getParentWidget().setPreferredBounds(newBounds); - final Rectangle newBoundConteneurs = getParentWidget().getBounds(); - newBoundConteneurs.height = (int) ((listePlage.size() + 1) * newBounds.height * 1.5);// ( - newBoundConteneurs.width = (int) (newBounds.width * 1.5); - getParentWidget().setPreferredBounds(newBoundConteneurs); - getEbliScene().refresh(); - oldFont_ = getFormeFont(); + } - } + } - } + @Override + public boolean canRotate() { + return false; + } - @Override - public boolean canRotate() { - return false; - } + @Override + public boolean canColorForeground() { + return false; + } - @Override - public boolean canColorForeground() { - return false; - } + @Override + public boolean canColorBackground() { + return true; + } - @Override - public boolean canColorBackground() { - return true; - } + @Override + public boolean canTraceLigneModel() { + return false; + } - @Override - public boolean canTraceLigneModel() { - return false; - } + @Override + public boolean canFont() { + return true; + } - @Override - public boolean canFont() { - return true; - } + } - } + /** + * Creation de la legende + * + * @param g + * @param scene + * @param PreferredLocation peut etre null + * @return + */ + public static EbliWidget createLegende(final EGGraphe g, final EbliScene scene, final Point PreferredLocation) { + final EGCourbe[] cs = g.getModel().getCourbes(); + final WidgetCalqueLegende res = new WidgetCalqueLegende(scene, false); + res.setLayout(new FlowLayout(true, SerialAlignment.CENTER, 5));// a + // modifier + // pour + // setter + // le gap + // res.setLayout(new OverlayLayout()); + for (int i = 0; i < cs.length; i++) { + final EbliWidget line = new EbliWidget(scene); + line.setLayout(new FlowLayout(false, SerialAlignment.CENTER, 5)); - /** - * Creation de la legende - * - * @param g - * @param scene - * @param PreferredLocation peut etre null - * @return - */ - public static EbliWidget createLegende(final EGGraphe g, final EbliScene scene, final Point PreferredLocation) { - final EGCourbe[] cs = g.getModel().getCourbes(); - final WidgetCalqueLegende res = new WidgetCalqueLegende(scene, false); - res.setLayout(new FlowLayout(true, SerialAlignment.CENTER, 5));// a - // modifier - // pour - // setter - // le gap - // res.setLayout(new OverlayLayout()); - for (int i = 0; i < cs.length; i++) { - final EbliWidget line = new EbliWidget(scene); - line.setLayout(new FlowLayout(false, SerialAlignment.CENTER, 5)); + // creation de la widget titre + final EbliWidgetTitle tw = new EbliWidgetTitle(scene, cs[i], null); - // creation de la widget titre - final EbliWidgetTitle tw = new EbliWidgetTitle(scene, cs[i], null); + // creation de la widget ligne + final EbliWidgetLine lw = new EbliWidgetLine(scene, cs[i], null); + line.setUseBorder(false); + lw.setUseBorder(false); + tw.setUseBorder(false); - // creation de la widget ligne - final EbliWidgetLine lw = new EbliWidgetLine(scene, cs[i], null); - line.setUseBorder(false); - lw.setUseBorder(false); - tw.setUseBorder(false); + lw.setEnabled(false); + line.addChild(lw); + line.addChild(tw); + res.addChild(line); - lw.setEnabled(false); - line.addChild(lw); - line.addChild(tw); - res.addChild(line); + // -- ajouter le listener EGGraphe pour ecouter et \xE9ettre a jour els + // l\xE9gendes --// + g.getModel().addModelListener(new EGGrapheModelListener() { - // -- ajouter le listener EGGraphe pour ecouter et \xE9ettre a jour els - // l\xE9gendes --// - g.getModel().addModelListener(new EGGrapheModelListener() { + public void structureChanged() { + if(g.getModel().contains(lw.cb_)){ + line.repaint(); + tw.majLabel(); + }else{ + //-- il faut supprimer --// + res.removeChild(line); + res.majSuppression(); + } - public void structureChanged() { - line.repaint(); - tw.majLabel(); + } - } + public void courbeContentChanged(final EGObject _c, final boolean restore) { + if(g.getModel().contains(lw.cb_)){ + line.repaint(); + tw.majLabel(); + }else{ + //-- il faut supprimer --// + res.removeChild(line); + res.majSuppression(); + } + } - public void courbeContentChanged(final EGObject _c, final boolean restore) { - line.repaint(); - tw.majLabel(); + public void courbeAspectChanged(final EGObject _c, final boolean _visibil) { + if(g.getModel().contains(lw.cb_)){ + line.repaint(); + tw.majLabel(); + }else{ + //-- il faut supprimer --// + res.removeChild(line); + res.majSuppression(); + } + } - } + public void axeContentChanged(final EGAxe _c) { + if(g.getModel().contains(lw.cb_)){ + line.repaint(); + tw.majLabel(); + }else{ + //-- il faut supprimer --// + res.removeChild(line); + res.majSuppression(); + } + } - public void courbeAspectChanged(final EGObject _c, final boolean _visibil) { - line.repaint(); - tw.majLabel(); + public void axeAspectChanged(final EGAxe _c) { + if(g.getModel().contains(lw.cb_)){ + line.repaint(); + tw.majLabel(); + }else{ + //-- il faut supprimer --// + res.removeChild(line); + res.majSuppression(); + } + } + }); - } + } - public void axeContentChanged(final EGAxe _c) { - line.repaint(); - tw.majLabel(); - } + res.setController(new EbliWidgetControllerMenuOnly(res, false)); - public void axeAspectChanged(final EGAxe _c) { - line.repaint(); - tw.majLabel(); - } - }); + // -- prendre en compte le resize automatique --// + res.oldFont_ = new Font("Helvetica", Font.BOLD, 40); + res.repaint(); - } + return res; + } - res.setController(new EbliWidgetControllerMenuOnly(res, false)); - - // -- prendre en compte le resize automatique --// - res.oldFont_ = new Font("Helvetica", Font.BOLD, 40); - res.repaint(); - - return res; - } - } Modified: branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostLayoutPanelController.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostLayoutPanelController.java 2008-10-23 11:14:24 UTC (rev 4091) +++ branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostLayoutPanelController.java 2008-10-23 16:30:33 UTC (rev 4092) @@ -51,6 +51,7 @@ import org.fudaa.ebli.visuallibrary.creator.EbliWidgetCreatorShape; import org.fudaa.ebli.visuallibrary.creator.EbliWidgetCreatorTextLabel; import org.fudaa.ebli.visuallibrary.creator.ShapeCreatorCircle; +import org.fudaa.ebli.visuallibrary.creator.ShapeCreatorDblFleche; import org.fudaa.ebli.visuallibrary.creator.ShapeCreatorEllipse; import org.fudaa.ebli.visuallibrary.creator.ShapeCreatorFleche; import org.fudaa.ebli.visuallibrary.creator.ShapeCreatorLine; @@ -319,7 +320,21 @@ return nodeFleche; } + + public EbliNode addDblFleche() { + // -- ajout du rectangle --// + final EbliNodeDefault nodeFleche = new EbliNodeDefault(); + nodeFleche.setTitle("Double Fleche"); + nodeFleche.setCreator(new EbliWidgetCreatorShape(new ShapeCreatorDblFleche())); + nodeFleche.setPreferedSize(new Dimension(100, 50)); + nodeFleche.setPreferedLocation(new Point(350, 125)); + // ajout du node au layout + addNode(nodeFleche); + + return nodeFleche; + } + /** * Methode generique d ajout d un node widget a la scene. * @@ -405,7 +420,7 @@ .getToolIcon("crystal_bu_scrollpane_corner"), "WIDGETDBLFLECHE") { @Override public void actionPerformed(final ActionEvent _evt) { - addFleche(); + addDblFleche(); } }); // -- palette Ellipse --// Modified: branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostProjet.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostProjet.java 2008-10-23 11:14:24 UTC (rev 4091) +++ branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostProjet.java 2008-10-23 16:30:33 UTC (rev 4092) @@ -500,7 +500,7 @@ */ public String formatInfoSource(final TrPostSource _src) { // --ajout dans la liste des titres --// - return formatName(_src.getTitle()) + " | Fichier: " + formatFichier(_src.getFile()); + return "Fichier: " + formatFichier(_src.getFile())+" |"+formatName(_src.getTitle()) ; } public String formatFichier(final File file) { Modified: branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/actions/TrPostActionFusionCalques.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/actions/TrPostActionFusionCalques.java 2008-10-23 11:14:24 UTC (rev 4091) +++ branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/actions/TrPostActionFusionCalques.java 2008-10-23 16:30:33 UTC (rev 4092) @@ -337,6 +337,8 @@ // parent.setChildConstraint(findWidget, new Rectangle2D.Float(rMinX, rMinY, rMaxX, rMaxY)); } + + final EbliWidgetGroupCreator creator = new EbliWidgetGroupCreator(); parent.setGroup(true); @@ -350,7 +352,8 @@ // -- synchronisation des sondes des fusions --// parent.synchroniseSondeFusion(); - + //-- synchronisation du zoom --// + parent.synchronyseZoom(); scene_.addNode(node); if (pn != null && boite != null) { pn.getVueCalque().changeRepere(pn, boite, 0, 0); Modified: branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/persist/TrPostPersistenceManager.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/persist/TrPostPersistenceManager.java 2008-10-23 11:14:24 UTC (rev 4091) +++ branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/persist/TrPostPersistenceManager.java 2008-10-23 16:30:33 UTC (rev 4092) @@ -438,7 +438,7 @@ final List<TrPostUserVariableSaver> liste = new XmlArrayList(new VariablesStreamStrategy(new File(path),trprojet_.listeSrc_)); - if (init) clearDatas(liste); + //if (init) clearDatas(liste); return liste; } @@ -446,9 +446,10 @@ private void clearDatas(final List<TrPostUserVariableSaver> list) { // CtuluRemoveContentDirectory.contentDirectoryRemover(getDirectoryCurves()); if (list == null) return; - while (list.size() != 0) - list.remove(0); - + for(Iterator<TrPostUserVariableSaver> it=list.iterator();it.hasNext();){ + it.next(); + it.remove(); + } } /** @@ -674,7 +675,12 @@ // -- etape 1: creation du repertoire des graphe et calques --// final String pathVariables = projet_.getAbsolutePath() + File.separator + "Variables"; try { - new File(pathVariables).mkdir(); + File fileVar= new File(pathVariables); + + if(fileVar.isDirectory()){ + CtuluRemoveContentDirectory.contentDirectoryRemover(fileVar); + }else + fileVar.mkdir(); } catch (final Exception e) { // pas grave on continue FuLog.debug("Le repertoire des variables existe deja"); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <had...@us...> - 2008-10-24 20:42:48
|
Revision: 4096 http://fudaa.svn.sourceforge.net/fudaa/?rev=4096&view=rev Author: hadouxad Date: 2008-10-24 20:42:43 +0000 (Fri, 24 Oct 2008) Log Message: ----------- Mise a jour des buges et refactorisation de plusieurs trucs Modified Paths: -------------- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/ressource/ebli_en.fr_txt branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliSceneController.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetController.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/actions/CommandSupprimer.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/actions/CommandUndoRedoPaste.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/actions/CommandeChangeWidgetScene.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/actions/EbliWidgetActionDuplicate.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetControllerCalque.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/graphe/EbliWidgetControllerGraphe.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostLayoutFille.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/actions/TrPostActionChangeSceneForWidget.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/persist/TrPostPersistenceManager.java Added Paths: ----------- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/actions/EbliWidgetActionResize.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/resizestrategy/ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/resizestrategy/AlignWithResizeProportionalStrategy.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/resizestrategy/EbliWidgetActionFactory.java Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/ressource/ebli_en.fr_txt =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/ressource/ebli_en.fr_txt 2008-10-24 16:18:06 UTC (rev 4095) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/ressource/ebli_en.fr_txt 2008-10-24 20:42:43 UTC (rev 4096) @@ -623,4 +623,6 @@ X s\xE9lectionn\xE9:=Selected X: Interpolation Fusion=Fusion interpolation Bloquer la taille et la position de la frame=Lock the size and the location of the frame -D\xE9bloquer la taille et la position de la frame=Unlock the size and the location of the frame \ No newline at end of file +D\xE9bloquer la taille et la position de la frame=Unlock the size and the location of the frame +Redimensionnement classique de la taille de la frame=Classical resize of the frame +Redimensionner proportionnellement la taille de la frame=Proportional resizing of the frame Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliSceneController.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliSceneController.java 2008-10-24 16:18:06 UTC (rev 4095) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliSceneController.java 2008-10-24 20:42:43 UTC (rev 4096) @@ -8,6 +8,7 @@ import javax.swing.ListSelectionModel; import org.fudaa.ebli.visuallibrary.actions.EbliAlignWithMoveStrategyProvider; +import org.fudaa.ebli.visuallibrary.resizestrategy.EbliWidgetActionFactory; import org.fudaa.ebli.visuallibrary.tree.EbliJXTreeTableCellRenderer; import org.jdesktop.swingx.JXTreeTable; import org.jdesktop.swingx.decorator.HighlighterFactory; @@ -25,6 +26,8 @@ final private WidgetAction alignWithResizeAction; + final private WidgetAction alignWithResizeActionProportionnal; + Set<EbliWidgetEditModeListener> listeners_ = new HashSet<EbliWidgetEditModeListener>(); BuMenuBar menuCalque_ = null; @@ -49,9 +52,17 @@ .getInteractionLayer(), ActionFactory.createDefaultAlignWithMoveDecorator(), false); alignWithMoveAction = ActionFactory.createMoveAction(sp, sp); - alignWithResizeAction = ActionFactory.createAlignWithResizeAction(scene_.getVisu(), scene_.getInteractionLayer(), + // alignWithResizeAction = + // ActionFactory.createAlignWithResizeAction(scene_.getVisu(), + // scene_.getInteractionLayer(), ActionFactory + // .createDefaultAlignWithMoveDecorator(), false); + + alignWithResizeActionProportionnal = EbliWidgetActionFactory.createAlignWithProportionnalResizeAction(scene_ + .getVisu(), scene_ + .getInteractionLayer(), ActionFactory.createDefaultAlignWithMoveDecorator(), false); - + alignWithResizeAction = alignWithResizeActionProportionnal; + rectangularSelection_ = ActionFactory.createRectangularSelectAction(scene_, scene_.getInteractionLayer()); // -- ajoute l'action du zoom ( ctrl + clic) scene_.getActions().addAction(ActionFactory.createCenteredZoomAction(1.1)); @@ -62,6 +73,10 @@ } + public WidgetAction getAlignWithResizeActionProportionnal() { + return alignWithResizeActionProportionnal; + } + public boolean isEditable() { return false; } @@ -152,10 +167,14 @@ return rectangularSelection_; } - public WidgetAction getReisizeAction() { + public WidgetAction getResizeAction() { return alignWithResizeAction; } + public WidgetAction getProportionnalResizeAction() { + return alignWithResizeActionProportionnal; + } + public BuToolBar getToolbarComponent() { return null; } Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetController.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetController.java 2008-10-24 16:18:06 UTC (rev 4095) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetController.java 2008-10-24 20:42:43 UTC (rev 4096) @@ -22,6 +22,7 @@ import org.fudaa.ebli.visuallibrary.actions.CommandeDuplicate; import org.fudaa.ebli.visuallibrary.actions.EbliWidgetActionBloqueOuDebloqueWidget; import org.fudaa.ebli.visuallibrary.actions.EbliWidgetActionConfigure; +import org.fudaa.ebli.visuallibrary.actions.EbliWidgetActionResize; import org.fudaa.ebli.visuallibrary.actions.EbliWidgetActionSimple; import org.netbeans.api.visual.action.ActionFactory; import org.netbeans.api.visual.action.PopupMenuProvider; @@ -51,6 +52,8 @@ */ WidgetAction actionMove_; WidgetAction actionResize_; + WidgetAction actionResizeProportionel_; + WidgetAction actionSelect_; protected boolean canDuplicate_ = true; protected boolean canMove_ = true; @@ -95,45 +98,56 @@ } - protected void constructMenuDupliquer(final JPopupMenu _popup, final CtuluCommandContainer cmd_) { + private void constructMenuDupliquer(final JPopupMenu _popup, final CtuluCommandContainer cmd_) { final JMenuItem menuItem1 = _popup.add(EbliResource.EBLI.getString("Dupliquer la frame")); menuItem1.setIcon(CtuluResource.CTULU.getIcon("crystal_cascade")); menuItem1.addActionListener(new ActionListener() { public void actionPerformed(final ActionEvent e) { + // -- liste des nodes candidats pour le UNdo/redo --// + ArrayList<EbliNode> listeNodeUndo = new ArrayList<EbliNode>(); + duplication(listeNodeUndo); + cmd_.addCmd(new CommandeDuplicate(listeNodeUndo, widget_.getEbliScene())); + } - // -- recuperation du node a dupliquer --// - final EbliNode n = (EbliNode) widget_.getEbliScene().findObject(widget_); + }); + } - // duplication du node en question - final EbliNode duplique = n.duplicate(null); + /** + * Action de duplication des nodes + * + * @return le node duplique + */ + public EbliNode duplication(final ArrayList<EbliNode> listeNodeUndo) { + // -- recuperation du node a dupliquer --// + final EbliNode n = (EbliNode) widget_.getEbliScene().findObject(widget_); - // nouvelle position a cote de son predecesseur - // duplique.setPreferedLocation(nouvellePosition); + // duplication du node en question + final EbliNode duplique = n.duplicate(null); - // -- ajout dans la scene --// - if (duplique != null && widget_.getScene() != null) { - widget_.getEbliScene().addNode(duplique); + // nouvelle position a cote de son predecesseur + // duplique.setPreferedLocation(nouvellePosition); - // -- duplication des map de property graphique de la widget --// - duplique.getWidget().propGraphique = n.getWidget().duplicateGraphicalProperties(); - // -- duplication de la taille --// - duplique.getWidget().setPreferredBounds(n.getWidget().getPreferredBounds()); + // -- ajout dans la scene --// + if (duplique != null && widget_.getScene() != null) { + widget_.getEbliScene().addNode(duplique); - // -- ajout de la commande undo/redo --// - final ArrayList<EbliNode> ln = new ArrayList<EbliNode>(); - ln.add(duplique); - cmd_.addCmd(new CommandeDuplicate(ln, widget_.getEbliScene())); + // -- duplication des map de property graphique de la widget --// + duplique.getWidget().propGraphique = n.getWidget().duplicateGraphicalProperties(); + // -- duplication de la taille --// + duplique.getWidget().setPreferredBounds(n.getWidget().getPreferredBounds()); - // -- raffraichissement de la scene --// - widget_.getEbliScene().refresh(); - } + // -- ajout de la commande undo/redo --// + listeNodeUndo.add(duplique); + - postActionDuplication(n, duplique); + // -- raffraichissement de la scene --// + widget_.getEbliScene().refresh(); + } - } - - }); + postActionDuplication(n, duplique); + + return duplique; } /** @@ -187,7 +201,19 @@ _popup.add(boutonBloque); } + + + public AbstractButton boutonProportion = null; + public boolean isProportional = false; + + public void constructMenuResizeProportional(final JPopupMenu _popup, final CtuluCommandContainer cmd_) { + final EbliWidgetActionSimple actionBloque = new EbliWidgetActionResize.Proportional(widget_); + boutonProportion = actionBloque.buildMenuItem(EbliComponentFactory.INSTANCE); + _popup.add(boutonProportion); + } + + public void excecuteBlockOrDeblock() { if (boutonBloque == null) { final EbliWidgetActionSimple actionBloque = new EbliWidgetActionBloqueOuDebloqueWidget.Bloque(widget_); @@ -211,32 +237,47 @@ } - protected void constructMenuSupprimer(final JPopupMenu _popup, final CtuluCommandContainer cmd_) { + private void constructMenuSupprimer(final JPopupMenu _popup, final CtuluCommandContainer cmd_) { final JMenuItem menuItem = _popup.add(EbliResource.EBLI.getString("Supprimer la frame")); menuItem.setIcon(CtuluResource.CTULU.getIcon("crystal_non")); menuItem.addActionListener(new ActionListener() { public void actionPerformed(final ActionEvent e) { + // -- liste des nodes candidats pour le UNdo/redo --// + ArrayList<EbliNode> listeNodeUndo = new ArrayList<EbliNode>(); + ArrayList<Point> listeLocationUndo = new ArrayList<Point>(); + + + suppression(listeNodeUndo,listeLocationUndo); + cmd_.addCmd(new CommandSupprimer(listeNodeUndo, widget_.getEbliScene(),listeLocationUndo)); + + } - final EbliNode n = (EbliNode) widget_.getEbliScene().findObject(widget_); + }); + } - // -- on prend la location du node au moment de la suppression pour - // pouvoir la retablir dans le undo --// - // n.setPreferedLocation(widget_.getPreferredLocation()); - // -- on enregistre la commande undo redo --// - cmd_ - .addCmd(new CommandSupprimer(n, widget_.getEbliScene(), widget_.convertLocalToScene(widget_.getLocation()))); + /** + * Methode sp\xE9cifique a chaque node. par exemple les graphes et calques + * suppriment automatiquement leur l\xE9gende. + */ + public void suppression(final ArrayList<EbliNode> listeNodeUndo, ArrayList<Point> listeLocation) { - // -- on enleve le node de la scene --// - widget_.getEbliScene().removeNode(n); + final EbliNode n = (EbliNode) widget_.getEbliScene().findObject(widget_); + listeNodeUndo.add(n); + listeLocation.add(n.getWidget().getLocation()); + // -- on prend la location du node au moment de la suppression pour + // pouvoir la retablir dans le undo --// + // n.setPreferedLocation(widget_.getPreferredLocation()); + // -- on enregistre la commande undo redo --// + - // -- raffraichissement de la scene --// - widget_.getEbliScene().refresh(); + // -- on enleve le node de la scene --// + widget_.getEbliScene().removeNode(n); - } - - }); + // -- raffraichissement de la scene --// + widget_.getEbliScene().refresh(); } + /** * Methode de construction des menus de base @@ -262,6 +303,7 @@ _popup.addSeparator(); constructMenuMasquer(_popup, cmd_); constructMenuBloquer(_popup, cmd_); + constructMenuResizeProportional(_popup, cmd_); constructMenuSupprimer(_popup, cmd_); if (canDuplicate_) { _popup.addSeparator(); @@ -302,13 +344,17 @@ actionSelect_ = widget_.getEbliScene().createSelectAction(); widget_.getActions().addAction(actionSelect_); - actionResize_ = widget_.getEbliScene().getController().getReisizeAction(); + actionResize_ = widget_.getEbliScene().getController().getResizeAction(); if (canResize_) widget_.getActions().addAction(actionResize_); widget_.getActions().addAction(widget_.getEbliScene().createWidgetHoverAction()); actionMove_ = widget_.getEbliScene().getController().getMoveAction(); if (canMove_) widget_.getActions().addAction(actionMove_); + + // -- action mis de cote poru le debut \xE9ais reference indispensable --// + actionResizeProportionel_ = widget_.getEbliScene().getController().getProportionnalResizeAction(); + } public boolean fonctionsAlreadySpecified() { @@ -418,7 +464,28 @@ canResize_ = true; } + + /** + * Passe du resize classique au resize proportionnel + */ + public void switchToResizeProportionnal() { + if (!canResize_) + return; + if (actionResize_ != null && actionResizeProportionel_ != null) + widget_.getActions().removeAction(actionResize_); + + widget_.getActions().addAction(actionResizeProportionel_); + } + public void switchToResizeClassical() { + if (!canResize_) + return; + if (actionResizeProportionel_ != null && actionResize_ != null) + widget_.getActions().removeAction(actionResizeProportionel_); + widget_.getActions().addAction(actionResize_); + } + + public WidgetAction getActionMove() { return actionMove_; } Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/actions/CommandSupprimer.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/actions/CommandSupprimer.java 2008-10-24 16:18:06 UTC (rev 4095) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/actions/CommandSupprimer.java 2008-10-24 20:42:43 UTC (rev 4096) @@ -1,6 +1,8 @@ package org.fudaa.ebli.visuallibrary.actions; import java.awt.Point; +import java.util.ArrayList; +import java.util.List; import org.fudaa.ctulu.CtuluCommand; import org.fudaa.ebli.visuallibrary.EbliNode; @@ -13,38 +15,68 @@ */ public class CommandSupprimer implements CtuluCommand { - EbliNode nodeSupprime_; + List<EbliNode> nodeSupprime_; EbliScene scene_; - Point location_; + List<Point> location_; - public CommandSupprimer(final EbliNode nodeSupprime_, final EbliScene scene_, final Point _location) { + public CommandSupprimer(final EbliNode nodeSupprime, final EbliScene scene, final Point _location) { super(); - this.nodeSupprime_ = nodeSupprime_; - this.scene_ = scene_; - location_ = _location; + nodeSupprime_ = new ArrayList<EbliNode>(); + nodeSupprime_.add(nodeSupprime); + + this.scene_ = scene; + location_=new ArrayList<Point>(); + + location_.add( _location); } - public void redo() { + + public CommandSupprimer(final List<EbliNode> listeNode, final EbliScene scene, final List<Point> listeLocations) { + super(); + nodeSupprime_=listeNode; + location_ = listeLocations; + this.scene_ = scene; + } + + public void redoUnit(EbliNode nodeSupprime) { // --rattachement du node dans la scene --// - scene_.removeNode(nodeSupprime_); + scene_.removeNode(nodeSupprime); // -- raffraichissement de la scene --// scene_.refresh(); } - public void undo() { + public void undoUnit(EbliNode nodeSupprime, Point location) { // -- de nouveau suppression du node dans la scene --// - scene_.addNode(nodeSupprime_); + scene_.addNode(nodeSupprime); // -- repositionnement originel de la widget --// - nodeSupprime_.getWidget().setPreferredLocation(nodeSupprime_.getWidget().convertSceneToLocal(location_)); + nodeSupprime.getWidget().setPreferredLocation(nodeSupprime.getWidget().convertSceneToLocal(location)); // -- raffraichissement de la scene --// scene_.refresh(); } + + public void redo() { + for (int i = 0; i < nodeSupprime_.size(); i++) { + EbliNode node = nodeSupprime_.get(i); + redoUnit(node); + } + } + + public void undo() { + for (int i = 0; i < nodeSupprime_.size(); i++) { + EbliNode node=nodeSupprime_.get(i); + Point location=new Point(); + if(location_.size()>i) + location =location_.get(i); + undoUnit(node, location); + } + } + } Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/actions/CommandUndoRedoPaste.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/actions/CommandUndoRedoPaste.java 2008-10-24 16:18:06 UTC (rev 4095) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/actions/CommandUndoRedoPaste.java 2008-10-24 20:42:43 UTC (rev 4096) @@ -1,16 +1,16 @@ package org.fudaa.ebli.visuallibrary.actions; +import java.util.Collection; import java.util.Iterator; -import java.util.Set; import org.fudaa.ctulu.CtuluCommand; import org.fudaa.ebli.visuallibrary.EbliNode; public class CommandUndoRedoPaste implements CtuluCommand { - Set<EbliNode> nodesPasted_; + Collection<EbliNode> nodesPasted_; - public CommandUndoRedoPaste(final Set<EbliNode> _nodesPasted) { + public CommandUndoRedoPaste(final Collection<EbliNode> _nodesPasted) { super(); nodesPasted_ = _nodesPasted; } Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/actions/CommandeChangeWidgetScene.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/actions/CommandeChangeWidgetScene.java 2008-10-24 16:18:06 UTC (rev 4095) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/actions/CommandeChangeWidgetScene.java 2008-10-24 20:42:43 UTC (rev 4096) @@ -1,5 +1,6 @@ package org.fudaa.ebli.visuallibrary.actions; +import java.awt.Point; import java.util.ArrayList; import java.util.Iterator; @@ -15,17 +16,25 @@ public class CommandeChangeWidgetScene implements CtuluCommand { ArrayList<EbliNode> nodeDuplique_; - + ArrayList<Point> previsouLocation_; + ArrayList<Point> newLocation_; + EbliScene sceneDepart_; EbliScene sceneDestination_; - public CommandeChangeWidgetScene(final ArrayList<EbliNode> nodeDuplique_, final EbliScene sceneDep, - final EbliScene sceneDest) { + public CommandeChangeWidgetScene(final ArrayList<EbliNode> nodeDuplique, final EbliScene sceneDep, + final EbliScene sceneDest, ArrayList<Point> previsouLocation) { super(); - this.nodeDuplique_ = nodeDuplique_; + this.nodeDuplique_ = nodeDuplique; this.sceneDepart_ = sceneDep; sceneDestination_ = sceneDest; - + previsouLocation_ = previsouLocation; + + newLocation_ = new ArrayList<Point>(); + for (EbliNode node : nodeDuplique_) { + newLocation_.add(node.getWidget().getLocation()); + } + } public void redo() { @@ -41,11 +50,14 @@ public void undo() { // -- redo unitaire execute pour chaque node dupliques --// + int cpt = 0; for (final Iterator<EbliNode> it = nodeDuplique_.iterator(); it.hasNext();) { final EbliNode node = it.next(); sceneDestination_.removeNode(node); sceneDestination_.refresh(); sceneDepart_.addNode(node); + if (previsouLocation_.size() > cpt) + node.getWidget().setPreferredLocation(node.getWidget().convertSceneToLocal(previsouLocation_.get(cpt++))); sceneDepart_.refresh(); } } Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/actions/EbliWidgetActionDuplicate.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/actions/EbliWidgetActionDuplicate.java 2008-10-24 16:18:06 UTC (rev 4095) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/actions/EbliWidgetActionDuplicate.java 2008-10-24 20:42:43 UTC (rev 4096) @@ -49,7 +49,7 @@ final ArrayList<EbliNode> listeNodeADupliquer = new ArrayList<EbliNode>(); - final ArrayList<EbliNode> listeNouveauxNodes = new ArrayList<EbliNode>(); + ArrayList<EbliNode> listeNodeUndo = new ArrayList<EbliNode>(); // -- parcours des nodes for (final Iterator<EbliNode> it = listeNode.iterator(); it.hasNext();) { @@ -68,36 +68,48 @@ } sceneDestination_ = selectionneSceneNode(); - + // -- duplication des noeuds saisis --// for (final Iterator<EbliNode> it = listeNodeADupliquer.iterator(); it.hasNext();) { final EbliNode currentNode = it.next(); // -- duplication du node --// - final EbliNode node = currentNode.duplicate(null); - if (node != null) { + + EbliNode node = currentNode.getWidget().getController().duplication(listeNodeUndo); - // -- ajout du node dans la scene --// - sceneDestination_.addNode(node); - - node.getWidget().getController().postActionDuplication(currentNode, node); - node.getWidget().getController().setDescription(currentNode.getWidget().getController().getDescription()); - // -- ajout du noeud --// - listeNouveauxNodes.add(node); - - // -- duplication des map de property graphique de la widget --// - node.getWidget().setPropGraphique(currentNode.getWidget().duplicateGraphicalProperties()); - // -- duplication de la taille --// - node.getWidget().setPreferredBounds(currentNode.getWidget().getPreferredBounds()); - - // -- rafraichissement de la scene --// - sceneDestination_.refresh(); - - } + + + // final EbliNode node = currentNode.duplicate(null); + // if (node != null) { + // + // // -- ajout du node dans la scene --// + // sceneDestination_.addNode(node); + // + // node.getWidget().getController().postActionDuplication(currentNode, + // node); + //node.getWidget().getController().setDescription(currentNode.getWidget(). + // getController().getDescription()); + // // -- ajout du noeud --// + // listeNouveauxNodes.add(node); + // + // // -- duplication des map de property graphique de la widget --// + // node.getWidget().setPropGraphique(currentNode.getWidget(). + // duplicateGraphicalProperties()); + // // -- duplication de la taille --// + // node.getWidget().setPreferredBounds(currentNode.getWidget(). + // getPreferredBounds()); + // + // // -- rafraichissement de la scene --// + // sceneDestination_.refresh(); + // + // } } - + + + cmd_.addCmd(new CommandeDuplicate(listeNodeUndo, sceneDestination_)); // -- creation de l action undo/redo pour les nodes --// - cmd_.addCmd(new CommandeDuplicate(listeNouveauxNodes, sceneDestination_)); + // cmd_.addCmd(new CommandeDuplicate(listeNouveauxNodes, + // sceneDestination_)); } Added: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/actions/EbliWidgetActionResize.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/actions/EbliWidgetActionResize.java (rev 0) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/actions/EbliWidgetActionResize.java 2008-10-24 20:42:43 UTC (rev 4096) @@ -0,0 +1,133 @@ +package org.fudaa.ebli.visuallibrary.actions; + +import java.awt.event.ActionEvent; + +import javax.swing.Icon; + +import org.fudaa.ctulu.CtuluCommand; +import org.fudaa.ctulu.CtuluCommandContainer; +import org.fudaa.ebli.ressource.EbliResource; +import org.fudaa.ebli.visuallibrary.EbliWidget; +import org.fudaa.ebli.visuallibrary.EbliWidgetBordureSingle; +import org.fudaa.ebli.visuallibrary.EbliWidgetController; + +/** + * Action qui resize les widgets proportionnellement + * + * @author Adrien Hadoux + */ +public class EbliWidgetActionResize extends EbliWidgetActionSimple { + + private static final long serialVersionUID = 1L; + + final CtuluCommandContainer cmd_; + boolean resizeProportionnel_ = true; + EbliWidget widget_; + + public EbliWidgetActionResize(final String name, final Icon ic, final String id, + final EbliWidget _widget, + final boolean proportionnel) { + super(_widget.getEbliScene(), name, ic, id); + + widget_ = _widget; + cmd_ = _widget.getEbliScene().getCmdMng(); + resizeProportionnel_ = proportionnel; + } + + @SuppressWarnings("serial") + public static class Proportional extends EbliWidgetActionResize { + + public Proportional(final EbliWidget _widget) { + super(EbliResource.EBLI.getString("Resize proportionnel"), EbliResource.EBLI.getIcon("lock_16"), + "RESIZEPEWIDGET", + _widget, true); + setDefaultToolTip(EbliResource.EBLI.getString("Redimensionner proportionnellement la taille de la frame")); + + } + + } + + @SuppressWarnings("serial") + public static class Classical extends EbliWidgetActionResize { + + public Classical(final EbliWidget _widget) { + super(EbliResource.EBLI.getString("Resize classique"), EbliResource.EBLI.getIcon("unblock_16"), "RESIZEEWIDGET", + _widget, false); + setDefaultToolTip(EbliResource.EBLI.getString("Redimensionnement classique de la taille de la frame")); + + } + + } + + @Override + public void actionPerformed(final ActionEvent e) { + + EbliWidgetController controll; + + if (widget_ instanceof EbliWidgetBordureSingle) { + + controll = ((EbliWidgetBordureSingle) widget_).getBordureController(); + } else if (widget_.getParentWidget() instanceof EbliWidgetBordureSingle) { + controll = ((EbliWidgetBordureSingle) widget_.getParentWidget()).getBordureController(); + } else + controll = widget_.getController(); + + final EbliWidgetController controller = controll; + + if (resizeProportionnel_) { + controller.switchToResizeProportionnal(); + widget_.getController().boutonProportion.setAction(new EbliWidgetActionResize.Classical(widget_)); + widget_.getController().isProportional = true; + // -- enregistrement de la commande undoRedo --// + if (cmd_ != null) { + cmd_.addCmd(new CtuluCommand(){ + + public void redo() { + controller.switchToResizeProportionnal(); + widget_.getController().boutonProportion.setAction(new EbliWidgetActionResize.Classical(widget_)); + widget_.getController().isProportional = true; + } + + public void undo() { + controller.switchToResizeClassical(); + widget_.getController().boutonProportion.setAction(new EbliWidgetActionResize.Proportional(widget_)); + widget_.getController().isProportional = false; + } + + }); + + } + } else { + controller.switchToResizeClassical(); + widget_.getController().boutonProportion.setAction(new EbliWidgetActionResize.Proportional(widget_)); + widget_.getController().isProportional = false; + // -- enregistrement de la commande undoRedo --// + if (cmd_ != null) { + cmd_.addCmd(new CtuluCommand(){ + + public void redo() { + controller.switchToResizeClassical(); + widget_.getController().boutonProportion.setAction(new EbliWidgetActionResize.Proportional(widget_)); + widget_.getController().isProportional = false; + } + + public void undo() { + controller.switchToResizeProportionnal(); + widget_.getController().boutonProportion.setAction(new EbliWidgetActionResize.Classical(widget_)); + widget_.getController().isProportional = true; + } + + }); + } + } + // -- rafraichissement de la scene --// + scene_.refresh(); + + + + + + } + +} + Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetControllerCalque.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetControllerCalque.java 2008-10-24 16:18:06 UTC (rev 4095) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetControllerCalque.java 2008-10-24 20:42:43 UTC (rev 4096) @@ -18,7 +18,6 @@ import javax.swing.JScrollPane; import javax.swing.JSplitPane; -import org.fudaa.ctulu.CtuluCommand; import org.fudaa.ctulu.CtuluCommandContainer; import org.fudaa.ctulu.CtuluLibArray; import org.fudaa.ctulu.CtuluResource; @@ -42,7 +41,6 @@ import org.fudaa.ebli.visuallibrary.EbliWidgetControllerMenuOnly; import org.fudaa.ebli.visuallibrary.EbliWidgetWithBordure; import org.fudaa.ebli.visuallibrary.actions.CommandMasquer; -import org.fudaa.ebli.visuallibrary.actions.CommandSupprimer; import org.fudaa.ebli.visuallibrary.actions.EbliActionEditorOneClick; import com.memoire.bu.BuMenuBar; @@ -130,19 +128,32 @@ /** * Methode a surcharger si on veut effectuer un traitement particulier apres duplication du widget. */ - @Override - public void postActionDuplication(final EbliNode node, final EbliNode duplique) { + public void postActionDuplication(final EbliNode node, final EbliNode duplique, ArrayList<EbliNode> listeNodeUndo) { + listeNodeUndo.add(duplique); // -- il faut verifier que les le node a bien une legende sinon on n ajoute // pas de legende pour le dupliqu\xE9 --// EbliWidgetControllerCalque controllerDuDuplique = null; - if (duplique.getWidget() instanceof EbliWidgetBordureSingle) controllerDuDuplique = (EbliWidgetControllerCalque) ((EbliWidget) duplique - .getWidget().getChildren().get(0)).getController(); - else controllerDuDuplique = (EbliWidgetControllerCalque) (duplique.getWidget()).getController(); + EbliWidgetVueCalque widgetCalqueDuplic; + if (duplique.getWidget() instanceof EbliWidgetBordureSingle) + widgetCalqueDuplic = (EbliWidgetVueCalque) ((EbliWidget) duplique.getWidget().getChildren().get(0)); + else + widgetCalqueDuplic = (EbliWidgetVueCalque) (duplique.getWidget()); + controllerDuDuplique = (EbliWidgetControllerCalque) widgetCalqueDuplic.getController(); // -- on ajoute la legende apres duplication --// - if (getNodeLegende() != null && widget_.getEbliScene().isObject(getNodeLegende()) && this.legendeWidget_ != null) controllerDuDuplique - .ajoutLegende(); + if (getNodeLegende() != null && widget_.getEbliScene().isObject(getNodeLegende()) && this.legendeWidget_ != null) { + // -- on ajoute la legende --// + controllerDuDuplique.ajoutLegende(); + // -- on ajoute le noeud legende come commande undo --// + listeNodeUndo.add(controllerDuDuplique.getNodeLegende()); + + } + + // -- commande undo/redo --// + // cmd_.addCmd(new CommandeDuplicate(listeNodeUndo, + // widget_.getEbliScene())); + controllerDuDuplique.setDescription(getDescription()); // -- construction des actions sans passer par la frame fille --// @@ -150,6 +161,39 @@ } + + public EbliNode duplication(ArrayList<EbliNode> listeNodeUndo) { + + // -- recuperation du node a dupliquer --// + final EbliNode n = (EbliNode) widget_.getEbliScene().findObject(widget_); + + // duplication du node en question + final EbliNode duplique = n.duplicate(null); + + // nouvelle position a cote de son predecesseur + // duplique.setPreferedLocation(nouvellePosition); + + // -- ajout dans la scene --// + if (duplique != null && widget_.getScene() != null) { + widget_.getEbliScene().addNode(duplique); + + // -- duplication des map de property graphique de la widget --// + duplique.getWidget().setPropGraphique(n.getWidget().duplicateGraphicalProperties()); + // -- duplication de la taille --// + duplique.getWidget().setPreferredBounds(n.getWidget().getPreferredBounds()); + + // -- raffraichissement de la scene --// + widget_.getEbliScene().refresh(); + + postActionDuplication(n, duplique, listeNodeUndo); + } + return duplique; + } + + + + + public boolean hasLegende() { if (getNodeLegende() == null) return false; @@ -196,16 +240,11 @@ } } - @Override - protected void constructMenuSupprimer(final JPopupMenu _popup, final CtuluCommandContainer cmd_) { - final JMenuItem menuItem = _popup.add(EbliResource.EBLI.getString("Supprimer la frame")); - menuItem.setIcon(CtuluResource.CTULU.getIcon("crystal_non")); - menuItem.addActionListener(new ActionListener() { + public void suppression(final ArrayList<EbliNode> listeNodeUndo, ArrayList<Point> listLocation) { - public void actionPerformed(final ActionEvent e) { - final EbliNode n = (EbliNode) widget_.getEbliScene().findObject(widget_); - + listeNodeUndo.add(n); + listLocation.add(widget_.convertLocalToScene(widget_.getLocation())); // -- on prend la location du node au moment de la suppression pour // pouvoir la retablir dans le undo --// // n.setPreferedLocation(widget_.getPreferredLocation()); @@ -216,40 +255,43 @@ // -- on supprime le node legende associe --// if (hasLegende()) { + listeNodeUndo.add(widgetCalque_.nodeLegende); + listLocation.add(widgetCalque_.convertLocalToScene(widgetCalque_.nodeLegende.getWidget().getLocation())); widget_.getEbliScene().removeNode(widgetCalque_.nodeLegende); legendeWidget_ = null; - - final CtuluCommand commande1= new CommandSupprimer(n, widget_.getEbliScene(), widget_.convertLocalToScene(widget_.getLocation())); - final CtuluCommand commande2= new CommandSupprimer(widgetCalque_.nodeLegende, widget_.getEbliScene(), widget_.convertLocalToScene(widgetCalque_.nodeLegende.getWidget().getLocation())); - cmd_.addCmd(new CtuluCommand(){ - - @Override - public void redo() { - // TODO Auto-generated method stub - commande1.redo(); - commande2.redo(); - } - - @Override - public void undo() { - // TODO Auto-generated method stub - commande1.undo(); - commande2.undo(); - } - - }); + // final CtuluCommand commande1= new CommandSupprimer(n, + // widget_.getEbliScene(), + // widget_.convertLocalToScene(widget_.getLocation())); + // final CtuluCommand commande2= new + // CommandSupprimer(widgetCalque_.nodeLegende, widget_.getEbliScene(), + // widget_ + // .convertLocalToScene(widgetCalque_.nodeLegende.getWidget().getLocation + // ())); + // cmd_.addCmd(new CtuluCommand(){ + // + // + // public void redo() { + // // TODO Auto-generated method stub + // commande1.redo(); + // commande2.redo(); + // } + // + // + // public void undo() { + // // TODO Auto-generated method stub + // commande1.undo(); + // commande2.undo(); + // } + // + // }); } - else{ - // -- on enregistre la commande undo redo unitaire --// - cmd_.addCmd(new CommandSupprimer(n, widget_.getEbliScene(), widget_.convertLocalToScene(widget_.getLocation()))); - } + // -- raffraichissement de la scene --// widget_.getEbliScene().refresh(); } - }); - } + @Override protected void constructMenuMasquer(final JPopupMenu _popup, final CtuluCommandContainer cmd_) { Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/graphe/EbliWidgetControllerGraphe.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/graphe/EbliWidgetControllerGraphe.java 2008-10-24 16:18:06 UTC (rev 4095) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/graphe/EbliWidgetControllerGraphe.java 2008-10-24 20:42:43 UTC (rev 4096) @@ -13,7 +13,6 @@ import javax.swing.JPopupMenu; import javax.swing.JScrollPane; -import org.fudaa.ctulu.CtuluCommand; import org.fudaa.ctulu.CtuluCommandContainer; import org.fudaa.ctulu.CtuluResource; import org.fudaa.ctulu.gui.CtuluLibSwing; @@ -33,7 +32,6 @@ import org.fudaa.ebli.visuallibrary.EbliWidgetBordureSingle; import org.fudaa.ebli.visuallibrary.EbliWidgetControllerMenuOnly; import org.fudaa.ebli.visuallibrary.actions.CommandMasquer; -import org.fudaa.ebli.visuallibrary.actions.CommandSupprimer; import org.fudaa.ebli.visuallibrary.actions.EbliActionEditorOneClick; import com.memoire.bu.BuMenuBar; @@ -112,32 +110,77 @@ /** * Methode a surcharger si on veut effectuer un traitement particulier apres duplication du widget. */ - @Override - public void postActionDuplication(final EbliNode node, final EbliNode duplique) { + public void postActionDuplication(final EbliNode node, final EbliNode duplique, ArrayList<EbliNode> listeNodeUndo) { + listeNodeUndo.add(duplique); // -- il faut verifier que les le node a bien une legende sinon on n ajoute // pas de legende pour le dupliqu\xE9 --// EbliWidgetControllerGraphe controllerDuDuplique = null; - if (duplique.getWidget() instanceof EbliWidgetBordureSingle) controllerDuDuplique = (EbliWidgetControllerGraphe) ((EbliWidget) duplique - .getWidget().getChildren().get(0)).getController(); - else controllerDuDuplique = (EbliWidgetControllerGraphe) (duplique.getWidget()).getController(); + EbliWidgetGraphe widgetGrapheDuplic; + if (duplique.getWidget() instanceof EbliWidgetBordureSingle) + widgetGrapheDuplic = (EbliWidgetGraphe) ((EbliWidget) duplique.getWidget().getChildren().get(0)); + else + widgetGrapheDuplic = (EbliWidgetGraphe) (duplique.getWidget()); + + controllerDuDuplique = (EbliWidgetControllerGraphe) widgetGrapheDuplic.getController(); + // -- on ajoute la legende apres duplication --// - if (widgetGraphe_.getNodeLegende() != null) controllerDuDuplique.ajoutLegende(); - + + if (widgetGraphe_.getNodeLegende() != null) { + controllerDuDuplique.ajoutLegende(); + + listeNodeUndo.add(widgetGrapheDuplic.getNodeLegende()); + + } + // -- commande undo/redo --// + // cmd_.addCmd(new CommandeDuplicate(listeNodeUndo, + // widget_.getEbliScene())); controllerDuDuplique.setDescription(getDescription()); } + + + public EbliNode duplication(final ArrayList<EbliNode> listeNodeUndo) { - @Override - protected void constructMenuSupprimer(final JPopupMenu _popup, final CtuluCommandContainer cmd_) { - final JMenuItem menuItem = _popup.add(EbliResource.EBLI.getString("Supprimer la frame")); - menuItem.setIcon(CtuluResource.CTULU.getIcon("crystal_non")); - menuItem.addActionListener(new ActionListener() { + // -- recuperation du node a dupliquer --// + final EbliNode n = (EbliNode) widget_.getEbliScene().findObject(widget_); - public void actionPerformed(final ActionEvent e) { + // duplication du node en question + final EbliNode duplique = n.duplicate(null); + // nouvelle position a cote de son predecesseur + // duplique.setPreferedLocation(nouvellePosition); + + // -- ajout dans la scene --// + if (duplique != null && widget_.getScene() != null) { + widget_.getEbliScene().addNode(duplique); + + // -- duplication des map de property graphique de la widget --// + duplique.getWidget().setPropGraphique(n.getWidget().duplicateGraphicalProperties()); + // -- duplication de la taille --// + duplique.getWidget().setPreferredBounds(n.getWidget().getPreferredBounds()); + + + + // -- raffraichissement de la scene --// + widget_.getEbliScene().refresh(); + + postActionDuplication(n, duplique, listeNodeUndo); + + + } + return duplique; + } + + + + + + public void suppression(final ArrayList<EbliNode> listeNodeUndo, ArrayList<Point> listLocation) { + final EbliNode n = (EbliNode) widget_.getEbliScene().findObject(widget_); - + listeNodeUndo.add(n); + listLocation.add(widget_.convertLocalToScene(widget_.getLocation())); // -- on prend la location du node au moment de la suppression pour // pouvoir la retablir dans le undo --// // n.setPreferedLocation(widget_.getPreferredLocation()); @@ -148,37 +191,43 @@ // -- on supprime le node legende associe --// if (hasLegende()) { + listeNodeUndo.add(widgetGraphe_.getNodeLegende()); + listLocation.add(widget_.convertLocalToScene(widgetGraphe_.getNodeLegende().getWidget().getLocation())); widget_.getEbliScene().removeNode(widgetGraphe_.getNodeLegende()); - final CtuluCommand commande1=new CommandSupprimer(n, widget_.getEbliScene(), widget_.convertLocalToScene(widget_.getLocation())); - final CtuluCommand commande2= new CommandSupprimer(widgetGraphe_.getNodeLegende(), widget_.getEbliScene(), widget_.convertLocalToScene(widgetGraphe_.getNodeLegende().getWidget().getLocation())); - cmd_.addCmd(new CtuluCommand(){ - - @Override - public void redo() { - // TODO Auto-generated method stub - commande1.redo(); - commande2.redo(); - } - - @Override - public void undo() { - // TODO Auto-generated method stub - commande1.undo(); - commande2.undo(); - } - - }); - }else{ - // -- on enregistre la commande undo redo unitaire --// - cmd_.addCmd(new CommandSupprimer(n, widget_.getEbliScene(), widget_.convertLocalToScene(widget_.getLocation()))); + + + // final CtuluCommand commande1=new CommandSupprimer(n, + // widget_.getEbliScene(), + // widget_.convertLocalToScene(widget_.getLocation())); + // final CtuluCommand commande2= new + // CommandSupprimer(widgetGraphe_.getNodeLegende(), + // widget_.getEbliScene(), + // widget_.convertLocalToScene(widgetGraphe_.getNodeLegende + // ().getWidget().getLocation())); + // cmd_.addCmd(new CtuluCommand(){ + // + // + // public void redo() { + // // TODO Auto-generated method stub + // commande1.redo(); + // commande2.redo(); + // } + // + // + // public void undo() { + // // TODO Auto-generated method stub + // commande1.undo(); + // commande2.undo(); + // } + // + // }); } // -- raffraichissement de la scene --// widget_.getEbliScene().refresh(); } - }); - } + @Override protected void constructMenuMasquer(final JPopupMenu _popup, final CtuluCommandContainer cmd_) { Added: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/resizestrategy/AlignWithResizeProportionalStrategy.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/resizestrategy/AlignWithResizeProportionalStrategy.java (rev 0) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/resizestrategy/AlignWithResizeProportionalStrategy.java 2008-10-24 20:42:43 UTC (rev 4096) @@ -0,0 +1,220 @@ +package org.fudaa.ebli.visuallibrary.resizestrategy; + +import java.awt.Insets; +import java.awt.Point; +import java.awt.Rectangle; + +import org.fudaa.ctulu.image.CtuluLibImage; +import org.netbeans.api.visual.action.AlignWithMoveDecorator; +import org.netbeans.api.visual.action.AlignWithWidgetCollector; +import org.netbeans.api.visual.action.ResizeProvider; +import org.netbeans.api.visual.action.ResizeStrategy; +import org.netbeans.api.visual.widget.LayerWidget; +import org.netbeans.api.visual.widget.Widget; +import org.netbeans.modules.visual.action.AlignWithSupport; + +/** + * Strat\xE9gie poru le resize proportionnel + * + * @author Adrien Hadoux + * + */ + +public class AlignWithResizeProportionalStrategy extends AlignWithSupport implements ResizeStrategy, ResizeProvider { + + private boolean outerBounds; + + public AlignWithResizeProportionalStrategy(AlignWithWidgetCollector collector, LayerWidget interractionLayer, + AlignWithMoveDecorator decorator, boolean outerBounds) { + super(collector, interractionLayer, decorator); + this.outerBounds = outerBounds; + } + + public Rectangle boundsSuggested(Widget widget, Rectangle originalBounds, Rectangle suggestedBounds, + ControlPoint controlPoint) { + final double wDivParH = CtuluLibImage.getRatio(originalBounds.width, originalBounds.height); + final double hDivParW = CtuluLibImage.getRatio(originalBounds.height, originalBounds.width); + Insets insets = widget.getBorder().getInsets(); + int minx = insets.left + insets.right; + int miny = insets.top + insets.bottom; + + // double coefficientProportionnalite = (suggestedBounds.width * 1.0) / + // (suggestedBounds.height * 1.0); + // if (coefficientProportionnalite == 0) + // coefficientProportionnalite = 1; + int oldWidht = suggestedBounds.width; + int oldHeight = suggestedBounds.height; + + suggestedBounds = widget.convertLocalToScene(suggestedBounds); + + Point suggestedLocation, point; + int tempx, tempy; + + switch (controlPoint) { + case BOTTOM_CENTER: + suggestedLocation = new Point(suggestedBounds.x + suggestedBounds.width / 2, suggestedBounds.y + + suggestedBounds.height); + if (!outerBounds) + suggestedLocation.y -= insets.bottom; + + point = super.locationSuggested(widget, new Rectangle(suggestedLocation), suggestedLocation, false, true, false, + false); + + if (!outerBounds) + point.y += insets.bottom; + + suggestedBounds.height = Math.max(miny, point.y - suggestedBounds.y); + + break; + case BOTTOM_LEFT: + suggestedLocation = new Point(suggestedBounds.x, suggestedBounds.y + suggestedBounds.height); + if (!outerBounds) { + suggestedLocation.y -= insets.bottom; + suggestedLocation.x += insets.left; + } + + point = super.locationSuggested(widget, new Rectangle(suggestedLocation), suggestedLocation, true, true, false, + false); + + if (!outerBounds) { + point.y += insets.bottom; + point.x -= insets.left; + } + + suggestedBounds.height = Math.max(miny, point.y - suggestedBounds.y); + + tempx = Math.min(point.x, suggestedBounds.x + suggestedBounds.width - minx); + suggestedBounds.width = suggestedBounds.x + suggestedBounds.width - tempx; + suggestedBounds.x = tempx; + break; + case BOTTOM_RIGHT: + suggestedLocation = new Point(suggestedBounds.x + suggestedBounds.width, suggestedBounds.y + + suggestedBounds.height); + if (!outerBounds) { + suggestedLocation.y -= insets.bottom; + suggestedLocation.x -= insets.right; + } + + point = super.locationSuggested(widget, new Rectangle(suggestedLocation), suggestedLocation, true, true, false, + false); + + if (!outerBounds) { + point.y += insets.bottom; + point.x += insets.right; + } + + suggestedBounds.height = Math.max(miny, point.y - suggestedBounds.y); + + suggestedBounds.width = Math.max(minx, point.x - suggestedBounds.x); + break; + case CENTER_LEFT: + suggestedLocation = new Point(suggestedBounds.x, suggestedBounds.y + suggestedBounds.height / 2); + if (!outerBounds) + suggestedLocation.x += insets.left; + + point = super.locationSuggested(widget, new Rectangle(suggestedLocation), suggestedLocation, true, false, false, + false); + + if (!outerBounds) + point.x -= insets.left; + + tempx = Math.min(point.x, suggestedBounds.x + suggestedBounds.width - minx); + suggestedBounds.width = suggestedBounds.x + suggestedBounds.width - tempx; + suggestedBounds.x = tempx; + break; + case CENTER_RIGHT: + suggestedLocation = new Point(suggestedBounds.x + suggestedBounds.width, suggestedBounds.y + + suggestedBounds.height / 2); + if (!outerBounds) + suggestedLocation.x -= insets.right; + + point = super.locationSuggested(widget, new Rectangle(suggestedLocation), suggestedLocation, true, false, false, + false); + + if (!outerBounds) + point.x += insets.right; + + suggestedBounds.width = Math.max(minx, point.x - suggestedBounds.x); + break; + case TOP_CENTER: + suggestedLocation = new Point(suggestedBounds.x + suggestedBounds.width / 2, suggestedBounds.y); + if (!outerBounds) + suggestedLocation.y += insets.top; + + point = super.locationSuggested(widget, new Rectangle(suggestedLocation), suggestedLocation, false, true, false, + false); + + if (!outerBounds) + point.y -= insets.top; + + tempy = Math.min(point.y, suggestedBounds.y + suggestedBounds.height - miny); + suggestedBounds.height = suggestedBounds.y + suggestedBounds.height - tempy; + suggestedBounds.y = tempy; + break; + case TOP_LEFT: + suggestedLocation = new Point(suggestedBounds.x, suggestedBounds.y); + if (!outerBounds) { + suggestedLocation.y += insets.top; + suggestedLocation.x += insets.left; + } + + point = super.locationSuggested(widget, new Rectangle(suggestedLocation), suggestedLocation, true, true, false, + false); + + if (!outerBounds) { + point.y -= insets.top; + point.x -= insets.left; + } + + tempy = Math.min(point.y, suggestedBounds.y + suggestedBounds.height - miny); + suggestedBounds.height = suggestedBounds.y + suggestedBounds.height - tempy; + suggestedBounds.y = tempy; + + tempx = Math.min(point.x, suggestedBounds.x + suggestedBounds.width - minx); + suggestedBounds.width = suggestedBounds.x + suggestedBounds.width - tempx; + suggestedBounds.x = tempx; + break; + case TOP_RIGHT: + suggestedLocation = new Point(suggestedBounds.x + suggestedBounds.width, suggestedBounds.y); + if (!outerBounds) { + suggestedLocation.y += insets.top; + suggestedLocation.x -= insets.right; + } + + point = super.locationSuggested(widget, new Rectangle(suggestedLocation), suggestedLocation, true, true, false, + false); + + if (!outerBounds) { + point.y -= insets.top; + point.x += insets.right; + } + + tempy = Math.min(point.y, suggestedBounds.y + suggestedBounds.height - miny); + suggestedBounds.height = suggestedBounds.y + suggestedBounds.height - tempy; + suggestedBounds.y = tempy; + + suggestedBounds.width = Math.max(minx, point.x - suggestedBounds.x); + break; + } + + // -- proportions respectees --// + // double coeff = ((double) suggestedBounds.height) / ((double) oldHeight); + if (suggestedBounds.height != originalBounds.height) { + suggestedBounds.width = (int) (wDivParH * suggestedBounds.height); + } + if (suggestedBounds.width != originalBounds.width) { + suggestedBounds.height = (int) (hDivParW * suggestedBounds.width); + } + + return widget.convertSceneToLocal(suggestedBounds); + } + + public void resizingStarted(Widget widget) { + show(); + } + + public void resizingFinished(Widget widget) { + hide(); + } + +} Added: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/resizestrategy/EbliWidgetActionFactory.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/resizestrategy/EbliWidgetActionFactory.java (rev 0) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/resizestrategy/EbliWidgetActionFactory.java 2008-10-24 20:42:43 UTC (rev 4096) @@ -0,0 +1,55 @@ +package org.fudaa.ebli.visuallibrary.resizestrategy; + +import java.awt.BasicStroke; +import java.awt.Color; + +import org.netbeans.api.visual.action.ActionFactory; +import org.netbeans.api.visual.action.AlignWithMoveDecorator; +import org.netbeans.api.visual.action.AlignWithWidgetCollector; +import org.netbeans.api.visual.action.WidgetAction; +import org.netbeans.api.visual.widget.ConnectionWidget; +import org.netbeans.api.visual.widget.LayerWidget; +import org.netbeans.api.visual.widget.Scene; +import org.netbeans.modules.visual.action.SingleLayerAlignWithWidgetCollector; + +/** + * Customisation apr rapport a l'usine ActionFactory de visulalibrary de + * creation des actions des widgets. Rajout des resize proportionnels + * + * @author Adrien Hadoux + * + */ + +public class EbliWidgetActionFactory { + + + private static final BasicStroke STROKE = new BasicStroke(1.0f, BasicStroke.JOIN_BEVEL, BasicStroke.CAP_BUTT, 5.0f, + new float[] { 6.0f, 3.0f }, 0.0f); + + private static final AlignWithMoveDecorator ALIGN_WITH_MOVE_DECORATOR_DEFAULT = new AlignWithMoveDecorator() { + public ConnectionWidget createLineWidget(Scene scene) { + ConnectionWidget widget = new ConnectionWidget(scene); + widget.setStroke(STROKE); + widget.setForeground(Color.BLUE); + return widget; + } + }; + + + public static WidgetAction createAlignWithProportionnalResizeAction(LayerWidget collectionLayer, LayerWidget interractionLayer, + AlignWithMoveDecorator decorator, boolean outerBounds) { + assert collectionLayer != null; + return createAlignWithProportionnalResizeAction(new SingleLayerAlignWithWidgetCollector(collectionLayer, outerBounds), + interractionLayer, decorator != null ? decorator : ALIGN_WITH_MOVE_DECORATOR_DEFAULT, outerBounds); + } + + public static WidgetAction createAlignWithProportionnalResizeAction(AlignWithWidgetCollector collector, + LayerWidget interractionLayer, AlignWithMoveDecorator decorator, boolean outerBounds) { + assert collector != null && interractionLayer != null && decorator != null; + AlignWithResizeProportionalStrategy sp = new AlignWithResizeProportionalStrategy(collector, interractionLayer, + decorator, + outerBounds); + return ActionFactory.createResizeAction(sp, sp); + } + +} Modified: branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostLayoutFille.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostLayoutFille.java 2008-10-24 16:18:06 UTC (rev 4095) +++ branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostLayoutFille.java 2008-10-24 20:42:43 UTC (rev 4096) @@ -25,7 +25,6 @@ import org.fudaa.ebli.courbe.EGFillePanel; import org.fudaa.ebli.ressource.EbliResource; import org.fudaa.ebli.visuallibrary.EbliNode; -import org.fudaa.ebli.visuallibrary.EbliScene; import org.fudaa.ebli.visuallibrary.EbliWidgetController; import org.fudaa.ebli.visuallibrary.EbliWidgetControllerInterface; import org.fudaa.ebli.visuallibrary.EbliWidgetEditModeListener; @@ -342,36 +341,41 @@ public void paste() { // Point locationSouris = this.getMousePosition(); - - // JOptionPane.showMessageDialog(null, "paste(): nb elements " + - // nodesCopyied.size()); - final Set<EbliNode> newNodes = new HashSet<EbliNode>(); + ArrayList<EbliNode> listeNodeUndo = new ArrayList<EbliNode>(); + // --recuperation des noeuds copies --// if (projet_.nodesCopyied != null) { for (final Iterator<EbliNode> it = projet_.nodesCopyied.iterator(); it.hasNext();) { final EbliNode node = it.next(); // --duplication du node --// - final EbliNode nouveauNode = node.duplicate(null); + node.getWidget().getController().duplication(listeNodeUndo); - getScene().addNode(nouveauNode); + // final EbliNode nouveauNode = node.duplicate(null); + // + // getScene().addNode(nouveauNode); + // + //nouveauNode.getWidget().getController().setDescription(node.getWidget( + // ).getController().getDescription()); + // newNodes.add(nouveauNode); + // // -- duplication des map de property graphique de la widget --// + // node.getWidget().setPropGraphique(node.getWidget(). + // duplicateGraphicalProperties()); + // // -- duplication de la taille --// + //node.getWidget().setPreferredBounds(node.getWidget().getPreferredBounds + // ()); + // final Point newLocation = + // nouveauNode.getWidget().getPreferredLocation(); + // newLocation.x += 30; + // newLocation.y += 30; + // + // nouveauNode.getWidget().setPreferredLocation(newLocation); - nouveauNode.getWidget().getController().setDescription(node.getWidget().getController().getDescription()); - newNodes.add(nouveauNode); - // -- duplication des map de property graphique de la widget --// - node.getWidget().setPropGraphique(node.getWidget().duplicateGraphicalProperties()); - // -- duplication de la taille --// - node.getWidget().setPreferredBounds(node.getWidget().getPreferredBounds()); - final Point newLocation = nouveauNode.getWidget().getPreferredLocation(); - newLocation.x += 30; - newLocation.y += 30; - - nouveauNode.getWidget().setPreferredLocation(newLocation); - } // --creation de la commande undo/redo --// - if (newNodes.size() != 0) getScene().getCmdMng().addCmd(new CommandUndoRedoPaste(newNodes)); + if (listeNodeUndo.size() != 0) + getScene().getCmdMng().addCmd(new CommandUndoRedoPaste(listeNodeUndo)); // reinitialisation de la liste projet_.nodesCopyied = null; Modified: branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/actions/TrPostActionChangeSceneForWidget.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/actions/TrPostActionChangeSceneForWidget.java 2008-10-24 16:18:06 UTC (rev 4095) +++ branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/actions/TrPostActionChangeSceneForWidget.java 2008-10-24 20:42:43 UTC (rev 4096) @@ -1,5 +1,6 @@ package org.fudaa.fudaa.tr.post.actions; +import java.awt.Point; import java.awt.event.ActionEvent; import java.util.ArrayList; import java.util.Iterator; @@ -56,34 +57,47 @@ final EbliScene sceneDestination = selectionneSceneNode(); if (sceneDestination == null) return; - // -- changement des noeuds saisis des noeuds saisis --// + ArrayList<EbliNode> listeNodeUndo=new ArrayList<EbliNode>(); +... [truncated message content] |
From: <had...@us...> - 2008-10-26 13:58:30
|
Revision: 4097 http://fudaa.svn.sourceforge.net/fudaa/?rev=4097&view=rev Author: hadouxad Date: 2008-10-26 13:58:25 +0000 (Sun, 26 Oct 2008) Log Message: ----------- - Mise en place du bool?\195?\169en pour les resizes - Changement de tous les noms des fichier avec ceux de Didier (?\195?\169limination des doublons des titres des trpostlayoutfille auto) - Mise en place du lecteur du projet plus souple: si il ne peut pas lire certains fichiers il continue - Mise en place d'un rapport d erreurs lors du chargement du projet, ce rapport est affich?\195?\169 a la fin du chargement -Mise en place de la doc dans le projet aide - Les documents html ont ?\195?\169t?\195?\169 convertis en doc openoffice 3.0 AUTOPORTANT (pratique pour les modifier et les commiter), il faut donc penser ?\195?\160 passer les images sous la moulinette gimp pour les optimiser... Modified Paths: -------------- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliSceneController.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetController.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/actions/EbliWidgetActionResize.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/resizestrategy/AlignWithResizeProportionalStrategy.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostCommonImplementation.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/persist/TrPostPersistenceManager.java Added Paths: ----------- branches/Prepro-0.92-SNAPSHOT/aide/src/prepro/doc_pdf/ branches/Prepro-0.92-SNAPSHOT/aide/src/prepro/doc_pdf/README.txt branches/Prepro-0.92-SNAPSHOT/aide/src/prepro/doc_pdf/post/ branches/Prepro-0.92-SNAPSHOT/aide/src/prepro/doc_pdf/post/post_en.odt branches/Prepro-0.92-SNAPSHOT/aide/src/prepro/doc_pdf/post/post_fr.odt branches/Prepro-0.92-SNAPSHOT/aide/src/prepro/doc_pdf/reflux/ branches/Prepro-0.92-SNAPSHOT/aide/src/prepro/doc_pdf/reflux/reflux_en.odt branches/Prepro-0.92-SNAPSHOT/aide/src/prepro/doc_pdf/reflux/reflux_fr.odt branches/Prepro-0.92-SNAPSHOT/aide/src/prepro/doc_pdf/rubar/ branches/Prepro-0.92-SNAPSHOT/aide/src/prepro/doc_pdf/rubar/rubar_en.odt branches/Prepro-0.92-SNAPSHOT/aide/src/prepro/doc_pdf/rubar/rubar_fr.odt branches/Prepro-0.92-SNAPSHOT/aide/src/prepro/doc_pdf/telemac/ branches/Prepro-0.92-SNAPSHOT/aide/src/prepro/doc_pdf/telemac/telemac_en.odt branches/Prepro-0.92-SNAPSHOT/aide/src/prepro/doc_pdf/telemac/telemac_fr.odt branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/persist/TrPostPersistanceErrorManager.java Added: branches/Prepro-0.92-SNAPSHOT/aide/src/prepro/doc_pdf/README.txt =================================================================== --- branches/Prepro-0.92-SNAPSHOT/aide/src/prepro/doc_pdf/README.txt (rev 0) +++ branches/Prepro-0.92-SNAPSHOT/aide/src/prepro/doc_pdf/README.txt 2008-10-26 13:58:25 UTC (rev 4097) @@ -0,0 +1,30 @@ +Doc r\xE9alis\xE9e \xE0 l'a\xE9ide d'openoffice 3.0 + + +****TIPS**** + + +Proc\xE9dure conversion: +- ouvrir fichier html avec opeenoffice +- exporter au format openoffice (choix 1 document ...) +- ouvrir l'export +- mettre l'affichage classique: decocher web pour avoir les pages +- retirer les liens des images poru avoir tout en un fichier autoportant +- enregistrer au format odt + + +Pour enregistrer les images \xE0 l'int\xE9rieur du doc et ne pas conserver les liens comme par d\xE9fautlt; +Edition / Liens... / Rompre les liens +=> Force \xE0 rompre tous les liens et enregistre les images dans le doc +WARNING: si on utilise ce proc\xE9d\xE9, penser \xE0 optimiser les tailles images avec gimp ou autre logiciel dessin vectoriel + + +** TODO ** + +Doc pre: +- Mettre des sommaires visualisable par le cutuluPdfviewer +- Refondre graphiquement (tableaux, titree, mise en page...) + +Doc post: +- Mettre a jour avec la doc actuelle +- garder la meme presentation visuelle \ No newline at end of file Added: branches/Prepro-0.92-SNAPSHOT/aide/src/prepro/doc_pdf/post/post_en.odt =================================================================== (Binary files differ) Property changes on: branches/Prepro-0.92-SNAPSHOT/aide/src/prepro/doc_pdf/post/post_en.odt ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: branches/Prepro-0.92-SNAPSHOT/aide/src/prepro/doc_pdf/post/post_fr.odt =================================================================== (Binary files differ) Property changes on: branches/Prepro-0.92-SNAPSHOT/aide/src/prepro/doc_pdf/post/post_fr.odt ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: branches/Prepro-0.92-SNAPSHOT/aide/src/prepro/doc_pdf/reflux/reflux_en.odt =================================================================== (Binary files differ) Property changes on: branches/Prepro-0.92-SNAPSHOT/aide/src/prepro/doc_pdf/reflux/reflux_en.odt ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: branches/Prepro-0.92-SNAPSHOT/aide/src/prepro/doc_pdf/reflux/reflux_fr.odt =================================================================== (Binary files differ) Property changes on: branches/Prepro-0.92-SNAPSHOT/aide/src/prepro/doc_pdf/reflux/reflux_fr.odt ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: branches/Prepro-0.92-SNAPSHOT/aide/src/prepro/doc_pdf/rubar/rubar_en.odt =================================================================== (Binary files differ) Property changes on: branches/Prepro-0.92-SNAPSHOT/aide/src/prepro/doc_pdf/rubar/rubar_en.odt ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: branches/Prepro-0.92-SNAPSHOT/aide/src/prepro/doc_pdf/rubar/rubar_fr.odt =================================================================== (Binary files differ) Property changes on: branches/Prepro-0.92-SNAPSHOT/aide/src/prepro/doc_pdf/rubar/rubar_fr.odt ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: branches/Prepro-0.92-SNAPSHOT/aide/src/prepro/doc_pdf/telemac/telemac_en.odt =================================================================== (Binary files differ) Property changes on: branches/Prepro-0.92-SNAPSHOT/aide/src/prepro/doc_pdf/telemac/telemac_en.odt ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: branches/Prepro-0.92-SNAPSHOT/aide/src/prepro/doc_pdf/telemac/telemac_fr.odt =================================================================== (Binary files differ) Property changes on: branches/Prepro-0.92-SNAPSHOT/aide/src/prepro/doc_pdf/telemac/telemac_fr.odt ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliSceneController.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliSceneController.java 2008-10-24 20:42:43 UTC (rev 4096) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliSceneController.java 2008-10-26 13:58:25 UTC (rev 4097) @@ -26,7 +26,7 @@ final private WidgetAction alignWithResizeAction; - final private WidgetAction alignWithResizeActionProportionnal; + // final private WidgetAction alignWithResizeActionProportionnal; Set<EbliWidgetEditModeListener> listeners_ = new HashSet<EbliWidgetEditModeListener>(); BuMenuBar menuCalque_ = null; @@ -57,12 +57,11 @@ // scene_.getInteractionLayer(), ActionFactory // .createDefaultAlignWithMoveDecorator(), false); - alignWithResizeActionProportionnal = EbliWidgetActionFactory.createAlignWithProportionnalResizeAction(scene_ + alignWithResizeAction = EbliWidgetActionFactory.createAlignWithProportionnalResizeAction(scene_ .getVisu(), scene_ .getInteractionLayer(), ActionFactory.createDefaultAlignWithMoveDecorator(), false); - alignWithResizeAction = alignWithResizeActionProportionnal; - + rectangularSelection_ = ActionFactory.createRectangularSelectAction(scene_, scene_.getInteractionLayer()); // -- ajoute l'action du zoom ( ctrl + clic) scene_.getActions().addAction(ActionFactory.createCenteredZoomAction(1.1)); @@ -73,9 +72,9 @@ } - public WidgetAction getAlignWithResizeActionProportionnal() { - return alignWithResizeActionProportionnal; - } +// public WidgetAction getAlignWithResizeActionProportionnal() { +// return alignWithResizeActionProportionnal; +// } public boolean isEditable() { return false; @@ -171,9 +170,9 @@ return alignWithResizeAction; } - public WidgetAction getProportionnalResizeAction() { - return alignWithResizeActionProportionnal; - } +// public WidgetAction getProportionnalResizeAction() { +// return alignWithResizeActionProportionnal; +// } public BuToolBar getToolbarComponent() { return null; Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetController.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetController.java 2008-10-24 20:42:43 UTC (rev 4096) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetController.java 2008-10-26 13:58:25 UTC (rev 4097) @@ -353,7 +353,7 @@ if (canMove_) widget_.getActions().addAction(actionMove_); // -- action mis de cote poru le debut \xE9ais reference indispensable --// - actionResizeProportionel_ = widget_.getEbliScene().getController().getProportionnalResizeAction(); + // actionResizeProportionel_ = widget_.getEbliScene().getController().getProportionnalResizeAction(); } @@ -468,14 +468,14 @@ /** * Passe du resize classique au resize proportionnel */ - public void switchToResizeProportionnal() { - if (!canResize_) - return; - if (actionResize_ != null && actionResizeProportionel_ != null) - widget_.getActions().removeAction(actionResize_); - - widget_.getActions().addAction(actionResizeProportionel_); - } +// public void switchToResizeProportionnal() { +// if (!canResize_) +// return; +// if (actionResize_ != null && actionResizeProportionel_ != null) +// widget_.getActions().removeAction(actionResize_); +// +// widget_.getActions().addAction(actionResizeProportionel_); +// } public void switchToResizeClassical() { if (!canResize_) Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/actions/EbliWidgetActionResize.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/actions/EbliWidgetActionResize.java 2008-10-24 20:42:43 UTC (rev 4096) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/actions/EbliWidgetActionResize.java 2008-10-26 13:58:25 UTC (rev 4097) @@ -75,7 +75,7 @@ final EbliWidgetController controller = controll; if (resizeProportionnel_) { - controller.switchToResizeProportionnal(); + //controller.switchToResizeProportionnal(); widget_.getController().boutonProportion.setAction(new EbliWidgetActionResize.Classical(widget_)); widget_.getController().isProportional = true; // -- enregistrement de la commande undoRedo --// @@ -83,13 +83,13 @@ cmd_.addCmd(new CtuluCommand(){ public void redo() { - controller.switchToResizeProportionnal(); + // controller.switchToResizeProportionnal(); widget_.getController().boutonProportion.setAction(new EbliWidgetActionResize.Classical(widget_)); widget_.getController().isProportional = true; } public void undo() { - controller.switchToResizeClassical(); + // controller.switchToResizeClassical(); widget_.getController().boutonProportion.setAction(new EbliWidgetActionResize.Proportional(widget_)); widget_.getController().isProportional = false; } @@ -98,7 +98,7 @@ } } else { - controller.switchToResizeClassical(); + //controller.switchToResizeClassical(); widget_.getController().boutonProportion.setAction(new EbliWidgetActionResize.Proportional(widget_)); widget_.getController().isProportional = false; // -- enregistrement de la commande undoRedo --// @@ -106,13 +106,13 @@ cmd_.addCmd(new CtuluCommand(){ public void redo() { - controller.switchToResizeClassical(); + // controller.switchToResizeClassical(); widget_.getController().boutonProportion.setAction(new EbliWidgetActionResize.Proportional(widget_)); widget_.getController().isProportional = false; } public void undo() { - controller.switchToResizeProportionnal(); + // controller.switchToResizeProportionnal(); widget_.getController().boutonProportion.setAction(new EbliWidgetActionResize.Classical(widget_)); widget_.getController().isProportional = true; } Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/resizestrategy/AlignWithResizeProportionalStrategy.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/resizestrategy/AlignWithResizeProportionalStrategy.java 2008-10-24 20:42:43 UTC (rev 4096) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/resizestrategy/AlignWithResizeProportionalStrategy.java 2008-10-26 13:58:25 UTC (rev 4097) @@ -5,6 +5,7 @@ import java.awt.Rectangle; import org.fudaa.ctulu.image.CtuluLibImage; +import org.fudaa.ebli.visuallibrary.EbliWidget; import org.netbeans.api.visual.action.AlignWithMoveDecorator; import org.netbeans.api.visual.action.AlignWithWidgetCollector; import org.netbeans.api.visual.action.ResizeProvider; @@ -22,199 +23,202 @@ public class AlignWithResizeProportionalStrategy extends AlignWithSupport implements ResizeStrategy, ResizeProvider { - private boolean outerBounds; + private boolean outerBounds; - public AlignWithResizeProportionalStrategy(AlignWithWidgetCollector collector, LayerWidget interractionLayer, - AlignWithMoveDecorator decorator, boolean outerBounds) { - super(collector, interractionLayer, decorator); - this.outerBounds = outerBounds; - } + public AlignWithResizeProportionalStrategy(AlignWithWidgetCollector collector, LayerWidget interractionLayer, + AlignWithMoveDecorator decorator, boolean outerBounds) { + super(collector, interractionLayer, decorator); + this.outerBounds = outerBounds; + } - public Rectangle boundsSuggested(Widget widget, Rectangle originalBounds, Rectangle suggestedBounds, - ControlPoint controlPoint) { - final double wDivParH = CtuluLibImage.getRatio(originalBounds.width, originalBounds.height); - final double hDivParW = CtuluLibImage.getRatio(originalBounds.height, originalBounds.width); - Insets insets = widget.getBorder().getInsets(); - int minx = insets.left + insets.right; - int miny = insets.top + insets.bottom; + public Rectangle boundsSuggested(Widget widget, Rectangle originalBounds, Rectangle suggestedBounds, + ControlPoint controlPoint) { + final double wDivParH = CtuluLibImage.getRatio(originalBounds.width, originalBounds.height); + final double hDivParW = CtuluLibImage.getRatio(originalBounds.height, originalBounds.width); + Insets insets = widget.getBorder().getInsets(); + int minx = insets.left + insets.right; + int miny = insets.top + insets.bottom; - // double coefficientProportionnalite = (suggestedBounds.width * 1.0) / - // (suggestedBounds.height * 1.0); - // if (coefficientProportionnalite == 0) - // coefficientProportionnalite = 1; - int oldWidht = suggestedBounds.width; - int oldHeight = suggestedBounds.height; + // double coefficientProportionnalite = (suggestedBounds.width * 1.0) / + // (suggestedBounds.height * 1.0); + // if (coefficientProportionnalite == 0) + // coefficientProportionnalite = 1; - suggestedBounds = widget.convertLocalToScene(suggestedBounds); + suggestedBounds = widget.convertLocalToScene(suggestedBounds); - Point suggestedLocation, point; - int tempx, tempy; + Point suggestedLocation, point; + int tempx, tempy; - switch (controlPoint) { - case BOTTOM_CENTER: - suggestedLocation = new Point(suggestedBounds.x + suggestedBounds.width / 2, suggestedBounds.y - + suggestedBounds.height); - if (!outerBounds) - suggestedLocation.y -= insets.bottom; + switch (controlPoint) { + case BOTTOM_CENTER: + suggestedLocation = new Point(suggestedBounds.x + suggestedBounds.width / 2, suggestedBounds.y + + suggestedBounds.height); + if (!outerBounds) + suggestedLocation.y -= insets.bottom; - point = super.locationSuggested(widget, new Rectangle(suggestedLocation), suggestedLocation, false, true, false, - false); + point = super.locationSuggested(widget, new Rectangle(suggestedLocation), suggestedLocation, false, true, false, + false); - if (!outerBounds) - point.y += insets.bottom; + if (!outerBounds) + point.y += insets.bottom; - suggestedBounds.height = Math.max(miny, point.y - suggestedBounds.y); + suggestedBounds.height = Math.max(miny, point.y - suggestedBounds.y); - break; - case BOTTOM_LEFT: - suggestedLocation = new Point(suggestedBounds.x, suggestedBounds.y + suggestedBounds.height); - if (!outerBounds) { - suggestedLocation.y -= insets.bottom; - suggestedLocation.x += insets.left; - } + break; + case BOTTOM_LEFT: + suggestedLocation = new Point(suggestedBounds.x, suggestedBounds.y + suggestedBounds.height); + if (!outerBounds) { + suggestedLocation.y -= insets.bottom; + suggestedLocation.x += insets.left; + } - point = super.locationSuggested(widget, new Rectangle(suggestedLocation), suggestedLocation, true, true, false, - false); + point = super.locationSuggested(widget, new Rectangle(suggestedLocation), suggestedLocation, true, true, false, + false); - if (!outerBounds) { - point.y += insets.bottom; - point.x -= insets.left; - } + if (!outerBounds) { + point.y += insets.bottom; + point.x -= insets.left; + } - suggestedBounds.height = Math.max(miny, point.y - suggestedBounds.y); + suggestedBounds.height = Math.max(miny, point.y - suggestedBounds.y); - tempx = Math.min(point.x, suggestedBounds.x + suggestedBounds.width - minx); - suggestedBounds.width = suggestedBounds.x + suggestedBounds.width - tempx; - suggestedBounds.x = tempx; - break; - case BOTTOM_RIGHT: - suggestedLocation = new Point(suggestedBounds.x + suggestedBounds.width, suggestedBounds.y - + suggestedBounds.height); - if (!outerBounds) { - suggestedLocation.y -= insets.bottom; - suggestedLocation.x -= insets.right; - } + tempx = Math.min(point.x, suggestedBounds.x + suggestedBounds.width - minx); + suggestedBounds.width = suggestedBounds.x + suggestedBounds.width - tempx; + suggestedBounds.x = tempx; + break; + case BOTTOM_RIGHT: + suggestedLocation = new Point(suggestedBounds.x + suggestedBounds.width, suggestedBounds.y + + suggestedBounds.height); + if (!outerBounds) { + suggestedLocation.y -= insets.bottom; + suggestedLocation.x -= insets.right; + } - point = super.locationSuggested(widget, new Rectangle(suggestedLocation), suggestedLocation, true, true, false, - false); + point = super.locationSuggested(widget, new Rectangle(suggestedLocation), suggestedLocation, true, true, false, + false); - if (!outerBounds) { - point.y += insets.bottom; - point.x += insets.right; - } + if (!outerBounds) { + point.y += insets.bottom; + point.x += insets.right; + } - suggestedBounds.height = Math.max(miny, point.y - suggestedBounds.y); + suggestedBounds.height = Math.max(miny, point.y - suggestedBounds.y); - suggestedBounds.width = Math.max(minx, point.x - suggestedBounds.x); - break; - case CENTER_LEFT: - suggestedLocation = new Point(suggestedBounds.x, suggestedBounds.y + suggestedBounds.height / 2); - if (!outerBounds) - suggestedLocation.x += insets.left; + suggestedBounds.width = Math.max(minx, point.x - suggestedBounds.x); + break; + case CENTER_LEFT: + suggestedLocation = new Point(suggestedBounds.x, suggestedBounds.y + suggestedBounds.height / 2); + if (!outerBounds) + suggestedLocation.x += insets.left; - point = super.locationSuggested(widget, new Rectangle(suggestedLocation), suggestedLocation, true, false, false, - false); + point = super.locationSuggested(widget, new Rectangle(suggestedLocation), suggestedLocation, true, false, false, + false); - if (!outerBounds) - point.x -= insets.left; + if (!outerBounds) + point.x -= insets.left; - tempx = Math.min(point.x, suggestedBounds.x + suggestedBounds.width - minx); - suggestedBounds.width = suggestedBounds.x + suggestedBounds.width - tempx; - suggestedBounds.x = tempx; - break; - case CENTER_RIGHT: - suggestedLocation = new Point(suggestedBounds.x + suggestedBounds.width, suggestedBounds.y - + suggestedBounds.height / 2); - if (!outerBounds) - suggestedLocation.x -= insets.right; + tempx = Math.min(point.x, suggestedBounds.x + suggestedBounds.width - minx); + suggestedBounds.width = suggestedBounds.x + suggestedBounds.width - tempx; + suggestedBounds.x = tempx; + break; + case CENTER_RIGHT: + suggestedLocation = new Point(suggestedBounds.x + suggestedBounds.width, suggestedBounds.y + + suggestedBounds.height / 2); + if (!outerBounds) + suggestedLocation.x -= insets.right; - point = super.locationSuggested(widget, new Rectangle(suggestedLocation), suggestedLocation, true, false, false, - false); + point = super.locationSuggested(widget, new Rectangle(suggestedLocation), suggestedLocation, true, false, false, + false); - if (!outerBounds) - point.x += insets.right; + if (!outerBounds) + point.x += insets.right; - suggestedBounds.width = Math.max(minx, point.x - suggestedBounds.x); - break; - case TOP_CENTER: - suggestedLocation = new Point(suggestedBounds.x + suggestedBounds.width / 2, suggestedBounds.y); - if (!outerBounds) - suggestedLocation.y += insets.top; + suggestedBounds.width = Math.max(minx, point.x - suggestedBounds.x); + break; + case TOP_CENTER: + suggestedLocation = new Point(suggestedBounds.x + suggestedBounds.width / 2, suggestedBounds.y); + if (!outerBounds) + suggestedLocation.y += insets.top; - point = super.locationSuggested(widget, new Rectangle(suggestedLocation), suggestedLocation, false, true, false, - false); + point = super.locationSuggested(widget, new Rectangle(suggestedLocation), suggestedLocation, false, true, false, + false); - if (!outerBounds) - point.y -= insets.top; + if (!outerBounds) + point.y -= insets.top; - tempy = Math.min(point.y, suggestedBounds.y + suggestedBounds.height - miny); - suggestedBounds.height = suggestedBounds.y + suggestedBounds.height - tempy; - suggestedBounds.y = tempy; - break; - case TOP_LEFT: - suggestedLocation = new Point(suggestedBounds.x, suggestedBounds.y); - if (!outerBounds) { - suggestedLocation.y += insets.top; - suggestedLocation.x += insets.left; - } + tempy = Math.min(point.y, suggestedBounds.y + suggestedBounds.height - miny); + suggestedBounds.height = suggestedBounds.y + suggestedBounds.height - tempy; + suggestedBounds.y = tempy; + break; + case TOP_LEFT: + suggestedLocation = new Point(suggestedBounds.x, suggestedBounds.y); + if (!outerBounds) { + suggestedLocation.y += insets.top; + suggestedLocation.x += insets.left; + } - point = super.locationSuggested(widget, new Rectangle(suggestedLocation), suggestedLocation, true, true, false, - false); + point = super.locationSuggested(widget, new Rectangle(suggestedLocation), suggestedLocation, true, true, false, + false); - if (!outerBounds) { - point.y -= insets.top; - point.x -= insets.left; - } + if (!outerBounds) { + point.y -= insets.top; + point.x -= insets.left; + } - tempy = Math.min(point.y, suggestedBounds.y + suggestedBounds.height - miny); - suggestedBounds.height = suggestedBounds.y + suggestedBounds.height - tempy; - suggestedBounds.y = tempy; + tempy = Math.min(point.y, suggestedBounds.y + suggestedBounds.height - miny); + suggestedBounds.height = suggestedBounds.y + suggestedBounds.height - tempy; + suggestedBounds.y = tempy; - tempx = Math.min(point.x, suggestedBounds.x + suggestedBounds.width - minx); - suggestedBounds.width = suggestedBounds.x + suggestedBounds.width - tempx; - suggestedBounds.x = tempx; - break; - case TOP_RIGHT: - suggestedLocation = new Point(suggestedBounds.x + suggestedBounds.width, suggestedBounds.y); - if (!outerBounds) { - suggestedLocation.y += insets.top; - suggestedLocation.x -= insets.right; - } + tempx = Math.min(point.x, suggestedBounds.x + suggestedBounds.width - minx); + suggestedBounds.width = suggestedBounds.x + suggestedBounds.width - tempx; + suggestedBounds.x = tempx; + break; + case TOP_RIGHT: + suggestedLocation = new Point(suggestedBounds.x + suggestedBounds.width, suggestedBounds.y); + if (!outerBounds) { + suggestedLocation.y += insets.top; + suggestedLocation.x -= insets.right; + } - point = super.locationSuggested(widget, new Rectangle(suggestedLocation), suggestedLocation, true, true, false, - false); + point = super.locationSuggested(widget, new Rectangle(suggestedLocation), suggestedLocation, true, true, false, + false); - if (!outerBounds) { - point.y -= insets.top; - point.x += insets.right; - } + if (!outerBounds) { + point.y -= insets.top; + point.x += insets.right; + } - tempy = Math.min(point.y, suggestedBounds.y + suggestedBounds.height - miny); - suggestedBounds.height = suggestedBounds.y + suggestedBounds.height - tempy; - suggestedBounds.y = tempy; + tempy = Math.min(point.y, suggestedBounds.y + suggestedBounds.height - miny); + suggestedBounds.height = suggestedBounds.y + suggestedBounds.height - tempy; + suggestedBounds.y = tempy; - suggestedBounds.width = Math.max(minx, point.x - suggestedBounds.x); - break; - } + suggestedBounds.width = Math.max(minx, point.x - suggestedBounds.x); + break; + } - // -- proportions respectees --// - // double coeff = ((double) suggestedBounds.height) / ((double) oldHeight); - if (suggestedBounds.height != originalBounds.height) { - suggestedBounds.width = (int) (wDivParH * suggestedBounds.height); - } - if (suggestedBounds.width != originalBounds.width) { - suggestedBounds.height = (int) (hDivParW * suggestedBounds.width); - } + if(widget instanceof EbliWidget){ + boolean isProportionnal= ((EbliWidget)widget).getController().isProportional; + if(isProportionnal){ + // -- proportions respectees --// + // double coeff = ((double) suggestedBounds.height) / ((double) oldHeight); + if (suggestedBounds.height != originalBounds.height) { + suggestedBounds.width = (int) (wDivParH * suggestedBounds.height); + } + if (suggestedBounds.width != originalBounds.width) { + suggestedBounds.height = (int) (hDivParW * suggestedBounds.width); + } + } - return widget.convertSceneToLocal(suggestedBounds); - } + } + return widget.convertSceneToLocal(suggestedBounds); + } - public void resizingStarted(Widget widget) { - show(); - } + public void resizingStarted(Widget widget) { + show(); + } - public void resizingFinished(Widget widget) { - hide(); - } + public void resizingFinished(Widget widget) { + hide(); + } } Modified: branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostCommonImplementation.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostCommonImplementation.java 2008-10-24 20:42:43 UTC (rev 4096) +++ branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostCommonImplementation.java 2008-10-26 13:58:25 UTC (rev 4097) @@ -56,6 +56,23 @@ return res; } + + public void elimineDoublonNomsLayout(){ + List<TrPostLayoutFille> liste=getAllLayoutFille(); + + for(int i=0;i<liste.size();i++){ + int cpt=1; + for(int j=i; j<liste.size();j++){ + if(liste.get(j).previousTitleFrame.equals(liste.get(i).previousTitleFrame)){ + + liste.get(j).previousTitleFrame+="_"+(cpt++); + } + } + + } + + } + /** * @return la fenetre layout active. */ Added: branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/persist/TrPostPersistanceErrorManager.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/persist/TrPostPersistanceErrorManager.java (rev 0) +++ branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/persist/TrPostPersistanceErrorManager.java 2008-10-26 13:58:25 UTC (rev 4097) @@ -0,0 +1,101 @@ +package org.fudaa.fudaa.tr.post.persist; + +import java.awt.BorderLayout; +import java.awt.Frame; +import java.util.ArrayList; +import java.util.List; + +import javax.swing.JDialog; +import javax.swing.JLabel; +import javax.swing.JPanel; +import javax.swing.JScrollPane; +import javax.swing.JTable; +import javax.swing.table.DefaultTableModel; + +import org.fudaa.ctulu.CtuluUI; +import org.fudaa.ctulu.gui.CtuluLibSwing; +import org.fudaa.fudaa.tr.common.TrResource; + + +/** + * Manager qui indique toutes les erreurs qui se sont produites pendant le chargement. + * @author Adrien Hadoux + * + */ +public class TrPostPersistanceErrorManager { + + + java.util.List<String> listeMessageError=new ArrayList<String>(); + + public void addMessageError(String message){ + listeMessageError.add(message); + } + + public void clear(){ + + listeMessageError.clear(); + } + + private class ModeleTableError extends DefaultTableModel{ + + + java.util.List<String> listeMessageError_; + + public ModeleTableError(List<String> listeMessage) { + + + listeMessageError_ = listeMessage; + } + + @Override + public int getColumnCount() { + // TODO Auto-generated method stub + return 1; + } + + @Override + public String getColumnName(int column) { + // TODO Auto-generated method stub + return "Messages"; + } + + @Override + public int getRowCount() { + // TODO Auto-generated method stub + return listeMessageError_.size(); + } + + @Override + public Object getValueAt(int row, int column) { + // TODO Auto-generated method stub + return listeMessageError_.get(row); + } + + + } + + public void showDialog(CtuluUI ui){ + if(listeMessageError.size()==0){ + ui.message(TrResource.getS("Chargement termin\xE9"), TrResource.getS("Chargement termin\xE9 avec succ\xE8s"), false); + + return; + } + + JTable table=new JTable(new DefaultTableModel(listeMessageError.toArray(),listeMessageError.size())); + final Frame f = CtuluLibSwing.getFrameAncestorHelper(ui.getParentComponent()); + JDialog dialog_ = new JDialog(f); + dialog_.setModal(true); + dialog_.setTitle("Chargement termin\xE9"); + final JPanel container = new JPanel(new BorderLayout()); + container.add(new JScrollPane(table), BorderLayout.CENTER); + + container.add(new JLabel( TrResource.getS("Chargement termin\xE9 avec erreur(s)")),BorderLayout.NORTH); + dialog_.setContentPane(container); + dialog_.setLocationRelativeTo(ui.getParentComponent()); + dialog_.setSize(300,200); + dialog_.setVisible(true); + + } + + +} Modified: branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/persist/TrPostPersistenceManager.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/persist/TrPostPersistenceManager.java 2008-10-24 20:42:43 UTC (rev 4096) +++ branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/persist/TrPostPersistenceManager.java 2008-10-26 13:58:25 UTC (rev 4097) @@ -50,6 +50,7 @@ import org.fudaa.fudaa.tr.post.actions.TrPostActionFusionCalques; import org.netbeans.api.visual.widget.Widget; +import com.memoire.fu.FuLib; import com.memoire.fu.FuLog; import com.thoughtworks.xstream.XStream; import com.thoughtworks.xstream.io.xml.DomDriver; @@ -73,18 +74,19 @@ * Point d'entr\xE9e poru charger un projet repertoire. Continet le path du directory. Cela permet de placer ce fichier * n'importe ou sur le ddur et de pouvoir charger le projet. Peut etre g\xE9r\xE9 comem un raccourcis. */ - public static final String setupProject = "setup" + EXTENSION; + public static final String setupProject = "setup";// + EXTENSION; /** * Fichier qui d\xE9crit tous les contenu layout sauvegard\xE9s Et noms des balises importantes */ - public final static String INFOSCENE = "InfoLayout" + EXTENSION; + public final static String INFOSCENE = "info_layout";//"InfoLayout" + EXTENSION; public final static String BALISESCENES = "LayoutList"; /** * Fichier qui d\xE9crit int\xE9gralement le contenu d'une scene */ - public final static String DESCRIPTORSCENE = "layout"; + public final static String EXTENSION_REPLAYOUT=".LAY"; + public final static String DESCRIPTORSCENE = "desc_frame"; public static String ATTRIBUTESCENE = "LAYOUT"; /** @@ -93,7 +95,13 @@ //public final static String DESCRIPTORSOURCE = "sources" + EXTENSION; public final static String BALISESOURCES = "SourcesList"; public static String ATTRIBUTESOURCE = "FICHIER"; - public final static String FileWidgetNames = "FramesNames"+ EXTENSION; + public final static String FileWidgetNames = "nom_frame";//"FramesNames"+ EXTENSION; + + + public final static String REP_VAR="VARIABLES"; + public final static String REP_CALQUES="CALQUES"; + public final static String REP_GRAPHES="GRAPHES"; + public final static String REP_TEXTES="TEXTES"; /** * Le projet a persiter */ @@ -108,10 +116,9 @@ TrPostCommonImplementation ui_; - //-- elements de base tagg\xE9s par xstream pour etre plus explicites dans les fichiers --// + TrPostPersistanceErrorManager managerError=new TrPostPersistanceErrorManager(); - public TrPostPersistenceManager(final TrPostProjet projet) { super(); trprojet_ = projet; @@ -335,16 +342,14 @@ out.writeObject(XmlCommentaire.getCommentaireLayout()); // -- g\xE9n\xE9ration du xml pour la scene --// - final int nbFichiersToGenrate = trprojet_.impl_.getAllLayoutFille().size(); + List<TrPostLayoutFille> listeFilles=trprojet_.impl_.getAllLayoutFille(); + final int nbFichiersToGenrate = listeFilles.size(); out.writeInt(nbFichiersToGenrate); for (int i = 0; i < nbFichiersToGenrate; i++) { // creation du fichier de desciption des scenes dans le repertoire de meme nom. - String nomFichierLayout = /* - * projet_.getAbsolutePath() + File.separator - * + - */DESCRIPTORSCENE + (i + 1) + EXTENSION + File.separator + DESCRIPTORSCENE + (i + 1) - + EXTENSION; + String nomLayout=FuLib.clean(listeFilles.get(i).previousTitleFrame); + String nomFichierLayout = nomLayout + EXTENSION_REPLAYOUT + File.separator + DESCRIPTORSCENE ; out.writeObject(new LayoutDescriptor(nomFichierLayout)); @@ -376,6 +381,11 @@ * @throws ClassNotFoundException */ public List<String> loadDescriptorScenes(final File file) { + + if(!file.canRead()){ + managerError.addMessageError("FilePath "+file.getPath()+" du descriptor introuvable"); + return new ArrayList<String>(); + } // -- outputstream du xstream --// final List<String> listeFiles = new ArrayList<String>(); ObjectInputStream in = null; @@ -407,6 +417,7 @@ } catch (final FileNotFoundException e) { // TODO Auto-generated catch block e.printStackTrace(); + managerError.addMessageError("infolayout: path "+file.getPath()+" invalide. Impossible de charger des layouts"); } catch (final IOException e) { // TODO Auto-generated catch block e.printStackTrace(); @@ -615,6 +626,8 @@ // -- tentative de chargement du source dans le multi-projet --// multiProjectActivator.active(f, trprojet_.impl_, listeCouplesIdSources.get(i).IdSource); } + }else{ + managerError.addMessageError("setup: path "+path+" invalide. Fichier r\xE9sultat non charg\xE9"); } } } @@ -714,7 +727,7 @@ if (savePersistDirectory(saveAs)) { // -- etape 1: creation du repertoire des graphe et calques --// - final String pathVariables = projet_.getAbsolutePath() + File.separator + "Variables"; + final String pathVariables = projet_.getAbsolutePath() + File.separator + REP_VAR; try { File fileVar = new File(pathVariables); @@ -756,12 +769,13 @@ final String title = fille.previousTitleFrame; final EbliScene scene = fille.getScene(); if (listFilles.size() != 0) progression("Cr\xE9ation du fichier du layout " + title, 20 + 70 / listFilles.size()); - file = new File(projet_.getAbsolutePath() + File.separator + DESCRIPTORSCENE + cpt + EXTENSION); + String nomLayout=FuLib.clean(fille.previousTitleFrame)+ EXTENSION_REPLAYOUT ; + file = new File(projet_.getAbsolutePath() + File.separator + nomLayout); // -- sauvegarde du persitant --// parametres.put("dimensions", fille.getSize()); parametres.put("location", fille.getLocation()); parametres.put("scene", scene); - savePersitSceneXml(scene, title, file, parametres, listeNomsComposants,cpt); + savePersitSceneXml(scene, title, file, parametres, listeNomsComposants,cpt,nomLayout); cpt++; } @@ -860,13 +874,16 @@ * @return */ public boolean loadProject(final boolean executeByExplorer, final File explorerFile) { - + managerError.clear(); + //-- on elimine les doublons potentiels des frames layouts --// + ui_.elimineDoublonNomsLayout(); + progression("Lecture du r\xE9pertoire", 10); // -- etape 1 lecture du repertoire global ou du fichier param --// if (loadPersistDirectory(executeByExplorer, explorerFile)) { File file; - final String pathVariables = projet_.getAbsolutePath() + File.separator + "Variables"; + final String pathVariables = projet_.getAbsolutePath() + File.separator + REP_VAR; try { new File(pathVariables).mkdir(); } catch (final Exception e) { @@ -898,8 +915,6 @@ file = new File(projet_.getAbsolutePath() + File.separator + FileWidgetNames); final List<EbliWidgetSerializeXml.CoupleNomId> listeCouplesNoms = loadNomsFrames(file); - int cpt = 1; - for (final String fichier : listeFichiers) { file = new File(fichier); if (listeFichiers.size() != 0) progression("chargement du fichier " + fichier, 30 + 70 / listeFichiers.size()); @@ -909,8 +924,8 @@ // -- sauvegarde du persitant --// trprojet_.getImpl().addInternalFrame(postFrame); - String nomRepertoireLayout=DESCRIPTORSCENE + (cpt++) + EXTENSION; - loadPersitSceneXml(file, postFrame, parametres, listeCouplesNoms,nomRepertoireLayout); + + loadPersitSceneXml(file, postFrame, parametres, listeCouplesNoms); } // -- etape 6; lecture des variables --// @@ -918,7 +933,8 @@ loadVariables(pathVariables); progression("", 100); - ui_.message(TrResource.getS("Chargement termin\xE9"), TrResource.getS("Chargement termin\xE9 avec succ\xE8s"), false); + managerError.showDialog(ui_); + //ui_.message(TrResource.getS("Chargement termin\xE9"), TrResource.getS("Chargement termin\xE9 avec succ\xE8s"), false); return true; @@ -959,7 +975,7 @@ private void fillMapWithDataPath(final Map parametres,String repertoireLayout){ final String pathGraphes = projet_.getAbsolutePath() + File.separator + repertoireLayout + File.separator - + "Graphes"; + + REP_GRAPHES; try { File fichierGraphes = new File(pathGraphes); if (fichierGraphes.isDirectory()) { @@ -973,7 +989,7 @@ FuLog.debug("Le repertoire des graphes existe deja"); } final String pathCalques = projet_.getAbsolutePath() + File.separator + repertoireLayout + File.separator - + "Calques"; + + REP_CALQUES; try { File fichierCalques = new File(pathCalques); if (fichierCalques.isDirectory()) { @@ -987,7 +1003,7 @@ FuLog.debug("Le repertoire des calques existe deja"); } - final String pathText = projet_.getAbsolutePath() + File.separator + repertoireLayout + File.separator + "Textes"; + final String pathText = projet_.getAbsolutePath() + File.separator + repertoireLayout + File.separator + REP_TEXTES; try { File fichierText = new File(pathText); if (fichierText.isDirectory()) { @@ -1016,17 +1032,17 @@ * @throws IOException */ private void savePersitSceneXml(final EbliScene scene, final String title, File file, final Map parametres, - final List<EbliWidgetSerializeXml.CoupleNomId> listeNomsComposants,int cpt) { + final List<EbliWidgetSerializeXml.CoupleNomId> listeNomsComposants,int cpt,String titreRepertoireLayout) { // -- creation du repertoire du layout layoutN.POST--// file.mkdir(); // -- remplissage de la map avec les r\xE9pertoires calques/graphes/textes --// - fillMapWithDataPath(parametres, DESCRIPTORSCENE + cpt + EXTENSION); + fillMapWithDataPath(parametres, titreRepertoireLayout); // -- mise en place du fichier decrivant le contenu du layout --// - file = new File(file.getAbsolutePath() + File.separator + DESCRIPTORSCENE + cpt + EXTENSION); + file = new File(file.getAbsolutePath() + File.separator + DESCRIPTORSCENE);//DESCRIPTORSCENE + cpt + EXTENSION); // -- outputstream du xstream --// ObjectOutputStream out = null; @@ -1119,11 +1135,17 @@ * @throws InstantiationException */ private void loadPersitSceneXml(final File file, final TrPostLayoutFille fille, final Map parametres, - final List<EbliWidgetSerializeXml.CoupleNomId> listeCouplesNoms,String repertoireLayout) { - + final List<EbliWidgetSerializeXml.CoupleNomId> listeCouplesNoms) { + + if(!file.canRead()){ + managerError.addMessageError("Repertoire layout introuvable, "+file.getPath()+" incorrect"); + return; + } + + String nomRepertoireLayout=file.getPath().substring(0,file.getPath().lastIndexOf(DESCRIPTORSCENE) ); final EbliScene scenToUpdate = fille.getScene(); parametres.put("scene", scenToUpdate); - parametres.put("pathLayout", projet_.getAbsolutePath()+ File.separator +repertoireLayout); + parametres.put("pathLayout", nomRepertoireLayout); // -- inputstream du xstream --// ObjectInputStream in = null; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <de...@us...> - 2008-10-30 17:06:23
|
Revision: 4115 http://fudaa.svn.sourceforge.net/fudaa/?rev=4115&view=rev Author: deniger Date: 2008-10-30 17:06:20 +0000 (Thu, 30 Oct 2008) Log Message: ----------- Modified Paths: -------------- branches/Prepro-0.92-SNAPSHOT/ctulu/src/org/fudaa/ctulu/CtuluDurationFormatter.java branches/Prepro-0.92-SNAPSHOT/ctulu/src/org/fudaa/ctulu/CtuluLib.java branches/Prepro-0.92-SNAPSHOT/ctulu/src/org/fudaa/ctulu/CtuluLibGeometrie.java branches/Prepro-0.92-SNAPSHOT/ctulu/src/org/fudaa/ctulu/CtuluNumberFormatDefault.java branches/Prepro-0.92-SNAPSHOT/ctulu/src/org/fudaa/ctulu/interpolation/InterpolationVectorContainer.java branches/Prepro-0.92-SNAPSHOT/ctulu/test/org/fudaa/ctulu/TestJCtuluLib.java branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/commun/dodico_en.fr_txt branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/ef/EfElement.java branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/ef/EfNeighborMesh.java branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/ef/EfSegment.java Modified: branches/Prepro-0.92-SNAPSHOT/ctulu/src/org/fudaa/ctulu/CtuluDurationFormatter.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ctulu/src/org/fudaa/ctulu/CtuluDurationFormatter.java 2008-10-30 16:04:39 UTC (rev 4114) +++ branches/Prepro-0.92-SNAPSHOT/ctulu/src/org/fudaa/ctulu/CtuluDurationFormatter.java 2008-10-30 17:06:20 UTC (rev 4115) @@ -31,7 +31,7 @@ private static final String[] FIELDS_NAME = new String[] { CtuluLib.getS("Ann\xE9e"), CtuluLib.getS("Mois"), CtuluLib.getS("Jour"), CtuluLib.getS("Heure"), CtuluLib.getS("Minute"), CtuluLib.getS("Seconde") }; - public final static CtuluNumberFormatI DEFAULT_TIME = CtuluNumberFormatDefault.buildNoneFormatter(1,false); + public final static CtuluNumberFormatI DEFAULT_TIME = CtuluNumberFormatDefault.buildNoneFormatter(1, false); public static String getDesc() { return CtuluLib.getS("Une date est attendue"); @@ -47,7 +47,14 @@ } catch (final NumberFormatException e) { // le test bateau a echoue } - String dur = _str; + if (_str == null) return 0; + String dur = _str.trim(); + if (dur.length() == 0) return 0; + boolean neg = dur.charAt(0) == '-'; + if (neg) { + if (dur.length() == 0) return 0; + dur = dur.substring(1); + } final String minSep = "n"; dur = FuLib.replace(dur, FIELDS_ABBREV_MIN, minSep); final StringTokenizer tok = new StringTokenizer(dur, FIELDS_ABBREV_DAY + FIELDS_ABBREV_HOUR + minSep @@ -65,9 +72,7 @@ continue; } if (nexttok.indexOf(':') > 0) { - if (secDone || minDone || hDone) { - throw new NumberFormatException(_str + " h, min,s alreadydone"); - } + if (secDone || minDone || hDone) { throw new NumberFormatException(_str + " h, min,s alreadydone"); } secDone = true; minDone = true; hDone = true; @@ -91,38 +96,26 @@ if (tok.hasMoreTokens()) { final String abbr = tok.nextToken(); if (abbr.equals(FIELDS_ABBREV_SEC)) { - if (secDone) { - throw new NumberFormatException(_str + " sec alreadydone"); - } + if (secDone) { throw new NumberFormatException(_str + " sec alreadydone"); } secDone = true; multiple = 1; } else if (abbr.equals(minSep)) { multiple = 60; - if (minDone) { - throw new NumberFormatException(_str + " min alreadydone"); - } + if (minDone) { throw new NumberFormatException(_str + " min alreadydone"); } minDone = true; } else if (abbr.equals(FIELDS_ABBREV_HOUR)) { - if (hDone) { - throw new NumberFormatException(_str + " hour alreadydone"); - } + if (hDone) { throw new NumberFormatException(_str + " hour alreadydone"); } multiple = 3600; } else if (abbr.equals(FIELDS_ABBREV_DAY)) { - if (jDone) { - throw new NumberFormatException(_str + " day alreadydone"); - } + if (jDone) { throw new NumberFormatException(_str + " day alreadydone"); } jDone = true; multiple = 3600 * 24; } else if (abbr.equals(FIELDS_ABBREV_MONTH)) { - if (monthDone) { - throw new NumberFormatException(_str + " month alreadydone"); - } + if (monthDone) { throw new NumberFormatException(_str + " month alreadydone"); } monthDone = true; multiple = 3600 * 24 * 30; } else if (abbr.equals(FIELDS_ABBREV_YEAR)) { - if (yearDone) { - throw new NumberFormatException(_str + " year alreadydone"); - } + if (yearDone) { throw new NumberFormatException(_str + " year alreadydone"); } yearDone = true; multiple = 3600 * 24 * 365; } else { @@ -132,7 +125,7 @@ r += multiple * val; } } - return (int) r; + return (int) (neg ? -r : r); } public static CtuluDurationFormatter restoreFromLocalizedPattern(String _s) { @@ -168,9 +161,7 @@ } public boolean equals(final Object _obj) { - if (_obj == this) { - return true; - } + if (_obj == this) { return true; } if (_obj != null) { if (_obj.getClass().equals(getClass())) { final CtuluDurationFormatter fmt = (CtuluDurationFormatter) _obj; @@ -373,13 +364,11 @@ public String toLocalizedPattern() { String res = CtuluNumberFormatBuilder.getPrefixForDate(); if (useMonthYear_) res += "USE_MONTH_DAY_YES"; - else - res += "USE_MONTH_DAY_NO"; + else res += "USE_MONTH_DAY_NO"; res += "|"; if (hms_) { res += "USE_HMS_YES"; - } else - res += "USE_HMS_NO"; + } else res += "USE_HMS_NO"; res += "|"; if (isAlwaysDisplayZero()) { res += "USE_ZERO_YES"; Modified: branches/Prepro-0.92-SNAPSHOT/ctulu/src/org/fudaa/ctulu/CtuluLib.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ctulu/src/org/fudaa/ctulu/CtuluLib.java 2008-10-30 16:04:39 UTC (rev 4114) +++ branches/Prepro-0.92-SNAPSHOT/ctulu/src/org/fudaa/ctulu/CtuluLib.java 2008-10-30 17:06:20 UTC (rev 4115) @@ -34,6 +34,14 @@ return _d < _eps && _d > -_eps; } + public static boolean isEquals(final double _d, final double _d1, final double _eps) { + return isZero(_d - _d1, _eps); + } + + public static boolean isEquals(final double _d, final double _d1) { + return isZero(_d - _d1); + } + public static String getHelpProperty() { return "HELP_URL"; } @@ -69,6 +77,14 @@ r.setGroupingUsed(false); return r; } + + public static DecimalFormat getDecimalFormat(int nbMaxFractionDigits) { + DecimalFormat res=getDecimalFormat(); + res.setMaximumFractionDigits(nbMaxFractionDigits); + return res; + } + + /** * @return true si la locale est egale a "fr". @@ -80,16 +96,14 @@ /** * Permet d'enlever plusieurs indices d'un tableau. Les anciennes valeurs peuvent etre enregistree. Attention, si un * index n'est pas correct cela peut tout fausser. - * + * * @param _init le tableau a modifier * @param _sortedIdx les indices a enlever donner dans l'ordre * @param _removedValues le tableau qui va contenir (si non null et si de meme taille qui _init) les valeurs enlevees. * @return true si toutes les valeurs */ public static boolean removeIdx(final TDoubleArrayList _init, final int[] _sortedIdx, final double[] _removedValues) { - if (_init == null) { - return false; - } + if (_init == null) { return false; } final int n = _init.size(); final double[] newValues = new double[n]; int idx = 0; @@ -120,7 +134,7 @@ /** * Appele le singleton CTULU. - * + * * @param _s la chaine a traduire * @return le chaine traduite par ctulu */ @@ -130,7 +144,7 @@ /** * Appele le singleton CTULU. - * + * * @param _s la chaine a traduire * @param _v1 la chaine remplacant {0} * @return le chaine traduite par ctulu @@ -141,7 +155,7 @@ /** * Appele le singleton CTULU. - * + * * @param _s la chaine a traduire * @param _v1 la chaine remplacant {0} * @param _v2 la chaine remplacant {1} @@ -159,11 +173,11 @@ /** * Retourne vrai si l'application est lanc\xE9 ou d\xE9ploy\xE9 avec Java Web Start + * * @return si l'application est lanc\xE9 ou d\xE9ploy\xE9 avec Java Web Start */ public static boolean isJavaWebStart() { - return (System.getProperty("javawebstart.version")!=null); + return (System.getProperty("javawebstart.version") != null); } - } Modified: branches/Prepro-0.92-SNAPSHOT/ctulu/src/org/fudaa/ctulu/CtuluLibGeometrie.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ctulu/src/org/fudaa/ctulu/CtuluLibGeometrie.java 2008-10-30 16:04:39 UTC (rev 4114) +++ branches/Prepro-0.92-SNAPSHOT/ctulu/src/org/fudaa/ctulu/CtuluLibGeometrie.java 2008-10-30 17:06:20 UTC (rev 4115) @@ -32,12 +32,12 @@ * @return Renvoie la distance entre le point p1(_x1,_y1) et le point p2(_x2,_y2) */ public static double getDistance(final double _x1, final double _y1, final double _x2, final double _y2) { - return Math.sqrt((_x2 - _x1) * (_x2 - _x1) + (_y2 - _y1) * (_y2 - _y1)); + return Math.hypot(_x2 - _x1, _y2 - _y1); } - public static double getDistanceAuCarre(final double _x1, final double _y1, final double _x2, final double _y2) { - return (_x2 - _x1) * (_x2 - _x1) + (_y2 - _y1) * (_y2 - _y1); - } + // public static double getDistanceAuCarre(final double _x1, final double _y1, final double _x2, final double _y2) { + // return (_x2 - _x1) * (_x2 - _x1) + (_y2 - _y1) * (_y2 - _y1); + // } public static double getDistanceXY(final Coordinate _c1, final Coordinate _c2) { return getDistance(_c1.x, _c1.y, _c2.x, _c2.y); @@ -73,14 +73,7 @@ */ public static double distanceFromSegment(final double _segX1, final double _segY1, final double _segX2, final double _segY2, final double _x, final double _y) { - return Math.sqrt(distanceAuCarreFromSegment(_segX1, _segY1, _segX2, _segY2, _x, _y)); - } - - public static double distanceAuCarreFromSegment(final double _segX1, final double _segY1, final double _segX2, - final double _segY2, final double _x, final double _y) { - if ((_segX1 == _segX2) && (_segY1 == _segY2)) { - return getDistanceAuCarre(_segX1, _segY1, _x, _y); - } + if ((_segX1 == _segX2) && (_segY1 == _segY2)) { return getDistance(_segX1, _segY1, _x, _y); } // P1=(_x1,_y1) // P2=(_x2,_y2) // X=thisPoint @@ -90,25 +83,48 @@ // le produit scalaire double p = (_x - _segX1) * (_segX2 - _segX1) + (_y - _segY1) * (_segY2 - _segY1); // si le point est "en dehors" du segment ,on prend la distance X P1 - if (p < 0) { - return getDistanceAuCarre(_x, _y, _segX1, _segY1); - } + if (p < 0) { return getDistance(_x, _y, _segX1, _segY1); } // le produit scalaire/norme de B p = p / ((_segX2 - _segX1) * (_segX2 - _segX1) + (_segY2 - _segY1) * (_segY2 - _segY1)); // si p>1 p est en dehors du segment - if (p > 1) { - return getDistanceAuCarre(_x, _y, _segX2, _segY2); - } + if (p > 1) { return getDistance(_x, _y, _segX2, _segY2); } // le vecteur projete a pour coordonnees PROJ: double projx = p * (_segX2 - _segX1); double projy = p * (_segY2 - _segY1); // le vecteur de norme (on reutilise le variable projx) projx = (_x - _segX1) - projx; projy = (_y - _segY1) - projy; - return projx * projx + projy * projy; + return Math.hypot(projx, projy); } +// public static double distanceAuCarreFromSegment(final double _segX1, final double _segY1, final double _segX2, +// final double _segY2, final double _x, final double _y) { +// if ((_segX1 == _segX2) && (_segY1 == _segY2)) { return getD2(_segX1, _segY1, _x, _y); } +// // P1=(_x1,_y1) +// // P2=(_x2,_y2) +// // X=thisPoint +// // vecteur A=X-P1 +// // vecteur B=P2-P1 +// // On calcule la projection de A sur B +// // le produit scalaire +// double p = (_x - _segX1) * (_segX2 - _segX1) + (_y - _segY1) * (_segY2 - _segY1); +// // si le point est "en dehors" du segment ,on prend la distance X P1 +// if (p < 0) { return getD2(_x, _y, _segX1, _segY1); } +// +// // le produit scalaire/norme de B +// p = p / ((_segX2 - _segX1) * (_segX2 - _segX1) + (_segY2 - _segY1) * (_segY2 - _segY1)); +// // si p>1 p est en dehors du segment +// if (p > 1) { return getD2(_x, _y, _segX2, _segY2); } +// // le vecteur projete a pour coordonnees PROJ: +// double projx = p * (_segX2 - _segX1); +// double projy = p * (_segY2 - _segY1); +// // le vecteur de norme (on reutilise le variable projx) +// projx = (_x - _segX1) - projx; +// projy = (_y - _segY1) - projy; +// return projx * projx + projy * projy; +// } + /** * Tester dans dodico TestMaillage. * @@ -133,7 +149,7 @@ // le vecteur de norme (on reutilise le variable projx) projx = (_x3 - _x1) - projx; projy = (_y3 - _y1) - projy; - return d1d2 * Math.sqrt(projx * projx + projy * projy) / 2; + return d1d2 * Math.hypot(projx, projy) / 2; } /** @@ -149,19 +165,16 @@ public static AffineTransform projection(final Point2D[] _ptImages, final Point2D[] _ptReels) throws IllegalArgumentException { double[] proj = new double[6]; - if (_ptImages == null || _ptReels == null) { - return null; - // double[] projInv = new double[6]; - // double[] m_MatZoom = new double[6]; - // initialiser avec la matrice I - /* - * m_MatZoom[0]=1; m_MatZoom[4]=1; - */ + if (_ptImages == null || _ptReels == null) { return null; + // double[] projInv = new double[6]; + // double[] m_MatZoom = new double[6]; + // initialiser avec la matrice I + /* + * m_MatZoom[0]=1; m_MatZoom[4]=1; + */ } - if ((_ptImages.length != _ptReels.length) || (_ptImages.length < 3)) { - throw new IllegalArgumentException("badData"); - } + if ((_ptImages.length != _ptReels.length) || (_ptImages.length < 3)) { throw new IllegalArgumentException("badData"); } if (_ptImages.length == 3) { try { @@ -170,9 +183,7 @@ - _ptImages[0].getY() * _ptImages[1].getX() + _ptImages[1].getY() * _ptImages[0].getX() + _ptImages[0].getY() * _ptImages[2].getX() - _ptImages[1].getY() * _ptImages[2].getX(); - if (Math.abs(diviseur) < 0.0001) { - throw new Exception("div0"); - } + if (Math.abs(diviseur) < 0.0001) { throw new Exception("div0"); } proj[0] = (float) ((-_ptImages[1].getY() * _ptReels[2].getX() - _ptImages[0].getY() * _ptReels[1].getX() + _ptImages[2].getY() * _ptReels[1].getX() + _ptImages[1].getY() * _ptReels[0].getX() + _ptImages[0].getY() * _ptReels[2].getX() - _ptImages[2].getY() * _ptReels[0].getX()) / diviseur); Modified: branches/Prepro-0.92-SNAPSHOT/ctulu/src/org/fudaa/ctulu/CtuluNumberFormatDefault.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ctulu/src/org/fudaa/ctulu/CtuluNumberFormatDefault.java 2008-10-30 16:04:39 UTC (rev 4114) +++ branches/Prepro-0.92-SNAPSHOT/ctulu/src/org/fudaa/ctulu/CtuluNumberFormatDefault.java 2008-10-30 17:06:20 UTC (rev 4115) @@ -50,8 +50,7 @@ } public static CtuluNumberFormatDefault buildNoneFormatter(int _nbMaxDigits, final boolean _isDecimal) { - NumberFormat fmt = CtuluLib.getDecimalFormat(); - fmt.setMaximumFractionDigits(1); + NumberFormat fmt = CtuluLib.getDecimalFormat(_nbMaxDigits); return new NoneFormater(fmt, _isDecimal); } @@ -70,9 +69,7 @@ } public String format(final double _d) { - if (fmt_ == null) { - return Double.toString(_d); - } + if (fmt_ == null) { return Double.toString(_d); } return fmt_.format(_d); } Modified: branches/Prepro-0.92-SNAPSHOT/ctulu/src/org/fudaa/ctulu/interpolation/InterpolationVectorContainer.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ctulu/src/org/fudaa/ctulu/interpolation/InterpolationVectorContainer.java 2008-10-30 16:04:39 UTC (rev 4114) +++ branches/Prepro-0.92-SNAPSHOT/ctulu/src/org/fudaa/ctulu/interpolation/InterpolationVectorContainer.java 2008-10-30 17:06:20 UTC (rev 4115) @@ -94,18 +94,14 @@ } public static double getNorme(double _vx, double _vy) { - return Math.sqrt(_vx * _vx + _vy * _vy); + return Math.hypot(_vx, _vy); } public static double getTheta(double _vx, double _vy) { double n = getNorme(_vx, _vy); if (CtuluLib.isZero(n)) return 0; - if (CtuluLib.isZero(_vx)) { - return CtuluLib.getSign(_vy) * Math.PI / 2; - } - if (CtuluLib.isZero(_vy)) { - return _vx >= 0 ? 0 : Math.PI; - } + if (CtuluLib.isZero(_vx)) { return CtuluLib.getSign(_vy) * Math.PI / 2; } + if (CtuluLib.isZero(_vy)) { return _vx >= 0 ? 0 : Math.PI; } double theta = Math.atan(_vy / _vx); return _vx > 0 ? theta : (CtuluLib.getSign(_vy) * Math.PI + theta); } Modified: branches/Prepro-0.92-SNAPSHOT/ctulu/test/org/fudaa/ctulu/TestJCtuluLib.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ctulu/test/org/fudaa/ctulu/TestJCtuluLib.java 2008-10-30 16:04:39 UTC (rev 4114) +++ branches/Prepro-0.92-SNAPSHOT/ctulu/test/org/fudaa/ctulu/TestJCtuluLib.java 2008-10-30 17:06:20 UTC (rev 4115) @@ -63,8 +63,13 @@ } } - - public void testTrimRight(){ + + public void testAireTriangle() { + double aireTriangle = CtuluLibGeometrie.aireTriangle(0, 0, 2, 0, 1, 1); + assertEquals(1, aireTriangle, 1e-5); + } + + public void testTrimRight() { assertEquals(CtuluLibString.EMPTY_STRING, CtuluLibString.trimRight("")); assertEquals(CtuluLibString.EMPTY_STRING, CtuluLibString.trimRight(" ")); assertEquals("5", CtuluLibString.trimRight("5 ")); @@ -190,14 +195,13 @@ finalString = CtuluLibString.adjustSizeBefore(7, init); assertEquals(esp + init, finalString); } - - public void testToString(){ - File fzip=new File("/tmp/toto.zip"); - File fgz=CtuluLibFile.changeExtension(fzip,"gz"); - assertEquals("/tmp/toto.gz",fgz.getAbsolutePath()); + + public void testToString() { + File fzip = new File("/tmp/toto.zip"); + File fgz = CtuluLibFile.changeExtension(fzip, "gz"); + assertEquals("/tmp/toto.gz", fgz.getAbsolutePath()); } - public void testZip() { final String name = getToto(); try { Modified: branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/commun/dodico_en.fr_txt =================================================================== --- branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/commun/dodico_en.fr_txt 2008-10-30 16:04:39 UTC (rev 4114) +++ branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/commun/dodico_en.fr_txt 2008-10-30 17:06:20 UTC (rev 4115) @@ -140,4 +140,6 @@ Des conditions limites ont \xE9t\xE9 cr\xE9\xE9es par d\xE9faut=Some boundary conditions have been initialized with default values Les indices sont dans le fichier de log=The index are added to the log file Des ar\xEAtes sont mal d\xE9finies\: indice global du point invalide=Some edges are not valid\: global index is wrong -Variables=Variables \ No newline at end of file +Variables=Variables +Le premier pas de temps n'appartient pas \xE0 la simulation=The simulation doesn't contain the first time step +La dur\xE9e d'int\xE9gration d\xE9passe la dur\xE9e de la simulation=The integration duration overlaps the duration of the simulation Modified: branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/ef/EfElement.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/ef/EfElement.java 2008-10-30 16:04:39 UTC (rev 4114) +++ branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/ef/EfElement.java 2008-10-30 17:06:20 UTC (rev 4115) @@ -934,12 +934,12 @@ _support.getPtY(next), _x, _y); } - public double getAreteDistAuCarreFrom(final int _idx, final double _x, final double _y, final EfGridInterface _support) { - final int idx = ptIndex_[_idx]; - final int next = ptIndex_[(_idx + 1) % ptIndex_.length]; - return CtuluLibGeometrie.distanceAuCarreFromSegment(_support.getPtX(idx), _support.getPtY(idx), _support - .getPtX(next), _support.getPtY(next), _x, _y); - } +// public double getAreteDistAuCarreFrom(final int _idx, final double _x, final double _y, final EfGridInterface _support) { +// final int idx = ptIndex_[_idx]; +// final int next = ptIndex_[(_idx + 1) % ptIndex_.length]; +// return CtuluLibGeometrie.distanceAuCarreFromSegment(_support.getPtX(idx), _support.getPtY(idx), _support +// .getPtX(next), _support.getPtY(next), _x, _y); +// } public double getDist(final double _x, final double _y, final EfGridInterface _support) { double d2 = getAreteDistFrom(0, _x, _y, _support); @@ -952,16 +952,16 @@ return d2; } - public double getDistAuCarre(final double _x, final double _y, final EfGridInterface _support) { - double d2 = getAreteDistAuCarreFrom(0, _x, _y, _support); - for (int i = ptIndex_.length - 1; i > 0; i--) { - final double dTemp = getAreteDistAuCarreFrom(i, _x, _y, _support); - if (dTemp < d2) { - d2 = dTemp; - } - } - return d2; - } +// public double getDistAuCarre(final double _x, final double _y, final EfGridInterface _support) { +// double d2 = getAreteDistAuCarreFrom(0, _x, _y, _support); +// for (int i = ptIndex_.length - 1; i > 0; i--) { +// final double dTemp = getAreteDistAuCarreFrom(i, _x, _y, _support); +// if (dTemp < d2) { +// d2 = dTemp; +// } +// } +// return d2; +// } /** * Optimisation maillage T6. Modified: branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/ef/EfNeighborMesh.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/ef/EfNeighborMesh.java 2008-10-30 16:04:39 UTC (rev 4114) +++ branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/ef/EfNeighborMesh.java 2008-10-30 17:06:20 UTC (rev 4115) @@ -170,8 +170,8 @@ public double getAverageForNode(final CtuluVariable _var, final int _idxPt, final int _tIdx, final EfData _dataElement, EfGridDataInterpolator _datas) { - if (_datas.getInterpolator().getVect().isVect(_var)) { return getAverageForVect(_var, _idxPt, _tIdx, _dataElement, - _datas.getGridData(), _datas.getInterpolator().getVect()); + if (_datas.getVect().isVect(_var)) { return getAverageForVect(_var, _idxPt, _tIdx, _dataElement, _datas.getData(), + _datas.getVect()); } return getAverageForNodeDanger(_idxPt, _dataElement); @@ -184,8 +184,8 @@ public double getAverageForNode(final CtuluVariable _var, final int _idxPt, final int _tIdx, EfGridDataInterpolator _dataI) { - return getAverageForNode(_var, _idxPt, new EfGridDataInterpolationValuesAdapter(_dataI.getGridData(), _tIdx), - _dataI.getInterpolator().getVect()); + return getAverageForNode(_var, _idxPt, new EfGridDataInterpolationValuesAdapter(_dataI.getData(), _tIdx), _dataI + .getVect()); } public double getAverageForNode(final CtuluVariable _var, final int _idxPt, InterpolationSupportValuesMultiI _datas, Modified: branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/ef/EfSegment.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/ef/EfSegment.java 2008-10-30 16:04:39 UTC (rev 4114) +++ branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/ef/EfSegment.java 2008-10-30 17:06:20 UTC (rev 4115) @@ -87,9 +87,7 @@ } public double getNorme(final EfGridInterface _support) { - final double vx = getVx(_support); - final double vy = getVy(_support); - return Math.sqrt(vx * vx + vy * vy); + return Math.hypot(getVx(_support) ,getVy(_support)); } public double getCentreX(final EfGridInterface _support) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <de...@us...> - 2008-11-02 01:09:20
|
Revision: 4149 http://fudaa.svn.sourceforge.net/fudaa/?rev=4149&view=rev Author: deniger Date: 2008-11-02 01:09:08 +0000 (Sun, 02 Nov 2008) Log Message: ----------- Modified Paths: -------------- branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/ef/operation/EfTrajectoireGridDataProvider.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/graphe/EbliWidgetGraphe.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/tree/EbliWidgetTreeTableNode.java Added Paths: ----------- branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/ef/decorator/EfGridDataCacheSoftReferenceDecorator.java Removed Paths: ------------- branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/ef/decorator/EfGridDataCacheWeakDecorator.java Copied: branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/ef/decorator/EfGridDataCacheSoftReferenceDecorator.java (from rev 4135, branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/ef/decorator/EfGridDataCacheWeakDecorator.java) =================================================================== --- branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/ef/decorator/EfGridDataCacheSoftReferenceDecorator.java (rev 0) +++ branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/ef/decorator/EfGridDataCacheSoftReferenceDecorator.java 2008-11-02 01:09:08 UTC (rev 4149) @@ -0,0 +1,130 @@ +/** + * Licence GPL + * Copyright Genesis + */ +package org.fudaa.dodico.ef.decorator; + +import gnu.trove.TIntObjectHashMap; + +import java.io.IOException; +import java.lang.ref.SoftReference; +import java.util.HashMap; +import java.util.Map; + +import org.fudaa.ctulu.CtuluVariable; +import org.fudaa.dodico.ef.EfData; +import org.fudaa.dodico.ef.EfGridData; +import org.fudaa.dodico.ef.EfGridInterface; + +import com.memoire.fu.FuLog; + +/** + * Un decorateur permettant de cacher des donnees. Utilise des SoftReference pour les datas pour eviter d'encombrer la + * memoire + * + * @author deniger + */ +public class EfGridDataCacheSoftReferenceDecorator implements EfGridData { + + final EfGridData init_; + + int maxSize_ = 10; + + TIntObjectHashMap timeMap_ = new TIntObjectHashMap((int) (maxSize_ / 0.75)); + + public EfGridDataCacheSoftReferenceDecorator(EfGridData _init) { + super(); + init_ = _init; + } + + @SuppressWarnings("unchecked") + protected EfData getCachedData(CtuluVariable _o, int _timeIdx) { + Map<CtuluVariable, SoftReference<EfData>> res = (Map<CtuluVariable, SoftReference<EfData>>) timeMap_.get(_timeIdx); + if (res == null) return null; + SoftReference<EfData> reference = res.get(_o); + EfData efData = reference == null ? null : reference.get(); + if (FuLog.isDebug()) { + + FuLog.debug("EfGridDataCacheDecorator getDataFrom cache for " + _o + " " + _timeIdx + " found " + + (efData != null)); + + } + return efData; + + } + + public EfData getData(CtuluVariable _o, int _timeIdx) throws IOException { + EfData data = getCachedData(_o, _timeIdx); + // en cache: on renvoie + if (data != null) return data; + data = init_.getData(_o, _timeIdx); + if (data != null) setCachedData(_o, _timeIdx, data); + return data; + } + + public double getData(CtuluVariable _o, int _timeIdx, int _idxObjet) throws IOException { + EfData data = getCachedData(_o, _timeIdx); + if (data != null) return data.getValue(_idxObjet); + return init_.getData(_o, _timeIdx, _idxObjet); + } + + /** + * @return + * @see org.fudaa.dodico.ef.EfGridData#getGrid() + */ + public EfGridInterface getGrid() { + return init_.getGrid(); + } + + /** + * @return the maxSize + */ + public int getMaxSize() { + return maxSize_; + } + + /** + * @param _var + * @return + * @see org.fudaa.dodico.ef.EfGridData#isDefined(org.fudaa.ctulu.CtuluVariable) + */ + public boolean isDefined(CtuluVariable _var) { + return init_.isDefined(_var); + } + + /** + * @param _idxVar + * @return + * @see org.fudaa.dodico.ef.EfGridData#isElementVar(org.fudaa.ctulu.CtuluVariable) + */ + public boolean isElementVar(CtuluVariable _idxVar) { + return init_.isElementVar(_idxVar); + } + + @SuppressWarnings("unchecked") + protected void setCachedData(CtuluVariable _o, int _timeIdx, EfData _data) { + Map<CtuluVariable, SoftReference<EfData>> res = (Map<CtuluVariable, SoftReference<EfData>>) timeMap_.get(_timeIdx); + if (res == null) { + // on reduit la map + // if (timeMap_.size() > maxSize_) { + // int[] keys = timeMap_.keys(); + // Arrays.sort(keys); + // timeMap_.remove(keys[0]); + // } + res = new HashMap<CtuluVariable, SoftReference<EfData>>(10); + timeMap_.put(_timeIdx, res); + } + res.put(_o, new SoftReference<EfData>(_data)); + + } + + /** + * La taille max du nombre de pas de pour lesquels on veut cacher les donnees + * + * @param _maxSize the maxSize to set + */ + public void setMaxSize(int _maxSize) { + maxSize_ = _maxSize; + } + +} Property changes on: branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/ef/decorator/EfGridDataCacheSoftReferenceDecorator.java ___________________________________________________________________ Added: svn:mergeinfo + Deleted: branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/ef/decorator/EfGridDataCacheWeakDecorator.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/ef/decorator/EfGridDataCacheWeakDecorator.java 2008-11-02 00:42:09 UTC (rev 4148) +++ branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/ef/decorator/EfGridDataCacheWeakDecorator.java 2008-11-02 01:09:08 UTC (rev 4149) @@ -1,131 +0,0 @@ -/** - * Licence GPL - * Copyright Genesis - */ -package org.fudaa.dodico.ef.decorator; - -import gnu.trove.TIntObjectHashMap; - -import java.io.IOException; -import java.lang.ref.WeakReference; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; - -import org.fudaa.ctulu.CtuluVariable; -import org.fudaa.dodico.ef.EfData; -import org.fudaa.dodico.ef.EfGridData; -import org.fudaa.dodico.ef.EfGridInterface; - -import com.memoire.fu.FuLog; - -/** - * Un decorateur permettant de cacher des donnees. Utilise des WeakReference pour les datas pour eviter d'encombrer la - * memoire - * - * @author deniger - */ -public class EfGridDataCacheWeakDecorator implements EfGridData { - - final EfGridData init_; - - int maxSize_ = 10; - - TIntObjectHashMap timeMap_ = new TIntObjectHashMap((int) (maxSize_ / 0.75)); - - public EfGridDataCacheWeakDecorator(EfGridData _init) { - super(); - init_ = _init; - } - - @SuppressWarnings("unchecked") - protected EfData getCachedData(CtuluVariable _o, int _timeIdx) { - Map<CtuluVariable, WeakReference<EfData>> res = (Map<CtuluVariable, WeakReference<EfData>>) timeMap_.get(_timeIdx); - if (res == null) return null; - WeakReference<EfData> reference = res.get(_o); - EfData efData = reference == null ? null : reference.get(); - if (FuLog.isDebug()) { - - FuLog.debug("EfGridDataCacheDecorator getDataFrom cache for " + _o + " " + _timeIdx + " found " - + (efData != null)); - - } - return efData; - - } - - public EfData getData(CtuluVariable _o, int _timeIdx) throws IOException { - EfData data = getCachedData(_o, _timeIdx); - // en cache: on renvoie - if (data != null) return data; - data = init_.getData(_o, _timeIdx); - if (data != null) setCachedData(_o, _timeIdx, data); - return data; - } - - public double getData(CtuluVariable _o, int _timeIdx, int _idxObjet) throws IOException { - EfData data = getCachedData(_o, _timeIdx); - if (data != null) return data.getValue(_idxObjet); - return init_.getData(_o, _timeIdx, _idxObjet); - } - - /** - * @return - * @see org.fudaa.dodico.ef.EfGridData#getGrid() - */ - public EfGridInterface getGrid() { - return init_.getGrid(); - } - - /** - * @return the maxSize - */ - public int getMaxSize() { - return maxSize_; - } - - /** - * @param _var - * @return - * @see org.fudaa.dodico.ef.EfGridData#isDefined(org.fudaa.ctulu.CtuluVariable) - */ - public boolean isDefined(CtuluVariable _var) { - return init_.isDefined(_var); - } - - /** - * @param _idxVar - * @return - * @see org.fudaa.dodico.ef.EfGridData#isElementVar(org.fudaa.ctulu.CtuluVariable) - */ - public boolean isElementVar(CtuluVariable _idxVar) { - return init_.isElementVar(_idxVar); - } - - @SuppressWarnings("unchecked") - protected void setCachedData(CtuluVariable _o, int _timeIdx, EfData _data) { - Map<CtuluVariable, WeakReference<EfData>> res = (Map<CtuluVariable, WeakReference<EfData>>) timeMap_.get(_timeIdx); - if (res == null) { - // on reduit la map - // if (timeMap_.size() > maxSize_) { - // int[] keys = timeMap_.keys(); - // Arrays.sort(keys); - // timeMap_.remove(keys[0]); - // } - res = new HashMap<CtuluVariable, WeakReference<EfData>>(10); - timeMap_.put(_timeIdx, res); - } - res.put(_o, new WeakReference<EfData>(_data)); - - } - - /** - * La taille max du nombre de pas de pour lesquels on veut cacher les donnees - * - * @param _maxSize the maxSize to set - */ - public void setMaxSize(int _maxSize) { - maxSize_ = _maxSize; - } - -} Modified: branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/ef/operation/EfTrajectoireGridDataProvider.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/ef/operation/EfTrajectoireGridDataProvider.java 2008-11-02 00:42:09 UTC (rev 4148) +++ branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/ef/operation/EfTrajectoireGridDataProvider.java 2008-11-02 01:09:08 UTC (rev 4149) @@ -8,7 +8,7 @@ import org.fudaa.dodico.ef.EfGridData; import org.fudaa.dodico.ef.EfGridInterface; import org.fudaa.dodico.ef.decorator.EfGridDataCacheOneTimeDecorator; -import org.fudaa.dodico.ef.decorator.EfGridDataCacheWeakDecorator; +import org.fudaa.dodico.ef.decorator.EfGridDataCacheSoftReferenceDecorator; import org.fudaa.dodico.ef.decorator.EfGridDataTimeDecorator; /** @@ -48,7 +48,7 @@ public Trajectoire(double[] _initTimeStep, EfGridData _init) { super(); - init_ = new EfGridDataCacheWeakDecorator(_init); + init_ = new EfGridDataCacheSoftReferenceDecorator(_init); initTimeStep_ = _initTimeStep; } Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/graphe/EbliWidgetGraphe.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/graphe/EbliWidgetGraphe.java 2008-11-02 00:42:09 UTC (rev 4148) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/graphe/EbliWidgetGraphe.java 2008-11-02 01:09:08 UTC (rev 4149) @@ -14,7 +14,10 @@ import org.fudaa.ctulu.image.CtuluLibImage; import org.fudaa.ebli.animation.EbliAnimatedInterface; +import org.fudaa.ebli.animation.EbliAnimationAdapterInterface; +import org.fudaa.ebli.calque.BCalque; import org.fudaa.ebli.courbe.EGAxe; +import org.fudaa.ebli.courbe.EGCourbe; import org.fudaa.ebli.courbe.EGFillePanel; import org.fudaa.ebli.courbe.EGGraphe; import org.fudaa.ebli.courbe.EGGrapheModelListener; @@ -23,6 +26,8 @@ import org.fudaa.ebli.visuallibrary.EbliNodeDefault; import org.fudaa.ebli.visuallibrary.EbliScene; import org.fudaa.ebli.visuallibrary.EbliWidget; +import org.fudaa.ebli.visuallibrary.animation.EbliWidgetAnimatedItem; +import org.geotools.xml.xsi.XSISimpleTypes.Int; import org.netbeans.api.visual.action.InplaceEditorProvider; import org.netbeans.api.visual.widget.Widget; @@ -43,7 +48,7 @@ public EGFillePanel getPanelGraphe() { return panelGraphe_; } - + BuPanel conteneurEditor; private EbliNodeDefault nodeLegende = null; @@ -51,16 +56,41 @@ public EbliNodeDefault getNodeLegende() { return nodeLegende; } - - public EbliAnimatedInterface getAnimatedInterface() { if (panelGraphe_ instanceof EbliAnimatedInterface) return (EbliAnimatedInterface) panelGraphe_; return null; } + @Override + public List<EbliWidgetAnimatedItem> getAnimatedItems() { + final EGCourbe[] cqs = panelGraphe_.getGraphe().getModel().getCourbes(); + final List<EbliWidgetAnimatedItem> res = new ArrayList<EbliWidgetAnimatedItem>(20); + for (int i = 0; i < cqs.length; i++) { + EGCourbe courbe = cqs[i]; + if (courbe.isVisible() && courbe instanceof EbliAnimationAdapterInterface) { + res.add(new EbliWidgetAnimatedItem((EbliAnimationAdapterInterface) courbe, courbe, getId(), getAnimId(courbe), + courbe.getTitle())); + } + } + return res; + } + private String getAnimId(EGCourbe courbe) { + return courbe.hashCode() + courbe.getTitle(); + } + @Override + public boolean isAnimatedItemAlive(final String _id) { + if(_id==null) return false; + final EGCourbe[] cqs = panelGraphe_.getGraphe().getModel().getCourbes(); + for (int i = 0; i < cqs.length; i++) { + EGCourbe courbe = cqs[i]; + if(_id.equals(getAnimId(courbe))) return true; + } + return false; + } + public void setNodeLegende(final EbliNodeDefault node) { nodeLegende = node; } @@ -77,7 +107,7 @@ // this.graphe_ = graphe; // } EbliWidgetControllerGraphe controllerGraphe_; - + public EbliWidgetGraphe(final EbliScene scene, final Point preferredLocation, final EGFillePanel _pn) { super(scene); panelGraphe_ = _pn; @@ -117,24 +147,24 @@ final Rectangle rec = getClientArea(); final Graphics2D g = getGraphics(); // g.translate(rec.x, rec.y); - if(rec.width>0 && rec.height>0){ - if (frame_ == null) { - getGraphe().setSize(rec.width - 1, rec.height - 1); - // getGraphe().computeMarges(g); - // getGraphe().dessine(g, rec.width - 1, rec.height - 1, false); - } + if (rec.width > 0 && rec.height > 0) { + if (frame_ == null) { + getGraphe().setSize(rec.width - 1, rec.height - 1); + // getGraphe().computeMarges(g); + // getGraphe().dessine(g, rec.width - 1, rec.height - 1, false); + } - // mode edition - if (imageGraphe == null || imageGraphe.getWidth() != rec.width || imageGraphe.getHeight() != rec.height) { - FuLog.debug("EWI: recreate image"); - final Map params = new HashMap(); - CtuluLibImage.setCompatibleImageAsked(params); + // mode edition + if (imageGraphe == null || imageGraphe.getWidth() != rec.width || imageGraphe.getHeight() != rec.height) { + FuLog.debug("EWI: recreate image"); + final Map params = new HashMap(); + CtuluLibImage.setCompatibleImageAsked(params); - imageGraphe = getGraphe().produceImage(rec.width - 1, rec.height - 1, params); + imageGraphe = getGraphe().produceImage(rec.width - 1, rec.height - 1, params); + } + g.drawImage(imageGraphe, rec.x, rec.y, rec.width - 1, rec.height - 1, null); } - g.drawImage(imageGraphe, rec.x, rec.y, rec.width - 1, rec.height - 1, null); - } // g.translate(-rec.x, -rec.y); } @@ -285,14 +315,12 @@ } public boolean hasSattelite() { - if (controllerGraphe_.hasLegende()) - return true; + if (controllerGraphe_.hasLegende()) return true; return false; } public List<EbliWidget> getSattelite() { - if (!hasSattelite()) - return null; + if (!hasSattelite()) return null; List<EbliWidget> liste = new ArrayList<EbliWidget>(); liste.add(getNodeLegende().getWidget()); @@ -300,17 +328,15 @@ return liste; } - + public void setSattelite(List<EbliWidget> liste) { - if(liste.size()<=0) - return; - - EbliWidget widg=liste.get(0); - - EbliNodeDefault node= (EbliNodeDefault) getEbliScene().findObject(widg); - setNodeLegende( node); - - + if (liste.size() <= 0) return; + + EbliWidget widg = liste.get(0); + + EbliNodeDefault node = (EbliNodeDefault) getEbliScene().findObject(widg); + setNodeLegende(node); + } - + } Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/tree/EbliWidgetTreeTableNode.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/tree/EbliWidgetTreeTableNode.java 2008-11-02 00:42:09 UTC (rev 4148) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/tree/EbliWidgetTreeTableNode.java 2008-11-02 01:09:08 UTC (rev 4149) @@ -1,6 +1,7 @@ package org.fudaa.ebli.visuallibrary.tree; import java.util.ArrayList; +import java.util.List; import org.fudaa.ctulu.CtuluCommandContainer; import org.fudaa.ebli.visuallibrary.EbliNode; @@ -33,7 +34,9 @@ static void addChilds(final ObjectScene _sc, final Widget w, final EbliWidgetTreeTableNode parent, final EbliNode parentNode) { - for (final Widget child : w.getChildren()) { + List<Widget> children = w.getChildren(); + for (int i = children.size() - 1; i >= 0; i--) { + Widget child = children.get(i); final EbliNode n = (EbliNode) _sc.findObject(child); if (n != null && n != parentNode) { final EbliWidgetTreeTableNode treeNode = new EbliWidgetTreeTableNode(n); @@ -94,7 +97,7 @@ // -- cas particulier si il s agit d un calque ou d un graphe, on masque // aussi - + if ((((EbliNode) getUserObject()).getWidget()) instanceof EbliWidgetBordureSingle && (((EbliNode) getUserObject()).getWidget()).getChildren() != null) { @@ -102,16 +105,16 @@ final EbliWidgetVueCalque wid = (EbliWidgetVueCalque) (((EbliNode) getUserObject()).getWidget()) .getChildren().get(0); if (((EbliWidgetControllerCalque) wid.getController()).hasLegende()) { - wid.nodeLegende.getWidget().setVisible(((Boolean) _value).booleanValue()); - listeWidgetUndo.add(wid.nodeLegende.getWidget()); + wid.nodeLegende.getWidget().setVisible(((Boolean) _value).booleanValue()); + listeWidgetUndo.add(wid.nodeLegende.getWidget()); } } else if ((((EbliNode) getUserObject()).getWidget()).getChildren().get(0) instanceof EbliWidgetGraphe) { final EbliWidgetGraphe wid = (EbliWidgetGraphe) (((EbliNode) getUserObject()).getWidget()).getChildren() .get(0); if (((EbliWidgetControllerGraphe) wid.getController()).hasLegende()) { - wid.getNodeLegende().getWidget().setVisible(((Boolean) _value).booleanValue()); - listeWidgetUndo.add(wid.getNodeLegende().getWidget()); + wid.getNodeLegende().getWidget().setVisible(((Boolean) _value).booleanValue()); + listeWidgetUndo.add(wid.getNodeLegende().getWidget()); } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <had...@us...> - 2008-10-27 19:49:42
|
Revision: 4101 http://fudaa.svn.sourceforge.net/fudaa/?rev=4101&view=rev Author: hadouxad Date: 2008-10-27 19:49:31 +0000 (Mon, 27 Oct 2008) Log Message: ----------- Plusieurs mise a jours dont celles ci - Syst?\195?\168me de d?\195?\169placement revue; notion de frame sattelite qui se d?\195?\169place en effectuant la m?\195?\170me translation que leur widget parente. - Syst?\195?\168me de zoom ok: lors de la fusion, le zoom du calque initial est conserv?\195?\169. - Correction de plusieurs bugs Modified Paths: -------------- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliSceneController.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidget.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetBordureSingle.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetController.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetControllerForGroup.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/actions/CommandSupprimer.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/actions/CommandeChangeWidgetScene.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/actions/CommandeDuplicate.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/actions/EbliWidgetActionDuplicate.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/actions/EbliWidgetGroupAction.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetControllerCalque.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetCreatorVueCalque.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetFusionCalques.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetVueCalque.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/graphe/EbliWidgetControllerGraphe.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/graphe/EbliWidgetGraphe.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/resizestrategy/EbliWidgetActionFactory.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostLayoutFille.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/actions/TrPostActionChangeSceneForWidget.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/actions/TrPostActionFusionCalques.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/dialogSpec/TrPostWizardCourbeTemporelle.java Added Paths: ----------- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/resizestrategy/EbliAlignWithMoveStrategyProvider.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/resizestrategy/MoveAction.java Removed Paths: ------------- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/actions/EbliAlignWithMoveStrategyProvider.java Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliSceneController.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliSceneController.java 2008-10-27 13:11:41 UTC (rev 4100) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliSceneController.java 2008-10-27 19:49:31 UTC (rev 4101) @@ -7,7 +7,7 @@ import javax.swing.JScrollPane; import javax.swing.ListSelectionModel; -import org.fudaa.ebli.visuallibrary.actions.EbliAlignWithMoveStrategyProvider; +import org.fudaa.ebli.visuallibrary.resizestrategy.EbliAlignWithMoveStrategyProvider; import org.fudaa.ebli.visuallibrary.resizestrategy.EbliWidgetActionFactory; import org.fudaa.ebli.visuallibrary.tree.EbliJXTreeTableCellRenderer; import org.jdesktop.swingx.JXTreeTable; @@ -50,7 +50,7 @@ .getVisu(), false); final EbliAlignWithMoveStrategyProvider sp = new EbliAlignWithMoveStrategyProvider(widgetCollector, scene_ .getInteractionLayer(), ActionFactory.createDefaultAlignWithMoveDecorator(), false); - alignWithMoveAction = ActionFactory.createMoveAction(sp, sp); + alignWithMoveAction = EbliWidgetActionFactory.createMoveAction(sp, sp); // alignWithResizeAction = // ActionFactory.createAlignWithResizeAction(scene_.getVisu(), Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidget.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidget.java 2008-10-27 13:11:41 UTC (rev 4100) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidget.java 2008-10-27 19:49:31 UTC (rev 4101) @@ -521,5 +521,22 @@ if (isGrouped()) return ((EbliWidget) this.getParentBordure().getParentWidget()).getId(); else return EbliWidgetGroup.NOGROUP; } + + + /** + * Methode qui indique si lq widget a des sattelites, ie des widgets qui + * doivent etre deplacees avec. + * + * @return + */ + public boolean hasSattelite() { + return false; + } + + public List<EbliWidget> getSattelite() { + return null; + } + + } \ No newline at end of file Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetBordureSingle.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetBordureSingle.java 2008-10-27 13:11:41 UTC (rev 4100) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetBordureSingle.java 2008-10-27 19:49:31 UTC (rev 4101) @@ -259,5 +259,12 @@ public boolean canFont() { return intern_.canFont(); } + public boolean hasSattelite() { + return intern_.hasSattelite(); + } + public List<EbliWidget> getSattelite() { + return intern_.getSattelite(); + } + } Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetController.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetController.java 2008-10-27 13:11:41 UTC (rev 4100) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetController.java 2008-10-27 19:49:31 UTC (rev 4101) @@ -98,7 +98,7 @@ } - private void constructMenuDupliquer(final JPopupMenu _popup, final CtuluCommandContainer cmd_) { + protected void constructMenuDupliquer(final JPopupMenu _popup, final CtuluCommandContainer cmd_) { final JMenuItem menuItem1 = _popup.add(EbliResource.EBLI.getString("Dupliquer la frame")); menuItem1.setIcon(CtuluResource.CTULU.getIcon("crystal_cascade")); menuItem1.addActionListener(new ActionListener() { @@ -106,7 +106,7 @@ public void actionPerformed(final ActionEvent e) { // -- liste des nodes candidats pour le UNdo/redo --// ArrayList<EbliNode> listeNodeUndo = new ArrayList<EbliNode>(); - duplication(listeNodeUndo); + duplication(listeNodeUndo, widget_.getEbliScene()); cmd_.addCmd(new CommandeDuplicate(listeNodeUndo, widget_.getEbliScene())); } @@ -118,7 +118,7 @@ * * @return le node duplique */ - public EbliNode duplication(final ArrayList<EbliNode> listeNodeUndo) { + public EbliNode duplication(final ArrayList<EbliNode> listeNodeUndo, EbliScene sceneDestination) { // -- recuperation du node a dupliquer --// final EbliNode n = (EbliNode) widget_.getEbliScene().findObject(widget_); @@ -129,8 +129,8 @@ // duplique.setPreferedLocation(nouvellePosition); // -- ajout dans la scene --// - if (duplique != null && widget_.getScene() != null) { - widget_.getEbliScene().addNode(duplique); + if (duplique != null && sceneDestination != null) { + sceneDestination.addNode(duplique); // -- duplication des map de property graphique de la widget --// duplique.getWidget().propGraphique = n.getWidget().duplicateGraphicalProperties(); @@ -143,6 +143,7 @@ // -- raffraichissement de la scene --// widget_.getEbliScene().refresh(); + sceneDestination.refresh(); } postActionDuplication(n, duplique); @@ -237,7 +238,7 @@ } - private void constructMenuSupprimer(final JPopupMenu _popup, final CtuluCommandContainer cmd_) { + protected void constructMenuSupprimer(final JPopupMenu _popup, final CtuluCommandContainer cmd_) { final JMenuItem menuItem = _popup.add(EbliResource.EBLI.getString("Supprimer la frame")); menuItem.setIcon(CtuluResource.CTULU.getIcon("crystal_non")); menuItem.addActionListener(new ActionListener() { Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetControllerForGroup.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetControllerForGroup.java 2008-10-27 13:11:41 UTC (rev 4100) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetControllerForGroup.java 2008-10-27 19:49:31 UTC (rev 4101) @@ -4,9 +4,17 @@ */ package org.fudaa.ebli.visuallibrary; +import java.awt.Point; +import java.util.ArrayList; +import java.util.List; + import javax.swing.JPopupMenu; +import org.fudaa.ctulu.CtuluCommand; +import org.fudaa.ebli.visuallibrary.actions.CommandeDuplicate; +import org.fudaa.ebli.visuallibrary.actions.EbliWidgetGroupAction; import org.fudaa.ebli.visuallibrary.actions.EbliWidgetUngroupAction; +import org.netbeans.api.visual.widget.Widget; /** * @author deniger @@ -31,4 +39,50 @@ final EbliNode n = (EbliNode) getWidget().getEbliScene().findObject(getWidget()); _menu.add(new EbliWidgetUngroupAction(getWidget().getEbliScene(), n, isFusionCalque)); } + + /** + * Duplication de groupe. + */ + public EbliNode duplication(final ArrayList<EbliNode> listeNodeUndo, final EbliScene sceneDestination) { + final ArrayList<EbliNode> nodeToGroup = new ArrayList<EbliNode>(); + final List<Widget> children = new ArrayList<Widget>(widget_.getIntern().getChildren()); + for (final Widget widget : children) { + final Point p = widget.getLocation(); + final Point toScene = widget_.convertLocalToScene(p); + final EbliNode n = (EbliNode) widget_.getEbliScene().findObject(widget); + + // -- duplication du node dans la scene --// + EbliNode duplic = n.duplicate(null); + // listeNodeUndo.add(duplic); + + duplic.setPreferedSize(widget.getPreferredSize()); + nodeToGroup.add(duplic); + final Point nouvellePosition = new Point(toScene.x, (toScene.y + widget_.getIntern().getClientArea().height)); + duplic.setPreferedLocation(nouvellePosition); + sceneDestination.addNode(duplic); + sceneDestination.refresh(); + } + + // -- on rejoue un groupement des node a grouper --// + final EbliNode nodeGroup = new EbliWidgetGroupAction(sceneDestination).groupWidgets(nodeToGroup); + // listeNodeUndo.add(nodeGroup); + + // -- undo global --// + sceneDestination.getCmdMng().addCmd(new CtuluCommand() { + + public void undo() { + EbliWidgetUngroupAction.degroupObjects(sceneDestination, nodeGroup); + new CommandeDuplicate(nodeToGroup, widget_.getEbliScene()).undo(); + } + + public void redo() { + new CommandeDuplicate(nodeToGroup, widget_.getEbliScene()).redo(); + new EbliWidgetGroupAction(sceneDestination).groupWidgets(nodeToGroup); + } + }); + + + return nodeGroup; + } + } Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/actions/CommandSupprimer.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/actions/CommandSupprimer.java 2008-10-27 13:11:41 UTC (rev 4100) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/actions/CommandSupprimer.java 2008-10-27 19:49:31 UTC (rev 4101) @@ -6,7 +6,12 @@ import org.fudaa.ctulu.CtuluCommand; import org.fudaa.ebli.visuallibrary.EbliNode; +import org.fudaa.ebli.visuallibrary.EbliNodeDefault; import org.fudaa.ebli.visuallibrary.EbliScene; +import org.fudaa.ebli.visuallibrary.calque.EbliWidgetCalqueLegende; +import org.fudaa.ebli.visuallibrary.calque.EbliWidgetVueCalque; +import org.fudaa.ebli.visuallibrary.graphe.EbliWidgetGraphe; +import org.fudaa.ebli.visuallibrary.graphe.WidgetLegendeManager; /** * commande qui effectue un undo/redo sur la suppression. @@ -76,6 +81,30 @@ if(location_.size()>i) location =location_.get(i); undoUnit(node, location); + + // -- gerer cas particulier des legendes, il faut les rattacher a leur + // widget origine --// + if (node.getWidget().getIntern() instanceof EbliWidgetCalqueLegende) { + + //on recherche la widget calque correspondante + for(int j = 0; j < nodeSupprime_.size(); j++){ + EbliNode nodeVue=nodeSupprime_.get(j); + if (nodeVue.getWidget().getIntern() instanceof EbliWidgetVueCalque) { + ((EbliWidgetVueCalque) nodeVue.getWidget().getIntern()).nodeLegende = node; + } + } + } else if (node.getWidget().getIntern() instanceof WidgetLegendeManager.WidgetCalqueLegende) { + + // on recherche la widget graphe correspondante + for (int j = 0; j < nodeSupprime_.size(); j++) { + EbliNode nodeVue = nodeSupprime_.get(j); + if (nodeVue.getWidget().getIntern() instanceof EbliWidgetGraphe) { + ((EbliWidgetGraphe) nodeVue.getWidget().getIntern()).setNodeLegende((EbliNodeDefault) node); + } + } + } + + } } Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/actions/CommandeChangeWidgetScene.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/actions/CommandeChangeWidgetScene.java 2008-10-27 13:11:41 UTC (rev 4100) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/actions/CommandeChangeWidgetScene.java 2008-10-27 19:49:31 UTC (rev 4101) @@ -6,7 +6,12 @@ import org.fudaa.ctulu.CtuluCommand; import org.fudaa.ebli.visuallibrary.EbliNode; +import org.fudaa.ebli.visuallibrary.EbliNodeDefault; import org.fudaa.ebli.visuallibrary.EbliScene; +import org.fudaa.ebli.visuallibrary.calque.EbliWidgetCalqueLegende; +import org.fudaa.ebli.visuallibrary.calque.EbliWidgetVueCalque; +import org.fudaa.ebli.visuallibrary.graphe.EbliWidgetGraphe; +import org.fudaa.ebli.visuallibrary.graphe.WidgetLegendeManager; /** * action qui permet de faire le undo/redo sur le changement de scene du node. @@ -45,6 +50,27 @@ sceneDepart_.refresh(); sceneDestination_.addNode(node); sceneDestination_.refresh(); + // -- gerer cas particulier des legendes, il faut les rattacher a leur + // widget origine --// + if (node.getWidget().getIntern() instanceof EbliWidgetCalqueLegende) { + + // on recherche la widget calque correspondante + for (int j = 0; j < nodeDuplique_.size(); j++) { + EbliNode nodeVue = nodeDuplique_.get(j); + if (nodeVue.getWidget().getIntern() instanceof EbliWidgetVueCalque) { + ((EbliWidgetVueCalque) nodeVue.getWidget().getIntern()).nodeLegende = node; + } + } + } else if (node.getWidget().getIntern() instanceof WidgetLegendeManager.WidgetCalqueLegende) { + + // on recherche la widget graphe correspondante + for (int j = 0; j < nodeDuplique_.size(); j++) { + EbliNode nodeVue = nodeDuplique_.get(j); + if (nodeVue.getWidget().getIntern() instanceof EbliWidgetGraphe) { + ((EbliWidgetGraphe) nodeVue.getWidget().getIntern()).setNodeLegende((EbliNodeDefault) node); + } + } + } } } @@ -59,6 +85,28 @@ if (previsouLocation_.size() > cpt) node.getWidget().setPreferredLocation(node.getWidget().convertSceneToLocal(previsouLocation_.get(cpt++))); sceneDepart_.refresh(); + // -- gerer cas particulier des legendes, il faut les rattacher a leur + // widget origine --// + if (node.getWidget().getIntern() instanceof EbliWidgetCalqueLegende) { + + // on recherche la widget calque correspondante + for (int j = 0; j < nodeDuplique_.size(); j++) { + EbliNode nodeVue = nodeDuplique_.get(j); + if (nodeVue.getWidget().getIntern() instanceof EbliWidgetVueCalque) { + ((EbliWidgetVueCalque) nodeVue.getWidget().getIntern()).nodeLegende = node; + } + } + } else if (node.getWidget().getIntern() instanceof WidgetLegendeManager.WidgetCalqueLegende) { + + // on recherche la widget graphe correspondante + for (int j = 0; j < nodeDuplique_.size(); j++) { + EbliNode nodeVue = nodeDuplique_.get(j); + if (nodeVue.getWidget().getIntern() instanceof EbliWidgetGraphe) { + ((EbliWidgetGraphe) nodeVue.getWidget().getIntern()).setNodeLegende((EbliNodeDefault) node); + } + } + } + } } Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/actions/CommandeDuplicate.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/actions/CommandeDuplicate.java 2008-10-27 13:11:41 UTC (rev 4100) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/actions/CommandeDuplicate.java 2008-10-27 19:49:31 UTC (rev 4101) @@ -5,8 +5,13 @@ import org.fudaa.ctulu.CtuluCommand; import org.fudaa.ebli.visuallibrary.EbliNode; +import org.fudaa.ebli.visuallibrary.EbliNodeDefault; import org.fudaa.ebli.visuallibrary.EbliScene; import org.fudaa.ebli.visuallibrary.EbliWidget; +import org.fudaa.ebli.visuallibrary.calque.EbliWidgetCalqueLegende; +import org.fudaa.ebli.visuallibrary.calque.EbliWidgetVueCalque; +import org.fudaa.ebli.visuallibrary.graphe.EbliWidgetGraphe; +import org.fudaa.ebli.visuallibrary.graphe.WidgetLegendeManager; /** * Command undo/redo pour le duplicate de widget. @@ -31,6 +36,30 @@ for (final Iterator<EbliNode> it = nodeDuplique_.iterator(); it.hasNext();) { final EbliNode node = it.next(); redo(node.getWidget(), node); + + // -- gerer cas particulier des legendes, il faut les rattacher a leur + // widget origine --// + if (node.getWidget().getIntern() instanceof EbliWidgetCalqueLegende) { + + // on recherche la widget calque correspondante + for (int j = 0; j < nodeDuplique_.size(); j++) { + EbliNode nodeVue = nodeDuplique_.get(j); + if (nodeVue.getWidget().getIntern() instanceof EbliWidgetVueCalque) { + ((EbliWidgetVueCalque) nodeVue.getWidget().getIntern()).nodeLegende = node; + } + } + } else if (node.getWidget().getIntern() instanceof WidgetLegendeManager.WidgetCalqueLegende) { + + // on recherche la widget graphe correspondante + for (int j = 0; j < nodeDuplique_.size(); j++) { + EbliNode nodeVue = nodeDuplique_.get(j); + if (nodeVue.getWidget().getIntern() instanceof EbliWidgetGraphe) { + ((EbliWidgetGraphe) nodeVue.getWidget().getIntern()).setNodeLegende((EbliNodeDefault) node); + } + } + } + + } } @@ -45,7 +74,7 @@ widget.getEbliScene().addNode(nodeDuplique); // -- raffraichissement de la scene --// - scene_.refresh(); + widget.getEbliScene().refresh(); } public void undo() { @@ -61,7 +90,7 @@ widget.getEbliScene().removeNode(nodeDuplique); // -- raffraichissement de la scene --// - scene_.refresh(); + widget.getEbliScene().refresh(); } } Deleted: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/actions/EbliAlignWithMoveStrategyProvider.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/actions/EbliAlignWithMoveStrategyProvider.java 2008-10-27 13:11:41 UTC (rev 4100) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/actions/EbliAlignWithMoveStrategyProvider.java 2008-10-27 19:49:31 UTC (rev 4101) @@ -1,101 +0,0 @@ -/** - * Licence GPL - * Copyright Genesis - */ -package org.fudaa.ebli.visuallibrary.actions; - -import java.awt.Point; - -import org.fudaa.ebli.visuallibrary.EbliWidget; -import org.netbeans.api.visual.action.AlignWithMoveDecorator; -import org.netbeans.api.visual.action.AlignWithWidgetCollector; -import org.netbeans.api.visual.action.MoveProvider; -import org.netbeans.api.visual.action.MoveStrategy; -import org.netbeans.api.visual.widget.LayerWidget; -import org.netbeans.api.visual.widget.Widget; -import org.netbeans.modules.visual.action.AlignWithMoveStrategyProvider; - -/** - * @author deniger - */ -public class EbliAlignWithMoveStrategyProvider implements MoveStrategy, MoveProvider { - - final AlignWithMoveStrategyProvider alignProvider_; - - public EbliAlignWithMoveStrategyProvider(final AlignWithWidgetCollector collector, - final LayerWidget interractionLayer, final AlignWithMoveDecorator decorator, final boolean outerBounds) { - alignProvider_ = new AlignWithMoveStrategyProvider(collector, interractionLayer, decorator, outerBounds); - } - - /** - * @param _widget - * @return - * @see org.netbeans.modules.visual.action.AlignWithMoveStrategyProvider#getOriginalLocation(org.netbeans.api.visual.widget.Widget) - */ - public Point getOriginalLocation(final Widget _widget) { - return getWidgetToMove(_widget).getPreferredLocation(); - } - - /** - * @see org.netbeans.modules.visual.action.AlignWithSupport#hide() - */ - public void hide() { - alignProvider_.hide(); - } - - /** - * @param _widget - * @param _originalLocation - * @param _suggestedLocation - * @return - * @see org.netbeans.modules.visual.action.AlignWithMoveStrategyProvider#locationSuggested(org.netbeans.api.visual.widget.Widget, - * java.awt.Point, java.awt.Point) - */ - public Point locationSuggested(final Widget _widget, final Point _originalLocation, final Point _suggestedLocation) { - return alignProvider_.locationSuggested(getWidgetToMove(_widget), _originalLocation, _suggestedLocation); - } - - /** - * @param _widget - * @see org.netbeans.modules.visual.action.AlignWithMoveStrategyProvider#movementFinished(org.netbeans.api.visual.widget.Widget) - */ - public void movementFinished(final Widget _widget) { - alignProvider_.movementFinished(getWidgetToMove(_widget)); - } - - /** - * @param _widget - * @see org.netbeans.modules.visual.action.AlignWithMoveStrategyProvider#movementStarted(org.netbeans.api.visual.widget.Widget) - */ - public void movementStarted(final Widget _widget) { - alignProvider_.movementStarted(getWidgetToMove(_widget)); - } - - /** - * @param _widget - * @param _location - * @see org.netbeans.modules.visual.action.AlignWithMoveStrategyProvider#setNewLocation(org.netbeans.api.visual.widget.Widget, - * java.awt.Point) - */ - public void setNewLocation(final Widget _widget, final Point _location) { - getWidgetToMove(_widget).setPreferredLocation(_location); - } - - /** - * @see org.netbeans.modules.visual.action.AlignWithSupport#show() - */ - public void show() { - alignProvider_.show(); - } - - /** - * @param widget - */ - public static EbliWidget getWidgetToMove(final Widget widget) { - final EbliWidget w = (EbliWidget) widget; - final EbliWidget group = w.getGroup(); - if (group != null) { return group; } - return w; - } - -} Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/actions/EbliWidgetActionDuplicate.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/actions/EbliWidgetActionDuplicate.java 2008-10-27 13:11:41 UTC (rev 4100) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/actions/EbliWidgetActionDuplicate.java 2008-10-27 19:49:31 UTC (rev 4101) @@ -75,7 +75,7 @@ // -- duplication du node --// - EbliNode node = currentNode.getWidget().getController().duplication(listeNodeUndo); + EbliNode node = currentNode.getWidget().getController().duplication(listeNodeUndo, sceneDestination_); Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/actions/EbliWidgetGroupAction.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/actions/EbliWidgetGroupAction.java 2008-10-27 13:11:41 UTC (rev 4100) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/actions/EbliWidgetGroupAction.java 2008-10-27 19:49:31 UTC (rev 4101) @@ -11,6 +11,7 @@ import java.awt.event.ActionEvent; import java.awt.geom.Rectangle2D; import java.util.Arrays; +import java.util.Collection; import java.util.HashSet; import java.util.Set; @@ -70,7 +71,7 @@ return n; } - private EbliNode groupWidgets(final Set _selectedObjects) { + public EbliNode groupWidgets(final Collection _selectedObjects) { final EbliWidgetGroup parent = new EbliWidgetGroup(scene_); // parent.setController(new EbliWidgetControllerMenuOnly(parent)); parent.setLayout(new GroupLayout()); Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetControllerCalque.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetControllerCalque.java 2008-10-27 13:11:41 UTC (rev 4100) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetControllerCalque.java 2008-10-27 19:49:31 UTC (rev 4101) @@ -36,6 +36,7 @@ import org.fudaa.ebli.palette.PaletteEditAction; import org.fudaa.ebli.ressource.EbliResource; import org.fudaa.ebli.visuallibrary.EbliNode; +import org.fudaa.ebli.visuallibrary.EbliScene; import org.fudaa.ebli.visuallibrary.EbliWidget; import org.fudaa.ebli.visuallibrary.EbliWidgetBordureSingle; import org.fudaa.ebli.visuallibrary.EbliWidgetControllerMenuOnly; @@ -67,8 +68,8 @@ Map<BCalque,CalqueLegendeWidgetAdapter> legendeWidget_=new HashMap<BCalque, CalqueLegendeWidgetAdapter>(); - - + + BuMenuBar menuCalque_; JComponent panelTreeCalque_; @@ -147,13 +148,13 @@ // -- on ajoute le noeud legende come commande undo --// listeNodeUndo.add(controllerDuDuplique.getNodeLegende()); - + } - + // -- commande undo/redo --// // cmd_.addCmd(new CommandeDuplicate(listeNodeUndo, // widget_.getEbliScene())); - + controllerDuDuplique.setDescription(getDescription()); // -- construction des actions sans passer par la frame fille --// @@ -161,39 +162,39 @@ } - - public EbliNode duplication(ArrayList<EbliNode> listeNodeUndo) { - // -- recuperation du node a dupliquer --// - final EbliNode n = (EbliNode) widget_.getEbliScene().findObject(widget_); + public EbliNode duplication(ArrayList<EbliNode> listeNodeUndo, EbliScene sceneDestination) { - // duplication du node en question - final EbliNode duplique = n.duplicate(null); + // -- recuperation du node a dupliquer --// + final EbliNode n = (EbliNode) widget_.getEbliScene().findObject(widget_); - // nouvelle position a cote de son predecesseur - // duplique.setPreferedLocation(nouvellePosition); + // duplication du node en question + final EbliNode duplique = n.duplicate(null); - // -- ajout dans la scene --// - if (duplique != null && widget_.getScene() != null) { - widget_.getEbliScene().addNode(duplique); + // -- redimensionnement du duplicata --// + ((EbliWidgetCreatorVueCalque) duplique.getCreator()).initSize(getVisuPanel().getVueCalque().getCalque().getSize()); - // -- duplication des map de property graphique de la widget --// - duplique.getWidget().setPropGraphique(n.getWidget().duplicateGraphicalProperties()); - // -- duplication de la taille --// - duplique.getWidget().setPreferredBounds(n.getWidget().getPreferredBounds()); + // -- ajout dans la scene --// + if (duplique != null && sceneDestination != null) { + sceneDestination.addNode(duplique); - // -- raffraichissement de la scene --// - widget_.getEbliScene().refresh(); + // -- duplication des map de property graphique de la widget --// + duplique.getWidget().setPropGraphique(n.getWidget().duplicateGraphicalProperties()); + // -- duplication de la taille --// + duplique.getWidget().setPreferredBounds(n.getWidget().getPreferredBounds()); - postActionDuplication(n, duplique, listeNodeUndo); - } + // -- raffraichissement de la scene --// + widget_.getEbliScene().refresh(); + sceneDestination.refresh(); + postActionDuplication(n, duplique, listeNodeUndo); + } return duplique; - } + } - - - + + + public boolean hasLegende() { if (getNodeLegende() == null) return false; @@ -205,61 +206,63 @@ if (widget_.getEbliScene() != null) { // position a cote de la widget graphe -// final Point nouvellePosition = new Point((widget_.getLocation().x), (int) (widget_.getLocation().y + widget_ -// .getBounds().height * 1.2)); + // final Point nouvellePosition = new Point((widget_.getLocation().x), + // (int) (widget_.getLocation().y + widget_ + // .getBounds().height * 1.2)); -// if (!hasLegende()) { + // if (!hasLegende()) { - - BCalque calqueActif=widgetCalque_.calquePanel_.getCalqueActif(); - if(calqueActif!=null && calqueActif instanceof BCalqueAffichage){ + + BCalque calqueActif = widgetCalque_.calquePanel_.getCalqueActif(); + if (calqueActif != null && calqueActif instanceof BCalqueAffichage) { if (this.legendeWidget_.get(calqueActif) == null) { //legendeWidget_ = (CalqueLegendeWidgetAdapter) widgetCalque_.calquePanel_.getCqLegend(); - legendeWidget_.put(widgetCalque_.calquePanel_.getCalqueActif(), (CalqueLegendeWidgetAdapter) widgetCalque_.calquePanel_.getCqLegend()); - - - CalqueLegendeWidgetAdapter legendeAdapter=this.legendeWidget_.get(calqueActif); - - // -- creation de la legende - final Point positionLegende = new Point(); - if (widget_.getBounds() != null && widget_.getPreferredLocation() != null) { - positionLegende.x = widget_.getPreferredLocation().x + widget_.getBounds().width + 20; - positionLegende.y = widget_.getPreferredLocation().y; - setNodeLegende(legendeAdapter.createLegende(positionLegende, widget_.getEbliScene(), widget_.getId(),calqueActif)); + legendeWidget_.put(widgetCalque_.calquePanel_.getCalqueActif(), + (CalqueLegendeWidgetAdapter) widgetCalque_.calquePanel_.getCqLegend()); + + CalqueLegendeWidgetAdapter legendeAdapter = this.legendeWidget_.get(calqueActif); + + // -- creation de la legende + final Point positionLegende = new Point(); + if (widget_.getBounds() != null && widget_.getPreferredLocation() != null) { + positionLegende.x = widget_.getPreferredLocation().x + widget_.getBounds().width + 20; + positionLegende.y = widget_.getPreferredLocation().y; + setNodeLegende(legendeAdapter.createLegende(positionLegende, widget_.getEbliScene(), widget_.getId(), + calqueActif)); + } + widget_.getEbliScene().refresh(); } - widget_.getEbliScene().refresh(); - } - } -// } else if (getNodeLegende().hasWidget()) -// // -- cas ou la legende existe mais est cach\xE9e --// -// getNodeLegende().getWidget().setVisible(true); + } + // } else if (getNodeLegende().hasWidget()) + // // -- cas ou la legende existe mais est cach\xE9e --// + // getNodeLegende().getWidget().setVisible(true); - - + + // GrapheWidget.this.addChild(widgetLegende); } } public void suppression(final ArrayList<EbliNode> listeNodeUndo, ArrayList<Point> listLocation) { - final EbliNode n = (EbliNode) widget_.getEbliScene().findObject(widget_); - listeNodeUndo.add(n); - listLocation.add(widget_.convertLocalToScene(widget_.getLocation())); - // -- on prend la location du node au moment de la suppression pour - // pouvoir la retablir dans le undo --// - // n.setPreferedLocation(widget_.getPreferredLocation()); - + final EbliNode n = (EbliNode) widget_.getEbliScene().findObject(widget_); + listeNodeUndo.add(n); + listLocation.add(widget_.convertLocalToScene(widget_.getLocation())); + // -- on prend la location du node au moment de la suppression pour + // pouvoir la retablir dans le undo --// + // n.setPreferedLocation(widget_.getPreferredLocation()); - // -- on enleve le node de la scene --// - widget_.getEbliScene().removeNode(n); - // -- on supprime le node legende associe --// - if (hasLegende()) { - listeNodeUndo.add(widgetCalque_.nodeLegende); + // -- on enleve le node de la scene --// + widget_.getEbliScene().removeNode(n); + + // -- on supprime le node legende associe --// + if (hasLegende()) { + listeNodeUndo.add(widgetCalque_.nodeLegende); listLocation.add(widgetCalque_.convertLocalToScene(widgetCalque_.nodeLegende.getWidget().getLocation())); - widget_.getEbliScene().removeNode(widgetCalque_.nodeLegende); - legendeWidget_ = null; - // final CtuluCommand commande1= new CommandSupprimer(n, + widget_.getEbliScene().removeNode(widgetCalque_.nodeLegende); + legendeWidget_ = null; + // final CtuluCommand commande1= new CommandSupprimer(n, // widget_.getEbliScene(), // widget_.convertLocalToScene(widget_.getLocation())); // final CtuluCommand commande2= new @@ -284,15 +287,15 @@ // } // // }); - } - - // -- raffraichissement de la scene --// - widget_.getEbliScene().refresh(); + } - } + // -- raffraichissement de la scene --// + widget_.getEbliScene().refresh(); - + } + + @Override protected void constructMenuMasquer(final JPopupMenu _popup, final CtuluCommandContainer cmd_) { final JMenuItem menuItem = _popup.add(EbliResource.EBLI.getString("Masquer l'objet")); @@ -392,8 +395,8 @@ } public CalqueLegendeWidgetAdapter getLegendeWidget(BCalque calqueSelectionne) { - if(calqueSelectionne==null) - return null; + if (calqueSelectionne == null) + return null; return legendeWidget_.get(calqueSelectionne); } @@ -464,6 +467,18 @@ return panelTreeCalque_; } + + BSelecteurListComboBox comboVar_; + + public void majComboVar() { + //-- on retire le listener si il existe --// + if (comboVar_ == null) + return; + getVisuPanel().getArbreCalqueModel().getTreeSelectionModel().removeTreeSelectionListener(comboVar_); + getVisuPanel().getArbreCalqueModel().getTreeSelectionModel().addTreeSelectionListener(comboVar_); + comboVar_.setPalettePanelTarget(getVisuPanel().getArbreCalqueModel().getSelectedCalque()); + } + /** * Obtient la toolbar specifique au calque * @@ -487,23 +502,22 @@ toolbarCalque_.add(new PaletteEditAction(getVisuPanel().getArbreCalqueModel().getTreeSelectionModel())); // -- ajout des comboBox des variables --// - BSelecteurListComboBox combo = new BSelecteurListComboBox(); + comboVar_ = new BSelecteurListComboBox(); // pour mettre \xE0 jour la combo d\xE8s que la s\xE9lection de l'arbre change - getVisuPanel().getArbreCalqueModel().getTreeSelectionModel().addTreeSelectionListener(combo); - combo.setPalettePanelTarget(getVisuPanel().getArbreCalqueModel().getSelectedCalque()); + majComboVar(); // combo.setPalettePanelTarget(listselector.getTarget()); - combo.setMinimumSize(combo.getPreferredSize()); - combo.setMaximumSize(combo.getPreferredSize()); + comboVar_.setMinimumSize(comboVar_.getPreferredSize()); + comboVar_.setMaximumSize(comboVar_.getPreferredSize()); // ajout combobox - toolbarCalque_.add(combo); + toolbarCalque_.add(comboVar_); // -- ajout des combo des pas de temps --// final EbliCalqueActionTimeChooser chooserT = new EbliCalqueActionTimeChooser(getVisuPanel().getArbreCalqueModel() .getTreeSelectionModel(), true); // pour activer l'action chooserT.setSelected(true); - combo = (BSelecteurListComboBox) chooserT.buildContentPane(); + BSelecteurListComboBox combo = (BSelecteurListComboBox) chooserT.buildContentPane(); chooserT.updateBeforeShow(); combo.setMaximumSize(combo.getPreferredSize()); combo.setMinimumSize(combo.getPreferredSize()); @@ -512,6 +526,9 @@ toolbarCalque_.add(combo); } + // -- mise a jour de la combo de variables pour le cas ou l on ajoute des + // var dans editer les var + majComboVar(); return toolbarCalque_; } Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetCreatorVueCalque.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetCreatorVueCalque.java 2008-10-27 13:11:41 UTC (rev 4100) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetCreatorVueCalque.java 2008-10-27 19:49:31 UTC (rev 4101) @@ -3,12 +3,11 @@ import java.awt.Dimension; import java.awt.Point; import java.io.File; -import java.io.FileNotFoundException; -import java.io.IOException; import java.util.HashMap; import java.util.Map; import org.fudaa.ctulu.CtuluLibFile; +import org.fudaa.ebli.calque.BCalque; import org.fudaa.ebli.calque.ZEbliCalquesPanel; import org.fudaa.ebli.calque.ZebliCalquePersist; import org.fudaa.ebli.geometrie.GrBoite; @@ -97,7 +96,16 @@ public EbliWidgetWithBordure getBordure() { return res; } - + + public void initSize(final Dimension rec) { + final BCalque[] tousCalques = calque_.getVueCalque().getCalque().getTousCalques(); + calque_.getVueCalque().setSize(rec.width, rec.height); + // calquePanel_.setPreferredSize(new Dimension(rec.width, rec.height)); + calque_.getVueCalque().getCalque().setSize(rec.width, rec.height); + for (int i = 0; i < tousCalques.length; i++) { + tousCalques[i].setSize(rec.width, rec.height); + } + } /** * parametre qui n est rensginee que dans le cas d une duplication. Sinon c est cree des le debut avec le bon * ebliwidgetCalqueLegende qui va. Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetFusionCalques.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetFusionCalques.java 2008-10-27 13:11:41 UTC (rev 4100) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetFusionCalques.java 2008-10-27 19:49:31 UTC (rev 4101) @@ -52,13 +52,48 @@ * Il faut le faire dans l'ordre inverse afin de pr\xE9server le zoom de la widget initiale. */ public void synchronyseZoom(){ - //-- on conserve le zoom du calque initial et on l'appllique avant de synchronizer les zooms --// - EbliWidgetVueCalque calqueInitialeZoom=listeWidgetCalque_.get(listeWidgetCalque_.size()-1); - final GrBoite boite = calqueInitialeZoom.getViewBoite(); - calqueInitialeZoom.calquePanel_.getVueCalque().addPropertyChangeListener("repere", this); - calqueInitialeZoom.calquePanel_.getVueCalque().changeRepere(calqueInitialeZoom.calquePanel_, boite, 0, 0); + // -- on met a jour le modele de zoom pour toutes les filles en prenant le + // dernier widget (= la widget temoin) + GrBoite boite = null; + ZEbliCalquesPanel pn = null; + for (int i = listeWidgetCalque_.size() - 1; i >= 0; i--) { + EbliWidgetVueCalque vue = listeWidgetCalque_.get(i); + if (boite == null) { + boite = vue.getViewBoite(); + + pn = vue.calquePanel_; + } + // } else if (vue.getViewBoite() != null) { + // boite.ajuste(vue.getViewBoite()); + // // vue.calquePanel_.getVueCalque().changeRepere(vue.calquePanel_, + // boite, + // // 0, 0); + // vue.image = null; + // vue.repaint(); + // } + vue.calquePanel_.getVueCalque().addPropertyChangeListener("repere", this); + vue.image = null; + vue.repaint(); + + } + if (boite != null) { + // -- on force le redimensionnement de la widget calque initiale avec le + // meme zoom + // -- le fait de faire appel a ceci mettra a jour les zooms de toutes les + // autres widgets + pn.getVueCalque().changeRepere(pn, boite, 0, 0); + } + // synchronizer les zooms --// + // EbliWidgetVueCalque + // calqueInitialeZoom=listeWidgetCalque_.get(listeWidgetCalque_.size()-1); + // final GrBoite boite = calqueInitialeZoom.getViewBoite(); + // calqueInitialeZoom.calquePanel_.getVueCalque().addPropertyChangeListener( + // "repere", this); + // calqueInitialeZoom.calquePanel_.getVueCalque().changeRepere( + // calqueInitialeZoom.calquePanel_, boite, 0, 0); + // for(int i=0;i<listeWidgetCalque_.size();i++){ // //-- mise a jour de la boite pour le calque originel (le reste suivra) --// // listeWidgetCalque_.get(i).calquePanel_.getVueCalque().changeRepere(listeWidgetCalque_.get(i).calquePanel_, boite, 0, 0); @@ -67,12 +102,13 @@ // } getEbliScene().refresh(); // -- ajout du listener des calques sur this --// - - for(int i=0;i<listeWidgetCalque_.size()-1;i++){ - EbliWidgetVueCalque widgetCalque=listeWidgetCalque_.get(i); - widgetCalque.calquePanel_.getVueCalque().addPropertyChangeListener("repere", this); - } + // for (int i = 0; i < listeWidgetCalque_.size(); i++) { + // EbliWidgetVueCalque widgetCalque=listeWidgetCalque_.get(i); + //widgetCalque.calquePanel_.getVueCalque().addPropertyChangeListener("repere" + // , this); + // } + } Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetVueCalque.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetVueCalque.java 2008-10-27 13:11:41 UTC (rev 4100) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetVueCalque.java 2008-10-27 19:49:31 UTC (rev 4101) @@ -42,8 +42,11 @@ ZEbliCalquesPanel calquePanel_; - public EbliNode nodeLegende = null; + + + public EbliNode nodeLegende = null; + Window frame_; BufferedImage image; @@ -85,6 +88,11 @@ } + + public ZEbliCalquesPanel getCalquePanel() { + return calquePanel_; + } + public BuPanel createEditorComponent( final org.netbeans.api.visual.action.InplaceEditorProvider.EditorController controller, final Widget widget) { return calquePanel_; @@ -254,4 +262,21 @@ return cq != null && cq.isVisible(); } + public boolean hasSattelite() { + if (getCalqueController().hasLegende()) + return true; + return false; + } + + public List<EbliWidget> getSattelite() { + if (!hasSattelite()) + return null; + List<EbliWidget> liste = new ArrayList<EbliWidget>(); + + liste.add(getCalqueController().getNodeLegende().getWidget()); + + return liste; + + } + } Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/graphe/EbliWidgetControllerGraphe.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/graphe/EbliWidgetControllerGraphe.java 2008-10-27 13:11:41 UTC (rev 4100) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/graphe/EbliWidgetControllerGraphe.java 2008-10-27 19:49:31 UTC (rev 4101) @@ -19,7 +19,6 @@ import org.fudaa.ebli.commun.EbliActionInterface; import org.fudaa.ebli.commun.EbliActionSimple; import org.fudaa.ebli.commun.EbliComponentFactory; -import org.fudaa.ebli.courbe.EGConfigureActionPalette; import org.fudaa.ebli.courbe.EGFillePanel; import org.fudaa.ebli.courbe.EGGraphe; import org.fudaa.ebli.courbe.EGGrapheTreeModel; @@ -28,11 +27,13 @@ import org.fudaa.ebli.ressource.EbliResource; import org.fudaa.ebli.visuallibrary.EbliNode; import org.fudaa.ebli.visuallibrary.EbliNodeDefault; +import org.fudaa.ebli.visuallibrary.EbliScene; import org.fudaa.ebli.visuallibrary.EbliWidget; import org.fudaa.ebli.visuallibrary.EbliWidgetBordureSingle; import org.fudaa.ebli.visuallibrary.EbliWidgetControllerMenuOnly; import org.fudaa.ebli.visuallibrary.actions.CommandMasquer; import org.fudaa.ebli.visuallibrary.actions.EbliActionEditorOneClick; +import org.fudaa.ebli.visuallibrary.actions.EbliWidgetActionConfigure; import com.memoire.bu.BuMenuBar; import com.memoire.bu.BuPanel; @@ -140,7 +141,7 @@ } - public EbliNode duplication(final ArrayList<EbliNode> listeNodeUndo) { + public EbliNode duplication(final ArrayList<EbliNode> listeNodeUndo, EbliScene sceneDestination) { // -- recuperation du node a dupliquer --// final EbliNode n = (EbliNode) widget_.getEbliScene().findObject(widget_); @@ -152,8 +153,8 @@ // duplique.setPreferedLocation(nouvellePosition); // -- ajout dans la scene --// - if (duplique != null && widget_.getScene() != null) { - widget_.getEbliScene().addNode(duplique); + if (duplique != null && sceneDestination != null) { + sceneDestination.addNode(duplique); // -- duplication des map de property graphique de la widget --// duplique.getWidget().setPropGraphique(n.getWidget().duplicateGraphicalProperties()); @@ -164,7 +165,7 @@ // -- raffraichissement de la scene --// widget_.getEbliScene().refresh(); - + sceneDestination.refresh(); postActionDuplication(n, duplique, listeNodeUndo); @@ -288,21 +289,52 @@ return widget_.getEbliScene().isObject(widgetGraphe_.getNodeLegende()); } + + + + /** + * Attention ce menu ne doit pas apparaitre pour les calques et graphe car il + * n a aucun effet. + * + * @param _popup + */ + public void constructPopupMenuBaseGraphique(final JPopupMenu _popup) { + + final JMenuItem menuItem4 = _popup.add(EbliResource.EBLI.getString("Configuration graphique")); + menuItem4.setIcon(CtuluResource.CTULU.getIcon("crystal_configurer")); + // BuResource.BU.getIcon("configurer") + menuItem4.addActionListener(new ActionListener() { + + public void actionPerformed(final ActionEvent e) { + EbliWidget found = null;// widget_; + + if (widget_.getParentWidget() != null && widget_.getParentWidget() instanceof EbliWidgetBordureSingle) + found = (EbliWidget) widget_.getParentWidget(); + else + found = widget_; + EbliWidgetActionConfigure.configure(found); + } + + }); + } + public void ajoutLegende() { // -- creation de la l\xE9gende --// if (widget_.getEbliScene() != null) { - final Point positionLegende = new Point(); - if (widget_.getBounds() != null && widget_.getPreferredLocation() != null) { - positionLegende.x = widget_.getPreferredLocation().x + widget_.getBounds().width + 20; - positionLegende.y = widget_.getPreferredLocation().y; - - } - + if (!hasLegende()) { // -- creation d'un node legende --// widgetGraphe_.setNodeLegende(new EbliNodeDefault()); + final Point positionLegende = new Point(); + if (widget_.getParentBordure().getBounds() != null && widget_.getParentBordure().getLocation() != null) { + positionLegende.x = widget_.getParentBordure().getLocation().x + widget_.getParentBordure().getBounds().width + + 20; + positionLegende.y = widget_.getParentBordure().getLocation().y; + widgetGraphe_.getNodeLegende().setPreferedLocation(positionLegende); + } + // -- non de la legende --// widgetGraphe_.getNodeLegende().setTitle("L\xE9gende " + (indiceLegende++)); @@ -310,7 +342,7 @@ widget_.getId()); widgetGraphe_.getNodeLegende().setCreator(creator); - widgetGraphe_.getNodeLegende().setPreferedLocation(positionLegende); + // widgetGraphe_.getNodeLegende().setPreferedLocation(positionLegende); widget_.getEbliScene().addNode(widgetGraphe_.getNodeLegende()); widgetGraphe_.getNodeLegende().setPreferedSize(widgetGraphe_.getNodeLegende().getWidget().getPreferredSize()); @@ -355,7 +387,8 @@ // -- creation du menu config de la courbe - _popup.add(new EGConfigureActionPalette(((EbliWidgetGraphe) widget_).getGraphe().getModel())); + // _popup.add(new EGConfigureActionPalette(((EbliWidgetGraphe) + // widget_).getGraphe().getModel())); } Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/graphe/EbliWidgetGraphe.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/graphe/EbliWidgetGraphe.java 2008-10-27 13:11:41 UTC (rev 4100) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/graphe/EbliWidgetGraphe.java 2008-10-27 19:49:31 UTC (rev 4101) @@ -6,8 +6,10 @@ import java.awt.Rectangle; import java.awt.Window; import java.awt.image.BufferedImage; +import java.util.ArrayList; import java.util.EnumSet; import java.util.HashMap; +import java.util.List; import java.util.Map; import org.fudaa.ctulu.image.CtuluLibImage; @@ -63,7 +65,8 @@ // public void setGraphe(EGGraphe graphe) { // this.graphe_ = graphe; // } - + EbliWidgetControllerGraphe controllerGraphe_; + public EbliWidgetGraphe(final EbliScene scene, final Point preferredLocation, final EGFillePanel _pn) { super(scene); panelGraphe_ = _pn; @@ -72,7 +75,8 @@ panelGraphe_.getGraphe().getModel().addModelListener(this); // --ajout du controller specifique au graphe --// - this.setController(new EbliWidgetControllerGraphe(this, nodeLegende)); + controllerGraphe_ = new EbliWidgetControllerGraphe(this, nodeLegende); + this.setController(controllerGraphe_); } @@ -269,4 +273,21 @@ return false; } + public boolean hasSattelite() { + if (controllerGraphe_.hasLegende()) + return true; + return false; + } + + public List<EbliWidget> getSattelite() { + if (!hasSattelite()) + return null; + List<EbliWidget> liste = new ArrayList<EbliWidget>(); + + liste.add(getNodeLegende().getWidget()); + + return liste; + + } + } Copied: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/resizestrategy/EbliAlignWithMoveStrategyProvider.java (from rev 4099, branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/actions/EbliAlignWithMoveStrategyProvider.java) =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/resizestrategy/EbliAlignWithMoveStrategyProvider.java (rev 0) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/resizestrategy/EbliAlignWithMoveStrategyProvider.java 2008-10-27 19:49:31 UTC (rev 4101) @@ -0,0 +1,115 @@ +/** + * Licence GPL + * Copyright Genesis + */ +package org.fudaa.ebli.visuallibrary.resizestrategy; + +import java.awt.Point; + +import org.fudaa.ebli.visuallibrary.EbliWidget; +import org.netbeans.api.visual.action.AlignWithMoveDecorator; +import org.netbeans.api.visual.action.AlignWithWidgetCollector; +import org.netbeans.api.visual.action.MoveProvider; +import org.netbeans.api.visual.action.MoveStrategy; +import org.netbeans.api.visual.widget.LayerWidget; +import org.netbeans.api.visual.widget.Widget; +import org.netbeans.modules.visual.action.AlignWithMoveStrategyProvider; + +/** + * @author deniger + */ +public class EbliAlignWithMoveStrategyProvider implements MoveStrategy, MoveProvider { + + final AlignWithMoveStrategyProvider alignProvider_; + + public EbliAlignWithMoveStrategyProvider(final AlignWithWidgetCollector collector, + final LayerWidget interractionLayer, final AlignWithMoveDecorator decorator, final boolean outerBounds) { + alignProvider_ = new AlignWithMoveStrategyProvider(collector, interractionLayer, decorator, outerBounds); + } + + /** + * @param _widget + * @return + * @see org.netbeans.modules.visual.action.AlignWithMoveStrategyProvider#getOriginalLocation(org.netbeans.api.visual.widget.Widget) + */ + public Point getOriginalLocation(final Widget _widget) { + return getWidgetToMove(_widget).getPreferredLocation(); + } + + /** + * @see org.netbeans.modules.visual.action.AlignWithSupport#hide() + */ + public void hide() { + alignProvider_.hide(); + } + + /** + * @param _widget + * @param _originalLocation + * @param _suggestedLocation + * @return + * @see org.netbeans.modules.visual.action.AlignWithMoveStrategyProvider#locationSuggested(org.netbeans.api.visual.widget.Widget, + * java.awt.Point, java.awt.Point) + */ + public Point locationSuggested(final Widget _widget, final Point _originalLocation, final Point _suggestedLocation) { + return alignProvider_.locationSuggested(getWidgetToMove(_widget), _originalLocation, _suggestedLocation); + } + + /** + * @param _widget + * @see org.netbeans.modules.visual.action.AlignWithMoveStrategyProvider#movementFinished(org.netbeans.api.visual.widget.Widget) + */ + public void movementFinished(final Widget _widget) { + alignProvider_.movementFinished(getWidgetToMove(_widget)); + } + + /** + * @param _widget + * @see org.netbeans.modules.visual.action.AlignWithMoveStrategyProvider#movementStarted(org.netbeans.api.visual.widget.Widget) + */ + public void movementStarted(final Widget _widget) { + alignProvider_.movementStarted(getWidgetToMove(_widget)); + } + + /** + * @param _widget + * @param _location + * @see org.netbeans.modules.visual.action.AlignWithMoveStrategyProvider#setNewLocation(org.netbeans.api.visual.widget.Widget, + * java.awt.Point) + */ + public void setNewLocation(final Widget _widget, final Point _location) { + Point oldLocation = getWidgetToMove(_widget).getLocation(); + getWidgetToMove(_widget).setPreferredLocation(_location); + + // -- cas particulier pour les widgets sattelites --// + EbliWidget ebliwidget = (EbliWidget) _widget; + if (ebliwidget.hasSattelite()) { + // -- on deplace ses widget sattelite a la location relative a leur + // location d'origine --// + for (EbliWidget satt : ebliwidget.getSattelite()) { + int translationX = _location.x - oldLocation.x; + int translationY = _location.y - oldLocation.y; + Point newLocationSatt = new Point(satt.getLocation().x + translationX, satt.getLocation().y + translationY); + satt.setPreferredLocation(newLocationSatt); + } + } + } + + /** + * @see org.netbeans.modules.visual.action.AlignWithSupport#show() + */ + public void show() { + alignProvider_.show(); + } + + /** + * @param widget + */ + public static EbliWidget getWidgetToMove(final Widget widget) { + final EbliWidget w = (EbliWidget) widget; + final EbliWidget group = w.getGroup(); + if (group != null) { return group; } + return w; + } + +} Property changes on: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/resizestrategy/EbliAlignWithMoveStrategyProvider.java ___________________________________________________________________ Added: svn:mergeinfo + Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/resizestrategy/EbliWidgetActionFactory.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/resizestrategy/EbliWidgetActionFactory.java 2008-10-27 13:11:41 UTC (rev 4100) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/resizestrategy/EbliWidgetActionFactory.java 2008-10-27 19:49:31 UTC (rev 4101) @@ -2,14 +2,20 @@ import java.awt.BasicStroke; import java.awt.Color; +import java.awt.Point; +import org.fudaa.ebli.visuallibrary.EbliWidget; import org.netbeans.api.visual.action.ActionFactory; import org.netbeans.api.visual.action.AlignWithMoveDecorator; import org.netbeans.api.visual.action.AlignWithWidgetCollector; +import org.netbeans.api.visual.action.MoveProvider; +import org.netbeans.api.visual.action.MoveStrategy; import org.netbeans.api.visual.action.WidgetAction; import org.netbeans.api.visual.widget.ConnectionWidget; import org.netbeans.api.visual.widget.LayerWidget; import org.netbeans.api.visual.widget.Scene; +import org.netbeans.api.visual.widget.Widget; +import org.netbeans.modules.visual.action.MoveAction; import org.netbeans.modules.visual.action.SingleLayerAlignWithWidgetCollector; /** @@ -22,6 +28,31 @@ public class EbliWidgetActionFactory { + private static final MoveProvider MOVE_PROVIDER_SATTELITTE = new MoveProvider() { + public void movementStarted(Widget widget) { + } + + public void movementFinished(Widget widget) { + } + + public Point getOriginalLocation(Widget widget) { + return widget.getPreferredLocation(); + } + + public void setNewLocation(Widget widget, Point location) { + widget.setPreferredLocation(location); + // -- cas particulier pour les widgets sattelites --// + EbliWidget ebliwidget = (EbliWidget) widget; + if (ebliwidget.hasSattelite()) { + // -- on deplace ses widget sattelite a la location relative a leur + // location d'origine --// + for (EbliWidget satt : ebliwidget.getSattelite()) { + satt.setPreferredLocation(location); + } + } + + } + }; private static final BasicStroke STROKE = new BasicStroke(1.0f, BasicStroke.JOIN_BEVEL, BasicStroke.CAP_BUTT, 5.0f, new float[] { 6.0f, 3.0f }, 0.0f); @@ -52,4 +83,11 @@ return ActionFactory.createResizeAction(sp, sp); } + public static WidgetAction createMoveAction(MoveStrategy strategy, MoveProvider provider) { + return new MoveAction(strategy != null ? strategy : ActionFactory.createFreeMoveStrategy(), + provider != null ? provider : MOVE_PROVIDER_SATTELITTE); + } + + + } Added: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/resizestrategy/MoveAction.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/resizestrategy/MoveAction.java (rev 0) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/resizestrategy/MoveAction.java 2008-10-27 19:49:31 UTC (rev 4101) @@ -0,0 +1,90 @@ +package org.fudaa.ebli.visuallibrary.resizestrategy; + +import java.awt.Point; +import java.awt.event.MouseEvent; + +import org.netbeans.api.visual.action.MoveProvider; +import org.netbeans.api.visual.action.MoveStrategy; +import org.netbeans.api.visual.action.WidgetAction; +import org.netbeans.api.visual.widget.Widget; + +/** + * Classe moveAction specifique aux widget. (pour certaines widget sattellites, + * leur deplacement doit etre aussi r\xE9alis\xE9) + * + * @author Adrien Hadoux + * + */ +public class MoveAction extends WidgetAction.LockedAdapter { + + + + + private MoveStrategy strategy; + private MoveProvider provider; + + private Widget movingWidget ... [truncated message content] |
From: <had...@us...> - 2008-10-29 20:57:50
|
Revision: 4109 http://fudaa.svn.sourceforge.net/fudaa/?rev=4109&view=rev Author: hadouxad Date: 2008-10-29 20:57:44 +0000 (Wed, 29 Oct 2008) Log Message: ----------- corection de bug creation du doc du post Modified Paths: -------------- branches/Prepro-0.92-SNAPSHOT/ctulu/src/com/memoire/bu/BuSpecificBar.java branches/Prepro-0.92-SNAPSHOT/ctulu/src/org/fudaa/ctulu/gui/CtuluHtmlEditorPanel.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetController.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetControllerInterface.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetTextEditor.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/actions/EbliWidgetActionBloqueOuDebloqueWidget.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/actions/EbliWidgetActionResize.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/actions/EbliWidgetActiontextEditor.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/actions/EbliWidgetGroupAction.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetControllerCalque.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/graphe/EbliWidgetControllerGraphe.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/common/tr_en.fr_txt branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostLayoutFille.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostLayoutPanelController.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/dialogSpec/TrPostDialogLigneCourants.java Added Paths: ----------- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetControllerTextEditor.java Modified: branches/Prepro-0.92-SNAPSHOT/ctulu/src/com/memoire/bu/BuSpecificBar.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ctulu/src/com/memoire/bu/BuSpecificBar.java 2008-10-29 20:56:55 UTC (rev 4108) +++ branches/Prepro-0.92-SNAPSHOT/ctulu/src/com/memoire/bu/BuSpecificBar.java 2008-10-29 20:57:44 UTC (rev 4109) @@ -26,7 +26,7 @@ */ public class BuSpecificBar - extends BuToolBar + extends JToolBar { int w_; /* private boolean horizontal_=true; Modified: branches/Prepro-0.92-SNAPSHOT/ctulu/src/org/fudaa/ctulu/gui/CtuluHtmlEditorPanel.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ctulu/src/org/fudaa/ctulu/gui/CtuluHtmlEditorPanel.java 2008-10-29 20:56:55 UTC (rev 4108) +++ branches/Prepro-0.92-SNAPSHOT/ctulu/src/org/fudaa/ctulu/gui/CtuluHtmlEditorPanel.java 2008-10-29 20:57:44 UTC (rev 4109) @@ -15,14 +15,13 @@ import javax.swing.JMenuBar; import javax.swing.JPanel; -import com.hexidec.ekit.EkitCore; +import org.fudaa.ctulu.CtuluLibString; +import com.hexidec.ekit.EkitCore; import com.memoire.bu.BuBorderLayout; import com.memoire.bu.BuPanel; import com.memoire.bu.BuResource; -import org.fudaa.ctulu.CtuluLibString; - /** * @author fred deniger * @version $Id: CtuluHtmlEditorPanel.java,v 1.2 2007-03-23 17:16:16 deniger Exp $ @@ -53,7 +52,7 @@ this(null, getMinimalActions()); } - private static String getMinimalActions() { + public static String getMinimalActions() { return "SR|SP|BL|IT|UD|SP|SK|SU|SB|SP|AL|AC|AR|AJ|SP|UM|SP|UL|OL|SP|*|FO"; } Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetController.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetController.java 2008-10-29 20:56:55 UTC (rev 4108) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetController.java 2008-10-29 20:57:44 UTC (rev 4109) @@ -8,9 +8,11 @@ import javax.swing.AbstractButton; import javax.swing.JComponent; import javax.swing.JLabel; +import javax.swing.JMenuBar; import javax.swing.JMenuItem; import javax.swing.JOptionPane; import javax.swing.JPopupMenu; +import javax.swing.JToolBar; import org.fudaa.ctulu.CtuluCommandContainer; import org.fudaa.ctulu.CtuluResource; @@ -29,9 +31,7 @@ import org.netbeans.api.visual.action.WidgetAction; import org.netbeans.api.visual.widget.Widget; -import com.memoire.bu.BuMenuBar; import com.memoire.bu.BuResource; -import com.memoire.bu.BuToolBar; /** * Classe qui g\xE8re les actions de contr\xF4le de la widget @@ -368,7 +368,7 @@ } - public BuMenuBar getMenubarComponent() { + public JMenuBar getMenubarComponent() { return null; } @@ -382,7 +382,7 @@ return popupMenu_; } - public BuToolBar getToolbarComponent() { + public JToolBar getToolbarComponent() { return null; } Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetControllerInterface.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetControllerInterface.java 2008-10-29 20:56:55 UTC (rev 4108) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetControllerInterface.java 2008-10-29 20:57:44 UTC (rev 4109) @@ -5,20 +5,19 @@ package org.fudaa.ebli.visuallibrary; import javax.swing.JComponent; +import javax.swing.JMenuBar; +import javax.swing.JToolBar; -import com.memoire.bu.BuMenuBar; -import com.memoire.bu.BuToolBar; - /** * @author deniger */ public interface EbliWidgetControllerInterface { - BuMenuBar getMenubarComponent(); + JMenuBar getMenubarComponent(); JComponent getOverviewComponent(); - BuToolBar getToolbarComponent(); + JToolBar getToolbarComponent(); JComponent getTracableComponent(); Added: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetControllerTextEditor.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetControllerTextEditor.java (rev 0) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetControllerTextEditor.java 2008-10-29 20:57:44 UTC (rev 4109) @@ -0,0 +1,92 @@ +package org.fudaa.ebli.visuallibrary; + +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; + +import javax.swing.JMenuBar; +import javax.swing.JMenuItem; +import javax.swing.JPopupMenu; +import javax.swing.JToolBar; + +import org.fudaa.ctulu.CtuluResource; +import org.fudaa.ctulu.gui.CtuluHtmlEditorPanel; +import org.fudaa.ebli.ressource.EbliResource; +import org.fudaa.ebli.visuallibrary.actions.EbliActionEditorOneClick; +import org.netbeans.api.visual.action.InplaceEditorProvider; + +import com.memoire.bu.BuMenuBar; +import com.memoire.bu.BuPanel; + +/** + * Controller de l'editeur de texte. Permet entre autre l'action edition pour + * pouvoir y acc\xE9der dans certains cas. + * + * @author Adrien Hadoux + * + */ +public class EbliWidgetControllerTextEditor extends EbliWidgetControllerMenuOnly { + + EbliActionEditorOneClick<BuPanel> editorAction_; + CtuluHtmlEditorPanel editor_; + + public EbliWidgetControllerTextEditor(EbliWidgetTextEditor _widget) { + super(_widget); + addActionSpecifiques(); + editor_ = _widget.editorPane_; + } + + + public void MenuEditer() { + // -- executer l action d edition --// + editorAction_.openEditor(getWidget()); + + } + + public void addActionSpecifiques() { + + editorAction_ = new EbliActionEditorOneClick<BuPanel>((InplaceEditorProvider) widget_); + // -- ajout de l action au widget correspondant --// + widget_.getActions().addAction(editorAction_); + + } + + @Override + protected void buildPopupMenu(final JPopupMenu _menu) { + constructPopupMenuSpecifique(_menu); + // -- creation du menu commun a tous les widgets + constructPopupMenuBase(_menu); + } + + + private void constructPopupMenuSpecifique(final JPopupMenu _popup) { + JMenuItem menuItem = new JMenuItem(EbliResource.EBLI.getString("Editer le texte")); + _popup.add(menuItem, 0); + menuItem.setIcon(CtuluResource.CTULU.getIcon("crystal_editer")); + menuItem.addActionListener(new ActionListener() { + public void actionPerformed(final ActionEvent e) { + MenuEditer(); + } + }); + } + + + public JToolBar getToolbarComponent() { + if (editor_ != null) + return editor_.getToolBar(true); + else + return new JToolBar(); + } + + JMenuBar menuBar_; + + public JMenuBar getMenubarComponent() { + if (editor_ == null) + return new BuMenuBar(); + + if (menuBar_ == null) + menuBar_ = editor_.getMenuBar(true, false); + return menuBar_; + + } + +} Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetTextEditor.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetTextEditor.java 2008-10-29 20:56:55 UTC (rev 4108) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetTextEditor.java 2008-10-29 20:57:44 UTC (rev 4109) @@ -1,6 +1,5 @@ package org.fudaa.ebli.visuallibrary; -import java.awt.Dimension; import java.awt.Rectangle; import java.util.EnumSet; @@ -30,7 +29,7 @@ public EbliWidgetTextEditor(final EbliScene scene, final CtuluHtmlEditorPanel content) { super(scene, false); editorPane_ = content; - + intern_ = new ComponentWidget(scene, contenuHTML_); contenuHTML_.setText(content.getDocumentText()); @@ -43,7 +42,7 @@ // -- ajout de l action au widget correspondant --// this.getActions().addAction(editorAction); - final EbliWidgetControllerMenuOnly controller = new EbliWidgetControllerMenuOnly(this); + final EbliWidgetControllerTextEditor controller = new EbliWidgetControllerTextEditor(this); controller.setEditable(true); setController(controller); @@ -89,11 +88,11 @@ conteneur = new BuPanel(new BuBorderLayout()); final Rectangle rec = getClientArea(); - editorPane_.setSize(rec.width, rec.height); - editorPane_.setPreferredSize(new Dimension(rec.width, rec.height)); - conteneur.setPreferredSize(new Dimension(rec.width, rec.height)); - conteneur.setMaximumSize(new Dimension(rec.width, rec.height)); - conteneur.setMinimumSize(new Dimension(rec.width, rec.height)); + // editorPane_.setSize(rec.width, rec.height); + // editorPane_.setPreferredSize(new Dimension(rec.width, rec.height)); + // conteneur.setPreferredSize(new Dimension(rec.width, rec.height)); + // conteneur.setMaximumSize(new Dimension(rec.width, rec.height)); + // conteneur.setMinimumSize(new Dimension(rec.width, rec.height)); conteneur.add(editorPane_, BuBorderLayout.CENTER); conteneur.add(editorPane_.getToolBar(true), BuBorderLayout.NORTH); conteneur.add(editorPane_.getMenuBar()); @@ -118,21 +117,43 @@ return null; } - public void notifyClosing(final org.netbeans.api.visual.action.InplaceEditorProvider.EditorController controller, - final Widget widget, final BuPanel editor, final boolean commit) { + // public void notifyClosing(final + // org.netbeans.api.visual.action.InplaceEditorProvider.EditorController + // controller, + // final Widget widget, final BuPanel editor, final boolean commit) { + // + // // -- mise a jour de intern avec le contenu du ekitcore --// + // + // contenuHTML_.setText(editorPane_.getDocumentText()); + // intern_.repaint(); + // intern_.revalidate(); + // this.repaint(); + // getEbliScene().refresh(); + // // intern_.setLabel(label.getText()); + // + // } - // -- mise a jour de intern avec le contenu du ekitcore --// - - contenuHTML_.setText(editorPane_.getDocumentText()); + public void notifyClosing(final EditorController _controller, final Widget _widget, final BuPanel _editor, + final boolean _commit) { + // contenuHTML_.setText(editorPane_.getDocumentText()); intern_.repaint(); intern_.revalidate(); this.repaint(); getEbliScene().refresh(); - // intern_.setLabel(label.getText()); + editingStop(); } - public void notifyOpened(final org.netbeans.api.visual.action.InplaceEditorProvider.EditorController controller, - final Widget widget, final BuPanel editor) {} + public void notifyOpened(final EditorController _controller, final Widget _widget, final BuPanel _editor) { + // contenuHTML_.setText(CtuluHtmlEditorPanel.showMinimalHtmlDialog("", + // getEbliScene().getView(), true)); + editingStart(); + } + + // public void notifyOpened(final + // org.netbeans.api.visual.action.InplaceEditorProvider.EditorController + // controller, + // final Widget widget, final BuPanel editor) {} + } Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/actions/EbliWidgetActionBloqueOuDebloqueWidget.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/actions/EbliWidgetActionBloqueOuDebloqueWidget.java 2008-10-29 20:56:55 UTC (rev 4108) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/actions/EbliWidgetActionBloqueOuDebloqueWidget.java 2008-10-29 20:57:44 UTC (rev 4109) @@ -48,7 +48,7 @@ public static class DeBloque extends EbliWidgetActionBloqueOuDebloqueWidget { public DeBloque(final EbliWidget _widget) { - super(EbliResource.EBLI.getString("Debloquer la frame"), EbliResource.EBLI.getIcon("unblock_16"), + super(EbliResource.EBLI.getString("Debloquer la frame"), EbliResource.EBLI.getIcon("unlock_16.png"), "DEBLOQUEWIDGET", _widget, false); setDefaultToolTip(EbliResource.EBLI.getString("D\xE9bloquer la taille et la position de la frame")); Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/actions/EbliWidgetActionResize.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/actions/EbliWidgetActionResize.java 2008-10-29 20:56:55 UTC (rev 4108) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/actions/EbliWidgetActionResize.java 2008-10-29 20:57:44 UTC (rev 4109) @@ -51,7 +51,8 @@ public static class Classical extends EbliWidgetActionResize { public Classical(final EbliWidget _widget) { - super(EbliResource.EBLI.getString("Resize classique"), EbliResource.EBLI.getIcon("unblock_16"), "RESIZEEWIDGET", + super(EbliResource.EBLI.getString("Resize classique"), EbliResource.EBLI.getIcon("bas-droit"), + "RESIZEEWIDGET", _widget, false); setDefaultToolTip(EbliResource.EBLI.getString("Redimensionnement classique de la taille de la frame")); Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/actions/EbliWidgetActiontextEditor.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/actions/EbliWidgetActiontextEditor.java 2008-10-29 20:56:55 UTC (rev 4108) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/actions/EbliWidgetActiontextEditor.java 2008-10-29 20:57:44 UTC (rev 4109) @@ -30,9 +30,11 @@ // -- creation de la widget et ajout dans la scene --// final EbliNodeDefault nodeText = new EbliNodeDefault(); nodeText.setTitle("Texte"); - final CtuluHtmlEditorPanel editor = new CtuluHtmlEditorPanel(); - editor.setDocumentText(EbliLib.getS("Double-cliquez pour \xE9diter")); + final CtuluHtmlEditorPanel editor = new CtuluHtmlEditorPanel(EbliLib.getS("Double-cliquez pour \xE9diter"), + CtuluHtmlEditorPanel.getMinimalActions()); + // editor.setDocumentText(); + nodeText.setCreator(new EbliWidgetCreatorTextEditor(editor)); nodeText.setPreferedSize(new Dimension(200, 200)); nodeText.setPreferedLocation(new Point(270, 225)); Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/actions/EbliWidgetGroupAction.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/actions/EbliWidgetGroupAction.java 2008-10-29 20:56:55 UTC (rev 4108) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/actions/EbliWidgetGroupAction.java 2008-10-29 20:57:44 UTC (rev 4109) @@ -24,7 +24,10 @@ import org.fudaa.ebli.visuallibrary.EbliWidget; import org.fudaa.ebli.visuallibrary.EbliWidgetControllerForGroup; import org.fudaa.ebli.visuallibrary.EbliWidgetGroup; +import org.fudaa.ebli.visuallibrary.calque.EbliWidgetControllerCalque; +import org.fudaa.ebli.visuallibrary.calque.EbliWidgetVueCalque; import org.fudaa.ebli.visuallibrary.creator.EbliWidgetGroupCreator; +import org.fudaa.ebli.visuallibrary.graphe.EbliWidgetGraphe; import org.fudaa.ebli.visuallibrary.layout.GroupLayout; import org.netbeans.api.visual.widget.Widget; @@ -42,14 +45,56 @@ @Override @SuppressWarnings("unchecked") public void actionPerformed(final ActionEvent e) { - final Set selectedObjects = new HashSet(scene_.getSelectedObjects()); + Set selectedObjects = new HashSet(scene_.getSelectedObjects()); if (!selectedObjects.isEmpty()) { + + //--Gestion du cas si le graphe a une legende, on veut pouvoir grouper automatiquement sa legende dans le groupe --// + selectedObjects = addLegendeAuto(selectedObjects); + + performGroup(selectedObjects); } } /** + * Ajoute automatiquement les legendes dans la liste a grouper. + * + * @param selectedObjects + * @return + */ + private Set addLegendeAuto(final Set selectedObjects) { + Set<EbliNode> newList = new HashSet<EbliNode>(selectedObjects); + + // -- check automatiquement les l\xE9gendes si il doit en ajouter --// + for (Object objet : selectedObjects) { + if (objet instanceof EbliNode) { + EbliNode nodeCurrent = (EbliNode) objet; + + // instance de graphe + if (nodeCurrent.getWidget().getIntern() instanceof EbliWidgetGraphe) { + // -- candidat --// + EbliNode nodeLegende = ((EbliWidgetGraphe) nodeCurrent.getWidget().getIntern()).getNodeLegende(); + if (nodeLegende != null) + newList.add(nodeLegende);// hashset donc ajoute que si la ref n + // existe pas deja + } else if (nodeCurrent.getWidget().getIntern() instanceof EbliWidgetVueCalque) { + // -- candidat --// + EbliNode nodeLegende = ((EbliWidgetControllerCalque) nodeCurrent.getWidget().getIntern().getController()) + .getNodeLegende(); + if (nodeLegende != null) + newList.add(nodeLegende);// hashset donc ajoute que si la ref n + // existe pas deja + } + + } + } + + + return newList; + } + + /** * Methode qui realise le groupage des ebliNodes. * * @param _selectedObjects @@ -115,6 +160,9 @@ final float rMaxX = ((float) (w - widgetBounds.width - dx)) / w; final float rMaxY = ((float) (h - widgetBounds.height - dy)) / h; parent.setChildConstraint(findWidget, new Rectangle2D.Float(rMinX, rMinY, rMaxX, rMaxY)); + + + } final EbliWidgetGroupCreator creator = new EbliWidgetGroupCreator(); Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetControllerCalque.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetControllerCalque.java 2008-10-29 20:56:55 UTC (rev 4108) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetControllerCalque.java 2008-10-29 20:57:44 UTC (rev 4109) @@ -13,10 +13,12 @@ import javax.swing.JComponent; import javax.swing.JLabel; import javax.swing.JMenu; +import javax.swing.JMenuBar; import javax.swing.JMenuItem; import javax.swing.JPopupMenu; import javax.swing.JScrollPane; import javax.swing.JSplitPane; +import javax.swing.JToolBar; import org.fudaa.ctulu.CtuluCommandContainer; import org.fudaa.ctulu.CtuluLibArray; @@ -406,7 +408,7 @@ * @return */ @Override - public BuMenuBar getMenubarComponent() { + public JMenuBar getMenubarComponent() { if (menuCalque_ == null) { @@ -485,7 +487,7 @@ * @return */ @Override - public BuToolBar getToolbarComponent() { + public JToolBar getToolbarComponent() { if (toolbarCalque_ == null) { toolbarCalque_ = new BuToolBar(); Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/graphe/EbliWidgetControllerGraphe.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/graphe/EbliWidgetControllerGraphe.java 2008-10-29 20:56:55 UTC (rev 4108) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/graphe/EbliWidgetControllerGraphe.java 2008-10-29 20:57:44 UTC (rev 4109) @@ -9,9 +9,11 @@ import javax.swing.JComponent; import javax.swing.JLabel; import javax.swing.JMenu; +import javax.swing.JMenuBar; import javax.swing.JMenuItem; import javax.swing.JPopupMenu; import javax.swing.JScrollPane; +import javax.swing.JToolBar; import org.fudaa.ctulu.CtuluCommandContainer; import org.fudaa.ctulu.CtuluResource; @@ -429,7 +431,7 @@ * @return */ @Override - public BuMenuBar getMenubarComponent() { + public JMenuBar getMenubarComponent() { if (menuGraphe_ == null) { menuGraphe_ = new BuMenuBar(); @@ -483,7 +485,7 @@ * @return */ @Override - public BuToolBar getToolbarComponent() { + public JToolBar getToolbarComponent() { if (toolbarGraphe_ == null) { toolbarGraphe_ = new BuToolBar(); Modified: branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/common/tr_en.fr_txt =================================================================== (Binary files differ) Modified: branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostLayoutFille.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostLayoutFille.java 2008-10-29 20:56:55 UTC (rev 4108) +++ branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostLayoutFille.java 2008-10-29 20:57:44 UTC (rev 4109) @@ -14,7 +14,9 @@ import javax.swing.JComponent; import javax.swing.JLabel; import javax.swing.JMenu; +import javax.swing.JMenuBar; import javax.swing.JPanel; +import javax.swing.JToolBar; import org.fudaa.ctulu.CtuluCommandManager; import org.fudaa.ctulu.CtuluUndoRedoInterface; @@ -35,6 +37,7 @@ import org.fudaa.ebli.visuallibrary.calque.CalqueLegendeWidgetAdapter; import org.fudaa.ebli.visuallibrary.calque.EbliWidgetCreatorLegende; import org.fudaa.ebli.visuallibrary.calque.EbliWidgetCreatorVueCalque; +import org.fudaa.ebli.visuallibrary.creator.EbliWidgetCreatorTextEditor; import org.fudaa.ebli.visuallibrary.graphe.EbliWidgetCreatorGraphe; import org.fudaa.fudaa.commun.courbe.FudaaCourbeImporter; import org.fudaa.fudaa.commun.courbe.FudaaCourbeImporter.Target; @@ -86,9 +89,9 @@ /** * Toolbar modifiable qui se met a jour selon la selection de la widget. */ - BuToolBar toolBarModifiable_ = new BuToolBar(); + JToolBar toolBarModifiable_ = new BuToolBar(); - BuMenuBar menuModifiable_ = new BuMenuBar(); + JMenuBar menuModifiable_ = new BuMenuBar(); /** * Scroll qui contient le tree a droite. Ce panel est modifi\xE9 des que l on change de type d elements. @@ -147,7 +150,7 @@ * * @param _toolBar */ - public void setToolBar(final BuToolBar _toolBar) { + public void setToolBar(final JToolBar _toolBar) { _toolBar.setFloatable(false); this.add(_toolBar, BorderLayout.NORTH); @@ -466,10 +469,23 @@ changeToolbarSpecifiqueGraphe(node.getWidget().getController(), (EbliWidgetCreatorGraphe) node.getCreator()); setTitle(previousTitleFrame + " " + node.getWidget().getController().getDescription(), false); - } else { + } else if (node.getCreator() instanceof EbliWidgetCreatorTextEditor) { + FuLog.debug("texte editor"); + // ((EbliWidgetCreatorTextEditor) + // node.getCreator()).getG().setFrame(projet_.impl_.getFrame()); + // -- etape 1: on fout eventuellement le tree des layouts --// changeTree(getScene()); // -- etape 2: rechargement de la toolbar specifique dans this --// + changeToolbar(node.getWidget().getController()); + setTitle(previousTitleFrame); + + } + + else { + // -- etape 1: on fout eventuellement le tree des layouts --// + changeTree(getScene()); + // -- etape 2: rechargement de la toolbar specifique dans this --// changeToolbarScene(); setTitle(previousTitleFrame); } Modified: branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostLayoutPanelController.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostLayoutPanelController.java 2008-10-29 20:56:55 UTC (rev 4108) +++ branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostLayoutPanelController.java 2008-10-29 20:57:44 UTC (rev 4109) @@ -66,7 +66,6 @@ import com.memoire.bu.BuDesktop; import com.memoire.bu.BuMenu; import com.memoire.bu.BuMenuItem; -import com.memoire.bu.BuResource; import com.memoire.bu.BuSeparator; /** @@ -385,13 +384,15 @@ @SuppressWarnings("serial") protected void addShapeActions(final List<EbliActionAbstract> _l) { // -- palette rectangle texte--// - _l.add(new EbliActionSimple(EbliResource.EBLI.getString("Rectangle texte"), BuResource.BU - .getToolIcon("crystal_couleurtexte"), "WIDGETRECTANGLE") { - @Override - public void actionPerformed(final ActionEvent _evt) { - addRectangleTexte(); - } - }); + // _l.add(new + // EbliActionSimple(EbliResource.EBLI.getString("Rectangle texte"), + // BuResource.BU + // .getToolIcon("crystal_couleurtexte"), "WIDGETRECTANGLE") { + // @Override + // public void actionPerformed(final ActionEvent _evt) { + // addRectangleTexte(); + // } + // }); // widget texte // TODO a revoir _l.add(new EbliWidgetActiontextEditor(getSceneCourante())); Modified: branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/dialogSpec/TrPostDialogLigneCourants.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/dialogSpec/TrPostDialogLigneCourants.java 2008-10-29 20:56:55 UTC (rev 4108) +++ branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/dialogSpec/TrPostDialogLigneCourants.java 2008-10-29 20:57:44 UTC (rev 4109) @@ -64,7 +64,7 @@ BuTextField y_ = new BuTextField(5); BuTextField x2_ = new BuTextField(5); BuTextField y2_ = new BuTextField(5); - BuTextField nbPoints_ = new BuTextField(5); + BuTextField nbPoints_ = new BuTextField(3); // variables et pdt private JPanel panelVariables_; @@ -279,12 +279,12 @@ contPoint1.add(new JLabel(TrResource.getS("-"))); contPoint1.add(y_); final JPanel contPoint2 = new JPanel(new FlowLayout(FlowLayout.CENTER)); - contPoint2.add(new JLabel("Point 1:")); + contPoint2.add(new JLabel("Point 2:")); contPoint2.add(x2_); contPoint2.add(new JLabel(TrResource.getS("-"))); contPoint2.add(y2_); final JPanel contPoint3 = new JPanel(new FlowLayout(FlowLayout.CENTER)); - contPoint3.add(new JLabel("Nombre de points uniform\xE9ments r\xE9partis sur le segment:")); + contPoint3.add(new JLabel("Nb pts uniform\xE9ments r\xE9partis sur le segment:")); contPoint3.add(nbPoints_); nbPoints_.setText("" + 4); @@ -293,6 +293,7 @@ conteneur.add(contPoint2); conteneur.add(contPoint3); conteneur.setBorder(BorderFactory.createTitledBorder(TrResource.getS("Choix du segment"))); + conteneur.setSize(400, 250); return conteneur; } @@ -331,6 +332,7 @@ content.add(choixMode_); // -- panel des segements --// if (panelSegment_ == null) panelSegment_ = buildSegments(); + content.add(panelSegment_); // -- panel des variables --// This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <had...@us...> - 2008-10-30 16:04:56
|
Revision: 4114 http://fudaa.svn.sourceforge.net/fudaa/?rev=4114&view=rev Author: hadouxad Date: 2008-10-30 16:04:39 +0000 (Thu, 30 Oct 2008) Log Message: ----------- - correction de plusieurs bug - robustesse du systeme de sauvegarde des layouts Modified Paths: -------------- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidget.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/actions/EbliWidgetGroupAction.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/actions/EbliWidgetUngroupAction.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetCreatorLegende.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetFusionCalques.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetVueCalque.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/graphe/EbliWidgetCreatorLegende.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/graphe/EbliWidgetGraphe.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostScene.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostVisuPanelPersistManager.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/persist/TrPostPersistanceErrorManager.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/persist/TrPostPersistenceManager.java Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidget.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidget.java 2008-10-30 14:27:59 UTC (rev 4113) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidget.java 2008-10-30 16:04:39 UTC (rev 4114) @@ -538,5 +538,7 @@ return null; } - + public void setSattelite(List<EbliWidget> liste) { + + } } \ No newline at end of file Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/actions/EbliWidgetGroupAction.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/actions/EbliWidgetGroupAction.java 2008-10-30 14:27:59 UTC (rev 4113) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/actions/EbliWidgetGroupAction.java 2008-10-30 16:04:39 UTC (rev 4114) @@ -13,6 +13,7 @@ import java.util.Arrays; import java.util.Collection; import java.util.HashSet; +import java.util.List; import java.util.Set; import org.fudaa.ctulu.CtuluCommand; @@ -148,6 +149,8 @@ final EbliWidget ew = (EbliWidget) findWidget; ew.getController().removeActionResize(); // scene_.removeNode((EbliNode) object); + + findWidget.removeFromParent(); final int dx = rec.x - min.x; final int dy = rec.y - min.y; Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/actions/EbliWidgetUngroupAction.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/actions/EbliWidgetUngroupAction.java 2008-10-30 14:27:59 UTC (rev 4113) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/actions/EbliWidgetUngroupAction.java 2008-10-30 16:04:39 UTC (rev 4114) @@ -51,6 +51,8 @@ final Point p = widget.getLocation(); final Point toScene = w.convertLocalToScene(p); final EbliNode n = (EbliNode) _scene.findObject(widget); + List<EbliWidget> listeSattellites=((EbliWidget)widget).getSattelite(); + widget.removeFromParent(); // -- utilis\xE9 pour enlever les propertychange listener @@ -68,6 +70,9 @@ // widget.setPreferredLocation(toScene); _scene.addNode(n).setPreferredLocation(toScene); n.getWidget().getController().replaceActionResize(); + if(listeSattellites!=null) + n.getWidget().getIntern().setSattelite(listeSattellites); + } _scene.removeNode(_n); // } Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetCreatorLegende.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetCreatorLegende.java 2008-10-30 14:27:59 UTC (rev 4113) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetCreatorLegende.java 2008-10-30 16:04:39 UTC (rev 4114) @@ -1,6 +1,7 @@ package org.fudaa.ebli.visuallibrary.calque; import java.awt.Font; +import java.util.List; import java.util.Map; import org.fudaa.ebli.calque.BCalque; @@ -129,6 +130,33 @@ // -- mise a jour des sattelites --// ((EbliWidgetControllerCalque) widget.getController()).setNodeLegende((EbliNode) parameters.get("node")); + }else{ + ((List<String>)parameters.get("errorMsg")).add("Erreur, la frame Legende ne trouve pas sa frame calque d'ID "+idCalque); + + //-- recherche dans les children de la scene le premier calque qui fera l'affaire --// + for(EbliNode nodeSubstitut:scene.getNodes()){ + + if(nodeSubstitut.getWidget().getIntern() instanceof EbliWidgetVueCalque){ + ((List<String>)parameters.get("errorMsg")).add("Par consequent, la frame Legende sera rattachee a la frame calque d'ID "+nodeSubstitut.getWidget().getId()); + widget=nodeSubstitut.getWidget().getIntern(); + ZEbliCalquesPanel calque=((EbliWidgetControllerCalque) widget.getController()).getVisuPanel(); + + //-- recuperation du bon calque --// + calqueCible_= (BCalque) calque.getArbreCalqueModel().getChild(calque.getArbreCalqueModel().getRoot(), indexCalque); + IdPossessor_=idCalque; + //g=new BCalqueLegendePanel((BCalqueAffichage) calqueCible_,calqueCible_.getTitle()); + BCalqueLegendePanel legendePanel=((CalqueLegendeWidgetAdapter)calque.getCqLegend()).legendePanel_; + g=legendePanel; + // -- mise a jour des sattelites --// + ((EbliWidgetControllerCalque) widget.getController()).setNodeLegende((EbliNode) parameters.get("node")); + break; + } + + + } + + + } Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetFusionCalques.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetFusionCalques.java 2008-10-30 14:27:59 UTC (rev 4113) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetFusionCalques.java 2008-10-30 16:04:39 UTC (rev 4114) @@ -4,6 +4,7 @@ import java.beans.PropertyChangeListener; import java.util.ArrayList; import java.util.Iterator; +import java.util.List; import org.fudaa.ebli.calque.BVueCalque; import org.fudaa.ebli.calque.ZCalqueSondeInteraction; @@ -187,4 +188,25 @@ managerSondesFusion_.removeAllListenningSonde(); } + + public boolean hasSattelite() { + + return true; + + } + + public List<EbliWidget> getSattelite() { + + List<EbliWidget> liste = new ArrayList<EbliWidget>(); + + for (int i = listeWidgetCalque_.size() - 1; i >= 0; i--) { + EbliWidgetVueCalque vue = listeWidgetCalque_.get(i); + if(vue.hasSattelite()) + liste.addAll(vue.getSattelite()); + } + return liste; + + } + + } Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetVueCalque.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetVueCalque.java 2008-10-30 14:27:59 UTC (rev 4113) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetVueCalque.java 2008-10-30 16:04:39 UTC (rev 4114) @@ -23,6 +23,7 @@ import org.fudaa.ebli.calque.ZEbliCalquesPanel; import org.fudaa.ebli.geometrie.GrBoite; import org.fudaa.ebli.visuallibrary.EbliNode; +import org.fudaa.ebli.visuallibrary.EbliNodeDefault; import org.fudaa.ebli.visuallibrary.EbliScene; import org.fudaa.ebli.visuallibrary.EbliWidget; import org.fudaa.ebli.visuallibrary.animation.EbliWidgetAnimatedItem; @@ -278,5 +279,17 @@ return liste; } + + public void setSattelite(List<EbliWidget> liste) { + if(liste.size()<=0) + return; + + EbliWidget widg=liste.get(0); + + EbliNodeDefault node= (EbliNodeDefault) getEbliScene().findObject(widg); + getCalqueController().setNodeLegende( node); + + + } } Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/graphe/EbliWidgetCreatorLegende.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/graphe/EbliWidgetCreatorLegende.java 2008-10-30 14:27:59 UTC (rev 4113) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/graphe/EbliWidgetCreatorLegende.java 2008-10-30 16:04:39 UTC (rev 4114) @@ -1,7 +1,11 @@ package org.fudaa.ebli.visuallibrary.graphe; +import java.util.List; import java.util.Map; +import org.fudaa.ebli.calque.BCalque; +import org.fudaa.ebli.calque.BCalqueLegendePanel; +import org.fudaa.ebli.calque.ZEbliCalquesPanel; import org.fudaa.ebli.courbe.EGGraphe; import org.fudaa.ebli.courbe.EGGrapheTreeModel; import org.fudaa.ebli.visuallibrary.EbliNode; @@ -10,6 +14,9 @@ import org.fudaa.ebli.visuallibrary.EbliWidget; import org.fudaa.ebli.visuallibrary.EbliWidgetBordureSingle; import org.fudaa.ebli.visuallibrary.EbliWidgetWithBordure; +import org.fudaa.ebli.visuallibrary.calque.CalqueLegendeWidgetAdapter; +import org.fudaa.ebli.visuallibrary.calque.EbliWidgetControllerCalque; +import org.fudaa.ebli.visuallibrary.calque.EbliWidgetVueCalque; import org.fudaa.ebli.visuallibrary.creator.EbliWidgetCreator; public class EbliWidgetCreatorLegende implements EbliWidgetCreator { @@ -86,6 +93,7 @@ idPossessor_ = (String) data; // -- recuperation du node graphe--// + final EbliNode nodeGraphe = ((EbliScene) parameters.get("scene")).findByWidgetId(idPossessor_); if (nodeGraphe != null && nodeGraphe.getCreator() instanceof EbliWidgetCreatorGraphe) { @@ -96,7 +104,31 @@ .get("node")); - } else g = new EGGraphe(new EGGrapheTreeModel()); + } else{ + ((List<String>)parameters.get("errorMsg")).add("Erreur, la frame Legende ne trouve pas sa frame graphe d'ID "+idPossessor_); + + //-- recherche dans les children de la scene le premier calque qui fera l'affaire --// + for(EbliNode nodeSubstitut:((EbliScene) parameters.get("scene")).getNodes()){ + + if(nodeSubstitut.getCreator() instanceof EbliWidgetCreatorGraphe){ + ((List<String>)parameters.get("errorMsg")).add("Par consequent, la frame Legende sera rattachee a la frame graphe d'ID "+nodeSubstitut.getWidget().getId()); + g = ((EbliWidgetCreatorGraphe)nodeSubstitut.getCreator()).getGraphe(); + + + // -- mise a jour des sattelites --// + ((EbliWidgetGraphe) nodeSubstitut.getWidget().getIntern()).setNodeLegende((EbliNodeDefault) parameters + .get("node")); + break; + } + + + } + + + + } + + //else g = new EGGraphe(new EGGrapheTreeModel()); } else g = new EGGraphe(new EGGrapheTreeModel()); } Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/graphe/EbliWidgetGraphe.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/graphe/EbliWidgetGraphe.java 2008-10-30 14:27:59 UTC (rev 4113) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/graphe/EbliWidgetGraphe.java 2008-10-30 16:04:39 UTC (rev 4114) @@ -18,6 +18,7 @@ import org.fudaa.ebli.courbe.EGGraphe; import org.fudaa.ebli.courbe.EGGrapheModelListener; import org.fudaa.ebli.courbe.EGObject; +import org.fudaa.ebli.visuallibrary.EbliNode; import org.fudaa.ebli.visuallibrary.EbliNodeDefault; import org.fudaa.ebli.visuallibrary.EbliScene; import org.fudaa.ebli.visuallibrary.EbliWidget; @@ -290,4 +291,16 @@ } + public void setSattelite(List<EbliWidget> liste) { + if(liste.size()<=0) + return; + + EbliWidget widg=liste.get(0); + + EbliNodeDefault node= (EbliNodeDefault) getEbliScene().findObject(widg); + setNodeLegende( node); + + + } + } Modified: branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostScene.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostScene.java 2008-10-30 14:27:59 UTC (rev 4113) +++ branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostScene.java 2008-10-30 16:04:39 UTC (rev 4114) @@ -104,6 +104,7 @@ EGGraphe graphe=((EbliWidgetCreatorGraphe)node.getCreator()).getGraphe(); if(graphe.getModel() instanceof MvProfileTreeModel){ MvProfileTreeModel model=(MvProfileTreeModel) graphe.getModel() ; + if(model !=null && model.target_!=null) if(model.target_.getData() !=null && model.target_.getData() instanceof TrPostSource){ TrPostSource sourceGraphe=(TrPostSource) model.target_.getData(); if(sourceGraphe==src) Modified: branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostVisuPanelPersistManager.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostVisuPanelPersistManager.java 2008-10-30 14:27:59 UTC (rev 4113) +++ branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostVisuPanelPersistManager.java 2008-10-30 16:04:39 UTC (rev 4114) @@ -5,6 +5,7 @@ import java.io.IOException; import java.io.ObjectInputStream; import java.io.ObjectOutputStream; +import java.util.List; import java.util.Map; import org.fudaa.ctulu.CtuluArkSaver; @@ -86,7 +87,13 @@ if (src == null) { // TrPostMultiSourceActivator activator = new TrPostMultiSourceActivator(projet); // activator.active(new File(idSource), projet.getImpl()); - return null; + ((List<String>)parameters.get("errorMsg")).add("Erreur, la frame calque ne trouve pas le fichier r\xE9sultat qui correspond \xE0 l'ID "+idSource); + if(projet.listeSrc_.size()>0){ + ((List<String>)parameters.get("errorMsg")).add("Le calque chargera en contrepartie le fichier r\xE9sultat "+projet.getSource(0).getFile().getPath()); + //return null; + src=projet.getSource(0); + } + else return null; } // -- etape 3: creation du legende adapter --// Modified: branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/persist/TrPostPersistanceErrorManager.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/persist/TrPostPersistanceErrorManager.java 2008-10-30 14:27:59 UTC (rev 4113) +++ branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/persist/TrPostPersistanceErrorManager.java 2008-10-30 16:04:39 UTC (rev 4114) @@ -2,18 +2,24 @@ import java.awt.BorderLayout; import java.awt.Frame; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; import java.util.ArrayList; import java.util.List; +import javax.swing.JButton; import javax.swing.JDialog; import javax.swing.JLabel; import javax.swing.JPanel; import javax.swing.JScrollPane; import javax.swing.JTable; +import javax.swing.event.TableModelListener; import javax.swing.table.DefaultTableModel; +import javax.swing.table.TableModel; import org.fudaa.ctulu.CtuluUI; import org.fudaa.ctulu.gui.CtuluLibSwing; +import org.fudaa.ebli.ressource.EbliResource; import org.fudaa.fudaa.tr.common.TrResource; @@ -34,44 +40,60 @@ public void clear(){ listeMessageError.clear(); + } - private class ModeleTableError extends DefaultTableModel{ - - - java.util.List<String> listeMessageError_; - + private static class ModeleTableError implements TableModel{ + java.util.List<String> liste_; public ModeleTableError(List<String> listeMessage) { - - - listeMessageError_ = listeMessage; + super(); + liste_ = listeMessage; } - @Override public int getColumnCount() { // TODO Auto-generated method stub return 1; } - @Override public String getColumnName(int column) { // TODO Auto-generated method stub return "Messages"; } - @Override public int getRowCount() { // TODO Auto-generated method stub - return listeMessageError_.size(); + return liste_.size(); } - @Override public Object getValueAt(int row, int column) { // TODO Auto-generated method stub - return listeMessageError_.get(row); + return liste_.get(row); } - - + @Override + public void addTableModelListener(TableModelListener l) { + // TODO Auto-generated method stub + + } + @Override + public Class<?> getColumnClass(int columnIndex) { + // TODO Auto-generated method stub + return String.class; + } + @Override + public boolean isCellEditable(int rowIndex, int columnIndex) { + // TODO Auto-generated method stub + return false; + } + @Override + public void removeTableModelListener(TableModelListener l) { + // TODO Auto-generated method stub + + } + @Override + public void setValueAt(Object value, int rowIndex, int columnIndex) { + // TODO Auto-generated method stub + + } } public void showDialog(CtuluUI ui){ @@ -81,18 +103,32 @@ return; } - JTable table=new JTable(new DefaultTableModel(listeMessageError.toArray(),listeMessageError.size())); + JTable table=new JTable(new ModeleTableError(listeMessageError)); final Frame f = CtuluLibSwing.getFrameAncestorHelper(ui.getParentComponent()); - JDialog dialog_ = new JDialog(f); + final JDialog dialog_ = new JDialog(f); dialog_.setModal(true); dialog_.setTitle("Chargement termin\xE9"); final JPanel container = new JPanel(new BorderLayout()); container.add(new JScrollPane(table), BorderLayout.CENTER); container.add(new JLabel( TrResource.getS("Chargement termin\xE9 avec erreur(s)")),BorderLayout.NORTH); + + JButton ajouter_ = new JButton("Valider", EbliResource.EBLI.getIcon("crystal_valider")); + ajouter_.addActionListener(new ActionListener(){ + + @Override + public void actionPerformed(ActionEvent e) { + // TODO Auto-generated method stub + dialog_.dispose(); + } + + }); + container.add((new JPanel()).add(ajouter_),BorderLayout.SOUTH); + dialog_.setContentPane(container); dialog_.setLocationRelativeTo(ui.getParentComponent()); - dialog_.setSize(300,200); + //dialog_.pack(); + dialog_.setSize(600,250); dialog_.setVisible(true); } Modified: branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/persist/TrPostPersistenceManager.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/persist/TrPostPersistenceManager.java 2008-10-30 14:27:59 UTC (rev 4113) +++ branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/persist/TrPostPersistenceManager.java 2008-10-30 16:04:39 UTC (rev 4114) @@ -346,7 +346,7 @@ final int nbFichiersToGenrate = listeFilles.size(); out.writeInt(nbFichiersToGenrate); - for (int i = 0; i < nbFichiersToGenrate; i++) { + for (int i = nbFichiersToGenrate-1; i >=0; i--) { // creation du fichier de desciption des scenes dans le repertoire de meme nom. String nomLayout=FuLib.clean(listeFilles.get(i).previousTitleFrame); String nomFichierLayout = nomLayout + EXTENSION_REPLAYOUT + File.separator + DESCRIPTORSCENE ; @@ -909,8 +909,8 @@ parametres.put("path", projet_.getAbsolutePath()); parametres.put("ui", ui_); parametres.put("TrPostProjet", trprojet_); + parametres.put("errorMsg", managerError.listeMessageError); - // -- etape 5 lecture de la liste des couples nomsfRAME /ID --// file = new File(projet_.getAbsolutePath() + File.separator + FileWidgetNames); final List<EbliWidgetSerializeXml.CoupleNomId> listeCouplesNoms = loadNomsFrames(file); @@ -1121,6 +1121,7 @@ for (final CoupleNomId couple : listeCouplesNoms) { if (couple.id.equals(idWidget)) return couple.nom; } + this.managerError.addMessageError(this.FileWidgetNames+": Il n'existe pas de nom correspondant \xE0 la frame d'ID "+idWidget); return ""; } @@ -1175,7 +1176,12 @@ for (int i = 0; i < sceneXml.getNbFrames(); i++) { // lecture xml de l objet - final EbliWidgetSerializeXml widgetXml = (EbliWidgetSerializeXml) in.readObject(); + final Object objetXml = in.readObject(); + if(objetXml==null || !(objetXml instanceof EbliWidgetSerializeXml)){ + managerError.addMessageError(nomRepertoireLayout+": l'objet xml N\xB0"+i+" lu n'est pas un descripteur de frame valide"); + }else{ + final EbliWidgetSerializeXml widgetXml =(EbliWidgetSerializeXml) objetXml; + if(!widgetXml.isLinked()){ // generation de la widget dans la scene parametres.put("nodeName", getNodeName(listeCouplesNoms, widgetXml.getId())); @@ -1204,6 +1210,7 @@ } } + } // --On executre les widgets liees --// for (EbliWidgetSerializeXml widgetXml : listeWidgetLinked) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <de...@us...> - 2008-10-30 17:07:53
|
Revision: 4117 http://fudaa.svn.sourceforge.net/fudaa/?rev=4117&view=rev Author: deniger Date: 2008-10-30 17:07:44 +0000 (Thu, 30 Oct 2008) Log Message: ----------- Modified Paths: -------------- branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/ef/operation/EfIndexVisitorNearestElt.java branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/ef/operation/EfIndexVisitorNearestNode.java branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/ef/operation/EfLineFlowrateResult.java branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/ef/operation/EfLineIntersection.java branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/ef/operation/EfLineIntersectionsCorrectionActivity.java branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/ef/operation/EfLineIntersectionsResultsMng.java branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/ef/operation/EfLineIntersectorActivity.java branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/h2d/reflux/H2dRefluxNodalPropertiesMng.java branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/telemac/io/SerafinFileFormat.java branches/Prepro-0.92-SNAPSHOT/dodico/test/org/fudaa/dodico/ef/TestJLineIntersection.java branches/Prepro-0.92-SNAPSHOT/dodico/test/org/fudaa/dodico/telemac/TestJSerafin.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/find/CalqueFindFlecheExpression.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/geometrie/GrMorphisme.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/geometrie/GrPoint.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/volume/BUnivers.java Added Paths: ----------- branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/ef/interpolation/EfGridDataInterpolator.java branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/ef/operation/EfIndexHelper.java branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/ef/operation/EfLineIntersectionParentDefault.java branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/ef/operation/EfLineSingleIntersectFinder.java branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/ef/operation/EfTrajectoireActivity.java branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/ef/operation/EfTrajectoireGridDataProvider.java branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/ef/operation/EfTrajectoireMarqueurBuilder.java branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/ef/operation/EfTrajectoireParameters.java branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/ef/operation/EfTrajectoireParametersMarqueur.java branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/ef/operation/EfTrajectoireResultBuilder.java Removed Paths: ------------- branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/ef/interpolation/EfGridDataInterpolator.java branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/ef/interpolation/EfGridDataInterpolatorDefault.java branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/ef/interpolation/EfInterpolator.java Deleted: branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/ef/interpolation/EfGridDataInterpolator.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/ef/interpolation/EfGridDataInterpolator.java 2008-10-30 17:06:38 UTC (rev 4116) +++ branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/ef/interpolation/EfGridDataInterpolator.java 2008-10-30 17:07:44 UTC (rev 4117) @@ -1,22 +0,0 @@ -/* - * @creation 30 mai 07 - * @modification $Date: 2007-06-05 08:59:14 $ - * @license GNU General Public License 2 - * @copyright (c)1998-2001 CETMEF 2 bd Gambetta F-60231 Compiegne - * @mail de...@fu... - */ -package org.fudaa.dodico.ef.interpolation; - -import org.fudaa.dodico.ef.EfGridData; - -/** - * @author fred deniger - * @version $Id: EfGridDataInterpolator.java,v 1.1 2007-06-05 08:59:14 deniger Exp $ - */ -public interface EfGridDataInterpolator { - - EfGridData getGridData(); - - EfInterpolator getInterpolator(); - -} Copied: branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/ef/interpolation/EfGridDataInterpolator.java (from rev 4018, branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/ef/interpolation/EfInterpolator.java) =================================================================== --- branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/ef/interpolation/EfGridDataInterpolator.java (rev 0) +++ branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/ef/interpolation/EfGridDataInterpolator.java 2008-10-30 17:07:44 UTC (rev 4117) @@ -0,0 +1,211 @@ +/* + * @creation 30 mai 07 + * @modification $Date: 2007-06-11 13:04:06 $ + * @license GNU General Public License 2 + * @copyright (c)1998-2001 CETMEF 2 bd Gambetta F-60231 Compiegne + * @mail de...@fu... + */ +package org.fudaa.dodico.ef.interpolation; + +import java.io.IOException; + +import org.fudaa.ctulu.CtuluLibGeometrie; +import org.fudaa.ctulu.CtuluVariable; +import org.fudaa.ctulu.interpolation.InterpolationVectorContainer; + +import org.fudaa.dodico.ef.EfData; +import org.fudaa.dodico.ef.EfDataInterpolationAdapter; +import org.fudaa.dodico.ef.EfElement; +import org.fudaa.dodico.ef.EfElementType; +import org.fudaa.dodico.ef.EfGridData; +import org.fudaa.dodico.ef.EfGridInterface; + +/** + * Une classe permettant d'interpoler des valeurs sur un maillage. Certaines donn\xE9es definies dans le + * InterpolationVectorContainer seront interpoler en norme,theta et non pas en vx,vy. + * + * @author fred deniger + * @version $Id: EfInterpolator.java,v 1.2 2007-06-11 13:04:06 deniger Exp $ + */ +public class EfGridDataInterpolator { + + /** + * @param _data the data to set + */ + public void setData(EfGridData _data) { + data_ = _data; + } + + private static double doInterpolate(final double _xt, final double _yt, final EfData _data, final int _ielt, + final EfGridInterface _g) { + if (_data.isElementData()) { return _data.getValue(_ielt); } + final EfElement elt = _g.getElement(_ielt); + if (elt.getDefaultType() == EfElementType.T3) { + return interpolateT3(_xt, _yt, _data, _ielt, _g); + } else if (elt.getDefaultType() == EfElementType.T6) { return doInterpolateT6(_xt, _yt, _data, _ielt, _g); } + return doInterpolateOther(_xt, _yt, _data, _ielt, _g); + } + + private static double doInterpolateOther(final double _xt, final double _yt, final EfData _data, final int _ielt, + final EfGridInterface _g) { + if (_data.isElementData()) { return _data.getValue(_ielt); } + final EfElement elt = _g.getElement(_ielt); + double num = 0; + double denom = 0; + // esp est la distance min au dessous de laquelle 2 points sont consid\xE9r\xE9s comme identiques + // on calcul les distances au carre, donc on met l'epsilon au carre + final double eps = 1E-4 * 1E-4; + for (int i = elt.getPtNb() - 1; i >= 0; i--) { + final int idx = elt.getPtIndex(i); + final double dist = CtuluLibGeometrie.getD2(_xt, _yt, _g.getPtX(idx), _g.getPtY(idx)); + // on suppose que si la distance est inf\xE9rieur au dixieme de millim\xE8tre, on prend le r\xE9sultat tel quel. + if (dist < eps) { return _data.getValue(idx); } + num += _data.getValue(idx) / dist; + denom += 1 / dist; + } + if (denom == 0) { throw new IllegalAccessError("ne devrait jamais arriv\xE9"); } + return num / denom; + } + + private static double doInterpolateT6(final double _xt, final double _yt, final EfData _data, final int _ielt, + final EfGridInterface _g) { + if (_data.isElementData()) { return _data.getValue(_ielt); } + final EfElement elt = _g.getElement(_ielt); + final int i1 = elt.getPtIndex(0); + final int i2 = elt.getPtIndex(2); + final int i3 = elt.getPtIndex(4); + return doInterpolateTriangle(_xt, _yt, _data.getValue(i1), _data.getValue(i2), _data.getValue(i3), i1, i2, i3, _g); + } + + private static double doInterpolateTriangle(final double _xt, final double _yt, final double _v1, final double _v2, + final double _v3, final int _pt1, final int _pt2, final int _pt3, final EfGridInterface _g) { + final double a1 = (_g.getPtX(_pt3) - _g.getPtX(_pt2)) * (_yt - _g.getPtY(_pt2)) + - (_g.getPtY(_pt3) - _g.getPtY(_pt2)) * (_xt - _g.getPtX(_pt2)); + final double a2 = (_g.getPtX(_pt1) - _g.getPtX(_pt3)) * (_yt - _g.getPtY(_pt3)) + - (_g.getPtY(_pt1) - _g.getPtY(_pt3)) * (_xt - _g.getPtX(_pt3)); + final double a3 = (_g.getPtX(_pt2) - _g.getPtX(_pt1)) * (_yt - _g.getPtY(_pt1)) + - (_g.getPtY(_pt2) - _g.getPtY(_pt1)) * (_xt - _g.getPtX(_pt1)); + final double cmax = (_g.getPtX(_pt3) - _g.getPtX(_pt2)) * (_g.getPtY(_pt1) - _g.getPtY(_pt2)) + - (_g.getPtY(_pt3) - _g.getPtY(_pt2)) * (_g.getPtX(_pt1) - _g.getPtX(_pt2)); + return (a1 * _v1 + a2 * _v2 + a3 * _v3) / cmax; + } + + private static double getMid(double _d1, double _d2, double _coef1, double _coef2) { + return (_d1 * _coef1 + _d2 * _coef2); + } + + public static double interpolate(int _idxElt, double _x, double _y, EfData _vxData, EfData _vyData, boolean _isVx, + EfGridInterface _grid) { + EfData norme = new EfDataInterpolationAdapter.Norm(_vxData, _vyData); + EfData theta = new EfDataInterpolationAdapter.Theta(_vxData, _vyData); + double n = doInterpolate(_x, _y, norme, _idxElt, _grid); + double t = doInterpolate(_x, _y, theta, _idxElt, _grid); + return _isVx ? InterpolationVectorContainer.getVx(n, t) : InterpolationVectorContainer.getVy(n, t); + } + + public static double interpolateDangerous(int _idxElt, double _x, double _y, EfData _value, EfGridInterface _grid) { + return doInterpolate(_x, _y, _value, _idxElt, _grid); + } + + private static double interpolateT3(final double _xt, final double _yt, final EfData _data, final int _ielt, + final EfGridInterface _g) { + if (_data.isElementData()) { return _data.getValue(_ielt); } + final EfElement elt = _g.getElement(_ielt); + final int i1 = elt.getPtIndex(0); + final int i2 = elt.getPtIndex(1); + final int i3 = elt.getPtIndex(2); + return doInterpolateTriangle(_xt, _yt, _data.getValue(i1), _data.getValue(i2), _data.getValue(i3), i1, i2, i3, _g); + + } + + EfGridData data_; + + final InterpolationVectorContainer vect_; + + public EfGridDataInterpolator(final EfGridData _data) { + this(_data, null); + } + + public EfGridDataInterpolator(final EfGridData _data, final InterpolationVectorContainer _vect) { + super(); + data_ = _data; + vect_ = _vect; + } + + /** + * @return the data + */ + public EfGridData getData() { + return data_; + } + + public double getMidValue(int _pt1, int _pt2, CtuluVariable _v, int _tIdx) throws IOException { + return getValue(_pt1, _pt2, 0.5, 0.5, _v, _tIdx); + + } + + public double getValue(int _pt1, int _pt2, double _coef1, double _coef2, CtuluVariable _v, int _tIdx) + throws IOException { + if (isVect(_v)) { + + CtuluVariable vx = vect_.getVxSafe(_v); + CtuluVariable vy = vect_.getVySafe(_v);; + double vx1 = data_.getData(vx, _tIdx, _pt1); + double vx2 = data_.getData(vx, _tIdx, _pt2); + double vy1 = data_.getData(vy, _tIdx, _pt1); + double vy2 = data_.getData(vy, _tIdx, _pt2); + double n = getMid(InterpolationVectorContainer.getNorme(vx1, vy1), InterpolationVectorContainer + .getNorme(vx2, vy2), _coef1, _coef2); + double t = getMid(InterpolationVectorContainer.getTheta(vx1, vy1), InterpolationVectorContainer + .getTheta(vx2, vy2), _coef1, _coef2); + return vect_.isVx(_v) ? InterpolationVectorContainer.getVx(n, t) : InterpolationVectorContainer.getVy(n, t); + } + return getMid(data_.getData(_v, _tIdx, _pt1), data_.getData(_v, _tIdx, _pt2), _coef1, _coef2); + + } + + public InterpolationVectorContainer getVect() { + return vect_; + } + + public double interpolate(int _idxElt, double _x, double _y, CtuluVariable _value, int _tIdx) throws IOException { + EfData data = data_.getData(_value, _tIdx); + return interpolateFromValue(_idxElt, _x, _y, _value, data, _tIdx); + + } + + public double interpolateFromValue(int _idxElt, double _x, double _y, CtuluVariable _value, EfData _data, int _tIdx) + throws IOException { + EfData data = _data; + if (!data.isElementData() && isVect(_value)) { + CtuluVariable vx = null; + CtuluVariable vy = null; + EfData vxData = null; + EfData vyData = null; + boolean isVx = true; + if (vect_.isVx(_value)) { + vx = _value; + vy = vect_.getVy(vx); + vxData = data; + vyData = data_.getData(vy, _tIdx); + } else { + isVx = false; + vy = _value; + vx = vect_.getVx(vy); + vyData = data; + vxData = data_.getData(vx, _tIdx); + } + return interpolate(_idxElt, _x, _y, vxData, vyData, isVx, data_.getGrid()); + + // double norme=InterpolationVectorContainer.getNorme(, _vy) + + } + return doInterpolate(_x, _y, data, _idxElt, data_.getGrid()); + + } + + protected boolean isVect(CtuluVariable _o) { + return vect_ != null && vect_.isVect(_o); + } + +} Property changes on: branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/ef/interpolation/EfGridDataInterpolator.java ___________________________________________________________________ Added: svn:mergeinfo + Deleted: branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/ef/interpolation/EfGridDataInterpolatorDefault.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/ef/interpolation/EfGridDataInterpolatorDefault.java 2008-10-30 17:06:38 UTC (rev 4116) +++ branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/ef/interpolation/EfGridDataInterpolatorDefault.java 2008-10-30 17:07:44 UTC (rev 4117) @@ -1,34 +0,0 @@ -/* - * @creation 30 mai 07 - * @modification $Date: 2007-06-05 08:59:14 $ - * @license GNU General Public License 2 - * @copyright (c)1998-2001 CETMEF 2 bd Gambetta F-60231 Compiegne - * @mail de...@fu... - */ -package org.fudaa.dodico.ef.interpolation; - -import org.fudaa.dodico.ef.EfGridData; - -/** - * @author fred deniger - * @version $Id: EfGridDataInterpolatorDefault.java,v 1.1 2007-06-05 08:59:14 deniger Exp $ - */ -public class EfGridDataInterpolatorDefault implements EfGridDataInterpolator { - final EfGridData data_; - final EfInterpolator interpolator_; - - public EfGridDataInterpolatorDefault(final EfGridData _data, final EfInterpolator _interpolator) { - super(); - data_ = _data; - interpolator_ = _interpolator; - } - - public EfGridData getGridData() { - return data_; - } - - public EfInterpolator getInterpolator() { - return interpolator_; - } - -} Deleted: branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/ef/interpolation/EfInterpolator.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/ef/interpolation/EfInterpolator.java 2008-10-30 17:06:38 UTC (rev 4116) +++ branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/ef/interpolation/EfInterpolator.java 2008-10-30 17:07:44 UTC (rev 4117) @@ -1,203 +0,0 @@ -/* - * @creation 30 mai 07 - * @modification $Date: 2007-06-11 13:04:06 $ - * @license GNU General Public License 2 - * @copyright (c)1998-2001 CETMEF 2 bd Gambetta F-60231 Compiegne - * @mail de...@fu... - */ -package org.fudaa.dodico.ef.interpolation; - -import java.io.IOException; - -import org.fudaa.ctulu.CtuluLibGeometrie; -import org.fudaa.ctulu.CtuluVariable; -import org.fudaa.ctulu.interpolation.InterpolationVectorContainer; - -import org.fudaa.dodico.ef.EfData; -import org.fudaa.dodico.ef.EfDataInterpolationAdapter; -import org.fudaa.dodico.ef.EfElement; -import org.fudaa.dodico.ef.EfElementType; -import org.fudaa.dodico.ef.EfGridData; -import org.fudaa.dodico.ef.EfGridInterface; - -/** - * @author fred deniger - * @version $Id: EfInterpolator.java,v 1.2 2007-06-11 13:04:06 deniger Exp $ - */ -public class EfInterpolator { - - final InterpolationVectorContainer vect_; - final EfGridData data_; - - public EfInterpolator(final EfGridData _data, final InterpolationVectorContainer _vect) { - super(); - data_ = _data; - vect_ = _vect; - } - - public InterpolationVectorContainer getVect() { - return vect_; - } - - protected boolean isVect(CtuluVariable _o) { - return vect_ != null && vect_.isVect(_o); - } - - public static double interpolate(int _idxElt, double _x, double _y, EfData _vxData, EfData _vyData, boolean _isVx, - EfGridInterface _grid) { - EfData norme = new EfDataInterpolationAdapter.Norm(_vxData, _vyData); - EfData theta = new EfDataInterpolationAdapter.Theta(_vxData, _vyData); - double n = doInterpolate(_x, _y, norme, _idxElt, _grid); - double t = doInterpolate(_x, _y, theta, _idxElt, _grid); - return _isVx ? InterpolationVectorContainer.getVx(n, t) : InterpolationVectorContainer.getVy(n, t); - } - - public static double interpolateDangerous(int _idxElt, double _x, double _y, EfData _value, EfGridInterface _grid) { - return doInterpolate(_x, _y, _value, _idxElt, _grid); - } - - public double getValue(int _pt1, int _pt2, double _coef1, double _coef2, CtuluVariable _v, int _tIdx) - throws IOException { - if (isVect(_v)) { - - CtuluVariable vx = vect_.getVxSafe(_v); - CtuluVariable vy = vect_.getVySafe(_v);; - double vx1 = data_.getData(vx, _tIdx, _pt1); - double vx2 = data_.getData(vx, _tIdx, _pt2); - double vy1 = data_.getData(vy, _tIdx, _pt1); - double vy2 = data_.getData(vy, _tIdx, _pt2); - double n = getMid(InterpolationVectorContainer.getNorme(vx1, vy1), InterpolationVectorContainer - .getNorme(vx2, vy2), _coef1, _coef2); - double t = getMid(InterpolationVectorContainer.getTheta(vx1, vy1), InterpolationVectorContainer - .getTheta(vx2, vy2), _coef1, _coef2); - return vect_.isVx(_v) ? InterpolationVectorContainer.getVx(n, t) : InterpolationVectorContainer.getVy(n, t); - } - return getMid(data_.getData(_v, _tIdx, _pt1), data_.getData(_v, _tIdx, _pt2), _coef1, _coef2); - - } - - public double getMidValue(int _pt1, int _pt2, CtuluVariable _v, int _tIdx) throws IOException { - return getValue(_pt1, _pt2, 0.5, 0.5, _v, _tIdx); - - } - - private static double getMid(double _d1, double _d2, double _coef1, double _coef2) { - return (_d1 * _coef1 + _d2 * _coef2); - } - - public double interpolate(int _idxElt, double _x, double _y, CtuluVariable _value, int _tIdx) throws IOException { - EfData data = data_.getData(_value, _tIdx); - return interpolateFromValue(_idxElt, _x, _y, _value, data, _tIdx); - - } - - public double interpolateFromValue(int _idxElt, double _x, double _y, CtuluVariable _value, EfData _data, int _tIdx) - throws IOException { - EfData data = _data; - if (!data.isElementData() && isVect(_value)) { - CtuluVariable vx = null; - CtuluVariable vy = null; - EfData vxData = null; - EfData vyData = null; - boolean isVx = true; - if (vect_.isVx(_value)) { - vx = _value; - vy = vect_.getVy(vx); - vxData = data; - vyData = data_.getData(vy, _tIdx); - } else { - isVx = false; - vy = _value; - vx = vect_.getVx(vy); - vyData = data; - vxData = data_.getData(vx, _tIdx); - } - return interpolate(_idxElt, _x, _y, vxData, vyData, isVx, data_.getGrid()); - - // double norme=InterpolationVectorContainer.getNorme(, _vy) - - } - return doInterpolate(_x, _y, data, _idxElt, data_.getGrid()); - - } - - private static double interpolateT3(final double _xt, final double _yt, final EfData _data, final int _ielt, - final EfGridInterface _g) { - if (_data.isElementData()) { - return _data.getValue(_ielt); - } - final EfElement elt = _g.getElement(_ielt); - final int i1 = elt.getPtIndex(0); - final int i2 = elt.getPtIndex(1); - final int i3 = elt.getPtIndex(2); - return doInterpolateTriangle(_xt, _yt, _data.getValue(i1), _data.getValue(i2), _data.getValue(i3), i1, i2, i3, _g); - - } - - private static double doInterpolateT6(final double _xt, final double _yt, final EfData _data, final int _ielt, - final EfGridInterface _g) { - if (_data.isElementData()) { - return _data.getValue(_ielt); - } - final EfElement elt = _g.getElement(_ielt); - final int i1 = elt.getPtIndex(0); - final int i2 = elt.getPtIndex(2); - final int i3 = elt.getPtIndex(4); - return doInterpolateTriangle(_xt, _yt, _data.getValue(i1), _data.getValue(i2), _data.getValue(i3), i1, i2, i3, _g); - } - - private static double doInterpolate(final double _xt, final double _yt, final EfData _data, final int _ielt, - final EfGridInterface _g) { - if (_data.isElementData()) { - return _data.getValue(_ielt); - } - final EfElement elt = _g.getElement(_ielt); - if (elt.getDefaultType() == EfElementType.T3) { - return interpolateT3(_xt, _yt, _data, _ielt, _g); - } else if (elt.getDefaultType() == EfElementType.T6) { - return doInterpolateT6(_xt, _yt, _data, _ielt, _g); - } - return doInterpolateOther(_xt, _yt, _data, _ielt, _g); - } - - private static double doInterpolateOther(final double _xt, final double _yt, final EfData _data, final int _ielt, - final EfGridInterface _g) { - if (_data.isElementData()) { - return _data.getValue(_ielt); - } - final EfElement elt = _g.getElement(_ielt); - double num = 0; - double denom = 0; - // esp est la distance min au dessous de laquelle 2 points sont consid\xE9r\xE9s comme identiques - // on calcul les distances au carre, donc on met l'epsilon au carre - final double eps = 1E-4 * 1E-4; - for (int i = elt.getPtNb() - 1; i >= 0; i--) { - final int idx = elt.getPtIndex(i); - final double dist = CtuluLibGeometrie.getD2(_xt, _yt, _g.getPtX(idx), _g.getPtY(idx)); - // on suppose que si la distance est inf\xE9rieur au dixieme de millim\xE8tre, on prend le r\xE9sultat tel quel. - if (dist < eps) { - return _data.getValue(idx); - } - num += _data.getValue(idx) / dist; - denom += 1 / dist; - } - if (denom == 0) { - throw new IllegalAccessError("ne devrait jamais arriv\xE9"); - } - return num / denom; - } - - private static double doInterpolateTriangle(final double _xt, final double _yt, final double _v1, final double _v2, - final double _v3, final int _pt1, final int _pt2, final int _pt3, final EfGridInterface _g) { - final double a1 = (_g.getPtX(_pt3) - _g.getPtX(_pt2)) * (_yt - _g.getPtY(_pt2)) - - (_g.getPtY(_pt3) - _g.getPtY(_pt2)) * (_xt - _g.getPtX(_pt2)); - final double a2 = (_g.getPtX(_pt1) - _g.getPtX(_pt3)) * (_yt - _g.getPtY(_pt3)) - - (_g.getPtY(_pt1) - _g.getPtY(_pt3)) * (_xt - _g.getPtX(_pt3)); - final double a3 = (_g.getPtX(_pt2) - _g.getPtX(_pt1)) * (_yt - _g.getPtY(_pt1)) - - (_g.getPtY(_pt2) - _g.getPtY(_pt1)) * (_xt - _g.getPtX(_pt1)); - final double cmax = (_g.getPtX(_pt3) - _g.getPtX(_pt2)) * (_g.getPtY(_pt1) - _g.getPtY(_pt2)) - - (_g.getPtY(_pt3) - _g.getPtY(_pt2)) * (_g.getPtX(_pt1) - _g.getPtX(_pt2)); - return (a1 * _v1 + a2 * _v2 + a3 * _v3) / cmax; - } - -} Added: branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/ef/operation/EfIndexHelper.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/ef/operation/EfIndexHelper.java (rev 0) +++ branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/ef/operation/EfIndexHelper.java 2008-10-30 17:07:44 UTC (rev 4117) @@ -0,0 +1,63 @@ +/** + * Licence GPL + * Copyright Genesis + */ +package org.fudaa.dodico.ef.operation; + +import org.fudaa.ctulu.CtuluListSelection; +import org.fudaa.ctulu.ProgressionInterface; +import org.fudaa.dodico.ef.EfGridInterface; + +/** + * @author deniger + */ +public final class EfIndexHelper { + + private EfIndexHelper() { + + } + + /** + * @param _grid + * @param _x le x + * @param _y le y + * @param _prog progression + * @return l'indice de l'element englobant ou -1 si non trouve + */ + public static int getElementEnglobant(EfGridInterface _grid, double _x, double _y, ProgressionInterface _prog) { + if (_grid.getIndex() == null) { + _grid.createIndexRegular(_prog); + } + final EfIndexVisitorNearestElt visitor = new EfIndexVisitorNearestElt(_grid, _x, _y, 0); + _grid.getIndex().query(EfIndexVisitorNearestNode.getEnvelope(_x, _y, 0), visitor); + return visitor.isIn() ? visitor.getSelected() : -1; + } + + /** + * @param _grid + * @param _x le x + * @param _y le y + * @param _tolerance la tolerance pour la recherche + * @param _prog la barre de progression + * @return la selection trouvee + */ + public static CtuluListSelection getNearestNode(EfGridInterface _grid, double _x, double _y, double _tolerance, + ProgressionInterface _prog) { + if (_grid.getIndex() == null) { + _grid.createIndexRegular(_prog); + } + final EfIndexVisitorNearestNode visitor = new EfIndexVisitorNearestNode(_grid, _x, _y, _tolerance); + _grid.getIndex().query(EfIndexVisitorNearestNode.getEnvelope(_x, _y, _tolerance), visitor); + return visitor.getSelection(); + } + + public static CtuluListSelection getNearestElement(EfGridInterface _grid, double _x, double _y, double _tolerance, + ProgressionInterface _prog) { + if (_grid.getIndex() == null) { + _grid.createIndexRegular(_prog); + } + final EfIndexVisitorNearestElt visitor = new EfIndexVisitorNearestElt(_grid, _x, _y, _tolerance); + _grid.getIndex().query(EfIndexVisitorNearestNode.getEnvelope(_x, _y, _tolerance), visitor); + return visitor.getSelection(); + } +} Modified: branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/ef/operation/EfIndexVisitorNearestElt.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/ef/operation/EfIndexVisitorNearestElt.java 2008-10-30 17:06:38 UTC (rev 4116) +++ branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/ef/operation/EfIndexVisitorNearestElt.java 2008-10-30 17:07:44 UTC (rev 4117) @@ -25,7 +25,7 @@ private int eltSelected_ = -1; private boolean isIn_; private double minDist_ = -1; - private final double maxSquareDistance_; + // private final double maxSquareDistance_; private final double maxDistance_; private final double x_; private final double y_; @@ -41,7 +41,7 @@ super(); grid_ = _grid; maxDistance_ = _dist; - maxSquareDistance_ = _dist < 0 ? -1D : (_dist * _dist); + // maxSquareDistance_ = _dist < 0 ? -1D : (_dist * _dist); x_ = _x; y_ = _y; } @@ -59,9 +59,9 @@ isIn_ = true; eltSelected_ = _idxElt; } else { - final double dist = el.getDistAuCarre(x_, y_, grid_); - // si maxSquareDistance_ est n\xE9gatif, l'utilisateur ne veut pas prendre en compte la distance max. - if ((maxSquareDistance_ < 0 || dist <= maxSquareDistance_) && (eltSelected_ < 0 || dist < minDist_)) { + final double dist = el.getDist(x_, y_, grid_); + // si maxDistance_ est n\xE9gatif, l'utilisateur ne veut pas prendre en compte la distance max. + if ((maxDistance_ < 0 || dist <= maxDistance_) && (eltSelected_ < 0 || dist < minDist_)) { minDist_ = dist; eltSelected_ = _idxElt; } @@ -87,7 +87,7 @@ } public double getMinDist() { - return Math.sqrt(minDist_); + return minDist_; } public int getSelected() { Modified: branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/ef/operation/EfIndexVisitorNearestNode.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/ef/operation/EfIndexVisitorNearestNode.java 2008-10-30 17:06:38 UTC (rev 4116) +++ branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/ef/operation/EfIndexVisitorNearestNode.java 2008-10-30 17:07:44 UTC (rev 4117) @@ -32,7 +32,7 @@ private final EfGridInterface grid_; private int selected_ = -1; private double minDist_ = -1; - private final double maxSquareDistance_; +// private final double maxSquareDistance_; private final double maxDistance_; private final double x_; @@ -48,7 +48,7 @@ super(); grid_ = _grid; maxDistance_ = _maxDist; - maxSquareDistance_ = _maxDist < 0 ? -1D : (_maxDist * _maxDist); +// maxSquareDistance_ = _maxDist < 0 ? -1D : (_maxDist * _maxDist); x_ = _x; y_ = _y; } @@ -63,8 +63,8 @@ final EfElement el = grid_.getElement(_idxElt); for (int i = el.getPtNb() - 1; i >= 0; i--) { final int idx = el.getPtIndex(i); - final double dist = CtuluLibGeometrie.getD2(x_, y_, grid_.getPtX(idx), grid_.getPtY(idx)); - if ((maxSquareDistance_ < 0 || dist <= maxSquareDistance_) && (selected_ < 0 || dist < minDist_)) { + final double dist = CtuluLibGeometrie.getDistance(x_, y_, grid_.getPtX(idx), grid_.getPtY(idx)); + if ((maxDistance_ < 0 || dist <= maxDistance_) && (selected_ < 0 || dist < minDist_)) { minDist_ = dist; selected_ = idx; } @@ -73,7 +73,7 @@ } public double getMinDist() { - return Math.sqrt(minDist_); + return minDist_; } public int getNodeSelected() { Modified: branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/ef/operation/EfLineFlowrateResult.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/ef/operation/EfLineFlowrateResult.java 2008-10-30 17:06:38 UTC (rev 4116) +++ branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/ef/operation/EfLineFlowrateResult.java 2008-10-30 17:07:44 UTC (rev 4117) @@ -63,7 +63,7 @@ // le vecteur de x1 vers x2 double vxs = (x2_ - x1_); double vys = (y2_ - y1_); - double norme = Math.sqrt(vxs * vxs + vys * vys); + double norme = Math.hypot(vxs, vys); // norme nulle ->pas de vitesse if (norme == 0) return 0; // le coupe v, vs doit etre dans le sens trigo @@ -123,8 +123,8 @@ idx++; calculator_.x2_ = _res.getIntersect(idx).getX(); calculator_.y2_ = _res.getIntersect(idx).getY(); -// n = _res.getIntersect(idx).getValueBadInterpolation(_vx); -// t = _res.getIntersect(idx).getValueBadInterpolation(_vy); + // n = _res.getIntersect(idx).getValueBadInterpolation(_vx); + // t = _res.getIntersect(idx).getValueBadInterpolation(_vy); calculator_.vx2_ = _res.getIntersect(idx).getValueBadInterpolation(_vx); calculator_.vy2_ = _res.getIntersect(idx).getValueBadInterpolation(_vy); calculator_.h2_ = _res.getIntersect(idx).getValueBadInterpolation(_h); Modified: branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/ef/operation/EfLineIntersection.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/ef/operation/EfLineIntersection.java 2008-10-30 17:06:38 UTC (rev 4116) +++ branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/ef/operation/EfLineIntersection.java 2008-10-30 17:07:44 UTC (rev 4117) @@ -22,7 +22,7 @@ import org.fudaa.dodico.ef.EfGridInterface; import org.fudaa.dodico.ef.EfNeighborMesh; import org.fudaa.dodico.ef.interpolation.EfGridDataInterpolator; -import org.fudaa.dodico.ef.interpolation.EfInterpolator; +import org.fudaa.dodico.ef.interpolation.EfGridDataInterpolator; public abstract class EfLineIntersection implements EfLineIntersectionI { @@ -76,16 +76,16 @@ if (parent_ == null) throw new IllegalAccessError("pas de parent"); EfGridDataInterpolator data = parent_.getGridData(); try { - if (data.getGridData().isElementVar(_var)) { + if (data.getData().isElementVar(_var)) { buildAdjacentMeshes(); - if (adjacentMesh_[1] < 0) return data.getGridData().getData(_var, _tIdx, adjacentMesh_[0]); - return data.getInterpolator().getMidValue(adjacentMesh_[0], adjacentMesh_[1], _var, _tIdx); + if (adjacentMesh_[1] < 0) return data.getData().getData(_var, _tIdx, adjacentMesh_[0]); + return data.getMidValue(adjacentMesh_[0], adjacentMesh_[1], _var, _tIdx); } double d1 = getD1(); double d2 = getD2(); - return data.getInterpolator().getValue(i1_, i2_, d1 / (d1 + d2), d2 / (d1 + d2), _var, _tIdx); + return data.getValue(i1_, i2_, d1 / (d1 + d2), d2 / (d1 + d2), _var, _tIdx); } catch (IllegalAccessError _evt) { FuLog.error(_evt); @@ -305,9 +305,9 @@ if (!isRealIntersection()) throw new IllegalAccessError("non accessible !"); EfGridDataInterpolator data = parent_.getGridData(); try { - if (data.getGridData().isElementVar(_var)) return data.getGridData().getData(_var, _tIdx, ielt_); + if (data.getData().isElementVar(_var)) return data.getData().getData(_var, _tIdx, ielt_); - return data.getInterpolator().interpolate(ielt_, x_, y_, _var, _tIdx); + return data.interpolate(ielt_, x_, y_, _var, _tIdx); } catch (IOException _evt) { FuLog.error(_evt); } @@ -317,7 +317,7 @@ public double getValueBadInterpolation(EfData _d) { if (!isRealIntersection()) throw new IllegalAccessError("non accessible !"); if (_d.isElementData()) return _d.getValue(ielt_); - return EfInterpolator.interpolateDangerous(ielt_, x_, y_, _d, parent_.getGrid()); + return EfGridDataInterpolator.interpolateDangerous(ielt_, x_, y_, _d, parent_.getGrid()); } public double getX() { @@ -364,12 +364,12 @@ public double getValue(CtuluVariable _var, int _tIdx) { EfGridDataInterpolator data = parent_.getGridData(); try { - if (data.getGridData().isElementVar(_var)) { + if (data.getData().isElementVar(_var)) { parent_.buildNeighbor(null); return parent_.getNeighbor().getAverageForNode(_var, ptIdx_, _tIdx, parent_.getGridData()); } - return data.getGridData().getData(_var, _tIdx, ptIdx_); + return data.getData().getData(_var, _tIdx, ptIdx_); } catch (IllegalAccessError _evt) { FuLog.error(_evt); Added: branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/ef/operation/EfLineIntersectionParentDefault.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/ef/operation/EfLineIntersectionParentDefault.java (rev 0) +++ branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/ef/operation/EfLineIntersectionParentDefault.java 2008-10-30 17:07:44 UTC (rev 4117) @@ -0,0 +1,42 @@ +/** + * Licence GPL + * Copyright Genesis + */ +package org.fudaa.dodico.ef.operation; + +import org.fudaa.ctulu.ProgressionInterface; +import org.fudaa.dodico.ef.EfGridInterface; +import org.fudaa.dodico.ef.EfNeighborMesh; +import org.fudaa.dodico.ef.interpolation.EfGridDataInterpolator; + +public class EfLineIntersectionParentDefault implements EfLineIntersectionParent { + + final EfGridDataInterpolator data_; + + protected EfLineIntersectionParentDefault(final EfGridDataInterpolator _interpolator) { + data_ = _interpolator; + + } + + public void buildNeighbor(ProgressionInterface _prog) { + EfGridInterface grid = data_.getData().getGrid(); + EfNeighborMesh neighbor = grid.getNeighbors(); + if (neighbor == null) { + grid.computeNeighbord(_prog, null); + } + + } + + public EfGridInterface getGrid() { + return data_.getData().getGrid(); + } + + public EfGridDataInterpolator getGridData() { + return data_; + } + + public EfNeighborMesh getNeighbor() { + return data_.getData().getGrid().getNeighbors(); + } + +} \ No newline at end of file Modified: branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/ef/operation/EfLineIntersectionsCorrectionActivity.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/ef/operation/EfLineIntersectionsCorrectionActivity.java 2008-10-30 17:06:38 UTC (rev 4116) +++ branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/ef/operation/EfLineIntersectionsCorrectionActivity.java 2008-10-30 17:07:44 UTC (rev 4117) @@ -12,6 +12,7 @@ import java.util.BitSet; import java.util.List; +import org.fudaa.ctulu.CtuluActivity; import org.fudaa.ctulu.ProgressionInterface; import org.fudaa.ctulu.ProgressionUpdater; @@ -19,10 +20,17 @@ * @author fred deniger * @version $Id: EfLineIntersectionsCorrectionActivity.java,v 1.1 2007-06-13 12:55:42 deniger Exp $ */ -public class EfLineIntersectionsCorrectionActivity { +public class EfLineIntersectionsCorrectionActivity implements CtuluActivity { + private boolean stop_; + + public void stop() { + stop_ = true; + } + public EfLineIntersectionsResultsI correct(EfLineIntersectionsResultsI _res, EfLineIntersectionsCorrectionTester _tester, int _tidx, ProgressionInterface _prog) { + stop_ = false; if (_tester == null || _res == null || _res.isEmpty()) return _res; int nbNew = _res.getNbIntersect() + 15; BitSet isOut = new BitSet(nbNew); @@ -35,6 +43,7 @@ destIntersection.add(_res.getIntersect(0)); // on parcourt les segment for (int i = 0; i < nbSeg; i++) { + if (stop_) return null; // le tester va ajouter des intersections si n\xE9cessaire: // on ne fait le test que pour les segments internes. boolean isSegmentOut = _res.isSegmentOut(i); @@ -68,6 +77,7 @@ .toArray(new EfLineIntersection[destIntersection.size()]), isOut); } + private static class AdapterResults implements EfLineIntersectionsResultsI { final EfLineIntersectionsResultsI res_; final EfLineIntersection[] inters_; Modified: branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/ef/operation/EfLineIntersectionsResultsMng.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/ef/operation/EfLineIntersectionsResultsMng.java 2008-10-30 17:06:38 UTC (rev 4116) +++ branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/ef/operation/EfLineIntersectionsResultsMng.java 2008-10-30 17:07:44 UTC (rev 4117) @@ -145,7 +145,7 @@ } public void buildNeighbor(final ProgressionInterface _prog) { - neighbor_ = EfNeighborMesh.compute(grid_.getGridData().getGrid(), _prog); + neighbor_ = EfNeighborMesh.compute(grid_.getData().getGrid(), _prog); } public EfLineIntersectionsResultsBuilder createBuilder(EfLineIntersectionsCorrectionTester _tester) { @@ -190,7 +190,7 @@ } public EfGridInterface getGrid() { - return grid_.getGridData().getGrid(); + return grid_.getData().getGrid(); } public EfGridDataInterpolator getGridData() { Modified: branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/ef/operation/EfLineIntersectorActivity.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/ef/operation/EfLineIntersectorActivity.java 2008-10-30 17:06:38 UTC (rev 4116) +++ branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/ef/operation/EfLineIntersectorActivity.java 2008-10-30 17:07:44 UTC (rev 4117) @@ -16,14 +16,6 @@ import java.util.SortedSet; import java.util.TreeSet; -import com.vividsolutions.jts.algorithm.LineIntersector; -import com.vividsolutions.jts.algorithm.PointInRing; -import com.vividsolutions.jts.algorithm.RobustLineIntersector; -import com.vividsolutions.jts.geom.Coordinate; -import com.vividsolutions.jts.geom.Envelope; -import com.vividsolutions.jts.geom.LineString; -import com.vividsolutions.jts.geom.PrecisionModel; - import org.fudaa.ctulu.CtuluActivity; import org.fudaa.ctulu.CtuluLibArray; import org.fudaa.ctulu.CtuluLibGeometrie; @@ -33,7 +25,6 @@ import org.fudaa.ctulu.gis.GISLib; import org.fudaa.ctulu.gis.GISPolygone; import org.fudaa.ctulu.interpolation.InterpolationVectorContainer; - import org.fudaa.dodico.commun.DodicoLib; import org.fudaa.dodico.ef.EfElement; import org.fudaa.dodico.ef.EfGridData; @@ -41,12 +32,18 @@ import org.fudaa.dodico.ef.EfIndexInterface; import org.fudaa.dodico.ef.EfNeighborMesh; import org.fudaa.dodico.ef.interpolation.EfGridDataInterpolator; -import org.fudaa.dodico.ef.interpolation.EfGridDataInterpolatorDefault; -import org.fudaa.dodico.ef.interpolation.EfInterpolator; import org.fudaa.dodico.ef.operation.EfLineIntersection.ItemEdge; import org.fudaa.dodico.ef.operation.EfLineIntersection.ItemNode; import org.fudaa.dodico.ef.operation.EfLineIntersectionsResultsMng.DistComparator; +import com.vividsolutions.jts.algorithm.LineIntersector; +import com.vividsolutions.jts.algorithm.PointInRing; +import com.vividsolutions.jts.algorithm.RobustLineIntersector; +import com.vividsolutions.jts.geom.Coordinate; +import com.vividsolutions.jts.geom.Envelope; +import com.vividsolutions.jts.geom.LineString; +import com.vividsolutions.jts.geom.PrecisionModel; + /** * @author fred deniger * @version $Id: EfLineIntersectorActivity.java,v 1.5 2007-06-20 12:21:53 deniger Exp $ @@ -72,9 +69,7 @@ } void addPt(int _idx) { - if (isComplete()) { - throw new IllegalAccessError("on doit jamais arriv\xE9 ici !"); - } + if (isComplete()) { throw new IllegalAccessError("on doit jamais arriv\xE9 ici !"); } if (!issetItem1()) { item1_ = new ItemNode(_idx); item1_.setParent(parent_); @@ -128,29 +123,24 @@ final TempResult tmp_ = new TempResult(this); - public EfLineIntersectorActivity(EfGridData _grid, EfInterpolator _inter) { - this(new EfGridDataInterpolatorDefault(_grid, _inter)); - - } - /** * @param _grid * @param _vects peut etre null */ public EfLineIntersectorActivity(EfGridData _grid, InterpolationVectorContainer _vects) { - this(new EfGridDataInterpolatorDefault(_grid, new EfInterpolator(_grid, _vects))); + this(new EfGridDataInterpolator(_grid, _vects)); } - + public EfLineIntersectorActivity(EfGridData _grid) { - this(new EfGridDataInterpolatorDefault(_grid, new EfInterpolator(_grid, null))); + this(new EfGridDataInterpolator(_grid, null)); } public EfLineIntersectorActivity(EfGridDataInterpolator _grid) { super(); gridData_ = _grid; - grid_ = gridData_.getGridData().getGrid(); + grid_ = gridData_.getData().getGrid(); intersector_ = new RobustLineIntersector(); // mm intersector_.setPrecisionModel(new PrecisionModel(1E4)); @@ -257,19 +247,13 @@ } } - protected void addIntersectionForSegExtremite(List _res, double _x, double _y, EfIndexVisitorHashSet _eltSelected) { + public void addIntersectionForSegExtremite(List _res, double _x, double _y, EfIndexVisitorHashSet _eltSelected) { final int startElt = getContainingElement(_x, _y, _eltSelected.getIterator()); EfLineIntersection.ItemInitial init = new EfLineIntersection.ItemInitial(this); if (startElt >= 0) { EfElement elt = grid_.getElement(startElt); - int idxSelected = -1; double tolerance = getTolerance(); - for (int i = elt.getPtNb() - 1; i >= 0 && idxSelected < 0; i--) { - final int idx = elt.getPtIndex(i); - if (CtuluLibGeometrie.getDistance(_x, _y, grid_.getPtX(idx), grid_.getPtY(idx)) < tolerance) { - idxSelected = idx; - } - } + int idxSelected = getSelectedNodeIdx(_x, _y, elt, tolerance); if (idxSelected >= 0) { init.item1_ = new EfLineIntersection.ItemNode(idxSelected); } else { @@ -297,19 +281,12 @@ _res.add(init); } + private int getSelectedNodeIdx(double _x, double _y, EfElement elt, double tolerance) { + return EfLineSingleIntersectFinder.getSelectedNodeIdx(grid_, _x, _y, elt, tolerance); + } + protected int getContainingElement(double _x, double _y, TIntIterator _it) { - EfIndexVisitorNearestElt visitor = new EfIndexVisitorNearestElt(grid_, _x, _y, 1e-4); - while (_it.hasNext()) { - visitor.visitItem(_it.next()); - } - int idx = visitor.getSelected(); - // un element proche a \xE9t\xE9 trouv\xE9 mais le point (_x,_y) n'appartient pas \xE0 ce point - if (idx >= 0 && !visitor.isIn()) { - // on tol\xE8re une erreur de 1E-3: si la distance entre l'element et le point est inferieur a 1E-3 on renvoie quand - // meme cet element - idx = (grid_.getElement(idx).getDist(_x, _y, grid_) < getTolerance()) ? idx : -1; - } - return idx; + return EfLineSingleIntersectFinder.getContainingElement(grid_, _x, _y, _it, getTolerance()); } Added: branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/ef/operation/EfLineSingleIntersectFinder.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/ef/operation/EfLineSingleIntersectFinder.java (rev 0) +++ branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/ef/operation/EfLineSingleIntersectFinder.java 2008-10-30 17:07:44 UTC (rev 4117) @@ -0,0 +1,101 @@ +/** + * Licence GPL + * Copyright Genesis + */ +package org.fudaa.dodico.ef.operation; + +import gnu.trove.TIntIterator; + +import org.fudaa.ctulu.CtuluLibGeometrie; +import org.fudaa.ctulu.ProgressionInterface; +import org.fudaa.dodico.ef.EfElement; +import org.fudaa.dodico.ef.EfGridInterface; + +/** + * @author deniger + */ +public class EfLineSingleIntersectFinder { + EfIndexVisitorHashSet _eltSelected = new EfIndexVisitorHashSet(); + + EfGridInterface grid_; + + double tolerance_ = 1E-3; + + public EfLineIntersection findIntersectionFor(double _x, double _y, ProgressionInterface _prog) { + final int startElt = EfIndexHelper.getElementEnglobant(grid_, _x, _y, _prog); + if (startElt >= 0) { + EfElement elt = grid_.getElement(startElt); + double tolerance = getTolerance(); + int idxSelected = getSelectedNodeIdx(_x, _y, elt); + if (idxSelected >= 0) { + return new EfLineIntersection.ItemNode(idxSelected); + } else { + // sur une arete ? + for (int i = 0; i < elt.getNbEdge(); i++) { + int i1 = elt.getEdgePt1(i); + int i2 = elt.getEdgePt2(i); + if (CtuluLibGeometrie.distanceFromSegment(grid_.getPtX(i1), grid_.getPtY(i1), grid_.getPtX(i2), grid_ + .getPtY(i2), _x, _y) <= tolerance) { return new EfLineIntersection.ItemEdge(i1, i2, _x, _y); } + } + // pas une arete + return new EfLineIntersection.ItemMesh(startElt, _x, _y); + } + + } else { + return new EfLineIntersection.ItemNoIntersect(_x, _y); + } + + } + + protected int getContainingElement(double _x, double _y, TIntIterator _it) { + return getContainingElement(grid_, _x, _y, _it, getTolerance()); + + } + + private int getSelectedNodeIdx(double _x, double _y, EfElement elt) { + return getSelectedNodeIdx(grid_, _x, _y, elt, getTolerance()); + } + + /** + * @return the tolerance + */ + public double getTolerance() { + return tolerance_; + } + + /** + * @param _tolerance the tolerance to set + */ + public void setTolerance(double _tolerance) { + tolerance_ = _tolerance; + } + + protected static int getContainingElement(EfGridInterface _grid, double _x, double _y, TIntIterator _it, + double _tolerance) { + EfIndexVisitorNearestElt visitor = new EfIndexVisitorNearestElt(_grid, _x, _y, _tolerance / 10); + while (_it.hasNext()) { + visitor.visitItem(_it.next()); + } + int idx = visitor.getSelected(); + // un element proche a \xE9t\xE9 trouv\xE9 mais le point (_x,_y) n'appartient pas \xE0 ce point + if (idx >= 0 && !visitor.isIn()) { + // on tol\xE8re une erreur de 1E-3: si la distance entre l'element et le point est inferieur a 1E-3 on renvoie quand + // meme cet element + idx = (_grid.getElement(idx).getDist(_x, _y, _grid) < _tolerance) ? idx : -1; + } + return idx; + + } + + static int getSelectedNodeIdx(EfGridInterface _grid, double _x, double _y, EfElement elt, double tolerance) { + int idxSelected = -1; + for (int i = elt.getPtNb() - 1; i >= 0 && idxSelected < 0; i--) { + final int idx = elt.getPtIndex(i); + if (CtuluLibGeometrie.getDistance(_x, _y, _grid.getPtX(idx), _grid.getPtY(idx)) < tolerance) { + idxSelected = idx; + } + } + return idxSelected; + } + +} Added: branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/ef/operation/EfTrajectoireActivity.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/ef/operation/EfTrajectoireActivity.java (rev 0) +++ branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/ef/operation/EfTrajectoireActivity.java 2008-10-30 17:07:44 UTC (rev 4117) @@ -0,0 +1,298 @@ +package org.fudaa.dodico.ef.operation; + +import gnu.trove.TIntHashSet; +import gnu.trove.TIntIterator; + +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; + +import org.fudaa.ctulu.CtuluActivity; +import org.fudaa.ctulu.CtuluAnalyze; +import org.fudaa.ctulu.CtuluLib; +import org.fudaa.ctulu.CtuluLibArray; +import org.fudaa.ctulu.CtuluLibGeometrie; +import org.fudaa.ctulu.ProgressionInterface; +import org.fudaa.ctulu.gis.GISGeometryFactory; +import org.fudaa.dodico.commun.DodicoLib; +import org.fudaa.dodico.ef.EfElement; +import org.fudaa.dodico.ef.EfGridData; +import org.fudaa.dodico.ef.EfGridInterface; +import org.fudaa.dodico.ef.decorator.EfGridDataCacheOneTimeDecorator; +import org.fudaa.dodico.ef.decorator.EfGridDataTimeDecorator; +import org.fudaa.dodico.ef.interpolation.EfGridDataInterpolator; + +import com.memoire.fu.FuLog; +import com.vividsolutions.jts.geom.Coordinate; + +/** + * Algorithme de Calcul les lignes de courants TODO mettre la classe dans EF il y a la classe qui est charge de faire le + * calcul qui doit implementer CtulActivity et la classe qui implemente EfLineIntersectionParent. + * + * @author Adrien Hadoux + */ +public class EfTrajectoireActivity implements CtuluActivity { + + /** + * @return the tester + */ + public EfLineIntersectionsCorrectionTester getTester() { + return tester_; + } + + /** + * @param _tester the tester to set + */ + public void setTester(EfLineIntersectionsCorrectionTester _tester) { + tester_ = _tester; + } + + final EfLineIntersectionsCorrectionTester lineIntersectCorrect_; + + /** + * Liste des intersections r\xE9sultats + */ + ArrayList<EfLineIntersection> listeIntersection_ = null; + + // List<Coordinate> listePointsARepartir_ = new ArrayList<Coordinate>(); // les GrPoint ne sont utilisee que pour + + // l'affichage + ProgressionInterface prog_; + + EfGridDataInterpolator data_; + EfLineIntersectorActivity intersectFinder_; + EfLineIntersectionsCorrectionActivity correctionActivity = new EfLineIntersectionsCorrectionActivity(); + EfLineIntersectionsCorrectionTester tester_; + + double[] timeStep_; + + /** + * @param _interpolator ne doit pas etre null: contient les donn\xE9es + * @param _timeStep requis si un calcul en mode trajectoire est demande + */ + public EfTrajectoireActivity(final EfGridData _data, final double[] _timeStep) { + this(new EfGridDataInterpolator(_data), null, _timeStep); + } + + /** + * @param _interpolator ne doit pas etre null: contient les donn\xE9es + * @param _lineIntersectTester peut etre null: correction des intersections + */ + public EfTrajectoireActivity(final EfGridDataInterpolator _interpolator, + final EfLineIntersectionsCorrectionTester _lineIntersectTester, final double[] _timeStep) { + data_ = _interpolator; + tester_ = _lineIntersectTester; + lineIntersectCorrect_ = _lineIntersectTester; + timeStep_ = _timeStep; + intersectFinder_ = new EfLineIntersectorActivity(data_); + if (CtuluLibArray.isEmpty(timeStep_)) throw new IllegalArgumentException( + "on ne peut pas calculer un trajectoire sans les pas de temps"); + } + + protected boolean mustGoOn(final EfTrajectoireResultBuilder[] enCours) { + for (int i = 0; i < enCours.length; i++) { + if (enCours[i] != null) { return true; } + + } + return false; + + } + + /** + * Methode appel\xE9e par l'interface de calcul des lignes de courant. + * + * @param init_ point de depart + * @param dureeIntegration_ duree totale de l'integration en secondes + * @param indicePdt indice du pas de temps + * @param finesse coefficient de finesse double + * @param vx la variable a utiliser + * @param _prog l'interface de progression, peut etre null + * @return + */ + public List<EfTrajectoireResultBuilder> computeLigneCourant(final EfTrajectoireParameters _data, + final ProgressionInterface _prog, final CtuluAnalyze _analyse) { + stop_ = false; + final double first = timeStep_[0]; + final double last = timeStep_[timeStep_.length - 1]; + if (_data.firstTimeStep_ < first || _data.firstTimeStep_ > last) { + _analyse.addFatalError(DodicoLib.getS("Le premier pas de temps n'appartient pas \xE0 la simulation")); + return null; + } + if (_data.isTrajectoire()) { + final double endTime = _data.firstTimeStep_ + _data.dureeIntegration_; + if (endTime < first || endTime > last) { + _analyse.addFatalError(DodicoLib.getS("La dur\xE9e d'int\xE9gration d\xE9passe la dur\xE9e de la simulation")); + return null; + } + } + prog_ = _prog; + if (_data.points_ == null) return Collections.emptyList(); + final List<EfTrajectoireResultBuilder> res = new ArrayList<EfTrajectoireResultBuilder>(_data.points_.size()); + EfTrajectoireGridDataProvider provider = null; + if (_data.isLigneDeCourant) { + provider = new EfTrajectoireGridDataProvider.LigneDeCourant(_data.firstTimeStepIdx_, data_.getData(), _data.vx, + _data.vy); + } else { + if (CtuluLibArray.isEmpty(timeStep_)) throw new IllegalArgumentException( + "on ne peut pas calculer un trajectoire sans les pas de temps"); + + provider = new EfTrajectoireGridDataProvider.Trajectoire(timeStep_, data_.getData()); + } + // on initialise les resultats + final EfGridDataInterpolator data = new EfGridDataInterpolator(new EfGridDataCacheOneTimeDecorator(data_.getData(), + _data.firstTimeStepIdx_, _data.vx, _data.vy)); + final EfLineSingleIntersectFinder finder = new EfLineSingleIntersectFinder(); + for (final Coordinate coord : _data.points_) { + if (stop_) return res; + final EfTrajectoireResultBuilder builder = new EfTrajectoireResultBuilder(_data, provider); + final EfLineIntersection inter = finder.findIntersectionFor(coord.x, coord.y, _prog); + builder.addFirstIntersection(inter, _data.firstTimeStep_, data); + res.add(builder); + } + + final EfTrajectoireResultBuilder[] enCours = res.toArray(new EfTrajectoireResultBuilder[res.size()]); + while (mustGoOn(enCours)) { + if (stop_) return res; + for (int i = 0; i < enCours.length; i++) { + if (stop_) return res; + final EfTrajectoireResultBuilder bi = enCours[i]; + if (bi != null && !doNext(bi)) { + enCours[i] = null; + } + } + + } + return res; + + } + + /** + * @param _enCours + * @return true si on doit continuer, false si la trajectoire est arrive au bout. + */ + boolean doNext(final EfTrajectoireResultBuilder _enCours) { + final Coordinate lastCoordinate = _enCours.getLastCoordinate(); + final TIntHashSet elementsAdjacent = _enCours.lastAdjacentMeshes_; + final double lastTime = _enCours.getLastTime(); + // l'indice inf et sup des pas de temps englobant le dernier pas de temps + final int[] minMaxLastTime = EfGridDataTimeDecorator.getTMinMax(timeStep_, lastTime); + final EfTrajectoireParameters parameters = _enCours.getParameters(); + // dans le cas des trajectoires on doit rester dans les clous + if (parameters.isTrajectoire() && minMaxLastTime == null) { + FuLog.error("EfTrajectoireActivity: nous sommes en dehors de la simulation !"); + // on s'arrete et c'est bizarre + return false; + } + final double maxDistance = getMaxDistance(lastCoordinate, elementsAdjacent); + + final double vx = _enCours.getLastVx(); + final double vy = _enCours.getLastVy(); + final double v = Math.hypot(vx, vy); + // il s'agit du delta t en valu + double absDeltaT = 0; + int nextTimeStep = -1; + // true si le pas de temps actuelle est sur un pas de temps du projet + if (parameters.isTrajectoire()) { + final boolean isOnTimeStep = (minMaxLastTime[0] == minMaxLastTime[1]); + if (parameters.dureeIntegration_ < 0) { + nextTimeStep = (isOnTimeStep) ? minMaxLastTime[0] - 1 : minMaxLastTime[0]; + } else { + nextTimeStep = (isOnTimeStep) ? minMaxLastTime[1] + 1 : minMaxLastTime[1]; + } + if (nextTimeStep < 0 || nextTimeStep >= timeStep_.length) { + // ce ne devrait jamais arrive car l'iteration precedante aurait du arrete le tout + FuLog.error("EfTrajectoireActivity: le pas de temps courant est en dehors de la simulation !"); + return false; + } + } + // s'il y a une tres faible vitesse on va faire exploser le tout... + final boolean isVitesseNulle = CtuluLib.isZero(v, 1E-4); + if (isVitesseNulle) { + // si c'est une ligne de courant on n'avancera plus + if (parameters.isLigneDeCourant) { return false; } + // sinon on va passer au temps suivant + // on set le delta t pour qu'il aille au prochain pas de temps + absDeltaT = Math.abs(timeStep_[nextTimeStep] - lastTime); + } else { + absDeltaT = maxDistance / v; + + } + if (parameters.finesse_ > 1 && absDeltaT > 1E-2) { + // la c'est bizarre: le coup de l'escargot + absDeltaT = absDeltaT / parameters.finesse_; + } + absDeltaT = Math.max(absDeltaT, 1);// on se d\xE9place au moins d'1 seconde pour avancer + // pour les trajectoires, on essaie de ne pas sauter de pas de temps + // dans le cas des vitesses null on ne fait rien + if (!isVitesseNulle && parameters.isTrajectoire()) { + absDeltaT = Math.min(Math.abs(timeStep_[nextTimeStep] - lastTime), absDeltaT); + } + if (parameters.dureeIntegration_ < 0) absDeltaT = -absDeltaT; + + // le nouveau pas de temps que l'on devrait avoir + double newT = lastTime + absDeltaT; + + final double maxTimeAutorise = parameters.firstTimeStep_ + parameters.dureeIntegration_; + if (Math.abs(newT - parameters.firstTimeStep_) > Math.abs(parameters.dureeIntegration_)) { + newT = maxTimeAutorise; + } + + // on remet a jour le delta t au cas il a ete modifie + absDeltaT = newT - lastTime; + final double newx = lastCoordinate.x + vx * absDeltaT; + final double newy = lastCoordinate.y + vy * absDeltaT; + + EfLineIntersectionsResultsI intersectResult = intersectFinder_.computeFor( + GISGeometryFactory.INSTANCE.createSegment(lastCoordinate.x, lastCoordinate.y, newx, newy), prog_, + data_.getData().isElementVar(parameters.vx)).getDefaultRes(); + if (stop_) return false; + if (tester_ != null) { + intersectResult = correctionActivity.correct(intersectResult, tester_, 0, prog_); + if (stop_) return false; + } + // on sort du maillage: on arrete + if (intersectResult.isSegmentOut(0)) return false; + final EfLineIntersection foundIntersect = intersectResult.getIntersect(1); + // on a croise un objet du maillage, on doit recalculer le temps + // si on une vitesse null, on n'a pas boug\xE9... + if (intersectResult.getNbIntersect() > 2 && !isVitesseNulle) { + double deltaTFistInt = intersectResult.getDistFromDeb(1) / v; + if (parameters.dureeIntegration_ < 0) deltaTFistInt = -deltaTFistInt; + newT = lastTime + deltaTFistInt; + } + + _enCours.addIntersection(foundIntersect, newT); + // on continue si diff\xE9rent de 0 + return !CtuluLib.isZero(maxTimeAutorise - newT, 1E-3); + } + + private double getMaxDistance(final Coordinate lastC... [truncated message content] |
From: <de...@us...> - 2008-10-31 02:48:33
|
Revision: 4135 http://fudaa.svn.sourceforge.net/fudaa/?rev=4135&view=rev Author: deniger Date: 2008-10-31 02:48:27 +0000 (Fri, 31 Oct 2008) Log Message: ----------- Modified Paths: -------------- branches/Prepro-0.92-SNAPSHOT/ctulu/src/org/fudaa/ctulu/gis/GISAttributeBoolean.java branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/ef/decorator/EfGridDataCacheOneTimeDecorator.java branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/ef/decorator/EfGridDataCacheWeakDecorator.java branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/ef/decorator/EfGridDataTimeDecorator.java branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/ef/operation/EfLineSingleIntersectFinder.java branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/ef/operation/EfTrajectoireActivity.java branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/ef/operation/EfTrajectoireGridDataProvider.java branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/ef/operation/EfTrajectoireMarqueurBuilder.java branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/ef/operation/EfTrajectoireParameters.java branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/ef/operation/EfTrajectoireResultBuilder.java branches/Prepro-0.92-SNAPSHOT/dodico/test/org/fudaa/dodico/telemac/TestJSerafin.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/edition/EbliAtomicCoordinatesTableModel.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/edition/EbliSingleGeomVisuPanel.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/ressource/ebli_en.fr_txt branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliHtmlWidget.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliLookFeel.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliSceneController.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidget.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetController.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetTextEditor.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/actions/EbliWidgetActiontextEditor.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/actions/WidgetConfigure.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/behavior/AlignWithResizeProportionalStrategy.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/behavior/EbliAlignWithMoveStrategyProvider.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/behavior/EbliWidgetActionFactory.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/behavior/MoveAction.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/graphe/EbliWidgetControllerGraphe.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/sig/FSigAttibuteTypeManager.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/common/TrPostActionLigneCourants.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/common/tr_en.fr_txt branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrIsoLineAdder.java Added Paths: ----------- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/ProportionnalResizeBorder.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/actions/EbliWidgetActionRatio.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/behavior/ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/behavior/EbliWidgetCursorProvider.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrTrajectoireComputeAndDisplayActivity.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrTrajectoireGisDataModel.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/dialogSpec/TrPostTrajectoireTaskModel.java Removed Paths: ------------- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetCursorProvider.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/actions/EbliWidgetActionResize.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/bahaviorstrategy/ branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrComputeLigneCourantTrajectoire.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/dialogSpec/TrPostDialogLigneCourants.java Modified: branches/Prepro-0.92-SNAPSHOT/ctulu/src/org/fudaa/ctulu/gis/GISAttributeBoolean.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ctulu/src/org/fudaa/ctulu/gis/GISAttributeBoolean.java 2008-10-30 19:48:39 UTC (rev 4134) +++ branches/Prepro-0.92-SNAPSHOT/ctulu/src/org/fudaa/ctulu/gis/GISAttributeBoolean.java 2008-10-31 02:48:27 UTC (rev 4135) @@ -22,12 +22,14 @@ super(CtuluValueEditorDefaults.STRING_EDITOR); } + public GISAttributeBoolean(final String _name, boolean _atomic) { + super(CtuluValueEditorDefaults.STRING_EDITOR, _name, _atomic); + } + public GISAttributeModelListener createAtomicModel(final Object[] _initValues, final int _nbValues) { if (_initValues != null) { - if (_initValues.length != _nbValues) { - throw new IllegalArgumentException("bad size value=" + _nbValues + " used=" - + _initValues.length); - } + if (_initValues.length != _nbValues) { throw new IllegalArgumentException("bad size value=" + _nbValues + + " used=" + _initValues.length); } return new GISAttributeModelBooleanArray(_initValues, this); } Modified: branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/ef/decorator/EfGridDataCacheOneTimeDecorator.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/ef/decorator/EfGridDataCacheOneTimeDecorator.java 2008-10-30 19:48:39 UTC (rev 4134) +++ branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/ef/decorator/EfGridDataCacheOneTimeDecorator.java 2008-10-31 02:48:27 UTC (rev 4135) @@ -8,6 +8,7 @@ import java.lang.ref.WeakReference; import java.util.Arrays; import java.util.Collections; +import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Set; @@ -30,9 +31,9 @@ Set<CtuluVariable> permanentVariable_; - Map<CtuluVariable, EfData> permCache_; + final Map<CtuluVariable, EfData> permCache_; final int timeCached_; - Map<CtuluVariable, WeakReference<EfData>> transCache_; + final Map<CtuluVariable, WeakReference<EfData>> transCache_; /** * @param _init les donnees initiales @@ -43,8 +44,15 @@ super(); init = _init; timeCached_ = _timeCached; - if (_permVariable != null) permanentVariable_ = new HashSet<CtuluVariable>(Arrays.asList(_permVariable)); - else permanentVariable_ = Collections.emptySet(); + if (_permVariable != null) { + permanentVariable_ = new HashSet<CtuluVariable>(Arrays.asList(_permVariable)); + permCache_ = new HashMap<CtuluVariable, EfData>(permanentVariable_.size()); + } else { + permanentVariable_ = Collections.emptySet(); + permCache_ = Collections.emptyMap(); + } + transCache_ = new HashMap<CtuluVariable, WeakReference<EfData>>(20); + } protected EfData getCachedData(CtuluVariable _o) { @@ -61,10 +69,10 @@ * @param _timeIdx ce pas de temps n'est pas pris en compte */ public EfData getData(CtuluVariable _o, int _timeIdx) throws IOException { - EfData data = getCachedData(_o); - if (data != null) return data; - data = init.getData(_o, timeCached_); - if (data != null) setCachedData(_o, data); + EfData initData = getCachedData(_o); + if (initData != null) return initData; + EfData data = init.getData(_o, timeCached_); + setCachedData(_o, data); return data; } Modified: branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/ef/decorator/EfGridDataCacheWeakDecorator.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/ef/decorator/EfGridDataCacheWeakDecorator.java 2008-10-30 19:48:39 UTC (rev 4134) +++ branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/ef/decorator/EfGridDataCacheWeakDecorator.java 2008-10-31 02:48:27 UTC (rev 4135) @@ -107,13 +107,13 @@ Map<CtuluVariable, WeakReference<EfData>> res = (Map<CtuluVariable, WeakReference<EfData>>) timeMap_.get(_timeIdx); if (res == null) { // on reduit la map - if (timeMap_.size() > maxSize_) { - int[] keys = timeMap_.keys(); - Arrays.sort(keys); - timeMap_.remove(keys[0]); - } + // if (timeMap_.size() > maxSize_) { + // int[] keys = timeMap_.keys(); + // Arrays.sort(keys); + // timeMap_.remove(keys[0]); + // } res = new HashMap<CtuluVariable, WeakReference<EfData>>(10); - timeMap_.put(_timeIdx, _data); + timeMap_.put(_timeIdx, res); } res.put(_o, new WeakReference<EfData>(_data)); Modified: branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/ef/decorator/EfGridDataTimeDecorator.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/ef/decorator/EfGridDataTimeDecorator.java 2008-10-30 19:48:39 UTC (rev 4134) +++ branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/ef/decorator/EfGridDataTimeDecorator.java 2008-10-31 02:48:27 UTC (rev 4135) @@ -40,7 +40,7 @@ init_ = _init; tMaxIdx_ = _maxIdx; tMinIdx_ = _minIdx; - coeff_ = (_t - _min) / (_maxIdx - _min); + coeff_ = (_t - _min) / (_max - _min); } /** @@ -99,9 +99,11 @@ res[0] = -idx - 2; res[1] = res[0] + 1; if (CtuluLib.isEquals(time, srcTimeStep[res[0]], 1E-3)) { + // en fait c'est egale a la borne inf, on prend celle-ci res[1] = res[0]; } if (CtuluLib.isEquals(time, srcTimeStep[res[1]], 1E-3)) { + // en fait c'est egale a la borne sup, on prend celle-ci res[0] = res[1]; } } Modified: branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/ef/operation/EfLineSingleIntersectFinder.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/ef/operation/EfLineSingleIntersectFinder.java 2008-10-30 19:48:39 UTC (rev 4134) +++ branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/ef/operation/EfLineSingleIntersectFinder.java 2008-10-31 02:48:27 UTC (rev 4135) @@ -17,8 +17,13 @@ public class EfLineSingleIntersectFinder { EfIndexVisitorHashSet _eltSelected = new EfIndexVisitorHashSet(); - EfGridInterface grid_; + final EfGridInterface grid_; + public EfLineSingleIntersectFinder(EfGridInterface _grid) { + super(); + grid_ = _grid; + } + double tolerance_ = 1E-3; public EfLineIntersection findIntersectionFor(double _x, double _y, ProgressionInterface _prog) { Modified: branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/ef/operation/EfTrajectoireActivity.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/ef/operation/EfTrajectoireActivity.java 2008-10-30 19:48:39 UTC (rev 4134) +++ branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/ef/operation/EfTrajectoireActivity.java 2008-10-31 02:48:27 UTC (rev 4135) @@ -57,9 +57,9 @@ // List<Coordinate> listePointsARepartir_ = new ArrayList<Coordinate>(); // les GrPoint ne sont utilisee que pour // l'affichage - ProgressionInterface prog_; + // ProgressionInterface prog_; - EfGridDataInterpolator data_; + EfGridDataInterpolator gridDatas_; EfLineIntersectorActivity intersectFinder_; EfLineIntersectionsCorrectionActivity correctionActivity = new EfLineIntersectionsCorrectionActivity(); EfLineIntersectionsCorrectionTester tester_; @@ -80,11 +80,11 @@ */ public EfTrajectoireActivity(final EfGridDataInterpolator _interpolator, final EfLineIntersectionsCorrectionTester _lineIntersectTester, final double[] _timeStep) { - data_ = _interpolator; + gridDatas_ = _interpolator; tester_ = _lineIntersectTester; lineIntersectCorrect_ = _lineIntersectTester; timeStep_ = _timeStep; - intersectFinder_ = new EfLineIntersectorActivity(data_); + intersectFinder_ = new EfLineIntersectorActivity(gridDatas_); if (CtuluLibArray.isEmpty(timeStep_)) throw new IllegalArgumentException( "on ne peut pas calculer un trajectoire sans les pas de temps"); } @@ -98,6 +98,18 @@ } + protected double getMaxDeltaFrom(final EfTrajectoireResultBuilder[] enCours, double _lastTime) { + double res = 0; + for (int i = 0; i < enCours.length; i++) { + if (enCours[i] != null) { + res = Math.max(res, Math.abs(enCours[i].getLastTime() - _lastTime)); + } + + } + return res; + + } + /** * Methode appel\xE9e par l'interface de calcul des lignes de courant. * @@ -125,23 +137,15 @@ return null; } } - prog_ = _prog; if (_data.points_ == null) return Collections.emptyList(); + + EfTrajectoireGridDataProvider provider = createDataProvider(_data); + final List<EfTrajectoireResultBuilder> res = new ArrayList<EfTrajectoireResultBuilder>(_data.points_.size()); - EfTrajectoireGridDataProvider provider = null; - if (_data.isLigneDeCourant) { - provider = new EfTrajectoireGridDataProvider.LigneDeCourant(_data.firstTimeStepIdx_, data_.getData(), _data.vx, - _data.vy); - } else { - if (CtuluLibArray.isEmpty(timeStep_)) throw new IllegalArgumentException( - "on ne peut pas calculer un trajectoire sans les pas de temps"); - - provider = new EfTrajectoireGridDataProvider.Trajectoire(timeStep_, data_.getData()); - } // on initialise les resultats - final EfGridDataInterpolator data = new EfGridDataInterpolator(new EfGridDataCacheOneTimeDecorator(data_.getData(), - _data.firstTimeStepIdx_, _data.vx, _data.vy)); - final EfLineSingleIntersectFinder finder = new EfLineSingleIntersectFinder(); + final EfGridDataInterpolator data = new EfGridDataInterpolator(new EfGridDataCacheOneTimeDecorator(gridDatas_ + .getData(), _data.firstTimeStepIdx_, _data.vx, _data.vy)); + final EfLineSingleIntersectFinder finder = new EfLineSingleIntersectFinder(data.getData().getGrid()); for (final Coordinate coord : _data.points_) { if (stop_) return res; final EfTrajectoireResultBuilder builder = new EfTrajectoireResultBuilder(_data, provider); @@ -151,6 +155,8 @@ } final EfTrajectoireResultBuilder[] enCours = res.toArray(new EfTrajectoireResultBuilder[res.size()]); + double lastTime = _data.firstTimeStep_ + _data.dureeIntegration_; + double absDuree = Math.abs(_data.dureeIntegration_); while (mustGoOn(enCours)) { if (stop_) return res; for (int i = 0; i < enCours.length; i++) { @@ -159,6 +165,11 @@ if (bi != null && !doNext(bi)) { enCours[i] = null; } + double maxDelta = getMaxDeltaFrom(enCours, lastTime); + if (_prog != null) { + _prog.setProgression((int) ((1D - maxDelta / absDuree) * 100)); + } + } } @@ -166,6 +177,20 @@ } + private EfTrajectoireGridDataProvider createDataProvider(final EfTrajectoireParameters _data) { + EfTrajectoireGridDataProvider provider = null; + if (_data.isLigneDeCourant) { + provider = new EfTrajectoireGridDataProvider.LigneDeCourant(_data.firstTimeStepIdx_, gridDatas_.getData(), + _data.vx, _data.vy); + } else { + if (CtuluLibArray.isEmpty(timeStep_)) throw new IllegalArgumentException( + "on ne peut pas calculer un trajectoire sans les pas de temps"); + + provider = new EfTrajectoireGridDataProvider.Trajectoire(timeStep_, gridDatas_.getData()); + } + return provider; + } + /** * @param _enCours * @return true si on doit continuer, false si la trajectoire est arrive au bout. @@ -243,16 +268,17 @@ final double newy = lastCoordinate.y + vy * absDeltaT; EfLineIntersectionsResultsI intersectResult = intersectFinder_.computeFor( - GISGeometryFactory.INSTANCE.createSegment(lastCoordinate.x, lastCoordinate.y, newx, newy), prog_, - data_.getData().isElementVar(parameters.vx)).getDefaultRes(); + GISGeometryFactory.INSTANCE.createSegment(lastCoordinate.x, lastCoordinate.y, newx, newy), null, + gridDatas_.getData().isElementVar(parameters.vx)).getDefaultRes(); if (stop_) return false; if (tester_ != null) { - intersectResult = correctionActivity.correct(intersectResult, tester_, 0, prog_); + intersectResult = correctionActivity.correct(intersectResult, tester_, 0, null); if (stop_) return false; } // on sort du maillage: on arrete if (intersectResult.isSegmentOut(0)) return false; - final EfLineIntersection foundIntersect = intersectResult.getIntersect(1); + final EfLineIntersection foundIntersect = isVitesseNulle ? intersectResult.getIntersect(0) : intersectResult + .getIntersect(1); // on a croise un objet du maillage, on doit recalculer le temps // si on une vitesse null, on n'a pas boug\xE9... if (intersectResult.getNbIntersect() > 2 && !isVitesseNulle) { @@ -262,13 +288,19 @@ } _enCours.addIntersection(foundIntersect, newT); + if (FuLog.isDebug()) { + FuLog.debug("Trajectoire compute on " + newT); + } + // System.err.println("calcul en t=" + newT); + if (parameters.dureeIntegration_ > 0 && newT > maxTimeAutorise) return false; + if (parameters.dureeIntegration_ < 0 && newT < maxTimeAutorise) return false; // on continue si diff\xE9rent de 0 return !CtuluLib.isZero(maxTimeAutorise - newT, 1E-3); } private double getMaxDistance(final Coordinate lastCoordinate, final TIntHashSet elementsAdjacent) { double maxDistance = 0; - final EfGridInterface grid = data_.getData().getGrid(); + final EfGridInterface grid = gridDatas_.getData().getGrid(); final Coordinate c = new Coordinate(); for (final TIntIterator it = elementsAdjacent.iterator(); it.hasNext();) { final int idxElt = it.next(); Modified: branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/ef/operation/EfTrajectoireGridDataProvider.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/ef/operation/EfTrajectoireGridDataProvider.java 2008-10-30 19:48:39 UTC (rev 4134) +++ branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/ef/operation/EfTrajectoireGridDataProvider.java 2008-10-31 02:48:27 UTC (rev 4135) @@ -6,6 +6,7 @@ import org.fudaa.ctulu.CtuluVariable; import org.fudaa.dodico.ef.EfGridData; +import org.fudaa.dodico.ef.EfGridInterface; import org.fudaa.dodico.ef.decorator.EfGridDataCacheOneTimeDecorator; import org.fudaa.dodico.ef.decorator.EfGridDataCacheWeakDecorator; import org.fudaa.dodico.ef.decorator.EfGridDataTimeDecorator; @@ -33,11 +34,17 @@ return init_; } + @Override + public EfGridInterface getGrid() { + return init_.getGrid(); + } + } public static class Trajectoire extends EfTrajectoireGridDataProvider { + + final double[] initTimeStep_; final EfGridData init_; - final double[] initTimeStep_; public Trajectoire(double[] _initTimeStep, EfGridData _init) { super(); @@ -51,8 +58,15 @@ return EfGridDataTimeDecorator.getTimeInterpolated(init_, initTimeStep_, _t); } + @Override + public EfGridInterface getGrid() { + return init_.getGrid(); + } + } + public abstract EfGridInterface getGrid(); + public abstract EfGridData getDataFor(double _t); } Modified: branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/ef/operation/EfTrajectoireMarqueurBuilder.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/ef/operation/EfTrajectoireMarqueurBuilder.java 2008-10-30 19:48:39 UTC (rev 4134) +++ branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/ef/operation/EfTrajectoireMarqueurBuilder.java 2008-10-31 02:48:27 UTC (rev 4135) @@ -5,7 +5,7 @@ package org.fudaa.dodico.ef.operation; import org.fudaa.ctulu.CtuluLibGeometrie; -import org.fudaa.dodico.ef.EfGridData; +import org.fudaa.dodico.ef.EfGridInterface; import com.vividsolutions.jts.geom.Coordinate; @@ -17,7 +17,8 @@ public static class Geo extends EfTrajectoireMarqueurBuilder { double deltaEnCours_; - Geo(double _maxDelta) { + Geo(EfGridInterface _grid, double _maxDelta) { + super(_grid); maxDelta = _maxDelta; } @@ -44,7 +45,8 @@ public static class Time extends EfTrajectoireMarqueurBuilder { double lastMarqueurTime_; - Time(double _startTime, double _maxDelta) { + Time(EfGridInterface _grid, double _startTime, double _maxDelta) { + super(_grid); maxDelta = _maxDelta; lastMarqueurTime_ = _startTime; } @@ -68,22 +70,23 @@ } public static EfTrajectoireMarqueurBuilder createMarqueurBuilder(EfTrajectoireResultBuilder _item, - EfTrajectoireParameters _data, EfTrajectoireGridDataProvider _gridDataProvider) { + EfTrajectoireParameters _data) { if (_data == null || _data.marqueur_ == null) return null; EfTrajectoireMarqueurBuilder res = null; if (_data.marqueur_.timeStep_) { - res = new Time(_data.firstTimeStep_, _data.marqueur_.deltaMax_); - } else res = new Geo(_data.marqueur_.deltaMax_); + res = new Time(_item.gridDataProvider_.getGrid(), _data.firstTimeStep_, _data.marqueur_.deltaMax_); + } else res = new Geo(_item.gridDataProvider_.getGrid(), _data.marqueur_.deltaMax_); res.dest_ = _item; return res; } private EfTrajectoireResultBuilder dest_; - private final EfLineSingleIntersectFinder finder = new EfLineSingleIntersectFinder(); + private final EfLineSingleIntersectFinder finder; double maxDelta; - private EfTrajectoireMarqueurBuilder() { + private EfTrajectoireMarqueurBuilder(EfGridInterface _grid) { + finder = new EfLineSingleIntersectFinder(_grid); } Modified: branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/ef/operation/EfTrajectoireParameters.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/ef/operation/EfTrajectoireParameters.java 2008-10-30 19:48:39 UTC (rev 4134) +++ branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/ef/operation/EfTrajectoireParameters.java 2008-10-31 02:48:27 UTC (rev 4135) @@ -16,7 +16,7 @@ */ public class EfTrajectoireParameters { - EfTrajectoireParametersMarqueur marqueur_; + public EfTrajectoireParametersMarqueur marqueur_; /** * Les points de depart des trajectoires/ligne de courants Modified: branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/ef/operation/EfTrajectoireResultBuilder.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/ef/operation/EfTrajectoireResultBuilder.java 2008-10-30 19:48:39 UTC (rev 4134) +++ branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/ef/operation/EfTrajectoireResultBuilder.java 2008-10-31 02:48:27 UTC (rev 4135) @@ -13,6 +13,7 @@ import java.util.Map; import org.fudaa.ctulu.CtuluVariable; +import org.fudaa.ctulu.collection.CDoubleArrayList; import org.fudaa.dodico.ef.interpolation.EfGridDataInterpolator; import com.vividsolutions.jts.geom.Coordinate; @@ -23,101 +24,137 @@ * * @author deniger */ -class EfTrajectoireResultBuilder { +public class EfTrajectoireResultBuilder { - /** - * @return the parameters - */ - public EfTrajectoireParameters getParameters() { - return parameters_; - } + private final List<Coordinate> coords_ = new ArrayList<Coordinate>(50); - /** - * @param _parameters the parameters to set - */ - public void setParameters(EfTrajectoireParameters _parameters) { - parameters_ = _parameters; - } + final EfTrajectoireGridDataProvider gridDataProvider_; - List<Coordinate> coords_ = new ArrayList<Coordinate>(50); + final TIntHashSet lastAdjacentMeshes_ = new TIntHashSet(); // private EfLineIntersection lastIntersect_; private final EfTrajectoireMarqueurBuilder marqueurBuilder_; - private List<Boolean> marqueurs = new ArrayList<Boolean>(50); - private TDoubleArrayList times_ = new TDoubleArrayList(50); - private Map<CtuluVariable, TDoubleArrayList> varValues_; - private EfTrajectoireParameters parameters_; - final EfTrajectoireGridDataProvider gridDataProvider_; + private final List<Boolean> marqueurs = new ArrayList<Boolean>(50); + + private final EfTrajectoireParameters parameters_; + + private CDoubleArrayList times_ = new CDoubleArrayList(50); + private Map<CtuluVariable, CDoubleArrayList> varValues_; + public EfTrajectoireResultBuilder(EfTrajectoireParameters _parameters, EfTrajectoireGridDataProvider _provider) { gridDataProvider_ = _provider; - marqueurBuilder_ = EfTrajectoireMarqueurBuilder.createMarqueurBuilder(this, _parameters, _provider); - varValues_ = new HashMap<CtuluVariable, TDoubleArrayList>(2 + _parameters.varsASuivre_.size()); + marqueurBuilder_ = EfTrajectoireMarqueurBuilder.createMarqueurBuilder(this, _parameters); + varValues_ = new HashMap<CtuluVariable, CDoubleArrayList>(2 + _parameters.varsASuivre_.size()); parameters_ = _parameters; - varValues_.put(_parameters.vx, new TDoubleArrayList(100)); - varValues_.put(_parameters.vy, new TDoubleArrayList(100)); + varValues_.put(_parameters.vx, new CDoubleArrayList(100)); + varValues_.put(_parameters.vy, new CDoubleArrayList(100)); for (CtuluVariable v : _parameters.varsASuivre_) { - varValues_.put(v, new TDoubleArrayList(100)); + varValues_.put(v, new CDoubleArrayList(100)); } } - public double getLastVx() { - TDoubleArrayList list = varValues_.get(parameters_.vx); - return list.getQuick(list.size() - 1); - } + protected void addFirstIntersection(EfLineIntersection _intersect, double _t, EfGridDataInterpolator _data) { + saveIntersection(_intersect, _t, _data); - public double getLastVy() { - TDoubleArrayList list = varValues_.get(parameters_.vy); - return list.getQuick(list.size() - 1); } protected void addIntersection(EfLineIntersection _intersect, double _t) { if (!coords_.isEmpty() && marqueurBuilder_ != null) { marqueurBuilder_.preCoordinateAdded(_intersect, _t); } - addIntersection(_intersect, _t, getDataFor(_t)); + saveIntersection(_intersect, _t, getDataFor(_t)); } - protected void addFirstIntersection(EfLineIntersection _intersect, double _t, EfGridDataInterpolator _data) { - addIntersection(_intersect, _t, _data); - - } - - TIntHashSet lastAdjacentMeshes_ = new TIntHashSet(); - - private void addIntersection(EfLineIntersection _intersect, double _t, EfGridDataInterpolator _data) { + private void saveIntersection(EfLineIntersection _intersect, double _t, EfGridDataInterpolator _data) { + setParent(_intersect, _data); lastAdjacentMeshes_.clear(); _intersect.fillWithAdjacentMeshes(lastAdjacentMeshes_); - EfGridDataInterpolator dataForT = getDataFor(_t); - fillMaps(_intersect, _t, false, dataForT); + // EfGridDataInterpolator dataForT = getDataFor(_t); + fillMaps(_intersect, _t, false, _data); } - private EfGridDataInterpolator getDataFor(double _t) { - return new EfGridDataInterpolator(gridDataProvider_.getDataFor(_t)); + protected void addMarqueurIntersection(EfLineIntersection _intersect, double _t) { + EfGridDataInterpolator dataFor = getDataFor(_t); + setParent(_intersect, dataFor); + fillMaps(_intersect, _t, true, dataFor); } private void fillMaps(EfLineIntersection _intersect, double _t, boolean _marqueur, EfGridDataInterpolator dataForT) { - _intersect.setParent(new EfLineIntersectionParentDefault(dataForT)); + marqueurs.add(Boolean.valueOf(_marqueur || (coords_.isEmpty() && marqueurBuilder_ != null))); coords_.add(new Coordinate(_intersect.getX(), _intersect.getY())); times_.add(_t); // on ajoute un marqueur si demande ou si c'est le premier et si les marqueurs sont actives. - marqueurs.add(Boolean.valueOf(_marqueur || (coords_.isEmpty() && marqueurBuilder_ != null))); - for (Map.Entry<CtuluVariable, TDoubleArrayList> entry : varValues_.entrySet()) { + + for (Map.Entry<CtuluVariable, CDoubleArrayList> entry : varValues_.entrySet()) { entry.getValue().add(_intersect.getValue(entry.getKey(), 0));// on prend le pas de temps 0 car les donnees sont // construites ainsi } } - protected void addMarqueurIntersection(EfLineIntersection _intersect, double _t) { - fillMaps(_intersect, _t, true, getDataFor(_t)); + private void setParent(EfLineIntersection _intersect, EfGridDataInterpolator dataForT) { + _intersect.setParent(new EfLineIntersectionParentDefault(dataForT)); } + /** + * @return the coords + */ + public List<Coordinate> getCoords() { + return coords_; + } + + private EfGridDataInterpolator getDataFor(double _t) { + return new EfGridDataInterpolator(gridDataProvider_.getDataFor(_t)); + } + public Coordinate getLastCoordinate() { return coords_.isEmpty() ? null : coords_.get(coords_.size() - 1); } + public double getLastTime() { + return times_.get(times_.size() - 1); + } + + public double getLastVx() { + TDoubleArrayList list = varValues_.get(parameters_.vx); + return list.getQuick(list.size() - 1); + } + + public double getLastVy() { + TDoubleArrayList list = varValues_.get(parameters_.vy); + return list.getQuick(list.size() - 1); + } + + /** + * @return the marqueurs + */ + public List<Boolean> getMarqueurs() { + return marqueurs; + } + + /** + * @return the parameters + */ + public EfTrajectoireParameters getParameters() { + return parameters_; + } + + /** + * @return the times + */ + public TDoubleArrayList getTimes() { + return times_; + } + + /** + * @return the varValues: contient les donnees pour vx et vy + */ + public Map<CtuluVariable, CDoubleArrayList> getVarValues() { + return varValues_; + } + // /** // * @return the lastIntersect // */ @@ -125,8 +162,4 @@ // return lastIntersect_; // } - public double getLastTime() { - return times_.get(times_.size() - 1); - } - } Modified: branches/Prepro-0.92-SNAPSHOT/dodico/test/org/fudaa/dodico/telemac/TestJSerafin.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/dodico/test/org/fudaa/dodico/telemac/TestJSerafin.java 2008-10-30 19:48:39 UTC (rev 4134) +++ branches/Prepro-0.92-SNAPSHOT/dodico/test/org/fudaa/dodico/telemac/TestJSerafin.java 2008-10-31 02:48:27 UTC (rev 4135) @@ -191,7 +191,7 @@ public double getValue(int _numVariable, int _pasTemps, int _ptIdx) throws IOException { if (_pasTemps < initTimeStep) { return r.getValue(_numVariable, _pasTemps, _ptIdx); } - return Math.random() * 1000; + return Math.random() ; } public String getUnite(int _i) { Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/edition/EbliAtomicCoordinatesTableModel.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/edition/EbliAtomicCoordinatesTableModel.java 2008-10-30 19:48:39 UTC (rev 4134) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/edition/EbliAtomicCoordinatesTableModel.java 2008-10-31 02:48:27 UTC (rev 4135) @@ -58,9 +58,7 @@ protected void apply(final CtuluCommandComposite _cmp) {} public int getRowCount() { - if (selectedAtomic_ != null) { - return selectedAtomic_.length; - } + if (selectedAtomic_ != null) { return selectedAtomic_.length; } return zone_.getNumGeometries(); } @@ -93,22 +91,16 @@ } public int getRowCount() { - if (selectedAtomic_ != null) { - return selectedAtomic_.length; - } + if (selectedAtomic_ != null) { return selectedAtomic_.length; } return isFerme_ ? g_.size() - 1 : g_.size(); } protected CtuluAnalyze isValid() { - if (modele_ == null) { - return null; - } + if (modele_ == null) { return null; } final CoordinateSequence seq = getNewCoordinateSequence(); if (seq != null) { final CtuluAnalyze ana = new CtuluAnalyze(); - if (!modele_.isCoordinateValid(seq, ana)) { - return ana; - } + if (!modele_.isCoordinateValid(seq, ana)) { return ana; } } return null; } @@ -117,9 +109,7 @@ * @return les nouvelles coordonnees. null si pas de modif */ public CoordinateSequence getNewCoordinateSequence() { - if (rowNewCoordinates_ == null) { - return null; - } + if (rowNewCoordinates_ == null) { return null; } final GISCoordinateSequence newSeq = new GISCoordinateSequence(g_); final TIntObjectIterator it = rowNewCoordinates_.iterator(); for (int j = rowNewCoordinates_.size(); j-- > 0;) { @@ -203,9 +193,7 @@ } public void setValueAt(final Object _value, final int _rowIndex, final int _columnIndex) { - if (_columnIndex == 0) { - return; - } + if (_columnIndex == 0) { return; } final int realIdx = getRealIdx(_rowIndex); if (_columnIndex > 2) { // l'indice de l'attribut atomic @@ -238,33 +226,30 @@ } public boolean isCellEditable(final int _rowIndex, final int _columnIndex) { - if (_columnIndex == 0) { - return false; - } - if (_columnIndex <= 2) { - return zone_.isGeomModifiable(); - } + if (_columnIndex == 0) { return false; } + if (_columnIndex <= 2) { return zone_.isGeomModifiable(); } return true; } private Object getAtomicValue(final int _row, final int _valIdx) { - if (modelesNewValues_ != null && (modelesNewValues_[_valIdx] != null) && modelesNewValues_[_valIdx].contains(_row)) { - return modelesNewValues_[_valIdx].get(_row); - } + if (modelesNewValues_ != null && (modelesNewValues_[_valIdx] != null) && modelesNewValues_[_valIdx].contains(_row)) { return modelesNewValues_[_valIdx] + .get(_row); } return modeles_[_valIdx].getObjectValueAt(_row); } + private Class getAtomicClass(final int _valIdx) { + return modeles_[_valIdx].getAttribute().getDataClass(); + } + private double getX(final int _row) { - if (rowNewCoordinates_ != null && rowNewCoordinates_.contains(_row)) { - return ((Coordinate) rowNewCoordinates_.get(_row)).x; - } + if (rowNewCoordinates_ != null && rowNewCoordinates_.contains(_row)) { return ((Coordinate) rowNewCoordinates_ + .get(_row)).x; } return g_.getX(_row); } private double getY(final int _row) { - if (rowNewCoordinates_ != null && rowNewCoordinates_.contains(_row)) { - return ((Coordinate) rowNewCoordinates_.get(_row)).y; - } + if (rowNewCoordinates_ != null && rowNewCoordinates_.contains(_row)) { return ((Coordinate) rowNewCoordinates_ + .get(_row)).y; } return g_.getY(_row); } @@ -283,12 +268,19 @@ default: } final int idx = _columnIndex - 3; - if (idx >= 0) { - return modeles_[idx].getAttribute().getName(); - } + if (idx >= 0) { return modeles_[idx].getAttribute().getName(); } return CtuluLibString.EMPTY_STRING; } + @Override + public Class<?> getColumnClass(int _columnIndex) { + if (_columnIndex < 3) return String.class; + final int idx = _columnIndex - 3; + return getAtomicClass(_columnIndex - 3); + } + + + public Object getValueAt(final int _rowIndex, final int _columnIndex) { final int realIdx = getRealIdx(_rowIndex); switch (_columnIndex) { @@ -301,9 +293,7 @@ default: } final int idx = _columnIndex - 3; - if (idx >= 0) { - return getAtomicValue(realIdx, idx); - } + if (idx >= 0) { return getAtomicValue(realIdx, idx); } return CtuluLibString.EMPTY_STRING; } Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/edition/EbliSingleGeomVisuPanel.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/edition/EbliSingleGeomVisuPanel.java 2008-10-30 19:48:39 UTC (rev 4134) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/edition/EbliSingleGeomVisuPanel.java 2008-10-31 02:48:27 UTC (rev 4135) @@ -20,13 +20,13 @@ import org.fudaa.ctulu.gis.GISZoneCollection; import org.fudaa.ctulu.gui.CtuluDialogPanel; import org.fudaa.ctulu.gui.CtuluTable; +import org.fudaa.ctulu.gui.CtuluTableColumnHeader; import org.fudaa.ebli.commun.EbliFormatterInterface; /** * @author Fred Deniger - * @version $Id: FSigSingleGeomVisuPanel.java,v 1.2 2005/10/03 10:36:25 deniger - * Exp $ + * @version $Id: FSigSingleGeomVisuPanel.java,v 1.2 2005/10/03 10:36:25 deniger Exp $ */ public class EbliSingleGeomVisuPanel extends CtuluDialogPanel { @@ -35,7 +35,7 @@ final int idx; // TObjectIntHashMap intAttr_; final EbliAtomicCoordinatesTableModel model; - JTable table; + CtuluTable table; idx = _idx; final GISZoneCollection zone = _zone; final Geometry g = zone.getGeometry(idx); @@ -58,15 +58,22 @@ } else { setLayout(new BuBorderLayout()); table = new CtuluTable(); - model = new EbliAtomicCoordinatesTableModel.Line(_xyFormatter, zone, idx, _idxVertex, false, null) { + model = new EbliAtomicCoordinatesTableModel.Line(_xyFormatter, zone, idx, _idxVertex, true, null) { public boolean isCellEditable(final int _rowIndex, final int _columnIndex) { return false; } }; table.setModel(model); + table.setTableHeader(new CtuluTableColumnHeader(table.getColumnModel())); + if (model.getColumnCount() > 4) { + for (int i = model.getColumnCount() - 1; i >= 4; i--) { + table.hideColumn(table.getColumnModel().getColumn(i)); + } + } + + // table.hideColumn(_idxColumn) add(new BuScrollPane(table), BuBorderLayout.CENTER); } } - } Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/ressource/ebli_en.fr_txt =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/ressource/ebli_en.fr_txt 2008-10-30 19:48:39 UTC (rev 4134) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/ressource/ebli_en.fr_txt 2008-10-31 02:48:27 UTC (rev 4135) @@ -626,3 +626,5 @@ D\xE9bloquer la taille et la position de la frame=Unlock the size and the location of the frame Redimensionnement classique de la taille de la frame=Classical resize of the frame Redimensionner proportionnellement la taille de la frame=Proportional resizing of the frame +Conserver le ratio hauteur/largeur=Preserve width/height ratio +Ne pas conserver le ratio hauteur/largeur=Do not preserve width/height ratio \ No newline at end of file Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliHtmlWidget.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliHtmlWidget.java 2008-10-30 19:48:39 UTC (rev 4134) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliHtmlWidget.java 2008-10-31 02:48:27 UTC (rev 4135) @@ -4,6 +4,7 @@ */ package org.fudaa.ebli.visuallibrary; +import java.awt.Dimension; import java.awt.Rectangle; import javax.swing.JLabel; @@ -33,11 +34,11 @@ @Override protected Rectangle calculateClientArea() { - Rectangle rec = new Rectangle(); - // the preferred size is here - rec.height = (int) view.getPreferredSpan(View.Y_AXIS); - rec.width = (int) view.getPreferredSpan(View.X_AXIS); - return rec; + Rectangle rec = new Rectangle(); + // the preferred size is here + rec.height = (int) view.getPreferredSpan(View.Y_AXIS); + rec.width = (int) view.getPreferredSpan(View.X_AXIS); + return rec; } /** @@ -46,6 +47,8 @@ @Override protected void paintWidget() { Rectangle clientArea = getClientArea(); + System.err.println(clientArea); + c.setPreferredSize(new Dimension(clientArea.width, clientArea.height)); view.paint(getGraphics(), clientArea); } Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliLookFeel.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliLookFeel.java 2008-10-30 19:48:39 UTC (rev 4134) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliLookFeel.java 2008-10-31 02:48:27 UTC (rev 4135) @@ -17,7 +17,7 @@ private static final Border ROUNDED_BORDER = BorderFactory.createRoundedBorder(0, 0, 0, 0, COLOR_SELECTED, COLOR_HOVERED); - private static final Border EMPTY_BORDER = BorderFactory.createEmptyBorder(); + // private static final Border EMPTY_BORDER = BorderFactory.createEmptyBorder(); private static final int MINI_THICKNESS = 8; private static final Border MINI_BORDER_SELECTED = BorderFactory.createRoundedBorder(MINI_THICKNESS, MINI_THICKNESS, MINI_THICKNESS, MINI_THICKNESS, COLOR_SELECTED, COLOR_SELECTED.darker()); @@ -25,6 +25,9 @@ private static final Border RESIZE_BORDER = BorderFactory.createResizeBorder(MINI_THICKNESS, COLOR_HOVERED, true); private static final Border RESIZE_BORDER_SELECTED = BorderFactory.createCompositeBorder(ROUNDED_BORDER, RESIZE_BORDER); + private static final Border RESIZE_BORDER_PROP = new ProportionnalResizeBorder(MINI_THICKNESS, COLOR_HOVERED, true); + private static final Border RESIZE_BORDER_SELECTED_PROP = BorderFactory.createCompositeBorder(ROUNDED_BORDER, + RESIZE_BORDER_PROP); private static final Border DEFAULT_BORDER = BorderFactory.createEmptyBorder(MINI_THICKNESS); private static final Border NON_RESIZE_BORDER_SELECTED = BorderFactory.createCompositeBorder(ROUNDED_BORDER, DEFAULT_BORDER); @@ -33,7 +36,7 @@ @Override public Border getBorder(final ObjectState _state) { - return getBorder(_state, true); + return getBorder(_state, true, false); } public static int getBorderThickness() { @@ -41,15 +44,15 @@ } public Border getBorderInGroup(final ObjectState _state) { - return getBorder(_state, false); + return getBorder(_state, false, false); // return EMPTY_BORDER; } - public Border getBorder(final ObjectState _state, final boolean resizable) { + public Border getBorder(final ObjectState _state, final boolean resizable, final boolean prop) { if (resizable) { if (_state.isHovered()) { - if (_state.isSelected()) { return RESIZE_BORDER_SELECTED; } - return RESIZE_BORDER; + if (_state.isSelected()) { return prop ? RESIZE_BORDER_SELECTED_PROP : RESIZE_BORDER_SELECTED; } + return prop ? RESIZE_BORDER_PROP : RESIZE_BORDER; } if (_state.isSelected()) { return MINI_BORDER_SELECTED; } Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliSceneController.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliSceneController.java 2008-10-30 19:48:39 UTC (rev 4134) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliSceneController.java 2008-10-31 02:48:27 UTC (rev 4135) @@ -7,8 +7,8 @@ import javax.swing.JScrollPane; import javax.swing.ListSelectionModel; -import org.fudaa.ebli.visuallibrary.bahaviorstrategy.EbliAlignWithMoveStrategyProvider; -import org.fudaa.ebli.visuallibrary.bahaviorstrategy.EbliWidgetActionFactory; +import org.fudaa.ebli.visuallibrary.behavior.EbliAlignWithMoveStrategyProvider; +import org.fudaa.ebli.visuallibrary.behavior.EbliWidgetActionFactory; import org.fudaa.ebli.visuallibrary.tree.EbliJXTreeTableCellRenderer; import org.jdesktop.swingx.JXTreeTable; import org.jdesktop.swingx.decorator.HighlighterFactory; Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidget.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidget.java 2008-10-30 19:48:39 UTC (rev 4134) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidget.java 2008-10-31 02:48:27 UTC (rev 4135) @@ -22,6 +22,7 @@ import org.fudaa.ebli.visuallibrary.actions.CommandeUndoRedoGraphicalProperties; import org.fudaa.ebli.visuallibrary.actions.WidgetConfigure; import org.fudaa.ebli.visuallibrary.animation.EbliWidgetAnimatedItem; +import org.fudaa.ebli.visuallibrary.behavior.EbliWidgetCursorProvider; import org.netbeans.api.visual.model.ObjectState; import org.netbeans.api.visual.widget.Widget; @@ -106,11 +107,6 @@ if (controllerDefaut) controller_ = new EbliWidgetController(this); } - @Override - protected Cursor getCursorAt(final Point _localLocation) { - return EbliWidgetCursorProvider.getCursor(this, _localLocation); - } - public void addPropertyChangeListener(final String _key, final PropertyChangeListener _l) { // voir EGObject @@ -176,6 +172,7 @@ changeVisible(!_newValue, false); } }); + getEbliScene().refresh(); return true; } @@ -213,14 +210,6 @@ return null; } - public EbliWidget getIntern() { - return this; - } - - public boolean isAnimatedItemAlive(final String _id) { - return false; - } - public Color getColorContour() { return (Color) propGraphique.get(COLORCONTOUR); } @@ -249,6 +238,11 @@ return controller_; } + @Override + protected Cursor getCursorAt(final Point _localLocation) { + return EbliWidgetCursorProvider.getCursor(this, _localLocation); + } + public EbliScene getEbliScene() { return scene_; } @@ -278,6 +272,20 @@ return id_; } + /** + * Renvoie l'id du group ou l'id NOGROUP si la widget ne fais pas partie d un groupe. + * + * @return + */ + public String getIdOfGroup() { + if (isGrouped()) return ((EbliWidget) this.getParentBordure().getParentWidget()).getId(); + else return EbliWidgetGroup.NOGROUP; + } + + public EbliWidget getIntern() { + return this; + } + // useless public Object getMin(final String _key) { return null; @@ -289,6 +297,15 @@ } /** + * @return le parent direct si de type bordure, sinon this. + */ + public EbliWidget getParentBordure() { + final Widget parent = getParentWidget(); + if (parent instanceof EbliWidgetBordureSingle) return (EbliWidget) parent; + return this; + } + + /** * Retourne l objet correspondant a la clef: retourne l objet graphique correspondant depuis la map d objets * graphiques de la widget. */ @@ -313,6 +330,10 @@ return (Double) propGraphique.get(ROTATION); } + public List<EbliWidget> getSattelite() { + return null; + } + /** * Retourne une interface widgetConfigure qui permet de gerer les interfaces a creer * @@ -340,12 +361,37 @@ } /** + * Methode qui indique si lq widget a des sattelites, ie des widgets qui doivent etre deplacees avec. + * + * @return + */ + public boolean hasSattelite() { + + return false; + } + + public boolean isAnimatedItemAlive(final String _id) { + return false; + } + + /** * @return the isGroup: true si le widget represente un groupe de widget comme un groupe par exemple */ public boolean isGroup() { return isGroup; } + /** + * Methode qui retourne vrai si la widget est group\xE9e. + * + * @return + */ + public boolean isGrouped() { + + if (this.getParentBordure().getParentWidget() instanceof EbliWidgetGroup) return true; + return false; + } + @Override public boolean isHitAt(final Point localLocation) { @@ -378,9 +424,10 @@ if (parent != null) { // System.err.println("parent not null"+ toString()); setBorder(lookFeel.getBorderInGroup(_newState)); - parent.setBorder(lookFeel.getBorder(_newState, parent.getController().canResize_)); + parent.setBorder(lookFeel.getBorder(_newState, parent.getController().canResize_, + parent.getController().isProportional)); } else { - setBorder(lookFeel.getBorder(_newState, getController().canResize_)); + setBorder(lookFeel.getBorder(_newState, getController().canResize_, getController().isProportional)); } } @@ -407,15 +454,6 @@ this.controller_ = controller_; } - /** - * @return le parent direct si de type bordure, sinon this. - */ - public EbliWidget getParentBordure() { - final Widget parent = getParentWidget(); - if (parent instanceof EbliWidgetBordureSingle) return (EbliWidget) parent; - return this; - } - public void setFormeFont(final Font newFont) { propGraphique.put(FONT, newFont); } @@ -427,6 +465,10 @@ this.isGroup = isGroup; } + public void setId_(final String id_) { + this.id_ = id_; + } + /** * Methode directement appelee apres modification des parametres renvoye par le getproperty. Ajoute les anciens * parametres dans la commande undo/redo. @@ -485,6 +527,10 @@ propGraphique.put(ROTATION, rotation); } + public void setSattelite(List<EbliWidget> liste) { + + } + public void setScene(final EbliScene _scene) { this.scene_ = _scene; } @@ -496,49 +542,4 @@ public void setUseBorder(final boolean _useBorder) { useBorder_ = _useBorder; } - - public void setId_(final String id_) { - this.id_ = id_; - } - - /** - * Methode qui retourne vrai si la widget est group\xE9e. - * - * @return - */ - public boolean isGrouped() { - - if (this.getParentBordure().getParentWidget() instanceof EbliWidgetGroup) return true; - return false; - } - - /** - * Renvoie l'id du group ou l'id NOGROUP si la widget ne fais pas partie d un groupe. - * - * @return - */ - public String getIdOfGroup() { - if (isGrouped()) return ((EbliWidget) this.getParentBordure().getParentWidget()).getId(); - else return EbliWidgetGroup.NOGROUP; - } - - - /** - * Methode qui indique si lq widget a des sattelites, ie des widgets qui - * doivent etre deplacees avec. - * - * @return - */ - public boolean hasSattelite() { - - return false; - } - - public List<EbliWidget> getSattelite() { - return null; - } - - public void setSattelite(List<EbliWidget> liste) { - - } } \ No newline at end of file Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetController.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetController.java 2008-10-30 19:48:39 UTC (rev 4134) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetController.java 2008-10-31 02:48:27 UTC (rev 4135) @@ -24,7 +24,7 @@ import org.fudaa.ebli.visuallibrary.actions.CommandeDuplicate; import org.fudaa.ebli.visuallibrary.actions.EbliWidgetActionBloqueOuDebloqueWidget; import org.fudaa.ebli.visuallibrary.actions.EbliWidgetActionConfigure; -import org.fudaa.ebli.visuallibrary.actions.EbliWidgetActionResize; +import org.fudaa.ebli.visuallibrary.actions.EbliWidgetActionRatio; import org.fudaa.ebli.visuallibrary.actions.EbliWidgetActionSimple; import org.netbeans.api.visual.action.ActionFactory; import org.netbeans.api.visual.action.PopupMenuProvider; @@ -209,7 +209,7 @@ public void constructMenuResizeProportional(final JPopupMenu _popup, final CtuluCommandContainer cmd_) { - final EbliWidgetActionSimple actionBloque = new EbliWidgetActionResize.Proportional(widget_); + final EbliWidgetActionSimple actionBloque = new EbliWidgetActionRatio.Proportional(widget_); boutonProportion = actionBloque.buildMenuItem(EbliComponentFactory.INSTANCE); _popup.add(boutonProportion); } Deleted: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetCursorProvider.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetCursorProvider.java 2008-10-30 19:48:39 UTC (rev 4134) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetCursorProvider.java 2008-10-31 02:48:27 UTC (rev 4135) @@ -1,50 +0,0 @@ -/** - * Licence GPL - * Copyright Genesis - */ -package org.fudaa.ebli.visuallibrary; - -import java.awt.Cursor; -import java.awt.Point; - -import org.netbeans.api.visual.action.ActionFactory; -import org.netbeans.api.visual.action.ResizeControlPointResolver; -import org.netbeans.api.visual.action.ResizeProvider.ControlPoint; -import org.netbeans.api.visual.widget.Widget; - -/** - * @author deniger - */ -public class EbliWidgetCursorProvider { - - private final static ResizeControlPointResolver controlPointResolver = ActionFactory - .createDefaultResizeControlPointResolver(); - - private static ControlPoint getControlPoint(final Widget _widget, final Point _localLocation) { - return controlPointResolver.resolveControlPoint(_widget, _localLocation); - } - - public static Cursor getCursor(final EbliWidget _widget, final Point _localLocation) { - if (!_widget.isEnabled() || _widget.getController() == null) return Cursor.getDefaultCursor(); - if (_widget.getController().canResize_) { - final ControlPoint controlPoint = getControlPoint(_widget, _localLocation); - if (controlPoint != null) { - int type = Cursor.SE_RESIZE_CURSOR; - if (controlPoint == ControlPoint.TOP_CENTER) type = Cursor.N_RESIZE_CURSOR; - else if (controlPoint == ControlPoint.TOP_LEFT) type = Cursor.NW_RESIZE_CURSOR; - else if (controlPoint == ControlPoint.TOP_RIGHT) type = Cursor.NE_RESIZE_CURSOR; - else if (controlPoint == ControlPoint.CENTER_LEFT) type = Cursor.W_RESIZE_CURSOR; - else if (controlPoint == ControlPoint.CENTER_RIGHT) type = Cursor.E_RESIZE_CURSOR; - else if (controlPoint == ControlPoint.BOTTOM_CENTER) type = Cursor.S_RESIZE_CURSOR; - else if (controlPoint == ControlPoint.BOTTOM_LEFT) type = Cursor.SW_RESIZE_CURSOR; - return Cursor.getPredefinedCursor(type); - } - } - if (_widget.getController().isEditable() && _widget.getClientArea().contains(_localLocation)) { return Cursor - .getPredefinedCursor(Cursor.TEXT_CURSOR); } - if (_widget.getController().canMove_) return Cursor.getPredefinedCursor(Cursor.MOVE_CURSOR); - return Cursor.getDefaultCursor(); - - } - -} Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetTextEditor.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetTextEditor.java 2008-10-30 19:48:39 UTC (rev 4134) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetTextEditor.java 2008-10-31 02:48:27 UTC (rev 4135) @@ -1,21 +1,20 @@ package org.fudaa.ebli.visuallibrary; -import java.awt.Dimension; import java.awt.Rectangle; import java.util.EnumSet; -import javax.swing.JLabel; +import javax.swing.JFrame; import javax.swing.plaf.basic.BasicHTML; import javax.swing.text.View; import org.fudaa.ctulu.CtuluLibString; import org.fudaa.ctulu.gui.CtuluHtmlEditorPanel; +import org.fudaa.ctulu.gui.CtuluLibSwing; import org.netbeans.api.visual.action.ActionFactory; import org.netbeans.api.visual.action.InplaceEditorProvider; import org.netbeans.api.visual.action.WidgetAction; import org.netbeans.api.visual.widget.Widget; -import com.memoire.bu.BuBorderLayout; import com.memoire.bu.BuPanel; public class EbliWidgetTextEditor extends EbliWidget implements InplaceEditorProvider<CtuluHtmlEditorPanel> { @@ -53,6 +52,10 @@ setController(controller); } + public boolean canRotate() { + return false; + } + View view; // JLabel c = new JLabel(); @@ -117,20 +120,20 @@ public CtuluHtmlEditorPanel createEditorComponent( final org.netbeans.api.visual.action.InplaceEditorProvider.EditorController controller, final Widget widget) { // --creation du panel ekitcore - if (conteneur == null) { - conteneur = new BuPanel(new BuBorderLayout()); - - // final Rectangle rec = getClientArea(); - // editorPane_.setSize(rec.width, rec.height); - // editorPane_.setPreferredSize(new Dimension(rec.width, rec.height)); - // conteneur.setPreferredSize(new Dimension(rec.width, rec.height)); - // conteneur.setMaximumSize(new Dimension(rec.width, rec.height)); - // conteneur.setMinimumSize(new Dimension(rec.width, rec.height)); - conteneur.add(editorPane_, BuBorderLayout.CENTER); - conteneur.add(editorPane_.getToolBar(true), BuBorderLayout.NORTH); - conteneur.add(editorPane_.getMenuBar()); - - } + // if (conteneur == null) { + // conteneur = new BuPanel(new BuBorderLayout()); + // + // // final Rectangle rec = getClientArea(); + // // editorPane_.setSize(rec.width, rec.height); + // // editorPane_.setPreferredSize(new Dimension(rec.width, rec.height)); + // // conteneur.setPreferredSize(new Dimension(rec.width, rec.height)); + // // conteneur.setMaximumSize(new Dimension(rec.width, rec.height)); + // // conteneur.setMinimumSize(new Dimension(rec.width, rec.height)); + // conteneur.add(editorPane_, BuBorderLayout.CENTER); + // conteneur.add(editorPane_.getToolBar(true), BuBorderLayout.NORTH); + // conteneur.add(editorPane_.getMenuBar()); + // + // } // -- on masque l affichage du widgetcomponent --// // contenuHTML_.setText(""); @@ -178,6 +181,7 @@ } public void notifyOpened(final EditorController _controller, final Widget _widget, final CtuluHtmlEditorPanel _editor) { + _editor.setFrame((JFrame) CtuluLibSwing.getActiveWindow()); // contenuHTML_.setText(CtuluHtmlEditorPanel.showMinimalHtmlDialog(contenuHTML_.getText(), // getEbliScene().getView(), true)); // editorPane_.setDocumentText(contenuHTML_.getText()); Added: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/ProportionnalResizeBorder.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/ProportionnalResizeBorder.java (rev 0) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/ProportionnalResizeBorder.java 2008-10-31 02:48:27 UTC (rev 4135) @@ -0,0 +1,75 @@ +/** + * Licence GPL + * Copyright Genesis + */ +package org.fudaa.ebli.visuallibrary; + +import java.awt.BasicStroke; +import java.awt.Color; +import java.awt.Graphics2D; +import java.awt.Insets; +import java.awt.Point; +import java.awt.Rectangle; +import java.awt.Stroke; +import java.awt.geom.Rectangle2D; + +import org.netbeans.api.visual.border.Border; +import org.netbeans.modules.visual.util.GeomUtil; + +/** + * @author deniger + */ +public class ProportionnalResizeBorder implements Border { + + private static final BasicStroke STROKE = new BasicStroke(1.0f, BasicStroke.JOIN_BEVEL, BasicStroke.CAP_BUTT, 5.0f, + new float[] { 6.0f, 3.0f }, 0.0f); + + private int thickness; + private Color color; + private boolean outer; + + public ProportionnalResizeBorder(int thickness, Color color, boolean outer) { + this.thickness = thickness; + this.color = color; + this.outer = outer; + } + + public Insets getInsets() { + return new Insets(thickness, thickness, thickness, thickness); + } + + public boolean isOuter() { + return outer; + } + + public void paint(Graphics2D gr, Rectangle bounds) { + gr.setColor(color); + + Stroke stroke = gr.getStroke(); + gr... [truncated message content] |
From: <de...@us...> - 2008-11-02 00:42:15
|
Revision: 4148 http://fudaa.svn.sourceforge.net/fudaa/?rev=4148&view=rev Author: deniger Date: 2008-11-02 00:42:09 +0000 (Sun, 02 Nov 2008) Log Message: ----------- Modified Paths: -------------- branches/Prepro-0.92-SNAPSHOT/ctulu/src/org/fudaa/ctulu/CtuluNumberFormat.java branches/Prepro-0.92-SNAPSHOT/ctulu/src/org/fudaa/ctulu/CtuluNumberFormatDefault.java branches/Prepro-0.92-SNAPSHOT/ctulu/src/org/fudaa/ctulu/ctulu_en.fr_txt branches/Prepro-0.92-SNAPSHOT/ctulu/src/org/fudaa/ctulu/gui/CtuluDecimalFormatEditPanel.java branches/Prepro-0.92-SNAPSHOT/ctulu/src/org/fudaa/ctulu/gui/CtuluDialogPanel.java branches/Prepro-0.92-SNAPSHOT/ctulu/src/org/fudaa/ctulu/image/CtuluImageExport.java branches/Prepro-0.92-SNAPSHOT/ctulu/src/org/fudaa/ctulu/pdf/CtuluPanelPdfViewer.java branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/dico/DicoEntite.java branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/ef/EfFilterNone.java branches/Prepro-0.92-SNAPSHOT/dodico/test/org/fudaa/dodico/telemac/TestJSerafin.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/BVueCalque.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/ZCalqueGrille.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/ZEbliCalquesPanel.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/commun/EbliActionPaletteAbstract.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/commun/EbliFormatter.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/commun/EbliTableInfoPanel.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/courbe/EGCourbeSurfacePainter.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/courbe/EGFille.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/courbe/EGFillePanel.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/courbe/EGFillePanelDialog.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/courbe/EGGrapheDuplicator.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/ressource/ebli_en.fr_txt branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliScene.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetController.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetControllerCalque.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetFusionCalques.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/graphe/EbliWidgetControllerGraphe.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/graphe/EbliWidgetCreatorGraphe.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/graphe/EbliWidgetGraphe.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/commun/courbe/FudaaGrapheTimeAnimatedVisuPanel.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/commun/impl/FudaaCommonImplementation.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/layer/MvNodeLayer.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/profile/MvProfileFillePanel.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/profile/MvProfileFlowrateVolumeBuilder.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/ressource/fudaa_en.fr_txt branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/sig/layer/FSigGrillePalette.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/sig/layer/FSigLayerGroup.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/sig/layer/FSigVisuPanel.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/sig/layer/FSigVisuPanelController.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/TrLauncherDefault.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/common/tr_en.fr_txt branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrIsoLayerDefault.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostCourbeFille.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostCourbeTreeModel.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostExprFlecheSupplier.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostFille.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostFlecheContent.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostFlecheContentDefaut.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostFlecheLayer.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostFlecheModel.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostMinMaxTableModel.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostProfileFille.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostProjectCompPanel.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostProjet.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostProjetCompTimeStepPanel.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostRubarEnvFlecheContent.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostRubarLoader.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostScene.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostSource.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostSourceAbstract.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostSourceComparatorBuilder.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostSourceProjected.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostSourceRubar.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostSourceRubarMaxContainer.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostSourceTelemac3D.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostUserVariableSaver.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostVisuPanel.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/actions/TrPostActionCubature.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/actions/TrPostVolumeAction.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/dialogSpec/TrPostDialogBilan.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/dialogSpec/TrPostDialogCubature.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/dialogSpec/TrPostTrajectoireTaskModel.java Added Paths: ----------- branches/Prepro-0.92-SNAPSHOT/ctulu/src/org/fudaa/ctulu/Thumbs.db branches/Prepro-0.92-SNAPSHOT/ctulu/src/org/fudaa/ctulu/copie-image_16.png branches/Prepro-0.92-SNAPSHOT/ctulu/src/org/fudaa/ctulu/copie-image_22.png branches/Prepro-0.92-SNAPSHOT/ctulu/src/org/fudaa/ctulu/gui/CtuluCellTextDecimalRenderer.java branches/Prepro-0.92-SNAPSHOT/ctulu/src/org/fudaa/ctulu/image/CtuluImageSelection.java branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/ef/cubature/ branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/ef/cubature/EfBilanHelper.java branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/ef/cubature/EfComputeVolume.java branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/ef/cubature/EfComputeVolumeSeuil.java branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/ef/cubature/EfDataIntegrale.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostTrajectoireComputeAndDisplayActivity.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostTrajectoireGisDataModel.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostTrajectoireLineLayer.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostTrajectoireLineLayerPersistence.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/data/ branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/data/TrPostDataCreated.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/data/TrPostDataCreatedConstant.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/data/TrPostDataCreatedCstTime.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/data/TrPostDataCreatedCstTimeSaver.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/data/TrPostDataCreatedDefault.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/data/TrPostDataCreatedExpr.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/data/TrPostDataCreatedFroud.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/data/TrPostDataCreatedImport.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/data/TrPostDataCreatedMoins.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/data/TrPostDataCreatedNorm.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/data/TrPostDataCreatedNorme3D.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/data/TrPostDataCreatedPlus.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/data/TrPostDataCreatedRubarBathy.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/data/TrPostDataCreatedRubarVitesse.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/data/TrPostDataCreatedSaver.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/data/TrPostDataCreatedStatistic.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/data/TrPostDataCreatedStatisticSaver.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/data/TrPostDataCreationActions.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/data/TrPostDataCreationFille.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/data/TrPostDataCreationPanel.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/data/TrPostDataEditCommonPanel.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/data/TrPostDataEditCstPanel.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/data/TrPostDataEditExprPanel.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/data/TrPostDataEditStatisticPanel.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/data/TrPostDataInfoDoc.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/data/TrPostDataListener.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/data/TrPostDataMinMaxGlobalItem.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/data/TrPostDataUserVarModel.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/data/TrPostDataVecteur.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/data/TrPostExtremVisitor.java Removed Paths: ------------- branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/ef/EfComputeVolume.java branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/ef/EfComputeVolumeSeuil.java branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/ef/EfDataIntegrale.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/commun/impl/FudaaImageSelection.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/ressource/copie-image_16.png branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/ressource/copie-image_22.png branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostDataCreated.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostDataCreatedConstant.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostDataCreatedCstTime.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostDataCreatedCstTimeSaver.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostDataCreatedDefault.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostDataCreatedExpr.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostDataCreatedFroud.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostDataCreatedImport.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostDataCreatedMoins.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostDataCreatedNorm.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostDataCreatedNorme3D.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostDataCreatedPlus.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostDataCreatedRubarBathy.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostDataCreatedRubarVitesse.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostDataCreatedSaver.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostDataCreatedStatistic.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostDataCreatedStatisticSaver.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostDataCreationActions.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostDataCreationFille.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostDataCreationPanel.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostDataEditCommonPanel.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostDataEditCstPanel.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostDataEditExprPanel.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostDataEditStatisticPanel.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostDataInfoDoc.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostDataListener.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostDataMinMaxGlobalItem.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostDataUserVarModel.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostDataVecteur.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostExtremVisitor.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrTrajectoireComputeAndDisplayActivity.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrTrajectoireGisDataModel.java Modified: branches/Prepro-0.92-SNAPSHOT/ctulu/src/org/fudaa/ctulu/CtuluNumberFormat.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ctulu/src/org/fudaa/ctulu/CtuluNumberFormat.java 2008-10-31 18:14:47 UTC (rev 4147) +++ branches/Prepro-0.92-SNAPSHOT/ctulu/src/org/fudaa/ctulu/CtuluNumberFormat.java 2008-11-02 00:42:09 UTC (rev 4148) @@ -9,6 +9,7 @@ import java.text.FieldPosition; import java.text.Format; +import java.text.NumberFormat; import java.text.ParsePosition; import com.memoire.fu.FuLog; @@ -18,6 +19,9 @@ * @version $Id: CtuluNumberFormat.java,v 1.10 2007-05-21 10:28:29 deniger Exp $ */ public abstract class CtuluNumberFormat extends Format implements CtuluNumberFormatI { + + + public void format(final double _d, final StringBuffer _dest) { _dest.append(format(_d)); Modified: branches/Prepro-0.92-SNAPSHOT/ctulu/src/org/fudaa/ctulu/CtuluNumberFormatDefault.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ctulu/src/org/fudaa/ctulu/CtuluNumberFormatDefault.java 2008-10-31 18:14:47 UTC (rev 4147) +++ branches/Prepro-0.92-SNAPSHOT/ctulu/src/org/fudaa/ctulu/CtuluNumberFormatDefault.java 2008-11-02 00:42:09 UTC (rev 4148) @@ -18,6 +18,13 @@ */ public class CtuluNumberFormatDefault extends CtuluNumberFormat { + public static CtuluNumberFormatDefault DEFAULT_FMT = new CtuluNumberFormatDefault(); + static { + final NumberFormat fmt = CtuluLib.getDecimalFormat(); + fmt.setMaximumFractionDigits(2); + DEFAULT_FMT.setFmt(fmt); + } + /** * @author fred deniger * @version $Id: CtuluNumberFormatDefault.java,v 1.8 2007-05-21 10:28:29 deniger Exp $ Added: branches/Prepro-0.92-SNAPSHOT/ctulu/src/org/fudaa/ctulu/Thumbs.db =================================================================== (Binary files differ) Property changes on: branches/Prepro-0.92-SNAPSHOT/ctulu/src/org/fudaa/ctulu/Thumbs.db ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Copied: branches/Prepro-0.92-SNAPSHOT/ctulu/src/org/fudaa/ctulu/copie-image_16.png (from rev 3976, branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/ressource/copie-image_16.png) =================================================================== (Binary files differ) Property changes on: branches/Prepro-0.92-SNAPSHOT/ctulu/src/org/fudaa/ctulu/copie-image_16.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: svn:mergeinfo + Copied: branches/Prepro-0.92-SNAPSHOT/ctulu/src/org/fudaa/ctulu/copie-image_22.png (from rev 3976, branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/ressource/copie-image_22.png) =================================================================== (Binary files differ) Property changes on: branches/Prepro-0.92-SNAPSHOT/ctulu/src/org/fudaa/ctulu/copie-image_22.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: svn:mergeinfo + Modified: branches/Prepro-0.92-SNAPSHOT/ctulu/src/org/fudaa/ctulu/ctulu_en.fr_txt =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ctulu/src/org/fudaa/ctulu/ctulu_en.fr_txt 2008-10-31 18:14:47 UTC (rev 4147) +++ branches/Prepro-0.92-SNAPSHOT/ctulu/src/org/fudaa/ctulu/ctulu_en.fr_txt 2008-11-02 00:42:09 UTC (rev 4148) @@ -150,6 +150,7 @@ Le fichier '{0}' existe d\xE9j\xE0 et est prot\xE9g\xE9=The file {0} already exists and it's write protected Le r\xE9pertoire parent '{0}' est prot\xE9g\xE9 en \xE9criture=The parent folder {0} is write protected Choisir un autre fichier=Choose another file +Choisir le format=Chooser the decimal format Exportation annul\xE9e=Export cancelled Export r\xE9ussie=Export succeed Export=Export @@ -270,4 +271,10 @@ Supprimer les \xE9l\xE9ments s\xE9lectionn\xE9s=Delete selected items Erreur fichier inexistant= Error file is missing Erreur lors de la lecture du fichier= Error while reading the file -Chapitres=Chapters \ No newline at end of file +Chapitres=Chapters +Exporter donn\xE9es=Export data +Image enregistr\xE9e=Image saved +Enregistrement dans le presse-papier=Save image in the clipboard +Placer l'image de la fen\xEAtre active dans le presse-papier=Copy the image of the current frame in the clipboard +Copier l'image dans le presse-papier=Copy the image in the clipboard +Cr\xE9er une image \xE0 partir de la fen\xEAtre active=Create an image from the current frama \ No newline at end of file Added: branches/Prepro-0.92-SNAPSHOT/ctulu/src/org/fudaa/ctulu/gui/CtuluCellTextDecimalRenderer.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ctulu/src/org/fudaa/ctulu/gui/CtuluCellTextDecimalRenderer.java (rev 0) +++ branches/Prepro-0.92-SNAPSHOT/ctulu/src/org/fudaa/ctulu/gui/CtuluCellTextDecimalRenderer.java 2008-11-02 00:42:09 UTC (rev 4148) @@ -0,0 +1,37 @@ +/** + * Licence GPL + * Copyright Genesis + */ +package org.fudaa.ctulu.gui; + +import org.fudaa.ctulu.CtuluNumberFormatDefault; +import org.fudaa.ctulu.CtuluNumberFormatI; + +/** + * @author deniger + */ +public class CtuluCellTextDecimalRenderer extends CtuluCellTextRenderer { + CtuluNumberFormatI formatter = CtuluNumberFormatDefault.DEFAULT_FMT; + + /** + * @return the formatter + */ + public CtuluNumberFormatI getFormatter() { + return formatter; + } + + /** + * @param _formatter the formatter to set + */ + public void setFormatter(CtuluNumberFormatI _formatter) { + formatter = _formatter; + } + + @Override + protected void setValue(Object _value) { + setHorizontalTextPosition(RIGHT); + setHorizontalAlignment(RIGHT); + if (_value == null) return; + super.setValue(formatter.format(((Number) _value).doubleValue())); + } +} Modified: branches/Prepro-0.92-SNAPSHOT/ctulu/src/org/fudaa/ctulu/gui/CtuluDecimalFormatEditPanel.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ctulu/src/org/fudaa/ctulu/gui/CtuluDecimalFormatEditPanel.java 2008-10-31 18:14:47 UTC (rev 4147) +++ branches/Prepro-0.92-SNAPSHOT/ctulu/src/org/fudaa/ctulu/gui/CtuluDecimalFormatEditPanel.java 2008-11-02 00:42:09 UTC (rev 4148) @@ -45,6 +45,14 @@ */ public class CtuluDecimalFormatEditPanel extends CtuluDialogPanel implements BuBorders { + public static CtuluNumberFormatI chooseNumberFormat(CtuluNumberFormatI _init) { + CtuluDecimalFormatEditPanel pn = new CtuluDecimalFormatEditPanel(_init); + if (pn.afficheModaleOk(CtuluLibSwing.getActiveWindow(), CtuluLib.getS("Choisir le format"))) { + return pn.getCurrentFmt(); } + return _init; + + } + JPanel pnDecimalFormat_; JPanel pnFixedFormat_; @@ -129,9 +137,7 @@ } private JPanel createFixedPanel() { - if (pnFixedFormat_ != null) { - return pnFixedFormat_; - } + if (pnFixedFormat_ != null) { return pnFixedFormat_; } pnFixedFormat_ = new BuPanel(new BuGridLayout(2, 5, 5)); final CtuluValueValidator min = new CtuluValueValidator.IntMin(1); tfNbDigits_ = BuTextField.createIntegerField(); @@ -165,9 +171,7 @@ } private JPanel createDecimalPanel() { - if (pnDecimalFormat_ != null) { - return pnDecimalFormat_; - } + if (pnDecimalFormat_ != null) { return pnDecimalFormat_; } pnDecimalFormat_ = new BuPanel(new BuGridLayout(2, 5, 5)); cbISExp_ = new BuCheckBox(); tfFraction_ = BuTextField.createIntegerField(); Modified: branches/Prepro-0.92-SNAPSHOT/ctulu/src/org/fudaa/ctulu/gui/CtuluDialogPanel.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ctulu/src/org/fudaa/ctulu/gui/CtuluDialogPanel.java 2008-10-31 18:14:47 UTC (rev 4147) +++ branches/Prepro-0.92-SNAPSHOT/ctulu/src/org/fudaa/ctulu/gui/CtuluDialogPanel.java 2008-11-02 00:42:09 UTC (rev 4148) @@ -195,7 +195,7 @@ return r; } - protected BuTextField addStringText() { + public BuTextField addStringText() { return addStringText(this); } Modified: branches/Prepro-0.92-SNAPSHOT/ctulu/src/org/fudaa/ctulu/image/CtuluImageExport.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ctulu/src/org/fudaa/ctulu/image/CtuluImageExport.java 2008-10-31 18:14:47 UTC (rev 4147) +++ branches/Prepro-0.92-SNAPSHOT/ctulu/src/org/fudaa/ctulu/image/CtuluImageExport.java 2008-11-02 00:42:09 UTC (rev 4148) @@ -7,6 +7,9 @@ */ package org.fudaa.ctulu.image; +import java.awt.Toolkit; +import java.awt.datatransfer.Clipboard; +import java.awt.image.BufferedImage; import java.awt.image.RenderedImage; import java.io.File; import java.io.IOException; @@ -23,7 +26,9 @@ import org.fudaa.ctulu.CtuluLib; import org.fudaa.ctulu.CtuluLibFile; import org.fudaa.ctulu.CtuluPermanentList; +import org.fudaa.ctulu.CtuluTaskDelegate; import org.fudaa.ctulu.CtuluUI; +import org.fudaa.ctulu.ProgressionInterface; /** * @author Fred Deniger @@ -95,4 +100,24 @@ return true; } + public static void exportImageInClipboard(final CtuluImageProducer frame, final CtuluUI _ui) { + final BufferedImage produceImage = frame.produceImage(null); + final CtuluTaskDelegate task = _ui.createTask(CtuluLib.getS("Enregistrement dans le presse-papier")); + task.start(new Runnable() { + + public void run() { + final ProgressionInterface prog = task.getStateReceiver(); + + final Clipboard clipboard = Toolkit.getDefaultToolkit().getSystemClipboard(); + prog.setProgression(10); + final CtuluImageSelection selection = new CtuluImageSelection(produceImage); + prog.setProgression(30); + clipboard.setContents(selection, selection); + prog.setProgression(90); + _ui.message("Image", CtuluLib.getS("Image enregistr\xE9e"), true); + } + + }); + } + } \ No newline at end of file Copied: branches/Prepro-0.92-SNAPSHOT/ctulu/src/org/fudaa/ctulu/image/CtuluImageSelection.java (from rev 3976, branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/commun/impl/FudaaImageSelection.java) =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ctulu/src/org/fudaa/ctulu/image/CtuluImageSelection.java (rev 0) +++ branches/Prepro-0.92-SNAPSHOT/ctulu/src/org/fudaa/ctulu/image/CtuluImageSelection.java 2008-11-02 00:42:09 UTC (rev 4148) @@ -0,0 +1,87 @@ +/* + * @creation 6 d\xE9c. 06 + * @modification $Date: 2007-02-07 09:56:20 $ + * @license GNU General Public License 2 + * @copyright (c)1998-2001 CETMEF 2 bd Gambetta F-60231 Compiegne + * @mail de...@fu... + */ +package org.fudaa.ctulu.image; + +import java.awt.Image; +import java.awt.datatransfer.Clipboard; +import java.awt.datatransfer.ClipboardOwner; +import java.awt.datatransfer.DataFlavor; +import java.awt.datatransfer.Transferable; + +import javax.swing.JComponent; +import javax.swing.TransferHandler; + + +/** + * @author fred deniger + * @version $Id: FudaaImageSelection.java,v 1.3 2007-02-07 09:56:20 deniger Exp $ + */ +public class CtuluImageSelection extends TransferHandler implements Transferable, ClipboardOwner { + + public CtuluImageSelection(final Image _image) { + super(); + image_ = _image; + } + public CtuluImageSelection() { + super(); + } + + public void lostOwnership(final Clipboard _clipboard, final Transferable _contents) {} + + private static final DataFlavor[] FLAVORS = { DataFlavor.imageFlavor }; + + private Image image_; + + public int getSourceActions(final JComponent _c) { + return TransferHandler.COPY; + } + + public boolean canImport(final JComponent _comp, final DataFlavor[] _flavor) { + if (!(_comp instanceof CtuluImageProducer)) { + return false; + } + for (int i = 0, n = _flavor.length; i < n; i++) { + if (_flavor.equals(FLAVORS[0])) { + return true; + } + } + return false; + } + + public Transferable createTransferable(final JComponent _comp) { + // Clear + image_ = null; + + if (_comp instanceof CtuluImageProducer) { + image_ = ((CtuluImageProducer) _comp).produceImage(null); + return this; + } + return null; + } + + public boolean importData(final JComponent _comp, final Transferable _t) { + return false; + } + + // Transferable + public Object getTransferData(final DataFlavor _flavor) { + if (isDataFlavorSupported(_flavor)) { + return image_; + } + return null; + } + + public DataFlavor[] getTransferDataFlavors() { + return FLAVORS; + } + + public boolean isDataFlavorSupported(final DataFlavor _flavor) { + return _flavor.equals(FLAVORS[0]); + } + +} Property changes on: branches/Prepro-0.92-SNAPSHOT/ctulu/src/org/fudaa/ctulu/image/CtuluImageSelection.java ___________________________________________________________________ Added: svn:mergeinfo + Modified: branches/Prepro-0.92-SNAPSHOT/ctulu/src/org/fudaa/ctulu/pdf/CtuluPanelPdfViewer.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ctulu/src/org/fudaa/ctulu/pdf/CtuluPanelPdfViewer.java 2008-10-31 18:14:47 UTC (rev 4147) +++ branches/Prepro-0.92-SNAPSHOT/ctulu/src/org/fudaa/ctulu/pdf/CtuluPanelPdfViewer.java 2008-11-02 00:42:09 UTC (rev 4148) @@ -3,60 +3,47 @@ import java.awt.BorderLayout; import java.awt.Color; import java.awt.Dimension; +import java.awt.Toolkit; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.awt.event.KeyEvent; import java.awt.event.KeyListener; -import java.awt.event.WindowAdapter; -import java.awt.event.WindowEvent; import java.awt.geom.Rectangle2D; import java.awt.print.Book; import java.awt.print.PageFormat; import java.awt.print.PrinterException; import java.awt.print.PrinterJob; -import java.awt.Toolkit; import java.beans.PropertyChangeEvent; import java.beans.PropertyChangeListener; import java.io.File; -import java.io.FileOutputStream; import java.io.IOException; import java.io.RandomAccessFile; -import java.net.Socket; +import java.lang.reflect.InvocationTargetException; import java.net.URL; import java.nio.ByteBuffer; import java.nio.channels.FileChannel; -import java.util.Date; -import java.util.HashMap; import javax.swing.AbstractAction; import javax.swing.Action; -import javax.swing.BorderFactory; import javax.swing.Box; import javax.swing.ButtonGroup; import javax.swing.Icon; import javax.swing.ImageIcon; import javax.swing.JButton; -import javax.swing.JCheckBox; -import javax.swing.JCheckBoxMenuItem; import javax.swing.JDialog; import javax.swing.JFileChooser; -import javax.swing.JFrame; import javax.swing.JMenu; -import javax.swing.JMenuBar; -import javax.swing.JMenuItem; import javax.swing.JOptionPane; import javax.swing.JScrollPane; -import javax.swing.JSplitPane; import javax.swing.JTextField; import javax.swing.JToggleButton; import javax.swing.JToolBar; import javax.swing.JTree; +import javax.swing.SwingUtilities; import javax.swing.event.TreeSelectionEvent; import javax.swing.event.TreeSelectionListener; import javax.swing.filechooser.FileFilter; -import javax.swing.SwingUtilities; -import org.fudaa.ctulu.CtuluResource; import org.fudaa.ctulu.CtuluUI; import com.memoire.bu.BuPanel; @@ -74,7 +61,6 @@ import com.sun.pdfview.ThumbPanel; import com.sun.pdfview.action.GoToAction; import com.sun.pdfview.action.PDFAction; -import java.lang.reflect.InvocationTargetException; /** * Classe qui g\xE9n\xE8re un panel disposant de toutes les fonctionnalit\xE9 du lecteur pdf. * Ce panel s'autosuffie pour la gestion des pdfs Modified: branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/dico/DicoEntite.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/dico/DicoEntite.java 2008-10-31 18:14:47 UTC (rev 4147) +++ branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/dico/DicoEntite.java 2008-11-02 00:42:09 UTC (rev 4148) @@ -387,6 +387,8 @@ */ public void setTaille(final int _i) { taille_ = _i; + //Nombre magique qui indique qu'un tableau est dynamique +// if(taille_==2) dynamique_=true; } public String toString() { Deleted: branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/ef/EfComputeVolume.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/ef/EfComputeVolume.java 2008-10-31 18:14:47 UTC (rev 4147) +++ branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/ef/EfComputeVolume.java 2008-11-02 00:42:09 UTC (rev 4148) @@ -1,195 +0,0 @@ -/* - * @creation 1 f\xE9vr. 07 - * @modification $Date: 2007-06-11 13:04:05 $ - * @license GNU General Public License 2 - * @copyright (c)1998-2001 CETMEF 2 bd Gambetta F-60231 Compiegne - * @mail de...@fu... - */ -package org.fudaa.dodico.ef; - -import gnu.trove.TIntArrayList; -import gnu.trove.TIntObjectHashMap; - -import java.io.IOException; - -import com.memoire.fu.FuLog; - -import org.fudaa.ctulu.CtuluActivity; -import org.fudaa.ctulu.CtuluAnalyze; -import org.fudaa.ctulu.CtuluVariable; -import org.fudaa.ctulu.ProgressionInterface; -import org.fudaa.ctulu.ProgressionUpdater; - -import org.fudaa.dodico.commun.DodicoLib; - -/** - * Permet de calculer le volume d'eau sur une s\xE9lection d'\xE9l\xE9ment ou de noeuds. - * - * @author fred deniger - * @version $Id: EfComputeVolume.java,v 1.4 2007-06-11 13:04:05 deniger Exp $ - */ -public abstract class EfComputeVolume implements CtuluActivity { - - public static class ForMeshData extends EfComputeVolume { - - ForMeshData(final EfFilter _filter, final ProgressionInterface _prog, final EfGridData _data, - final CtuluVariable _hVar) { - super(_filter, _prog, _data, _hVar); - } - - double computeVolume(final EfGridInterface _grid, final EfData _h) { - double resi = 0; - for (int ielt = 0; ielt < _grid.getEltNb(); ielt++) { - if (filter_.isActivatedElt(ielt, _grid, false)) { - resi += _grid.getAire(ielt) * _h.getValue(ielt); - } - } - return resi; - } - - } - - public static class ForNodeData extends EfComputeVolume { - - ForNodeData(final EfFilter _filter, final ProgressionInterface _prog, final EfGridData _data, - final CtuluVariable _hVar) { - super(_filter, _prog, _data, _hVar); - } - - double computeVolume(final EfGridInterface _grid, final EfData _h) { - double resi = 0; - for (int ipt = 0; ipt < _grid.getPtsNb(); ipt++) { - // le calcul du volume se fait: - // Volume=(surface des elements adjacents)* hauteur au point /3 - if (filter_.isActivated(ipt)) { - // liste des elements adjacents. - final TIntArrayList list = (TIntArrayList) idxPtAdjMes_.get(ipt); - // la liste est nulle: ne devrait jamais arriv\xE9: un point isol\xE9 que faire ? - // pour l'instant on ignore. - if (list != null) { - // s est la surface des elements adjacents. - double s = 0D; - for (int k = 0; k < list.size(); k++) { - s += _grid.getAire(list.getQuick(k)); - } - // la formule qui tue - resi += s * _h.getValue(ipt) / 3D; - } - } - } - return resi; - } - - public double[] getVolume(final int _nbTimeStep) { - computeNeighborMeshes(); - return super.getVolume(_nbTimeStep); - } - } - - final EfGridData data_; - final EfFilter filter_; - final CtuluVariable h_; - /** - * Stocke indice du noeuds -> list element adjacent. Pour les noeuds s\xE9lecionn\xE9s uniquement - */ - TIntObjectHashMap idxPtAdjMes_; - ProgressionInterface prog_; - - boolean stop_; - - public static EfComputeVolume getVolumeComputer(final EfFilter _filter, final ProgressionInterface _prog, - final EfGridData _data, final CtuluVariable _hVar, final CtuluAnalyze _analyze) { - if (!_data.isDefined(_hVar)) { - _analyze.addFatalError(DodicoLib.getS("La hauteur d'eau n'est pas d\xE9finie")); - return null; - } - if (_data.isElementVar(_hVar)) { - return new ForMeshData(_filter, _prog, _data, _hVar); - } - return new ForNodeData(_filter, _prog, _data, _hVar); - - } - - EfComputeVolume(final EfFilter _filter, final ProgressionInterface _prog, final EfGridData _data, - final CtuluVariable _hVar) { - super(); - prog_ = _prog; - data_ = _data; - h_ = _hVar; - filter_ = _filter == null ? new EfFilterNone() : _filter; - } - - abstract double computeVolume(final EfGridInterface _grid, EfData _h); - - protected void computeNeighborMeshes() { - if (idxPtAdjMes_ != null) { - return; - } - final ProgressionUpdater up = new ProgressionUpdater(prog_); - final EfGridInterface grid = data_.getGrid(); - up.setValue(10, grid.getEltNb()); - up.majProgessionStateOnly(DodicoLib.getS("Recherche des \xE9l\xE9ments voisins")); - idxPtAdjMes_ = new TIntObjectHashMap(grid.getPtsNb()); - for (int i = 0; i < grid.getEltNb(); i++) { - if (stop_) { - idxPtAdjMes_ = null; - return; - } - final EfElement elt = grid.getElement(i); - for (int j = 0; j < elt.getPtNb(); j++) { - final int ptIndex = elt.getPtIndex(j); - // si le noeud est s\xE9lectionne - if (filter_.isActivated(ptIndex)) { - TIntArrayList list = (TIntArrayList) idxPtAdjMes_.get(ptIndex); - // ce noeud n'a pas encore \xE9t\xE9 trait\xE9 - if (list == null) { - list = new TIntArrayList(10); - idxPtAdjMes_.put(ptIndex, list); - } - list.add(i); - - } - } - up.majAvancement(); - } - } - - public double[] getVolume(final int _nbTimeStep) { - final ProgressionUpdater up = new ProgressionUpdater(prog_); - final EfGridInterface grid = data_.getGrid(); - up.setValue(10, _nbTimeStep); - final double[] res = new double[_nbTimeStep]; - up.majProgessionStateOnly(DodicoLib.getS("Calcul du volume")); - for (int i = 0; i < res.length; i++) { - if (stop_) { - return null; - } - EfData h = null; - try { - h = data_.getData(h_, i); - } catch (final IOException _evt) { - FuLog.error(_evt); - - } - if (h == null) { - return null; - } - res[i] = computeVolume(grid, h); - up.majAvancement(); - } - return res; - } - - public ProgressionInterface getProg() { - return prog_; - } - - public void setProg(final ProgressionInterface _prog) { - prog_ = _prog; - } - - public void stop() { - stop_ = true; - } - -} Deleted: branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/ef/EfComputeVolumeSeuil.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/ef/EfComputeVolumeSeuil.java 2008-10-31 18:14:47 UTC (rev 4147) +++ branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/ef/EfComputeVolumeSeuil.java 2008-11-02 00:42:09 UTC (rev 4148) @@ -1,187 +0,0 @@ -package org.fudaa.dodico.ef; - -import gnu.trove.TIntArrayList; -import gnu.trove.TIntObjectHashMap; - -import java.io.IOException; - -import org.fudaa.ctulu.CtuluActivity; -import org.fudaa.ctulu.CtuluAnalyze; -import org.fudaa.ctulu.CtuluVariable; -import org.fudaa.ctulu.ProgressionInterface; -import org.fudaa.ctulu.ProgressionUpdater; -import org.fudaa.dodico.commun.DodicoLib; - -import com.memoire.fu.FuLog; - -/** - * Calcul du volume par rapport a un seuil et non plus 0. - * - * @author Adrien Hadoux - */ -public abstract class EfComputeVolumeSeuil implements CtuluActivity { - - public static class ForMeshData extends EfComputeVolumeSeuil { - - ForMeshData(final EfFilter _filter, final ProgressionInterface _prog, final EfGridData _data, - final CtuluVariable _hVar, final int timestep, final double seuil) { - super(_filter, _prog, _data, _hVar, timestep, seuil); - } - - EfDataIntegrale computeVolume(final EfGridInterface _grid, final EfData _h) { - EfDataIntegrale resi = new EfDataIntegrale(); - for (int ielt = 0; ielt < _grid.getEltNb(); ielt++) { - if (filter_.isActivatedElt(ielt, _grid, false)) { - - double value = _grid.getAire(ielt) * (_h.getValue(ielt) - seuil_);// Todo je pense que c'est la diff - if (value >= 0) resi.zonePlus_ += value; - else resi.zoneMoins_ -= value; - } - } - return resi; - } - } - - public static class ForNodeData extends EfComputeVolumeSeuil { - - ForNodeData(final EfFilter _filter, final ProgressionInterface _prog, final EfGridData _data, - final CtuluVariable _hVar, final int timestep, final double seuil) { - super(_filter, _prog, _data, _hVar, timestep, seuil); - } - - EfDataIntegrale computeVolume(final EfGridInterface _grid, final EfData _h) { - EfDataIntegrale resi = new EfDataIntegrale(); - for (int ipt = 0; ipt < _grid.getPtsNb(); ipt++) { - // le calcul du volume se fait: - // Volume=(surface des elements adjacents)* hauteur au point /3 - if (filter_.isActivated(ipt)) { - // liste des elements adjacents. - final TIntArrayList list = (TIntArrayList) idxPtAdjMes_.get(ipt); - // la liste est nulle: ne devrait jamais arriv\xE9: un point isol\xE9 que faire ? - // pour l'instant on ignore. - if (list != null) { - // s est la surface des elements adjacents. - double s = 0D; - for (int k = 0; k < list.size(); k++) { - s += _grid.getAire(list.getQuick(k)); - } - double d = s * (_h.getValue(ipt)) / 3D - seuil_;// TODO a verifier - if (d >= 0) resi.zonePlus_ += d; - else resi.zoneMoins_ -= d; - } - } - } - return resi; - } - - public EfDataIntegrale getVolume(int _choosenTimestep) { - computeNeighborMeshes(); - return super.getVolume(_choosenTimestep); - } - } - - final EfGridData data_; - final EfFilter filter_; - final CtuluVariable h_; - protected final int timeStep_; - protected final double seuil_; - - /** - * Stocke indice du noeuds -> list element adjacent. Pour les noeuds s\xE9lecionn\xE9s uniquement - */ - TIntObjectHashMap idxPtAdjMes_; - ProgressionInterface prog_; - - boolean stop_; - - public static EfComputeVolumeSeuil getVolumeComputer(final EfFilter _filter, final ProgressionInterface _prog, - final EfGridData _data, final CtuluVariable _hVar, final int timestep, final double seuil, - final CtuluAnalyze _analyze) { - if (!_data.isDefined(_hVar)) { - _analyze.addFatalError(DodicoLib.getS("La variable n'est pas d\xE9finie")); - return null; - } - if (_data.isElementVar(_hVar)) { return new ForMeshData(_filter, _prog, _data, _hVar, timestep, seuil); } - return new ForNodeData(_filter, _prog, _data, _hVar, timestep, seuil); - - } - - EfComputeVolumeSeuil(final EfFilter _filter, final ProgressionInterface _prog, final EfGridData _data, - final CtuluVariable _hVar, final int timestep, final double seuil) { - super(); - prog_ = _prog; - data_ = _data; - h_ = _hVar; - timeStep_ = timestep; - seuil_ = seuil; - filter_ = _filter == null ? new EfFilterNone() : _filter; - } - - abstract EfDataIntegrale computeVolume(final EfGridInterface _grid, EfData _h); - - protected void computeNeighborMeshes() { - if (idxPtAdjMes_ != null) { return; } - final ProgressionUpdater up = new ProgressionUpdater(prog_); - final EfGridInterface grid = data_.getGrid(); - up.setValue(10, grid.getEltNb()); - up.majProgessionStateOnly(DodicoLib.getS("Recherche des \xE9l\xE9ments voisins")); - idxPtAdjMes_ = new TIntObjectHashMap(grid.getPtsNb()); - for (int i = 0; i < grid.getEltNb(); i++) { - if (stop_) { - idxPtAdjMes_ = null; - return; - } - final EfElement elt = grid.getElement(i); - for (int j = 0; j < elt.getPtNb(); j++) { - final int ptIndex = elt.getPtIndex(j); - // si le noeud est s\xE9lectionne - if (filter_.isActivated(ptIndex)) { - TIntArrayList list = (TIntArrayList) idxPtAdjMes_.get(ptIndex); - // ce noeud n'a pas encore \xE9t\xE9 trait\xE9 - if (list == null) { - list = new TIntArrayList(10); - idxPtAdjMes_.put(ptIndex, list); - } - list.add(i); - - } - } - up.majAvancement(); - } - } - - public EfDataIntegrale getVolume(int choosenTimestep) { - final ProgressionUpdater up = new ProgressionUpdater(prog_); - final EfGridInterface grid = data_.getGrid(); - up.setValue(10, 100); - EfDataIntegrale res; - up.majProgessionStateOnly(DodicoLib.getS("Calcul du volume")); - - if (stop_) { return null; } - EfData h = null; - try { - h = data_.getData(h_, timeStep_); - } catch (final IOException _evt) { - FuLog.error(_evt); - - } - if (h == null) { return null; } - res = computeVolume(grid, h); - up.majAvancement(); - - return res; - } - - public ProgressionInterface getProg() { - return prog_; - } - - public void setProg(final ProgressionInterface _prog) { - prog_ = _prog; - } - - public void stop() { - stop_ = true; - } - -} Deleted: branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/ef/EfDataIntegrale.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/ef/EfDataIntegrale.java 2008-10-31 18:14:47 UTC (rev 4147) +++ branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/ef/EfDataIntegrale.java 2008-11-02 00:42:09 UTC (rev 4148) @@ -1,213 +0,0 @@ -package org.fudaa.dodico.ef; - -import org.fudaa.dodico.ef.operation.EfLineIntersectionsResultsI; - -/** - * Classe qui gere les bilans ainsi que les cubatures. - * - * @author Adrien Hadoux - * - */ -public class EfDataIntegrale { - - /** - * Valeur pour la zone plus - */ - double zonePlus_ = 0; - - /** - * Valeur int\xE9grale pour la zone moins - */ - double zoneMoins_ = 0; - - - - - public double getZonePlus() { - return zonePlus_; - } - - public double getZoneMoins() { - return zoneMoins_; - } - - /** - * Integration des donnees par la methode des trapezes entre la courbe - * representee par les x et y et la droite d\xE9finie par la fonction affine de - * coeff a et d'ordonn\xE9\xE9e a l origine b y=a*x+b - * - * @param lx - * @param ly - * @return - */ - public static EfDataIntegrale integrerMethodeTrapeze(double[] lx, double[] ly, double a, double b) { - - EfDataIntegrale data = new EfDataIntegrale(); - - for (int i = 0; i < Math.min(lx.length, ly.length)-1; i++) { - double x = lx[i]; - double x2= lx[i+1]; - double y = ly[i]; - double y2= ly[i+1]; - - double ySeuil1=a*x+b; - double ySeuil2=a*x2+b; - if (y > ySeuil1 && y2 > ySeuil2) { - // courbe au dessus de la ligne - data.zonePlus_ += calculAireTrapeze(x, y, x2, y2, ySeuil1, ySeuil2); - - } else if (y < ySeuil1 && y2 < ySeuil2) { - // courbe en dessous de la ligne - data.zoneMoins_ += calculAireTrapeze(x, y, x2, y2, ySeuil1, ySeuil2); - - } else { - // cas particulier : intersection, on calcule l'intersection entre les - // points - // cas particulier : intersection, on calcule l'intersection entre les - // points - double yIntersect = 0; - double xIntersect = 0; - // on prend la droite form\xE9e par les 2 points et on calcule son - // intersection avec la droite affine - if (x2 - x != 0) { - // droite non parrallele a l axe des abscisses - double coefDirecteur = (y2 - y) / (x2 - x); - double ordoOrigine = y2 - coefDirecteur * x2; - - // intersection de droites avec le seuil - - - if(coefDirecteur - a!=0){ - //droie non paralleles - xIntersect = (ordoOrigine-b) / (coefDirecteur-a); - yIntersect=coefDirecteur*xIntersect+ordoOrigine; - } - else - { - // droite parrallele confondue au seuil, on ne fais rien... - } - - } else { - // x2=x droite d equation x=Cste - - xIntersect = x; - yIntersect = a*x+b; - } - - //maintenant que l on a le point d'intersection, on test si on ajoute en positif ou negatif - if (y >= ySeuil1 && y2 <= ySeuil2) { - data.zonePlus_ += calculAireTrapeze(x, y, xIntersect, yIntersect, ySeuil1, ySeuil2); - data.zoneMoins_ += calculAireTrapeze(xIntersect, yIntersect, x2, y2, ySeuil1, ySeuil2); - - } else { - data.zoneMoins_ += calculAireTrapeze(x, y, xIntersect, yIntersect, ySeuil1, ySeuil2); - data.zonePlus_ += calculAireTrapeze(xIntersect, yIntersect, x2, y2, ySeuil1, ySeuil2); - } - - } - - - } - - - return data; - } - - - - /** - * Calcule l'aire du trapeze en utilisant un objet - * EfLineIntersectionsResultsI. EfLineIntersectionsResultsI fonctionne de la - * maniere suivante: getNbIntersect():donne le nombre de points - * getDistFromDeb(i) donne le Xi: distance entre le debut et le point - * getIntersect(i) getValueBadInterpolation(EfData _d) donne le y associ\xE9 au x - */ - public static EfDataIntegrale integrerMethodeTrapeze(EfLineIntersectionsResultsI interfaceResults, EfData crbdata, - double seuil) { - - EfDataIntegrale data = new EfDataIntegrale(); - - for (int i = 0; i < interfaceResults.getNbIntersect() - 1; i++) { - double x = interfaceResults.getDistFromDeb(i); - double x2 = interfaceResults.getDistFromDeb(i + 1); - double y = interfaceResults.getIntersect(i).getValueBadInterpolation(crbdata); - double y2 = interfaceResults.getIntersect(i + 1).getValueBadInterpolation(crbdata); - - - if (y >= seuil && y2 >= seuil) { - // courbe au dessus de la ligne - data.zonePlus_ += calculAireTrapeze(x, y, x2, y2, seuil, seuil); - } else if (y <= seuil && y2 <= seuil) { - // courbe en dessous de la ligne - data.zoneMoins_ += calculAireTrapeze(x, y, x2, y2, seuil, seuil); - } else { - // cas particulier : intersection, on calcule l'intersection entre les - // points - final double yIntersect = seuil; - double xIntersect = 0; - // on prend la droite form\xE9e par les 2 points et on calcule son - // intersection avec la droite affine - if (x2 - x != 0) { - // droite non parrallele a l axe des ordonn\xE9e ! - double coefDirecteur = (y2 - y) / (x2 - x); - double ordoOrigine = y2 - coefDirecteur * x2; - - // intersection de droites avec le seuil -// yIntersect = seuil; - - - if(coefDirecteur!=0) - //droie non parallele au seuil - xIntersect = (yIntersect - ordoOrigine) / coefDirecteur; - else - { - // droite parrallele confondue au seuil, on ne fais rien... - } - - } else { - // x2=x droite perpendiculaire au seuil, le point d'intersection est - // donc (x,seuil) - xIntersect = x; -// yIntersect = seuil; - } - - //maintenant que l on a le point d'intersection, on test si on ajoute en positif ou negatif - if (y >= seuil && y2 <= seuil) { - data.zonePlus_ += calculAireTrapeze(x, y, xIntersect, yIntersect, seuil, seuil); - data.zoneMoins_ += calculAireTrapeze(xIntersect, yIntersect, x2, y2, seuil, seuil); - - } else { - data.zoneMoins_ += calculAireTrapeze(x, y, xIntersect, yIntersect, seuil, seuil); - data.zonePlus_ += calculAireTrapeze(xIntersect, yIntersect, x2, y2, seuil, seuil); - } - - } - - } - - return data; - } - - - /** - * calcul de l'aire du trapeze form\xE9 par les 4 points (x,y) (x2,y2) (x,y3) - * (x2,y4) - */ - public static double calculAireTrapeze(double x, double y, double x2, double y2, double y3, double y4) { - // 1: calcul de la hauteur - double h = Math.abs(x2 - x); - // 2 base 1: coordonnees cartesiennes entre le point x,y et x,y3 - double base1 = Math.abs(y3 - y); - // 3 base 2: coordonnees cartesiennes entre le point x2,y2 et x2,y4 - double base2 = Math.abs(y4 - y2); - // 4 calcul de l'aire - return h * (base1 + base2) / 2; -} - - - public double getResultat() { - return zonePlus_ - zoneMoins_; - } - - -} Modified: branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/ef/EfFilterNone.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/ef/EfFilterNone.java 2008-10-31 18:14:47 UTC (rev 4147) +++ branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/ef/EfFilterNone.java 2008-11-02 00:42:09 UTC (rev 4148) @@ -8,6 +8,8 @@ package org.fudaa.dodico.ef; /** + * Un filtre vide: tous les elements/ noeuds sont selectionnes. + * * @author fred deniger * @version $Id: EfFilterNone.java,v 1.2 2007-05-04 13:45:58 deniger Exp $ */ Added: branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/ef/cubature/EfBilanHelper.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/ef/cubature/EfBilanHelper.java (rev 0) +++ branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/ef/cubature/EfBilanHelper.java 2008-11-02 00:42:09 UTC (rev 4148) @@ -0,0 +1,175 @@ +/** + * Licence GPL + * Copyright Genesis + */ +package org.fudaa.dodico.ef.cubature; + +import org.fudaa.dodico.ef.EfData; +import org.fudaa.dodico.ef.operation.EfLineIntersectionsResultsI; + +/** + * @author deniger + */ +public class EfBilanHelper { + + /** + * Integration des donnees par la methode des trapezes entre la courbe representee par les x et y et la droite d\xE9finie + * par la fonction affine de coeff a et d'ordonn\xE9\xE9e a l origine b y=a*x+b + * + * @param lx + * @param ly + * @return + */ + public static EfDataIntegrale integrerMethodeTrapeze(double[] lx, double[] ly, double a, double b) { + + EfDataIntegrale data = new EfDataIntegrale(); + + for (int i = 0; i < Math.min(lx.length, ly.length) - 1; i++) { + double x = lx[i]; + double x2 = lx[i + 1]; + double y = ly[i]; + double y2 = ly[i + 1]; + + double ySeuil1 = a * x + b; + double ySeuil2 = a * x2 + b; + if (y > ySeuil1 && y2 > ySeuil2) { + // courbe au dessus de la ligne + data.addZonePlus(calculAireTrapeze(x, y, x2, y2, ySeuil1, ySeuil2)); + + } else if (y < ySeuil1 && y2 < ySeuil2) { + // courbe en dessous de la ligne + data.addZoneMoins(calculAireTrapeze(x, y, x2, y2, ySeuil1, ySeuil2)); + + } else { + // cas particulier : intersection, on calcule l'intersection entre les + // points + // cas particulier : intersection, on calcule l'intersection entre les + // points + double yIntersect = 0; + double xIntersect = 0; + // on prend la droite form\xE9e par les 2 points et on calcule son + // intersection avec la droite affine + if (x2 - x != 0) { + // droite non parrallele a l axe des abscisses + double coefDirecteur = (y2 - y) / (x2 - x); + double ordoOrigine = y2 - coefDirecteur * x2; + + // intersection de droites avec le seuil + + if (coefDirecteur - a != 0) { + // droie non paralleles + xIntersect = (ordoOrigine - b) / (coefDirecteur - a); + yIntersect = coefDirecteur * xIntersect + ordoOrigine; + } else { + // droite parrallele confondue au seuil, on ne fais rien... + } + + } else { + // x2=x droite d equation x=Cste + + xIntersect = x; + yIntersect = a * x + b; + } + + // maintenant que l on a le point d'intersection, on test si on ajoute en positif ou negatif + if (y >= ySeuil1 && y2 <= ySeuil2) { + data.addZonePlus(calculAireTrapeze(x, y, xIntersect, yIntersect, ySeuil1, ySeuil2)); + data.addZoneMoins(calculAireTrapeze(xIntersect, yIntersect, x2, y2, ySeuil1, ySeuil2)); + + } else { + data.addZoneMoins(calculAireTrapeze(x, y, xIntersect, yIntersect, ySeuil1, ySeuil2)); + data.addZonePlus(calculAireTrapeze(xIntersect, yIntersect, x2, y2, ySeuil1, ySeuil2)); + } + + } + + } + + return data; + } + + /** + * Calcule l'aire du trapeze en utilisant un objet EfLineIntersectionsResultsI. EfLineIntersectionsResultsI fonctionne + * de la maniere suivante: getNbIntersect():donne le nombre de points getDistFromDeb(i) donne le Xi: distance entre le + * debut et le point getIntersect(i) getValueBadInterpolation(EfData _d) donne le y associ\xE9 au x + */ + public static EfDataIntegrale integrerMethodeTrapeze(EfLineIntersectionsResultsI _interfaceResults, EfData _crbdata, + double seuil) { + + EfDataIntegrale data = new EfDataIntegrale(); + + for (int i = 0; i < _interfaceResults.getNbIntersect() - 1; i++) { + // on ne traite pas ce cas, + if (_interfaceResults.isSegmentOut(i)) continue; + double x = _interfaceResults.getDistFromDeb(i); + double x2 = _interfaceResults.getDistFromDeb(i + 1); + double y = _interfaceResults.getIntersect(i).getValueBadInterpolation(_crbdata); + double y2 = _interfaceResults.getIntersect(i + 1).getValueBadInterpolation(_crbdata); + + if (y >= seuil && y2 >= seuil) { + // courbe au dessus de la ligne + data.addZonePlus(calculAireTrapeze(x, y, x2, y2, seuil, seuil)); + } else if (y <= seuil && y2 <= seuil) { + // courbe en dessous de la ligne + data.addZoneMoins(calculAireTrapeze(x, y, x2, y2, seuil, seuil)); + } else { + // cas particulier : intersection, on calcule l'intersection entre les + // points + final double yIntersect = seuil; + double xIntersect = 0; + // on prend la droite form\xE9e par les 2 points et on calcule son + // intersection avec la droite affine + if (x2 - x != 0) { + // droite non parrallele a l axe des ordonn\xE9e ! + double coefDirecteur = (y2 - y) / (x2 - x); + double ordoOrigine = y2 - coefDirecteur * x2; + + // intersection de droites avec le seuil + // yIntersect = seuil; + + if (coefDirecteur != 0) + // droie non parallele au seuil + xIntersect = (yIntersect - ordoOrigine) / coefDirecteur; + else { + // droite parrallele confondue au seuil, on ne fais rien... + } + + } else { + // x2=x droite perpendiculaire au seuil, le point d'intersection est + // donc (x,seuil) + xIntersect = x; + // yIntersect = seuil; + } + + // maintenant que l on a le point d'intersection, on test si on ajoute en positif ou negatif + if (y >= seuil && y2 <= seuil) { + data.addZonePlus(calculAireTrapeze(x, y, xIntersect, yIntersect, seuil, seuil)); + data.addZoneMoins(calculAireTrapeze(xIntersect, yIntersect, x2, y2, seuil, seuil)); + + } else { + data.addZoneMoins(calculAireTrapeze(x, y, xIntersect, yIntersect, seuil, seuil)); + data.addZonePlus(calculAireTrapeze(xIntersect, yIntersect, x2, y2, seuil, seuil)); + } + + } + + } + + return data; + } + + /** + * calcul de l'aire du trapeze form\xE9 par les 4 points (x,y) (x2,y2) (x,y3) (x2,y4) + */ + public static double calculAireTrapeze(double x, double y, double x2, double y2, double y3, double y4) { + // 1: calcul de la hauteur + double h = Math.abs(x2 - x); + // 2 base 1: coordonnees cartesiennes entre le point x,y et x,y3 + double base1 = Math.abs(y3 - y); + // 3 base 2: coordonnees cartesiennes entre le point x2,y2 et x2,y4 + double base2 = Math.abs(y4 - y2); + // 4 calcul de l'aire + return h * (base1 + base2) / 2; + } + +} Copied: branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/ef/cubature/EfComputeVolume.java (from rev 4018, branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/ef/EfComputeVolume.java) =================================================================== --- branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/ef/cubature/EfComputeVolume.java (rev 0) +++ branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/ef/cubature/EfComputeVolume.java 2008-11-02 00:42:09 UTC (rev 4148) @@ -0,0 +1,201 @@ +/* + * @creation 1 f\xE9vr. 07 + * @modification $Date: 2007-06-11 13:04:05 $ + * @license GNU General Public License 2 + * @copyright (c)1998-2001 CETMEF 2 bd Gambetta F-60231 Compiegne + * @mail de...@fu... + */ +package org.fudaa.dodico.ef.cubature; + +import gnu.trove.TIntArrayList; +import gnu... [truncated message content] |
From: <de...@us...> - 2008-12-08 22:24:45
|
Revision: 4283 http://fudaa.svn.sourceforge.net/fudaa/?rev=4283&view=rev Author: deniger Date: 2008-12-08 22:24:36 +0000 (Mon, 08 Dec 2008) Log Message: ----------- Modified Paths: -------------- branches/Prepro-0.92-SNAPSHOT/ctulu/src/org/jdesktop/swingx/ScrollPaneSelector.java branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/dico/DicoAnalyzer.java branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/telemac/io/SerafinFileFilter.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/ZEbliCalquesPanel.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliScene.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidget.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetController.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetGroup.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/actions/EbliWidgetActionDuplicateLayout.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/actions/EbliWidgetActionRatio.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/actions/EbliWidgetActiontextEditor.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/actions/EbliWidgetGroupAction.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/actions/EbliWidgetUngroupAction.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/behavior/AlignWithResizeProportionalStrategy.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/behavior/EbliWidgetActionFactory.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetControllerCalque.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetVueCalque.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/graphe/EbliWidgetControllerGraphe.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/graphe/EbliWidgetCreatorGraphe.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/graphe/EbliWidgetCreatorLegende.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/graphe/EbliWidgetGraphe.java branches/Prepro-0.92-SNAPSHOT/ebli/test/org/fudaa/ebli/all/TestVisualLibrary.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostLayoutFille.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostLayoutPanelController.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostVisuPanel.java Added Paths: ----------- branches/Prepro-0.92-SNAPSHOT/ctulu/src/org/fudaa/ctulu/gui/CtuluSelectorPopupButton.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/actions/EbliWidgetActionForeground.java Property Changed: ---------------- branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/telemac/dico/ Added: branches/Prepro-0.92-SNAPSHOT/ctulu/src/org/fudaa/ctulu/gui/CtuluSelectorPopupButton.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ctulu/src/org/fudaa/ctulu/gui/CtuluSelectorPopupButton.java (rev 0) +++ branches/Prepro-0.92-SNAPSHOT/ctulu/src/org/fudaa/ctulu/gui/CtuluSelectorPopupButton.java 2008-12-08 22:24:36 UTC (rev 4283) @@ -0,0 +1,85 @@ +/** + * Licence GPL + * Copyright Genesis + */ +package org.fudaa.ctulu.gui; + +import java.awt.BorderLayout; +import java.awt.Component; +import java.awt.Dimension; +import java.awt.Point; +import java.awt.Robot; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; + +import javax.swing.JButton; +import javax.swing.JComponent; +import javax.swing.JPopupMenu; +import javax.swing.JScrollPane; +import javax.swing.ScrollPaneConstants; +import javax.swing.SwingUtilities; + +import org.jdesktop.swingx.ScrollPaneSelector; + +import com.memoire.fu.FuLog; + +/** + * @author deniger + */ +public abstract class CtuluSelectorPopupButton { + + JButton jb; + private JPopupMenu menu_; + + public ActionListener createActionActionListener() { + return new ActionListener() { + + public void actionPerformed(ActionEvent _e) { + JPopupMenu menu = createPopup(); + JComponent jc = (JComponent) _e.getSource(); + final Dimension pref = menu.getPreferredSize(); + final Point popupLocation = new Point((jc.getWidth() - pref.width) / 2, (jc.getHeight() - pref.height) / 2); + try { + final Point center = new Point(jc.getWidth() / 2, jc.getHeight() / 2); + SwingUtilities.convertPointToScreen(center, jc); + new Robot().mouseMove(center.x, center.y); + } catch (Exception ex) { + FuLog.error(ex); + } + menu.show(jc, popupLocation.x, popupLocation.y); + } + }; + } + + public abstract JComponent createComponent(); + + private JPopupMenu createPopup() { + if (menu_ == null) { + menu_ = new JPopupMenu(); + menu_.setLayout(new BorderLayout()); + menu_.add(createComponent()); + } + return menu_; + } + + public JButton getButton() { + if (jb == null) { + jb = new JButton(ScrollPaneSelector.LAUNCH_SELECTOR_ICON); + jb.setFocusable(false); + jb.setPreferredSize(new Dimension(16, 16)); + jb.setMaximumSize(jb.getPreferredSize()); + jb.addActionListener(createActionActionListener()); + } + return jb; + + } + + public void installButton(JScrollPane _jc) { + + try { + _jc.setCorner(ScrollPaneConstants.LOWER_TRAILING_CORNER, getButton()); + } catch (final IllegalArgumentException _evt) { + _jc.setCorner(ScrollPaneConstants.LOWER_RIGHT_CORNER, getButton()); + } + } +} Modified: branches/Prepro-0.92-SNAPSHOT/ctulu/src/org/jdesktop/swingx/ScrollPaneSelector.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ctulu/src/org/jdesktop/swingx/ScrollPaneSelector.java 2008-12-08 18:25:47 UTC (rev 4282) +++ branches/Prepro-0.92-SNAPSHOT/ctulu/src/org/jdesktop/swingx/ScrollPaneSelector.java 2008-12-08 22:24:36 UTC (rev 4283) @@ -37,8 +37,8 @@ */ public final class ScrollPaneSelector extends JComponent { // static final fields - static final double MAX_SIZE = 200; - static final Icon LAUNCH_SELECTOR_ICON = new Icon() { + public static final double MAX_SIZE = 200; + public static final Icon LAUNCH_SELECTOR_ICON = new Icon() { public void paintIcon(Component c, Graphics g, int x, int y) { Color tmpColor = g.getColor(); g.setColor(Color.BLACK); Modified: branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/dico/DicoAnalyzer.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/dico/DicoAnalyzer.java 2008-12-08 18:25:47 UTC (rev 4282) +++ branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/dico/DicoAnalyzer.java 2008-12-08 22:24:36 UTC (rev 4283) @@ -50,8 +50,8 @@ } /** - * Recupere a partir du nom de fichier dico <code>_s</code> le nom et la version du code correspondant. Il est - * suppose que la version est codee sur 4 caractere. Par exemple pour le fichier Telemac2dv2p5, la methode renvoie + * Recupere a partir du nom de fichier dico <code>_s</code> le nom et la version du code correspondant. Il est suppose + * que la version est codee sur 4 caractere. Par exemple pour le fichier Telemac2dv2p5, la methode renvoie * [telemac2d,v5p3] (nom en minuscule et version telle quelle). * * @param _s la chaine a analyser @@ -107,9 +107,7 @@ } private boolean computeChoice(final DicoDataTypeGenerate _type, final String[] _choiceByLanguage, final int _index) { - if (_choiceByLanguage == null) { - throw new IllegalArgumentException("argument _choice nul"); - } + if (_choiceByLanguage == null) { throw new IllegalArgumentException("argument _choice nul"); } final int t = _choiceByLanguage.length; String[] choiceList = CtuluLibString.parseString(_choiceByLanguage[0], DicoKeyword.getChoiceSep()); int nbChoix = choiceList.length; @@ -247,21 +245,15 @@ } else { String key = stemp.substring(0, index).trim(); if (key.startsWith(getQuoteString())) { - if (!key.endsWith(getQuoteString())) { - return false; - } + if (!key.endsWith(getQuoteString())) { return false; } key = key.substring(1, key.length() - 1); } _destArray[0] = key.trim(); value = stemp.substring(index + 1).trim(); } - if (value == null) { - return false; - } + if (value == null) { return false; } if (value.startsWith(getQuoteString())) { - if (!value.endsWith(getQuoteString())) { - return false; - } + if (!value.endsWith(getQuoteString())) { return false; } _destArray[1] = value.substring(1, value.length() - 1).trim(); } else { _destArray[1] = value.trim(); @@ -289,12 +281,8 @@ private String[] computeDefautValues(final String[] _initValues, final boolean _isMulti, final String _sep, final int _indexEntite) { - if (_initValues == null) { - return null; - } - if (_initValues.length == 0) { - return _initValues; - } + if (_initValues == null) { return null; } + if (_initValues.length == 0) { return _initValues; } final StringBuffer b = new StringBuffer(_initValues[0].length()); final int t = _initValues.length; final String[] r = new String[t]; @@ -361,14 +349,10 @@ t++; } } - if (t == 0) { - return null; - } + if (t == 0) { return null; } String[] noms = new String[t]; stemp = (String) _map.get(_prefixKey); - if ((stemp == null) || (stemp.trim().length() == 0)) { - return null; - } + if ((stemp == null) || (stemp.trim().length() == 0)) { return null; } if (_compute) { noms[0] = DicoKeyword.computeValue(stemp); } else { @@ -520,7 +504,7 @@ */ stemp = (String) mapEncours.get(kw_.getTaille()); boolean isMulti = false; - String sepChar = null; + int temp = 0; if (stemp != null) { temp = Integer.parseInt(stemp); @@ -528,9 +512,13 @@ final String compose = DicoKeyword.computeValue((String) mapEncours.get(kw_.getCompose())); boolean isComposedVect = (compose != null) && (compose.length() > 0); + final String sepChar = isComposedVect ? compose : DicoKeyword.SEPARATEUR_TABLEAU; + // String sep=isComposedVect // Correction du 7 mai 2007 // les mot-cl\xE9s qui ont une taille de 2 sont \xE9galement consid\xE9r\xE9s comme \xE9tant a taille variable - boolean isVect = (temp == 2 && isComposedVect); + boolean isVect = (temp == 2); + // if(temp==2 || ) + // si une taille est donnee et est differente de 2, c'est un tableau if (temp > 0 && !isVect) { final DicoEntiteGenerate.Tableau tab = new DicoEntiteGenerate.Tableau(type); tab.setTaille(temp); @@ -540,12 +528,13 @@ tab.setDataColumn(uniqueValueInTab); entite = tab; isMulti = true; - sepChar = DicoKeyword.SEPARATEUR_TABLEAU; - } else if (isComposedVect) { + // sepChar = DicoKeyword.SEPARATEUR_TABLEAU; + // vecteur si taille vaut 2 ou si un separateur est donne + } else if (isComposedVect || isVect) { entite = new DicoEntiteGenerate.Vecteur(type, compose); ((DicoEntiteGenerate.Vecteur) entite).setDataColumn(uniqueValueInTab); isMulti = true; - sepChar = compose; + // sepChar = compose; } else { entite = new DicoEntiteGenerate.Simple(type); } @@ -775,9 +764,7 @@ } } } - if (analyze_.containsFatalError()) { - return analyze_; - } + if (analyze_.containsFatalError()) { return analyze_; } // A partir des proprietes lues construit les entites utiles // a la generation. parseProprietes(props, nomLigne); Property changes on: branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/telemac/dico ___________________________________________________________________ Added: svn:mergeinfo + /branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/telemac/dico:3704-4282 Modified: branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/telemac/io/SerafinFileFilter.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/telemac/io/SerafinFileFilter.java 2008-12-08 18:25:47 UTC (rev 4282) +++ branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/telemac/io/SerafinFileFilter.java 2008-12-08 22:24:36 UTC (rev 4283) @@ -71,7 +71,7 @@ * @return true si c'est un fichier r\xE9sultat */ public boolean isResFile(final String _name) { - return _name.endsWith(".res") || ((_name.startsWith("res") || _name.endsWith("RES")) && (_name.indexOf('.') < 0)); + return _name.endsWith(".res3d")|| _name.endsWith(".res2d")|| _name.endsWith(".res") || ((_name.startsWith("res") || _name.endsWith("RES")) && (_name.indexOf('.') < 0)); } /** Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/ZEbliCalquesPanel.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/ZEbliCalquesPanel.java 2008-12-08 18:25:47 UTC (rev 4282) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/ZEbliCalquesPanel.java 2008-12-08 22:24:36 UTC (rev 4283) @@ -283,6 +283,7 @@ } BuLabel info_; + BuPanel suiviPanel_; /** * Constructeur minimal. Les groupes de navigation et standard seront construits. @@ -341,15 +342,15 @@ vc_.setListener(this); add(vc_, BuBorderLayout.CENTER); if (_addSouth) { - final BuPanel south = new BuPanel(); - south.setName("pnSuivis"); - south.setLayout(new BuBorderLayout()); - south.setOpaque(false); - south.setBorder(BorderFactory.createMatteBorder(1, 0, 0, 0, Color.gray)); - south.add(getLabelSuiviSouris(), BuBorderLayout.WEST); - south.add(mode_, BuBorderLayout.EAST); - south.add(info_, BuBorderLayout.CENTER); - add(south, BuBorderLayout.SOUTH); + suiviPanel_ = new BuPanel(); + suiviPanel_.setName("pnSuivis"); + suiviPanel_.setLayout(new BuBorderLayout()); + suiviPanel_.setOpaque(false); + suiviPanel_.setBorder(BorderFactory.createMatteBorder(1, 0, 0, 0, Color.gray)); + suiviPanel_.add(getLabelSuiviSouris(), BuBorderLayout.WEST); + suiviPanel_.add(mode_, BuBorderLayout.EAST); + suiviPanel_.add(info_, BuBorderLayout.CENTER); + add(suiviPanel_, BuBorderLayout.SOUTH); } modelArbre_.refresh(); @@ -384,6 +385,13 @@ return res; } + /** + * @return the suiviPanel + */ + public JComponent getSuiviPanel() { + return suiviPanel_; + } + protected void fillCmdContextuelles(final BuPopupMenu _menu) { final BCalque cqActif = getCalqueActif(); if (cqActif != null) { @@ -633,18 +641,12 @@ final Graphics2D g = i.createGraphics(); CtuluLibImage.setBestQuality(g); g.scale(CtuluLibImage.getRatio(_w, vc_.getWidth()), CtuluLibImage.getRatio(_h, vc_.getHeight())); - - - - vc_.paintImage(g, _params); - - - - - g.dispose(); + + vc_.paintImage(g, _params); + + g.dispose(); i.flush(); - - + return i; } @@ -806,9 +808,10 @@ public final void setModeVisible(final boolean _b) { mode_.setVisible(_b); } - + /** * Retourne les donn\xE9es persistantes. + * * @return */ public ZEbliCalquesPanelPersistManager getPersistenceManager() { @@ -921,5 +924,4 @@ return null; } - } \ No newline at end of file Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliScene.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliScene.java 2008-12-08 18:25:47 UTC (rev 4282) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliScene.java 2008-12-08 22:24:36 UTC (rev 4283) @@ -7,7 +7,6 @@ import java.beans.PropertyChangeListener; import java.beans.PropertyChangeSupport; import java.util.Iterator; -import java.util.List; import java.util.Map; import java.util.Set; Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidget.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidget.java 2008-12-08 18:25:47 UTC (rev 4282) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidget.java 2008-12-08 22:24:36 UTC (rev 4283) @@ -425,9 +425,9 @@ // System.err.println("parent not null"+ toString()); setBorder(lookFeel.getBorderInGroup(_newState)); parent.setBorder(lookFeel.getBorder(_newState, parent.getController().canResize_, - parent.getController().isProportional)); + parent.getController().isProportional())); } else { - setBorder(lookFeel.getBorder(_newState, getController().canResize_, getController().isProportional)); + setBorder(lookFeel.getBorder(_newState, getController().canResize_, getController().isProportional())); } } @@ -527,7 +527,7 @@ propGraphique.put(ROTATION, rotation); } - public void setSattelite(List<EbliWidget> liste) { + public void setSatellite(List<EbliWidget> liste) { } Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetController.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetController.java 2008-12-08 18:25:47 UTC (rev 4282) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetController.java 2008-12-08 22:24:36 UTC (rev 4283) @@ -210,7 +210,7 @@ } public AbstractButton boutonProportion = null; - public boolean isProportional = false; + private boolean isProportional = false; public void constructMenuResizeProportional(final JPopupMenu _popup, final CtuluCommandContainer cmd_) { @@ -542,4 +542,18 @@ menuExport.setIcon(null); return menuExport; } + + /** + * @return the isProportional + */ + public final boolean isProportional() { + return isProportional; + } + + /** + * @param _isProportional the isProportional to set + */ + public final void setProportional(boolean _isProportional) { + isProportional = _isProportional; + } } Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetGroup.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetGroup.java 2008-12-08 18:25:47 UTC (rev 4282) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetGroup.java 2008-12-08 22:24:36 UTC (rev 4283) @@ -1,10 +1,7 @@ package org.fudaa.ebli.visuallibrary; import java.awt.Dimension; -import java.awt.Point; -import java.util.ArrayList; import java.util.HashMap; -import java.util.List; import java.util.Map; import org.netbeans.api.visual.widget.Widget; Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/actions/EbliWidgetActionDuplicateLayout.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/actions/EbliWidgetActionDuplicateLayout.java 2008-12-08 18:25:47 UTC (rev 4282) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/actions/EbliWidgetActionDuplicateLayout.java 2008-12-08 22:24:36 UTC (rev 4283) @@ -14,7 +14,6 @@ import org.fudaa.ebli.visuallibrary.calque.EbliWidgetVueCalque; import org.fudaa.ebli.visuallibrary.graphe.EbliWidgetControllerGraphe; import org.fudaa.ebli.visuallibrary.graphe.EbliWidgetGraphe; -import org.fudaa.ebli.visuallibrary.graphe.EbliWidgetGrapheController; /** Copied: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/actions/EbliWidgetActionForeground.java (from rev 4282, branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/actions/EbliWidgetActionForeGround.java) =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/actions/EbliWidgetActionForeground.java (rev 0) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/actions/EbliWidgetActionForeground.java 2008-12-08 22:24:36 UTC (rev 4283) @@ -0,0 +1,69 @@ +package org.fudaa.ebli.visuallibrary.actions; + +import java.awt.event.ActionEvent; +import java.util.ArrayList; +import java.util.Iterator; +import java.util.Set; + +import org.fudaa.ctulu.CtuluCommandContainer; +import org.fudaa.ctulu.CtuluResource; +import org.fudaa.ebli.ressource.EbliResource; +import org.fudaa.ebli.visuallibrary.EbliNode; +import org.fudaa.ebli.visuallibrary.EbliScene; +import org.fudaa.ebli.visuallibrary.EbliWidget; + +/** + * classe qui permet de placer les widgets selectionnes au premier plan. + * + * @author genesis + */ +public class EbliWidgetActionForeground extends EbliWidgetActionSimple { + + CtuluCommandContainer cmd_; + + public EbliWidgetActionForeground(final EbliScene _scene) { + super(_scene, EbliResource.EBLI.getString("Premier plan"), CtuluResource.CTULU.getIcon("crystal_disposerdevant"), + "FORGROUND"); + + cmd_ = _scene.getCmdMng(); + putValue(NAME, "Premier plan"); + } + + private static final long serialVersionUID = 1L; + + @Override + public void actionPerformed(final ActionEvent e) { + // -- recuperation de la liste des nodes de la scene --// + final Set<EbliNode> listeNode = (Set<EbliNode>) scene_.getSelectedObjects(); + + // -- liste des widget selectionnees --// + final java.util.List<EbliWidget> listeWidget = new ArrayList<EbliWidget>(); + + // -- parcours des nodes + for (final Iterator<EbliNode> it = listeNode.iterator(); it.hasNext();) { + + final EbliNode currentNode = it.next(); + if (currentNode != null && currentNode.isMovable()) { + + // -- ajout au premier plan du node --// + // scene_.getVisu().addChild(currentNode.getWidget()); + + currentNode.getWidget().bringToFront(); + + listeWidget.add(currentNode.getWidget()); + + // -- rafraichissement de la scene --// + scene_.refresh(); + + } + + } + + // -- enregistrement de la commande undoRedo --// + if (cmd_ != null) { + cmd_.addCmd(new CommandBringToFront(listeWidget)); + } + + } + +} Property changes on: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/actions/EbliWidgetActionForeground.java ___________________________________________________________________ Added: svn:mergeinfo + Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/actions/EbliWidgetActionRatio.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/actions/EbliWidgetActionRatio.java 2008-12-08 18:25:47 UTC (rev 4282) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/actions/EbliWidgetActionRatio.java 2008-12-08 22:24:36 UTC (rev 4283) @@ -75,7 +75,7 @@ if (resizeProportionnel_) { // controller.switchToResizeProportionnal(); widget_.getController().boutonProportion.setAction(new EbliWidgetActionRatio.Classical(widget_)); - widget_.getController().isProportional = true; + widget_.getController().setProportional(true); // -- enregistrement de la commande undoRedo --// if (cmd_ != null) { cmd_.addCmd(new CtuluCommand() { @@ -83,13 +83,13 @@ public void redo() { // controller.switchToResizeProportionnal(); widget_.getController().boutonProportion.setAction(new EbliWidgetActionRatio.Classical(widget_)); - widget_.getController().isProportional = true; + widget_.getController().setProportional(true); } public void undo() { // controller.switchToResizeClassical(); widget_.getController().boutonProportion.setAction(new EbliWidgetActionRatio.Proportional(widget_)); - widget_.getController().isProportional = false; + widget_.getController().setProportional(false); } }); @@ -98,7 +98,7 @@ } else { // controller.switchToResizeClassical(); widget_.getController().boutonProportion.setAction(new EbliWidgetActionRatio.Proportional(widget_)); - widget_.getController().isProportional = false; + widget_.getController().setProportional(false); // -- enregistrement de la commande undoRedo --// if (cmd_ != null) { cmd_.addCmd(new CtuluCommand() { @@ -106,13 +106,13 @@ public void redo() { // controller.switchToResizeClassical(); widget_.getController().boutonProportion.setAction(new EbliWidgetActionRatio.Proportional(widget_)); - widget_.getController().isProportional = false; + widget_.getController().setProportional(false); } public void undo() { // controller.switchToResizeProportionnal(); widget_.getController().boutonProportion.setAction(new EbliWidgetActionRatio.Classical(widget_)); - widget_.getController().isProportional = true; + widget_.getController().setProportional(true); } }); Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/actions/EbliWidgetActiontextEditor.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/actions/EbliWidgetActiontextEditor.java 2008-12-08 18:25:47 UTC (rev 4282) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/actions/EbliWidgetActiontextEditor.java 2008-12-08 22:24:36 UTC (rev 4283) @@ -5,7 +5,6 @@ import java.awt.event.ActionEvent; import org.fudaa.ctulu.gui.CtuluHtmlEditorPanel; -import org.fudaa.ctulu.gui.CtuluLibSwing; import org.fudaa.ebli.commun.EbliLib; import org.fudaa.ebli.visuallibrary.EbliNodeDefault; import org.fudaa.ebli.visuallibrary.EbliScene; Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/actions/EbliWidgetGroupAction.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/actions/EbliWidgetGroupAction.java 2008-12-08 18:25:47 UTC (rev 4282) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/actions/EbliWidgetGroupAction.java 2008-12-08 22:24:36 UTC (rev 4283) @@ -13,7 +13,6 @@ import java.util.Arrays; import java.util.Collection; import java.util.HashSet; -import java.util.List; import java.util.Set; import org.fudaa.ctulu.CtuluCommand; Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/actions/EbliWidgetUngroupAction.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/actions/EbliWidgetUngroupAction.java 2008-12-08 18:25:47 UTC (rev 4282) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/actions/EbliWidgetUngroupAction.java 2008-12-08 22:24:36 UTC (rev 4283) @@ -71,7 +71,7 @@ _scene.addNode(n).setPreferredLocation(toScene); n.getWidget().getController().replaceActionResize(); if(listeSattellites!=null) - n.getWidget().getIntern().setSattelite(listeSattellites); + n.getWidget().getIntern().setSatellite(listeSattellites); } _scene.removeNode(_n); Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/behavior/AlignWithResizeProportionalStrategy.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/behavior/AlignWithResizeProportionalStrategy.java 2008-12-08 18:25:47 UTC (rev 4282) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/behavior/AlignWithResizeProportionalStrategy.java 2008-12-08 22:24:36 UTC (rev 4283) @@ -6,7 +6,6 @@ import org.fudaa.ctulu.image.CtuluLibImage; import org.fudaa.ebli.visuallibrary.EbliWidget; -import org.fudaa.ebli.visuallibrary.calque.EbliWidgetVueCalque; import org.netbeans.api.visual.action.AlignWithMoveDecorator; import org.netbeans.api.visual.action.AlignWithWidgetCollector; import org.netbeans.api.visual.action.ResizeProvider; @@ -189,7 +188,7 @@ } if (widget instanceof EbliWidget) { - if (((EbliWidget) widget).getController().isProportional) { + if (((EbliWidget) widget).getController().isProportional()) { // -- proportions respectees --// // double coeff = ((double) suggestedBounds.height) / ((double) oldHeight); if (suggestedBounds.height != originalBounds.height) { Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/behavior/EbliWidgetActionFactory.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/behavior/EbliWidgetActionFactory.java 2008-12-08 18:25:47 UTC (rev 4282) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/behavior/EbliWidgetActionFactory.java 2008-12-08 22:24:36 UTC (rev 4283) @@ -59,7 +59,7 @@ public ControlPoint resolveControlPoint(Widget _widget, Point _point) { ControlPoint pt = super.resolveControlPoint(_widget, _point); if (_widget instanceof EbliWidget) { - if (((EbliWidget) _widget).getController().isProportional) { + if (((EbliWidget) _widget).getController().isProportional()) { if (pt == ControlPoint.BOTTOM_LEFT || pt == ControlPoint.BOTTOM_RIGHT || pt == ControlPoint.TOP_LEFT || pt == ControlPoint.TOP_RIGHT) { return null; } } Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetControllerCalque.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetControllerCalque.java 2008-12-08 18:25:47 UTC (rev 4282) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetControllerCalque.java 2008-12-08 22:24:36 UTC (rev 4283) @@ -12,10 +12,10 @@ import java.util.Map; import javax.swing.JComponent; -import javax.swing.JLabel; import javax.swing.JMenu; import javax.swing.JMenuBar; import javax.swing.JMenuItem; +import javax.swing.JPanel; import javax.swing.JPopupMenu; import javax.swing.JScrollPane; import javax.swing.JSplitPane; @@ -24,6 +24,7 @@ import org.fudaa.ctulu.CtuluCommandContainer; import org.fudaa.ctulu.CtuluLibArray; import org.fudaa.ctulu.CtuluResource; +import org.fudaa.ctulu.gui.CtuluSelectorPopupButton; import org.fudaa.ebli.calque.BArbreCalque; import org.fudaa.ebli.calque.BCalque; import org.fudaa.ebli.calque.BCalqueAffichage; @@ -37,6 +38,7 @@ import org.fudaa.ebli.commun.EbliLib; import org.fudaa.ebli.controle.BSelecteurListComboBox; import org.fudaa.ebli.palette.PaletteEditAction; +import org.fudaa.ebli.repere.ZTransformationDomaine; import org.fudaa.ebli.ressource.EbliResource; import org.fudaa.ebli.visuallibrary.EbliNode; import org.fudaa.ebli.visuallibrary.EbliScene; @@ -47,6 +49,7 @@ import org.fudaa.ebli.visuallibrary.actions.CommandMasquer; import org.fudaa.ebli.visuallibrary.actions.EbliActionEditorOneClick; +import com.memoire.bu.BuBorderLayout; import com.memoire.bu.BuMenuBar; import com.memoire.bu.BuPanel; import com.memoire.bu.BuTabbedPane; @@ -60,7 +63,7 @@ */ public class EbliWidgetControllerCalque extends EbliWidgetControllerMenuOnly { - JLabel labelTrace_; + JComponent labelTrace_; public boolean hasAlreadyFusion = false; @@ -87,6 +90,7 @@ widgetCalque_ = _widget; widgetParent_ = _parent; addActionSpecifiques(); + setProportional(true); } @@ -536,7 +540,18 @@ public JComponent getTracableComponent() { if (labelTrace_ == null) { - labelTrace_ = getVisuPanel().getLabelSuiviSouris(); + labelTrace_ = new JPanel(new BuBorderLayout(0, 2, true, false)); + JComponent suiviPanel = getVisuPanel().getSuiviPanel(); + suiviPanel.setBorder(null); + labelTrace_.add(suiviPanel); + CtuluSelectorPopupButton bt = new CtuluSelectorPopupButton() { + + @Override + public JComponent createComponent() { + return new ZTransformationDomaine(getVisuPanel().getVueCalque()); + } + }; + labelTrace_.add(bt.getButton(), BuBorderLayout.WEST); } return labelTrace_; Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetVueCalque.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetVueCalque.java 2008-12-08 18:25:47 UTC (rev 4282) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetVueCalque.java 2008-12-08 22:24:36 UTC (rev 4283) @@ -41,277 +41,261 @@ public class EbliWidgetVueCalque extends EbliWidget implements /* EditProvider */InplaceEditorProvider<BuPanel> { - ZEbliCalquesPanel calquePanel_; + ZEbliCalquesPanel calquePanel_; - - - public EbliNode nodeLegende = null; - Window frame_; + Window frame_; - BufferedImage image; - + BufferedImage image; - public GrBoite initZoom_; + public GrBoite initZoom_; - BuPanel conteneurEditor; + BuPanel conteneurEditor; - // GrBoite zoom_; - public EbliWidgetVueCalque(final EbliScene _scene, final ZEbliCalquesPanel _vue) { - this(_scene, _vue, null); + GrBoite zoom_; - } + public EbliWidgetVueCalque(final EbliScene _scene, final ZEbliCalquesPanel _vue) { + this(_scene, _vue, null); - /** - * TODO a am\xE9liorer avec une Map - * - * @param _scene - * @param _vue - * @param _initZoom - */ - public EbliWidgetVueCalque(final EbliScene _scene, final ZEbliCalquesPanel _vue, final GrBoite _initZoom) { - super(_scene); - calquePanel_ = _vue; - initZoom_ = _initZoom; - calquePanel_.setBorder(null); + } - setPreferredSize(new Dimension(500, 400)); - initSize(new Rectangle(0, 0, 500, 400)); - calquePanel_.getArbreCalqueModel().getObservable().addObserver(new Observer() { + /** + * TODO a am\xE9liorer avec une Map + * + * @param _scene + * @param _vue + * @param _initZoom + */ + public EbliWidgetVueCalque(final EbliScene _scene, final ZEbliCalquesPanel _vue, final GrBoite _initZoom) { + super(_scene); + calquePanel_ = _vue; + initZoom_ = _initZoom; + calquePanel_.setBorder(null); - public void update(final Observable _o, final Object _arg) { - if (!isInEditMode() && "t".equals(_arg)) { - image = null; - // repaint(); - } + setPreferredSize(new Dimension(500, 400)); + initSize(new Rectangle(0, 0, 500, 400)); + calquePanel_.getArbreCalqueModel().getObservable().addObserver(new Observer() { - } - }); + public void update(final Observable _o, final Object _arg) { + if (!isInEditMode() && "t".equals(_arg)) { + image = null; + // repaint(); + } - } + } + }); - - public ZEbliCalquesPanel getCalquePanel() { + } + + public ZEbliCalquesPanel getCalquePanel() { return calquePanel_; } - public BuPanel createEditorComponent( - final org.netbeans.api.visual.action.InplaceEditorProvider.EditorController controller, final Widget widget) { - return calquePanel_; - } + public BuPanel createEditorComponent( + final org.netbeans.api.visual.action.InplaceEditorProvider.EditorController controller, final Widget widget) { + return calquePanel_; + } - /** - * appel\xE9 lors de la fermeture de l editeur. Il faut redessiner la widget. - */ - public void notifyClosing(final org.netbeans.api.visual.action.InplaceEditorProvider.EditorController controller, - final Widget widget, final BuPanel editor, final boolean commit) { - editingStop(); - // zoom_ = calquePanel_.getVueCalque().getViewBoite(); - image = null; + /** + * appel\xE9 lors de la fermeture de l editeur. Il faut redessiner la widget. + */ + public void notifyClosing(final org.netbeans.api.visual.action.InplaceEditorProvider.EditorController controller, + final Widget widget, final BuPanel editor, final boolean commit) { + editingStop(); + zoom_ = calquePanel_.getVueCalque().getViewBoite(); + image = null; - getEbliScene().refresh(); - // calquePanel_.setBorder(BuBorders.EMPTY1111); - this.repaint(); - } + getEbliScene().refresh(); + // calquePanel_.setBorder(BuBorders.EMPTY1111); + this.repaint(); + } - /** - * @return une interface non null si la widget peut etre animee - */ - @Override - public EbliAnimatedInterface getAnimatedInterface() { - if (calquePanel_ instanceof EbliAnimatedInterface) return (EbliAnimatedInterface) calquePanel_; - return null; - } + /** + * @return une interface non null si la widget peut etre animee + */ + @Override + public EbliAnimatedInterface getAnimatedInterface() { + if (calquePanel_ instanceof EbliAnimatedInterface) return (EbliAnimatedInterface) calquePanel_; + return null; + } - @Override - public Color getColorFond() { - return null; - } + @Override + public Color getColorFond() { + return null; + } - private void initSize(final Rectangle rec) { - final BCalque[] tousCalques = calquePanel_.getVueCalque().getCalque().getTousCalques(); - calquePanel_.getVueCalque().setSize(rec.width, rec.height); - // calquePanel_.setPreferredSize(new Dimension(rec.width, rec.height)); - calquePanel_.getVueCalque().getCalque().setSize(rec.width, rec.height); - for (int i = 0; i < tousCalques.length; i++) { - tousCalques[i].setSize(rec.width, rec.height); - } - } + private void initSize(final Rectangle rec) { + final BCalque[] tousCalques = calquePanel_.getVueCalque().getCalque().getTousCalques(); + calquePanel_.getVueCalque().setSize(rec.width, rec.height); + // calquePanel_.setPreferredSize(new Dimension(rec.width, rec.height)); + calquePanel_.getVueCalque().getCalque().setSize(rec.width, rec.height); + for (int i = 0; i < tousCalques.length; i++) { + tousCalques[i].setSize(rec.width, rec.height); + } + } - public GrBoite getViewBoite() { - return calquePanel_.getVueCalque().getViewBoite(); - } + public GrBoite getViewBoite() { + return calquePanel_.getVueCalque().getViewBoite(); + } - public EbliWidgetControllerCalque getCalqueController() { - return (EbliWidgetControllerCalque) getController(); - } + public EbliWidgetControllerCalque getCalqueController() { + return (EbliWidgetControllerCalque) getController(); + } - boolean first_ = true; + boolean first_ = true; - @SuppressWarnings("unchecked") - @Override - protected void paintWidget() { + @Override + protected void paintWidget() { - final Rectangle rec = getClientArea(); + final Rectangle rec = getClientArea(); + rec.width -= 1; + rec.height -= 1; + if (rec.width > 0 && rec.height > 0) { + final Graphics2D g = getGraphics(); - rec.width -= 1; - rec.height -= 1; + initSize(rec); + if (first_) { + first_ = false; + if (initZoom_ != null && initZoom_.getDeltaX() > 0 && initZoom_.getDeltaY() > 0) { + calquePanel_.getVueCalque().changeRepere(this, initZoom_); + initZoom_ = null; + } else calquePanel_.restaurer(); + } - if(rec.width>0 && rec.height>0){ - final Graphics2D g = getGraphics(); + // mode edition + if (image == null || image.getWidth() != rec.width || image.getHeight() != rec.height) { + FuLog.debug("EWI: recreate image"); + if (zoom_ != null) { + calquePanel_.getVueCalque().changeRepere(this, zoom_); - if (frame_ == null) { - initSize(rec); - if (first_) { - first_ = false; - if (initZoom_ != null && initZoom_.getDeltaX() > 0 && initZoom_.getDeltaY() > 0) { - calquePanel_.getVueCalque().changeRepere(this, initZoom_); - initZoom_ = null; - } else calquePanel_.restaurer(); - } - // if (zoom_ != null) { - // // image=null; - // calquePanel_.getVueCalque().changeRepere(this, zoom_); - // - // } else calquePanel_.restaurer(); - } + } else calquePanel_.restaurer(); + final Map params = new HashMap(); + CtuluLibImage.setCompatibleImageAsked(params); + // a ameliorer: il ne faudrait pas recreer l'image a chaque fois + // CtuluLibImage.setCompatibleImageAsked(params); - // mode edition - if (image == null || image.getWidth() != rec.width || image.getHeight() != rec.height) { - FuLog.debug("EWI: recreate image"); - final Map params = new HashMap(); - CtuluLibImage.setCompatibleImageAsked(params); - // a ameliorer: il ne faudrait pas recreer l'image a chaque fois - CtuluLibImage.setCompatibleImageAsked(params); - - - //- on enregistre le zoom en memoire --// - //GrBoite zoomMemoire=calquePanel_.getVueCalque().getViewBoite(); - - //-- on redessinne --// - image = calquePanel_.produceImage(rec.width, rec.height, params); - - //-- on remet le repere au max de la clientArea de la widget --// - //calquePanel_.getVueCalque().changeRepere(this, zoomMemoire); - - - calquePanel_.restaurer(); - } - - g.drawImage(image, rec.x, rec.y, rec.width, rec.height, null); + // - on enregistre le zoom en memoire --// + // GrBoite zoomMemoire=calquePanel_.getVueCalque().getViewBoite(); - } - } + // -- on redessinne --// + image = calquePanel_.produceImage(rec.width, rec.height, params); - public EnumSet<org.netbeans.api.visual.action.InplaceEditorProvider.ExpansionDirection> getExpansionDirections( - final org.netbeans.api.visual.action.InplaceEditorProvider.EditorController controller, final Widget widget, - final BuPanel editor) { - return null; - } + // -- on remet le repere au max de la clientArea de la widget --// + // calquePanel_.getVueCalque().changeRepere(this, zoomMemoire); - public Rectangle getInitialEditorComponentBounds( - final org.netbeans.api.visual.action.InplaceEditorProvider.EditorController controller, final Widget widget, - final BuPanel editor, final Rectangle viewBounds) { - return convertLocalToScene(getClientArea()); - } + // calquePanel_.restaurer(); + } - public void notifyOpened(final org.netbeans.api.visual.action.InplaceEditorProvider.EditorController controller, - final Widget widget, final BuPanel editor) { - editingStart(); - calquePanel_.setBorder(BorderFactory.createLineBorder(Color.GRAY, 1)); - } + g.drawImage(image, rec.x, rec.y, rec.width, rec.height, null); - // public void setColorFond(Color newColor) { - // couleurFond = newColor; - // repaint(); - // } - // - // public void update(Observable _o, Object _arg) { - // image = null; - // getEbliScene().refresh(); - // } - @Override - public boolean canRotate() { - return false; - } + } + } - @Override - public boolean canColorForeground() { - return false; - } + public EnumSet<org.netbeans.api.visual.action.InplaceEditorProvider.ExpansionDirection> getExpansionDirections( + final org.netbeans.api.visual.action.InplaceEditorProvider.EditorController controller, final Widget widget, + final BuPanel editor) { + return null; + } - @Override - public boolean canColorBackground() { - return false; - } + public Rectangle getInitialEditorComponentBounds( + final org.netbeans.api.visual.action.InplaceEditorProvider.EditorController controller, final Widget widget, + final BuPanel editor, final Rectangle viewBounds) { + return convertLocalToScene(getClientArea()); + } - @Override - public boolean canTraceLigneModel() { - return false; - } + public void notifyOpened(final org.netbeans.api.visual.action.InplaceEditorProvider.EditorController controller, + final Widget widget, final BuPanel editor) { + editingStart(); + calquePanel_.setBorder(BorderFactory.createLineBorder(Color.GRAY, 1)); + } - @Override - public boolean canFont() { - return false; - } + // public void setColorFond(Color newColor) { + // couleurFond = newColor; + // repaint(); + // } + // + // public void update(Observable _o, Object _arg) { + // image = null; + // getEbliScene().refresh(); + // } + @Override + public boolean canRotate() { + return false; + } - @Override - public List<EbliWidgetAnimatedItem> getAnimatedItems() { - final BCalque[] cqs = calquePanel_.getVueCalque().getCalque().getTousCalques(); - final List<EbliWidgetAnimatedItem> res = new ArrayList<EbliWidgetAnimatedItem>(20); - for (int i = 0; i < cqs.length; i++) { - if (cqs[i].isVisible() && cqs[i] instanceof EbliAnimationAdapterInterface) { - res.add(new EbliWidgetAnimatedItem((EbliAnimationAdapterInterface) cqs[i], cqs[i], getId(), cqs[i].getName(), - cqs[i].getTitle())); - } - } - return res; - } + @Override + public boolean canColorForeground() { + return false; + } - @Override - public boolean isAnimatedItemAlive(final String _id) { - final BCalque cq = calquePanel_.getVueCalque().getCalque().getCalqueParNom(_id); - return cq != null && cq.isVisible(); - } + @Override + public boolean canColorBackground() { + return false; + } - public boolean hasSattelite() { - if (getCalqueController().hasLegende()) - return true; - return false; + @Override + public boolean canTraceLigneModel() { + return false; } - + + @Override + public boolean canFont() { + return false; + } + + @Override + public List<EbliWidgetAnimatedItem> getAnimatedItems() { + final BCalque[] cqs = calquePanel_.getVueCalque().getCalque().getTousCalques(); + final List<EbliWidgetAnimatedItem> res = new ArrayList<EbliWidgetAnimatedItem>(20); + for (int i = 0; i < cqs.length; i++) { + if (cqs[i].isVisible() && cqs[i] instanceof EbliAnimationAdapterInterface) { + res.add(new EbliWidgetAnimatedItem((EbliAnimationAdapterInterface) cqs[i], cqs[i], getId(), cqs[i].getName(), + cqs[i].getTitle())); + } + } + return res; + } + + @Override + public boolean isAnimatedItemAlive(final String _id) { + final BCalque cq = calquePanel_.getVueCalque().getCalque().getCalqueParNom(_id); + return cq != null && cq.isVisible(); + } + + public boolean hasSattelite() { + if (getCalqueController().hasLegende()) return true; + return false; + } + public List<EbliWidget> getSattelite() { - if (!hasSattelite()) - return null; + if (!hasSattelite()) return null; List<EbliWidget> liste = new ArrayList<EbliWidget>(); - + liste.add(getCalqueController().getNodeLegende().getWidget()); - + return liste; - + } - - public void setSattelite(List<EbliWidget> liste) { - if(liste.size()<=0) - return; - - EbliWidget widg=liste.get(0); - - EbliNodeDefault node= (EbliNodeDefault) getEbliScene().findObject(widg); - getCalqueController().setNodeLegende( node); - - + + public void setSatellite(List<EbliWidget> liste) { + if (liste.size() <= 0) return; + + EbliWidget widg = liste.get(0); + + EbliNodeDefault node = (EbliNodeDefault) getEbliScene().findObject(widg); + getCalqueController().setNodeLegende(node); + } - + public BufferedImage getImage() { - return image; - } + return image; + } - public void setImage(BufferedImage image) { - this.image = image; - } - + public void setImage(BufferedImage image) { + this.image = image; + } + } Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/graphe/EbliWidgetControllerGraphe.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/graphe/EbliWidgetControllerGraphe.java 2008-12-08 18:25:47 UTC (rev 4282) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/graphe/EbliWidgetControllerGraphe.java 2008-12-08 22:24:36 UTC (rev 4283) @@ -70,7 +70,7 @@ public EbliWidgetControllerGraphe(final EbliWidgetGraphe widget_, final EbliNodeDefault nodeLegende) { super(widget_); - isProportional = true; + setProportional(true); widgetGraphe_ = widget_; labelTrace_ = (JLabel) CtuluLibSwing.findChildByName(getGraphePanel(), "lbTools"); @@ -454,7 +454,7 @@ // paneGlobal.setTopComponent(getGraphePanel().getInfoPanel()); // paneGlobal.setBottomComponent(new JScrollPane(tree)); - panelTreeGraphe_ = new JScrollPane(tree);;// paneGlobal; + panelTreeGraphe_ = new JScrollPane(tree);// paneGlobal; } return panelTreeGraphe_; Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/graphe/EbliWidgetCreatorGraphe.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/graphe/EbliWidgetCreatorGraphe.java 2008-12-08 18:25:47 UTC (rev 4282) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/graphe/EbliWidgetCreatorGraphe.java 2008-12-08 22:24:36 UTC (rev 4283) @@ -6,7 +6,6 @@ import java.util.Map; import org.fudaa.ctulu.CtuluLibFile; -import org.fudaa.ctulu.CtuluUI; import org.fudaa.ebli.courbe.EGFillePanel; import org.fudaa.ebli.courbe.EGGraphe; import org.fudaa.ebli.courbe.EGGrapheModel; Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/graphe/EbliWidgetCreatorLegende.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/graphe/EbliWidgetCreatorLegende.java 2008-12-08 18:25:47 UTC (rev 4282) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/graphe/EbliWidgetCreatorLegende.java 2008-12-08 22:24:36 UTC (rev 4283) @@ -3,9 +3,6 @@ import java.util.List; import java.util.Map; -import org.fudaa.ebli.calque.BCalque; -import org.fudaa.ebli.calque.BCalqueLegendePanel; -import org.fudaa.ebli.calque.ZEbliCalquesPanel; import org.fudaa.ebli.courbe.EGGraphe; import org.fudaa.ebli.courbe.EGGrapheTreeModel; import org.fudaa.ebli.visuallibrary.EbliNode; @@ -14,9 +11,6 @@ import org.fudaa.ebli.visuallibrary.EbliWidget; import org.fudaa.ebli.visuallibrary.EbliWidgetBordureSingle; import org.fudaa.ebli.visuallibrary.EbliWidgetWithBordure; -import org.fudaa.ebli.visuallibrary.calque.CalqueLegendeWidgetAdapter; -import org.fudaa.ebli.visuallibrary.calque.EbliWidgetControllerCalque; -import org.fudaa.ebli.visuallibrary.calque.EbliWidgetVueCalque; import org.fudaa.ebli.visuallibrary.creator.EbliWidgetCreator; public class EbliWidgetCreatorLegende implements EbliWidgetCreator { Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/graphe/EbliWidgetGraphe.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/graphe/EbliWidgetGraphe.java 2008-12-08 18:25:47 UTC (rev 4282) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/graphe/EbliWidgetGraphe.java 2008-12-08 22:24:36 UTC (rev 4283) @@ -15,19 +15,16 @@ import org.fudaa.ctulu.image.CtuluLibImage; import org.fudaa.ebli.animation.EbliAnimatedInterface; import org.fudaa.ebli.animation.EbliAnimationAdapterInterface; -import org.fudaa.ebli.calque.BCalque; import org.fudaa.ebli.courbe.EGAxe; import org.fudaa.ebli.courbe.EGCourbe; import org.fudaa.ebli.courbe.EGFillePanel; import org.fudaa.ebli.courbe.EGGraphe; import org.fudaa.ebli.courbe.EGGrapheModelListener; import org.fudaa.ebli.courbe.EGObject; -import org.fudaa.ebli.visuallibrary.EbliNode; import org.fudaa.ebli.visuallibrary.EbliNodeDefault; import org.fudaa.ebli.visuallibrary.EbliScene; import org.fudaa.ebli.visuallibrary.EbliWidget; import org.fudaa.ebli.visuallibrary.animation.EbliWidgetAnimatedItem; -import org.geotools.xml.xsi.XSISimpleTypes.Int; import org.netbeans.api.visual.action.InplaceEditorProvider; import org.netbeans.api.visual.widget.Widget; @@ -329,7 +326,7 @@ } - public void setSattelite(List<EbliWidget> liste) { + public void setSatellite(List<EbliWidget> liste) { if (liste.size() <= 0) return; EbliWidget widg = liste.get(0); Modified: branches/Prepro-0.92-SNAPSHOT/ebli/test/org/fudaa/ebli/all/TestVisualLibrary.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/test/org/fudaa/ebli/all/TestVisualLibrary.java 2008-12-08 18:25:47 UTC (rev 4282) +++ branches/Prepro-0.92-SNAPSHOT/ebli/test/org/fudaa/ebli/all/TestVisualLibrary.java 2008-12-08 22:24:36 UTC (rev 4283) @@ -56,7 +56,7 @@ import org.fudaa.ebli.visuallibrary.actions.EbliWidgetActionConfigure; import org.fudaa.ebli.visuallibrary.actions.EbliWidgetActionDuplicate; import org.fudaa.ebli.visuallibrary.actions.EbliWidgetActionFont; -import org.fudaa.ebli.visuallibrary.actions.EbliWidgetActionForeGround; +import org.fudaa.ebli.visuallibrary.actions.EbliWidgetActionForeground; import org.fudaa.ebli.visuallibrary.actions.EbliWidgetActionImageChooser; import org.fudaa.ebli.visuallibrary.actions.EbliWidgetActionRetaillageHorizontal; import org.fudaa.ebli.visuallibrary.actions.EbliWidgetActionRetaillageVertical; @@ -449,7 +449,7 @@ bar.add(new EbliWidgetActionDuplicate(scene)); - bar.add(new EbliWidgetActionForeGround(scene)); + bar.add(new EbliWidgetActionForeground(scene)); bar.add(new EbliWidgetActionBackGround(scene)); Modified: branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostLayoutFille.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostLayoutFille.java 2008-12-08 18:25:47 UTC (rev 4282) +++ branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostLayoutFille.java 2008-12-08 22:24:36 UTC (rev 4283) @@ -3,8 +3,6 @@ import java.awt.BorderLayout; import java.awt.Dimension; import java.awt.Point; -import java.awt.event.ComponentEvent; -import java.awt.event.ComponentListener; import java.awt.image.BufferedImage; import java.util.ArrayList; import java.util.HashSet; @@ -19,8 +17,6 @@ import javax.swing.JMenuBar; import javax.swing.JPanel; import javax.swing.JToolBar; -import javax.swing.event.InternalFrameEvent; -import javax.swing.event.InternalFrameListener; import org.fudaa.ctulu.CtuluCommandManager; import org.fudaa.ctulu.CtuluUndoRedoInterface; @@ -149,42 +145,42 @@ panelSouthSuiviSouris_ = new JLabel(); this.add(panelSouthSuiviSouris_, BorderLayout.SOUTH); - oldSize_=getSize(); +// oldSize_=getSize(); //-- ajout du controller en cas de resize --// - this.addComponentListener(new ComponentListener(){ - - @Override - public void componentHidden(ComponentEvent e) { - // TODO Auto-generated method stub - - } - - @Override - public void componentMoved(ComponentEvent e) { - // TODO Auto-generated method stub - - } - - @Override - public void componentResized(ComponentEvent e) { - // TODO Auto-generated method stub -// Dimension size=getSize(); -// System.out.println("Size nouvelle:"+size); -// if(size!=oldSize_ ){ -// controller_.getSceneCourante().resizeInnerWidget(size,oldSize_); +// this.addComponentListener(new ComponentListener(){ +// +// @Override +// public void componentHidden(ComponentEvent e) { +// // TODO Auto-generated method stub // -// //-- stockage de la taille comme ancienne size --// -// oldSize_=size; -// } - } - - @Override - public void componentShown(ComponentEvent e) { - // TODO Auto-generated method stub - - } - - }); +// } +// +// @Override +// public void componentMoved(ComponentEvent e) { +// // TODO Auto-generated method stub +// +// } +// +// @Override +// public void componentResized(ComponentEvent e) { +// // TODO Auto-generated method stub +//// Dimension size=getSize(); +//// System.out.println("Size nouvelle:"+size); +//// if(size!=oldSize_ ){ +//// controller_.getSceneCourante().resizeInnerWidget(size,oldSize_); +//// +//// //-- stockage de la taille comme ancienne size --// +//// oldSize_=size; +//// } +// } +// +// @Override +// public void componentShown(ComponentEvent e) { +// // TODO Auto-generated method stub +// +// } +// +// }); Modified: branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostLayoutPanelController.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostLayoutPanelController.java 2008-12-08 18:25:47 UTC (rev 4282) +++ branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostLayoutPanelController.java 2008-12-08 22:24:36 UTC (rev 4283) @@ -13,11 +13,14 @@ import javax.swing.JDesktopPane; import javax.swing.JMenu; import javax.swing.JPanel; +import javax.swing.JPopupMenu; import javax.swing.JScrollPane; import javax.swing.JTabbedPane; import javax.swing.SwingConstants; import org.fudaa.ctulu.CtuluCommandManager; +import org.fudaa.ctulu.gui.CtuluButtonForPopup; +import org.fudaa.ctulu.gui.CtuluSelectorPopupButton; import org.fudaa.ebli.calque.BCalqueLegende; import org.fudaa.ebli.calque.ZEbliCalquesPanel; import org.fudaa.ebli.commun.EbliActionAbstract; @@ -37,7 +40,7 @@ import org.fudaa.ebli.visuallibrary.actions.EbliWidgetActionBackGround; import org.fudaa.ebli.visuallibrary.actions.EbliWidgetActionColorBackground; import org.fudaa.ebli.visuallibrary.actions.EbliWidgetActionConfigure; -import org.fudaa.ebli.visuallibrary.actions.EbliWidgetActionForeGround; +import org.fudaa.ebli.visuallibrary.actions.EbliWidgetActionForeground; import org.fudaa.ebli.visuallibrary.actions.EbliWidgetActionImageChooser; import org.fudaa.ebli.visuallibrary.actions.EbliWidgetActionRetaillageHorizontal; import org.fudaa.ebli.visuallibrary.actions.EbliWidgetActionRetaillageVertical; @@ -194,10 +197,7 @@ // comboMultiScenes_.addActionListener(this); // comboMultiScenes_.setMaximumSize(comboMultiScenes_.getPreferredSize()); // comboMultiScenes_.setMinimumSize(comboMultiScenes_.getPreferredSize()); - - - - + } // public BuComboBox getComboMultiScenes() { @@ -255,7 +255,7 @@ // -- ajout du rectangle --// final EbliNodeDefault nodeLegende = new EbliNodeDefault(); nodeLegende.setTitle("Legende calque"); - nodeLegende.setCreator(new EbliWidgetCreatorLegende(legende.getLegendePanel(0), "x",null)); + nodeLegende.setCreator(new EbliWidgetCreatorLegende(legende.getLegendePanel(0), "x", null)); nodeLegende.setPreferedSize(new Dimension(200, 100)); nodeLegende.setPreferedLocation(new Point(350, 125)); // ajout du node au layout @@ -278,7 +278,7 @@ return nodeLigne; } - + public EbliNode addCercle() { // -- ajout du rectangle --// final EbliNodeDefault nodeCercle = new EbliNodeDefault(); @@ -323,20 +323,20 @@ return nodeFleche; } - + public EbliNode addDblFleche() { - // -- ajout du rectangle --// - final EbliNodeDefault nodeFleche = new EbliNodeDefault(); - nodeFleche.setTitle("Double Fleche"); - nodeFleche.setCreator(new EbliWidgetCreatorShape(new ShapeCreatorDblFleche())); - nodeFleche.setPreferedSize(new Dimension(100, 50)); - nodeFleche.setPreferedLocation(new Point(350, 125)); + // -- ajout du rectangle --// + final EbliNodeDefault nodeFleche = new EbliNodeDefault(); + nodeFleche.setTitle("Double Fleche"); + nodeFleche.setCreator(new EbliWidgetCreatorShape(new ShapeCreatorDblFleche())); + nodeFleche.setPreferedSize(new Dimension(100, 50)); + nodeFleche.setPreferedLocation(new Point(3... [truncated message content] |
From: <had...@us...> - 2008-12-09 16:44:49
|
Revision: 4287 http://fudaa.svn.sourceforge.net/fudaa/?rev=4287&view=rev Author: hadouxad Date: 2008-12-09 16:44:46 +0000 (Tue, 09 Dec 2008) Log Message: ----------- - Initialisation du bouton resize proportionnel du calque - Prise en compte du zoom du calque pour les duplications de calque - Prise en compte du zoom dans la sauvegarde des donn?\195?\169es cf: TrPostVisuPanelPersistManager: recuperation du zoom pour le zeblicalquepanel - ajout des fichiers .resu pour les fichiers r?\195?\169sultats ajout dans : SerafinFileFormat: { "ser", "res", "geo", "sel", "res2d", "res3d","resu" }; SerafinFileFilter: isResFile() (J'espere que j'ai rien oubli?\195?\169...) - Am?\195?\169lioration: clic direct sur l'explorer pour ouvrir un repertoire .POST la logique est dans le TrPostFileFilter et il y a surcharge de la methode updateLists0 dans TrExplorer pour ouvrir les repertoires .POST dans la vue files... |_ v?\195?\169rifie la r?\195?\168gle suivante: REPERTOIRE && contient .POST && contient fichier setup - Modification de l'option 'charger' du projet: charger uniquement des r?\195?\169pertoires. Modified Paths: -------------- branches/Prepro-0.92-SNAPSHOT/ctulu/src/com/memoire/bu/BuExplorer.java branches/Prepro-0.92-SNAPSHOT/ctulu/src/com/memoire/bu/BuFileViewer.java branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/telemac/io/SerafinFileFilter.java branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/telemac/io/SerafinFileFormat.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/ZEbliCalquesPanelPersistManager.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/ZebliCalquePersist.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/ressource/Thumbs.db branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetController.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetControllerCalque.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetCreatorVueCalque.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetVueCalque.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/graphe/EbliWidgetControllerGraphe.java branches/Prepro-0.92-SNAPSHOT/ebli/test/org/fudaa/ebli/all/TestVisualLibrary.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/common/TrApplicationManager.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/common/TrExplorer.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/common/TrFileRenderer.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostLayoutPanelController.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostVisuPanelPersistManager.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/persist/TrPostFileFilter.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/persist/TrPostPersistenceManager.java Added Paths: ----------- branches/Prepro-0.92-SNAPSHOT/fudaa/.metadata/ branches/Prepro-0.92-SNAPSHOT/fudaa/.metadata/.mylyn/ Modified: branches/Prepro-0.92-SNAPSHOT/ctulu/src/com/memoire/bu/BuExplorer.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ctulu/src/com/memoire/bu/BuExplorer.java 2008-12-08 22:59:46 UTC (rev 4286) +++ branches/Prepro-0.92-SNAPSHOT/ctulu/src/com/memoire/bu/BuExplorer.java 2008-12-09 16:44:46 UTC (rev 4287) @@ -1201,7 +1201,7 @@ } } - static class Model implements Serializable, ListModel { + protected static class Model implements Serializable, ListModel { private VfsFile[] els_; private int nb_; private Vector ldl_; @@ -1391,13 +1391,13 @@ // utils - static final Cursor WAIT_CURSOR = Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR); + protected static final Cursor WAIT_CURSOR = Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR); - final void setProgression(int _p) { + public final void setProgression(int _p) { if (app_ != null && app_.getMainPanel() != null) app_.getMainPanel().setProgression(_p); } - private int liststamp(String[] _s) { + protected int liststamp(String[] _s) { int r = 0; if (_s != null) { for (int i = 0; i < _s.length; i++) @@ -1410,7 +1410,7 @@ return r; } - boolean updating_ = false; + protected boolean updating_ = false; protected void updateLists(final VfsFile _dir, VfsFile _sel) { final boolean showing = isShowing(); @@ -1480,7 +1480,7 @@ } } - void updateLists0(final VfsFile _dir, BuFileFilter _filter, final Cursor _cursor, final VfsFile _sel, + protected void updateLists0(final VfsFile _dir, BuFileFilter _filter, final Cursor _cursor, final VfsFile _sel, final boolean _showing) { if (EventQueue.isDispatchThread()) throw new RuntimeException("In swing thread. " + "Use updateLists() instead"); @@ -1554,7 +1554,21 @@ VfsFile f = _dir.createChild(els[i]); - if (f == null) {} else if (f.isDirectory()) { + + + if (f == null) {} + + //--cas particulier: si le fichier est un repertoire .POST + //-- on place les repertoire .POST avec les fichiers --// + else + if(f.isDirectory() && f.getName().contains(".POST")){ + + files[nb_files] = f; + nb_files++; + } + + + else if (f.isDirectory()) { dirs[nb_dirs] = f; nb_dirs++; } else if (f.isFile()) { @@ -1589,6 +1603,10 @@ final int fnb_dirs = nb_dirs; final int fnb_files = nb_files; + + + + if (_sel != null) _sel.build(); runnable = new Runnable() { @@ -1624,7 +1642,7 @@ // FuLog.debug("end "+(System.currentTimeMillis()-before)); } - private FuComparator getSorter() { + protected FuComparator getSorter() { FuComparator r; /* * String s=(String)sorters_.getSelectedItem(); if("Date".equals(s)) r=DATE_COMPARATOR; else if("Size".equals(s)) Modified: branches/Prepro-0.92-SNAPSHOT/ctulu/src/com/memoire/bu/BuFileViewer.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ctulu/src/com/memoire/bu/BuFileViewer.java 2008-12-08 22:59:46 UTC (rev 4286) +++ branches/Prepro-0.92-SNAPSHOT/ctulu/src/com/memoire/bu/BuFileViewer.java 2008-12-09 16:44:46 UTC (rev 4287) @@ -16,6 +16,7 @@ import java.awt.Dimension; import java.awt.Point; +import javax.swing.JLabel; import javax.swing.JViewport; import javax.swing.SwingUtilities; @@ -133,6 +134,7 @@ if(ref!=runnable_) break; add(v[i]); } + Container p=getParent(); if(p instanceof JViewport) Modified: branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/telemac/io/SerafinFileFilter.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/telemac/io/SerafinFileFilter.java 2008-12-08 22:59:46 UTC (rev 4286) +++ branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/telemac/io/SerafinFileFilter.java 2008-12-09 16:44:46 UTC (rev 4287) @@ -71,7 +71,7 @@ * @return true si c'est un fichier r\xE9sultat */ public boolean isResFile(final String _name) { - return _name.endsWith(".res3d")|| _name.endsWith(".res2d")|| _name.endsWith(".res") || ((_name.startsWith("res") || _name.endsWith("RES")) && (_name.indexOf('.') < 0)); + return _name.endsWith(".resu")|| _name.endsWith(".res3d")|| _name.endsWith(".res2d")|| _name.endsWith(".res") || ((_name.startsWith("res") || _name.endsWith("RES")) && (_name.indexOf('.') < 0)); } /** Modified: branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/telemac/io/SerafinFileFormat.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/telemac/io/SerafinFileFormat.java 2008-12-08 22:59:46 UTC (rev 4286) +++ branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/telemac/io/SerafinFileFormat.java 2008-12-09 16:44:46 UTC (rev 4287) @@ -120,7 +120,7 @@ protected SerafinFileFormat() { super(1); - extensions_ = new String[] { "ser", "res", "geo", "sel", "res2d", "res3d" }; + extensions_ = new String[] { "ser", "res", "geo", "sel", "res2d", "res3d","resu" }; id_ = "SERAFIN"; nom_ = "Serafin"; description_ = H2dResource Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/ZEbliCalquesPanelPersistManager.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/ZEbliCalquesPanelPersistManager.java 2008-12-08 22:59:46 UTC (rev 4286) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/ZEbliCalquesPanelPersistManager.java 2008-12-09 16:44:46 UTC (rev 4287) @@ -3,6 +3,8 @@ import java.io.File; import java.util.Map; +import org.fudaa.ebli.geometrie.GrBoite; + /** * Interface des datas persistantes du calques. * Sont enregistrees dans un ficheir xml. @@ -32,5 +34,7 @@ * @return */ + + public GrBoite getZoom(); } Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/ZebliCalquePersist.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/ZebliCalquePersist.java 2008-12-08 22:59:46 UTC (rev 4286) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/ZebliCalquePersist.java 2008-12-09 16:44:46 UTC (rev 4287) @@ -8,6 +8,8 @@ import java.io.ObjectOutputStream; import java.util.Map; +import org.fudaa.ebli.geometrie.GrBoite; + import com.thoughtworks.xstream.XStream; import com.thoughtworks.xstream.io.xml.DomDriver; @@ -26,6 +28,8 @@ protected XStream parser_; + protected GrBoite zoom_; + /** * Fichier principal qui contient une instance de la classe ZEbliCalquesPanelPersistenceManager */ @@ -167,7 +171,7 @@ // -- etape 1: on lit les donn\xE9es sp\xE9cifiques pour avoir la data persistantes in = getParser().createObjectInputStream(new FileReader(new File(getMainFilePath()))); ZEbliCalquesPanelPersistManager dataPersistantes = (ZEbliCalquesPanelPersistManager) in.readObject(); - + zoom_=dataPersistantes.getZoom(); // -- etape 2 on creer l'obejt calque correspondant a partir des datas persitantes veritablePanel = dataPersistantes.generateCalquePanel(param,new File(getSpecifiqueDataFilePath())); @@ -189,4 +193,12 @@ return veritablePanel; } +public GrBoite getZoom_() { + return zoom_; } + +public void setZoom_(GrBoite zoom_) { + this.zoom_ = zoom_; +} + +} Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/ressource/Thumbs.db =================================================================== (Binary files differ) Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetController.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetController.java 2008-12-08 22:59:46 UTC (rev 4286) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetController.java 2008-12-09 16:44:46 UTC (rev 4287) @@ -213,9 +213,15 @@ private boolean isProportional = false; public void constructMenuResizeProportional(final JPopupMenu _popup, final CtuluCommandContainer cmd_) { - +if(!isProportional()){ final EbliWidgetActionSimple actionBloque = new EbliWidgetActionRatio.Proportional(widget_); boutonProportion = actionBloque.buildMenuItem(EbliComponentFactory.INSTANCE); +} +else{ + final EbliWidgetActionSimple actionBloque = new EbliWidgetActionRatio.Classical(widget_); + boutonProportion = actionBloque.buildMenuItem(EbliComponentFactory.INSTANCE); + +} _popup.add(boutonProportion); } Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetControllerCalque.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetControllerCalque.java 2008-12-08 22:59:46 UTC (rev 4286) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetControllerCalque.java 2008-12-09 16:44:46 UTC (rev 4287) @@ -48,6 +48,7 @@ import org.fudaa.ebli.visuallibrary.EbliWidgetWithBordure; import org.fudaa.ebli.visuallibrary.actions.CommandMasquer; import org.fudaa.ebli.visuallibrary.actions.EbliActionEditorOneClick; +import org.fudaa.ebli.visuallibrary.actions.EbliWidgetActionRatio; import com.memoire.bu.BuBorderLayout; import com.memoire.bu.BuMenuBar; @@ -91,6 +92,7 @@ widgetParent_ = _parent; addActionSpecifiques(); setProportional(true); + } Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetCreatorVueCalque.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetCreatorVueCalque.java 2008-12-08 22:59:46 UTC (rev 4286) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetCreatorVueCalque.java 2008-12-09 16:44:46 UTC (rev 4287) @@ -35,7 +35,9 @@ } public EbliWidgetCreatorVueCalque() { - + + + } public EbliWidgetCreatorVueCalque(ZEbliCalquesPanel calque, GrBoite _initZoom) { @@ -74,7 +76,7 @@ duplicOptions.put("scene", getWidget().getEbliScene()); EbliWidgetCreatorVueCalque creator = new EbliWidgetCreatorVueCalque(getCalque().duplicate(duplicOptions), - getCalque().getVueCalque().getViewBoite()); + /*((EbliWidgetVueCalque)getWidget().getIntern()).getZoom_()*/getCalque().getVueCalque().getViewBoite()); duplique.setCreator(creator); // -- ajout de la reference de la legende dans le widget calque --// @@ -155,7 +157,11 @@ else { String pathCalque = (String)parameters.get("pathLayout")+File.separator+(String) data; - calque_ = (new ZebliCalquePersist(pathCalque)).loadPersitCalqueXml(parameters); + ZebliCalquePersist persistance=new ZebliCalquePersist(pathCalque); + + calque_ = persistance.loadPersitCalqueXml(parameters); + if(calque_.getVueCalque()!=null && calque_.getVueCalque().getViewBoite()!=null) + initZoom_ = persistance.getZoom_(); } } Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetVueCalque.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetVueCalque.java 2008-12-08 22:59:46 UTC (rev 4286) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetVueCalque.java 2008-12-09 16:44:46 UTC (rev 4287) @@ -163,6 +163,12 @@ calquePanel_.getVueCalque().changeRepere(this, initZoom_); initZoom_ = null; } else calquePanel_.restaurer(); + + //-- ACHTUNG!!! si on enleve la creation de l'image ici, elle se fera dans l'autre if et ecrasera le zoom init!! --// + final Map params = new HashMap(); + CtuluLibImage.setCompatibleImageAsked(params); + image = calquePanel_.produceImage(rec.width, rec.height, params); + } // mode edition @@ -298,4 +304,12 @@ this.image = image; } +public GrBoite getZoom_() { + return zoom_; } + +public void setZoom_(GrBoite zoom_) { + this.zoom_ = zoom_; +} + +} Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/graphe/EbliWidgetControllerGraphe.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/graphe/EbliWidgetControllerGraphe.java 2008-12-08 22:59:46 UTC (rev 4286) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/graphe/EbliWidgetControllerGraphe.java 2008-12-09 16:44:46 UTC (rev 4287) @@ -36,6 +36,7 @@ import org.fudaa.ebli.visuallibrary.actions.CommandMasquer; import org.fudaa.ebli.visuallibrary.actions.EbliActionEditorOneClick; import org.fudaa.ebli.visuallibrary.actions.EbliWidgetActionConfigure; +import org.fudaa.ebli.visuallibrary.actions.EbliWidgetActionRatio; import com.memoire.bu.BuMenuBar; import com.memoire.bu.BuPanel; @@ -70,13 +71,17 @@ public EbliWidgetControllerGraphe(final EbliWidgetGraphe widget_, final EbliNodeDefault nodeLegende) { super(widget_); - setProportional(true); + widgetGraphe_ = widget_; labelTrace_ = (JLabel) CtuluLibSwing.findChildByName(getGraphePanel(), "lbTools"); // getGraphePanel().remove(labelTrace_); addActionSpecifiques(); + + + setProportional(true); + } @Override Modified: branches/Prepro-0.92-SNAPSHOT/ebli/test/org/fudaa/ebli/all/TestVisualLibrary.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/test/org/fudaa/ebli/all/TestVisualLibrary.java 2008-12-08 22:59:46 UTC (rev 4286) +++ branches/Prepro-0.92-SNAPSHOT/ebli/test/org/fudaa/ebli/all/TestVisualLibrary.java 2008-12-09 16:44:46 UTC (rev 4287) @@ -56,7 +56,8 @@ import org.fudaa.ebli.visuallibrary.actions.EbliWidgetActionConfigure; import org.fudaa.ebli.visuallibrary.actions.EbliWidgetActionDuplicate; import org.fudaa.ebli.visuallibrary.actions.EbliWidgetActionFont; -import org.fudaa.ebli.visuallibrary.actions.EbliWidgetActionForeground; +import org.fudaa.ebli.visuallibrary.actions.EbliWidgetActionForeGround; + import org.fudaa.ebli.visuallibrary.actions.EbliWidgetActionImageChooser; import org.fudaa.ebli.visuallibrary.actions.EbliWidgetActionRetaillageHorizontal; import org.fudaa.ebli.visuallibrary.actions.EbliWidgetActionRetaillageVertical; @@ -449,7 +450,7 @@ bar.add(new EbliWidgetActionDuplicate(scene)); - bar.add(new EbliWidgetActionForeground(scene)); + bar.add(new EbliWidgetActionForeGround(scene)); bar.add(new EbliWidgetActionBackGround(scene)); Modified: branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/common/TrApplicationManager.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/common/TrApplicationManager.java 2008-12-08 22:59:46 UTC (rev 4286) +++ branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/common/TrApplicationManager.java 2008-12-09 16:44:46 UTC (rev 4287) @@ -34,6 +34,7 @@ import org.fudaa.fudaa.ressource.FudaaResource; import org.fudaa.fudaa.tr.TrEditorImplementation; import org.fudaa.fudaa.tr.post.TrPostAnalyze; +import org.fudaa.fudaa.tr.post.persist.TrPostFileFilter; import org.fudaa.fudaa.tr.post.persist.TrPostFileFormat; import org.fudaa.fudaa.tr.rubar.TrRubarImplHelper; import org.fudaa.fudaa.tr.telemac.TrMatisseConvertGUI; @@ -545,7 +546,18 @@ _lb.setIcon(TrResource.getPostLayoutIcon()); } return res; - } + }else + if(TrPostFileFilter.acceptDirectoryPOST(_f)) + { + final String res = TrResource.getPostName(); + if (_lb == null) { + launcher_.openLayoutPost(TrPostFileFilter.getSetupFormDirectoryPOST(_f)); + } else { + _lb.setIcon(TrResource.getPostLayoutIcon()); + } + return res; + + } return null; } @@ -568,14 +580,17 @@ protected String ouvrir(final VfsFile _f, final AbstractButton _lb) { String res = ouvrirEditor(_f, _lb); if (res != null) { return res; } + + // -- tentative ouverture fichier type layout --// + res = ouvrirPostLayout(_f, _lb); + if (res != null) { return res; } + res = ouvrirMesh(_f, _lb); if (res != null) { return res; } res = ouvrirPost(_f, _lb); if (res != null) { return res; } - // -- tentative ouverture fichier type layout --// - res = ouvrirPostLayout(_f, _lb); - if (res != null) { return res; } + final String name = _f.getName(); if (getTxtFileFilter().accept(null, name)) { Modified: branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/common/TrExplorer.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/common/TrExplorer.java 2008-12-08 22:59:46 UTC (rev 4286) +++ branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/common/TrExplorer.java 2008-12-09 16:44:46 UTC (rev 4287) @@ -8,9 +8,13 @@ */ package org.fudaa.fudaa.tr.common; +import java.awt.Cursor; +import java.awt.EventQueue; import java.awt.event.ActionEvent; import java.io.File; +import javax.swing.SwingUtilities; + import org.fudaa.ctulu.CtuluLib; import org.fudaa.ctulu.fileformat.FileFormat; import org.fudaa.fudaa.commun.FudaaLib; @@ -18,14 +22,19 @@ import org.fudaa.fudaa.commun.exec.FudaaExec; import org.fudaa.fudaa.commun.impl.FudaaCommonImplementation; import org.fudaa.fudaa.commun.impl.FudaaExplorer; +import org.fudaa.fudaa.tr.post.persist.TrPostFileFilter; import com.memoire.bu.BuActionEnabler; import com.memoire.bu.BuFileFilter; import com.memoire.bu.BuIcon; import com.memoire.bu.BuMenuItem; import com.memoire.bu.BuResource; + +import com.memoire.bu.BuExplorer.Root; import com.memoire.fu.FuLib; +import com.memoire.fu.FuSort; import com.memoire.vfs.VfsFile; +import com.memoire.vfs.VfsFileFile; /** * @author Fred Deniger @@ -249,4 +258,174 @@ TrPreferences.TR.putStringProperty("superviseur.last.dir", getCurrentDirectory().getAbsolutePath()); } } + + + /** + * Surcharge du filtrage des fichiers et repertoires de l'explorer. + * Dans le cas du tr, cela affiche els repertoire .POST propre au post traitement dasn la vue des fichiers. + * @author Adrien Hadoux + */ + protected void updateLists0(final VfsFile _dir, BuFileFilter _filter, final Cursor _cursor, final VfsFile _sel, + final boolean _showing) { + if (EventQueue.isDispatchThread()) throw new RuntimeException("In swing thread. " + "Use updateLists() instead"); + + // long before=System.currentTimeMillis(); + // FuLog.debug("BEX: showing="+_showing); + + if (!updating_) throw new RuntimeException("updating_ should be true"); + + last_ = _dir; + setProgression(10); + + // Cursor old_cursor=null; + Runnable runnable = null; + + runnable = new Runnable() { + public void run() { + if (!WAIT_CURSOR.equals(_cursor)) setCursor(WAIT_CURSOR); + + current_.setText(FuLib.reducedPath(_dir.getAbsolutePath())); + current_.setToolTipText(_dir.getAbsolutePath()); + current_.revalidate(); + updateMenuCurrent(); + } + }; + + if (_showing) SwingUtilities.invokeLater(runnable); + else + runnable.run(); + + // FuLog.debug("read "+(System.currentTimeMillis()-before)); + timestamp_ = _dir.lastModified();// System.currentTimeMillis(); + + String[] els = _dir.list(); + liststamp_ = liststamp(els); + // FuLog.debug("update liststamp="+liststamp_+" for "+_dir); + if (els == null) els = STRING0; + // FuLog.debug("%%% DIR="+_dir+" ["+els.length+"]"); + + setProgression(20); + + int l = els.length; + + final VfsFile[] dirs = new VfsFile[l + 1]; + final VfsFile[] files = new VfsFile[l]; + int nb_dirs = 0; + int nb_files = 0; + + VfsFile pf = _dir.getParentVfsFile(); + // FuLog.debug("%%% PF="+pf); + if (pf instanceof VfsFileFile) { + String p = pf.getAbsolutePath(); + pf = new Root(p, p, ".."); + } + + if (pf != null) { + pf.setViewName(".."); + dirs[0] = pf; + nb_dirs++; + } + + setProgression(30); + + // cleanFilters(); + // addFilter(filter); + // filters_.setSelectedItem(filter); + + for (int i = 0; i < l; i++) { + if (els[i].startsWith(".")) continue; + if (els[i].endsWith("~")) continue; + if ("CVS".equals(els[i])) continue; + + VfsFile f = _dir.createChild(els[i]); + + + + if (f == null) {} + + //--cas particulier: si le fichier est un repertoire .POST + //-- on place les repertoire .POST avec les fichiers --// + else + if(TrPostFileFilter.acceptDirectoryPOST(f)){ + + files[nb_files] = f; + nb_files++; + } + + + else if (f.isDirectory()) { + dirs[nb_dirs] = f; + nb_dirs++; + } else if (f.isFile()) { + // if(viewer_!=null) + // { + // String n=f.getName(); + // int p=n.lastIndexOf('.'); + // if(p>0) + // { + // String e=n.substring(p+1).toLowerCase(); + // addFilter(new BuFileFilter(e,_("Fichiers")+ + // " "+e.toUpperCase()),true); + // } + // } + + if ((_filter == null) || _filter.accept(f)) { + files[nb_files] = f; + nb_files++; + } + } else { + // FuLog.debug("BEX: ignore entry "+f); + } + } + + // FuLog.debug("sort "+(System.currentTimeMillis()-before)); + els = null; + setProgression(40); + FuSort.sort(dirs, 0, nb_dirs); + setProgression(50); + FuSort.sort(files, 0, nb_files, getSorter()); + + final int fnb_dirs = nb_dirs; + final int fnb_files = nb_files; + + + + + + if (_sel != null) _sel.build(); + + runnable = new Runnable() { + public void run() { + // FuLog.debug("model"); + // dirs_.setEnabled(true); + dirs_.setEmptyText("No directory"); + dirs_.setModel(new Model(dirs, fnb_dirs)); + dirs_.revalidate(); + setProgression(60); + + // files_.setEnabled(true); + files_.setEmptyText("No file"); + files_.setModel(new Model(files, fnb_files)); + files_.revalidate(); + setProgression(70); + + setProgression(80); + // FuLog.debug("end"); + repaint(); + + if ((_sel != null) && !_sel.isDirectory()) files_.setSelectedValue(_sel, true); + if (!WAIT_CURSOR.equals(_cursor)) setCursor(_cursor); + + setProgression(100); + updating_ = false; + } + }; + + if (_showing) SwingUtilities.invokeLater(runnable); + else + runnable.run(); + // FuLog.debug("end "+(System.currentTimeMillis()-before)); + } + + } \ No newline at end of file Modified: branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/common/TrFileRenderer.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/common/TrFileRenderer.java 2008-12-08 22:59:46 UTC (rev 4286) +++ branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/common/TrFileRenderer.java 2008-12-09 16:44:46 UTC (rev 4287) @@ -19,6 +19,7 @@ import org.fudaa.dodico.telemac.io.SerafinFileFormat; import org.fudaa.fudaa.commun.FudaaUI; import org.fudaa.fudaa.commun.exec.FudaaExec; +import org.fudaa.fudaa.tr.post.persist.TrPostFileFilter; import org.fudaa.fudaa.tr.rubar.TrRubarImplHelper; import com.memoire.bu.BuFileRenderer; @@ -111,7 +112,9 @@ if (mng_.isPostFormat(_file)) { return TrResource.getPostIcon(); } if (mng_.isPostLayoutFormat(_file)) { return TrResource.getPostLayoutIcon(); } if (mng_.getTxtFileFilter().accept(_file)) { return BuResource.BU.getToolIcon("texte"); } - } + }else + if(TrPostFileFilter.acceptDirectoryPOST(_file)) + { return TrResource.getPostLayoutIcon(); } return super.getIcon(_file); } } \ No newline at end of file Modified: branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostLayoutPanelController.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostLayoutPanelController.java 2008-12-08 22:59:46 UTC (rev 4286) +++ branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostLayoutPanelController.java 2008-12-09 16:44:46 UTC (rev 4287) @@ -40,7 +40,8 @@ import org.fudaa.ebli.visuallibrary.actions.EbliWidgetActionBackGround; import org.fudaa.ebli.visuallibrary.actions.EbliWidgetActionColorBackground; import org.fudaa.ebli.visuallibrary.actions.EbliWidgetActionConfigure; -import org.fudaa.ebli.visuallibrary.actions.EbliWidgetActionForeground; +import org.fudaa.ebli.visuallibrary.actions.EbliWidgetActionForeGround; + import org.fudaa.ebli.visuallibrary.actions.EbliWidgetActionImageChooser; import org.fudaa.ebli.visuallibrary.actions.EbliWidgetActionRetaillageHorizontal; import org.fudaa.ebli.visuallibrary.actions.EbliWidgetActionRetaillageVertical; @@ -516,7 +517,7 @@ init.add(new EbliWidgetActionAlign.Bottom(getSceneCourante())); init.add(null); - init.add(new EbliWidgetActionForeground(getSceneCourante())); + init.add(new EbliWidgetActionForeGround(getSceneCourante())); init.add(new EbliWidgetActionBackGround(getSceneCourante())); init.add(null); Modified: branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostVisuPanelPersistManager.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostVisuPanelPersistManager.java 2008-12-08 22:59:46 UTC (rev 4286) +++ branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostVisuPanelPersistManager.java 2008-12-09 16:44:46 UTC (rev 4287) @@ -14,6 +14,7 @@ import org.fudaa.ebli.calque.ZebliCalquePersist; import org.fudaa.ebli.calque.ZEbliCalquesPanelPersistManager; import org.fudaa.ebli.courbe.EGGroupPersist; +import org.fudaa.ebli.geometrie.GrBoite; import org.fudaa.ebli.visuallibrary.EbliScene; import org.fudaa.ebli.visuallibrary.calque.CalqueLegendeWidgetAdapter; import org.fudaa.fudaa.commun.save.FudaaFilleVisuPersistence; @@ -37,7 +38,7 @@ boolean simplified; String idSource; - + GrBoite zoom_; TrPostVisuPanelPersistManager() { } @@ -51,7 +52,7 @@ TrPostVisuPanel panel = (TrPostVisuPanel) p; simplified = panel.simplifiedInit; idSource = panel.getSource().getId(); - + zoom_=panel.getVueCalque().getViewBoite(); // //-- etape 2: on sauvegarde les donnees --// FudaaSaveZipWriter writer = null; try { @@ -117,9 +118,20 @@ if (loader != null) loader.safeClose(); } + + //-- restoration du zoom --// +// if(zoom_!=null) +// newPanel.getVueCalque().changeRepere(newPanel, zoom_); + return newPanel; } +@Override +public GrBoite getZoom() { + // TODO Auto-generated method stub + return zoom_; +} + // @Override // public ZEbliCalquesPanel loadPersitCalqueXml(Map _param, File _dir) { // Modified: branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/persist/TrPostFileFilter.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/persist/TrPostFileFilter.java 2008-12-08 22:59:46 UTC (rev 4286) +++ branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/persist/TrPostFileFilter.java 2008-12-09 16:44:46 UTC (rev 4287) @@ -44,5 +44,56 @@ return false; } + + /** + * Indique si le repertoire concern\xE9 est bien un r\xE9pertoire de type POST + * @param _f + * @return + * @author Adrien Hadoux + */ + public static boolean acceptDirectoryPOST(final File _f){ + if(!_f.isDirectory() || !_f.getName().contains("."+DEFAULT_EXTENSION)) + return false; + + //-- test du contenu si il est bien form\xE9: --// + File[] children=_f.listFiles(); + + boolean setupFound=false; + for(int i=0;!setupFound && i<children.length;i++){ + if (children[i] == null) { setupFound= false; } + else{ + final String name = children[i].getName(); + if (name == null) { setupFound= false; } + else + if (name.equals(TrPostPersistenceManager.setupProject)) setupFound= true; + } + } + + + return setupFound; + } + + /** + * Recupere le fichier setup depuis le un r\xE9pertoire de type POST + * @param _f + * @return + * @author Adrien Hadoux + */ + public static File getSetupFormDirectoryPOST(final File _f){ + File[] children=_f.listFiles(); + + + for(int i=0; i<children.length;i++){ + if (children[i] == null) {} + else{ + final String name = children[i].getName(); + if (name == null) { } + else + if (name.equals(TrPostPersistenceManager.setupProject)) return children[i]; + } + } + return null; + } + } Modified: branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/persist/TrPostPersistenceManager.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/persist/TrPostPersistenceManager.java 2008-12-08 22:59:46 UTC (rev 4286) +++ branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/persist/TrPostPersistenceManager.java 2008-12-09 16:44:46 UTC (rev 4287) @@ -205,16 +205,24 @@ if (!executeByExplorer) { // -- creation d un chooser --// final CtuluFileChooser fileChooser = new CtuluFileChooser(true); - fileChooser.setDialogTitle(EbliResource.EBLI.getString("S\xE9lectionnez l'emplacement de votre fichier setup")); + fileChooser.setDialogTitle(EbliResource.EBLI.getString("S\xE9lectionnez l'emplacement de votre r\xE9pertoire POST")); fileChooser.setAcceptAllFileFilterUsed(false); - fileChooser.setFileSelectionMode(JFileChooser.FILES_ONLY); + fileChooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY); // -- init avec les param noms projet et autre --// if (projet_ != null) { fileChooser.setSelectedFile(projet_); } final int reponse = fileChooser.showOpenDialog(CtuluLibSwing.getFrameAncestor(ui_.getParentComponent())); if (reponse == JFileChooser.APPROVE_OPTION) { + + //-- Recuperation du fichier du chooser --// fichierSetup = fileChooser.getSelectedFile(); + if(TrPostFileFilter.acceptDirectoryPOST(fichierSetup)) { + fichierSetup=TrPostFileFilter.getSetupFormDirectoryPOST(fichierSetup); + }else{ + ui_.error(EbliResource.EBLI.getString("Impossible de charger ce r\xE9pertoire, Soit il n'est pas de type ."+TrPostFileFilter.DEFAULT_EXTENSION+"\n soit il ne contient pas de fichier setup.")); + return false; + } } else return false; } else { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <de...@us...> - 2008-12-10 23:38:42
|
Revision: 4293 http://fudaa.svn.sourceforge.net/fudaa/?rev=4293&view=rev Author: deniger Date: 2008-12-10 23:38:37 +0000 (Wed, 10 Dec 2008) Log Message: ----------- Modified Paths: -------------- branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/ef/operation/EfLineIntersectionsCorrectionActivity.java branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/ef/operation/EfLineIntersectionsCorrectionTester.java branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/ef/operation/EfLineIntersectionsResultsDefault.java branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/ef/operation/EfLineIntersectionsResultsI.java branches/Prepro-0.92-SNAPSHOT/dodico/test/org/fudaa/dodico/ef/TestJLineIntersection.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/BGroupeCalque.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/ZCalqueRepereInteraction.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/ZCalqueSelectionInteractionAbstract.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/ZCalqueSelectionInteractionMulti.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/ZCalqueSelectionInteractionSimple.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/ZEbliCalquePanelController.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/ZebliCalquePersist.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/commun/EbliLib.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/courbe/EGGraphe.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/courbe/EGInteractionSelection.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliScene.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliSceneController.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetCreatorVueCalque.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetVueCalque.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/graphe/EbliWidgetControllerGraphe.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/graphe/EbliWidgetTitle.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/layer/MvVisuPanel.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/profile/MvProfileCoteTester.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostLayoutFille.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostVisuPanelPersistManager.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/data/TrPostDataCreationPanel.java Modified: branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/ef/operation/EfLineIntersectionsCorrectionActivity.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/ef/operation/EfLineIntersectionsCorrectionActivity.java 2008-12-10 14:52:21 UTC (rev 4292) +++ branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/ef/operation/EfLineIntersectionsCorrectionActivity.java 2008-12-10 23:38:37 UTC (rev 4293) @@ -13,6 +13,7 @@ import java.util.List; import org.fudaa.ctulu.CtuluActivity; +import org.fudaa.ctulu.CtuluVariable; import org.fudaa.ctulu.ProgressionInterface; import org.fudaa.ctulu.ProgressionUpdater; @@ -31,7 +32,7 @@ public EfLineIntersectionsResultsI correct(EfLineIntersectionsResultsI _res, EfLineIntersectionsCorrectionTester _tester, int _tidx, ProgressionInterface _prog) { stop_ = false; - if (_tester == null || _res == null || _res.isEmpty()) return _res; + if (_tester == null || _res == null || _res.isEmpty() || !_tester.isEnableFor(_res)) return _res; int nbNew = _res.getNbIntersect() + 15; BitSet isOut = new BitSet(nbNew); final List setIn = new ArrayList(2); @@ -130,5 +131,9 @@ return out_.get(_idxInters); } + public boolean isDataAvailable(CtuluVariable _v) { + return res_.isDataAvailable(_v); + } + } } Modified: branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/ef/operation/EfLineIntersectionsCorrectionTester.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/ef/operation/EfLineIntersectionsCorrectionTester.java 2008-12-10 14:52:21 UTC (rev 4292) +++ branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/ef/operation/EfLineIntersectionsCorrectionTester.java 2008-12-10 23:38:37 UTC (rev 4293) @@ -14,6 +14,12 @@ * @version $Id: EfLineIntersectionsCorrectionTester.java,v 1.1 2007-06-13 12:55:42 deniger Exp $ */ public interface EfLineIntersectionsCorrectionTester { + + /** + * @param _res le r\xE9sultat qui sera corrig\xE9 + * @return true si cette correction est active pour le resultat donne + */ + boolean isEnableFor(EfLineIntersectionsResultsI _res); boolean createNews(int _tidx, EfLineIntersection _i1, EfLineIntersection _i2, List _setNewIn); Modified: branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/ef/operation/EfLineIntersectionsResultsDefault.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/ef/operation/EfLineIntersectionsResultsDefault.java 2008-12-10 14:52:21 UTC (rev 4292) +++ branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/ef/operation/EfLineIntersectionsResultsDefault.java 2008-12-10 23:38:37 UTC (rev 4293) @@ -7,6 +7,8 @@ */ package org.fudaa.dodico.ef.operation; +import org.fudaa.ctulu.CtuluVariable; + /** * @author fred deniger * @version $Id: EfLineIntersectionsResultsDefault.java,v 1.1 2007-06-13 12:55:43 deniger Exp $ @@ -52,4 +54,8 @@ return mng_.isSegmentOut(_idxInters); } + public boolean isDataAvailable(CtuluVariable _v) { + return mng_.getGridData().getData().isDefined(_v); + } + } Modified: branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/ef/operation/EfLineIntersectionsResultsI.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/ef/operation/EfLineIntersectionsResultsI.java 2008-12-10 14:52:21 UTC (rev 4292) +++ branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/ef/operation/EfLineIntersectionsResultsI.java 2008-12-10 23:38:37 UTC (rev 4293) @@ -7,6 +7,8 @@ */ package org.fudaa.dodico.ef.operation; +import org.fudaa.ctulu.CtuluVariable; + /** * @author fred deniger * @version $Id: EfLineIntersectionsResultsI.java,v 1.1 2007-06-13 12:55:42 deniger Exp $ @@ -28,5 +30,11 @@ boolean isSegmentOut(final int _idxInters); boolean isForMesh(); + + /** + * @param _v la variable a tester + * @return true si des donnees sont disponibles pour la variable _v + */ + boolean isDataAvailable(CtuluVariable _v); } \ No newline at end of file Modified: branches/Prepro-0.92-SNAPSHOT/dodico/test/org/fudaa/dodico/ef/TestJLineIntersection.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/dodico/test/org/fudaa/dodico/ef/TestJLineIntersection.java 2008-12-10 14:52:21 UTC (rev 4292) +++ branches/Prepro-0.92-SNAPSHOT/dodico/test/org/fudaa/dodico/ef/TestJLineIntersection.java 2008-12-10 23:38:37 UTC (rev 4293) @@ -129,6 +129,8 @@ } protected class DefaultTester implements EfLineIntersectionsCorrectionTester { + + public boolean createNews(int _tidx, EfLineIntersection _i1, EfLineIntersection _i2, List _setNewIn) { EfLineIntersectionParent parent = _i1.getParent(); @@ -144,6 +146,10 @@ return false; } + + public boolean isEnableFor(EfLineIntersectionsResultsI _res) { + return true; + } } private EfDataNode createDataNodes(EfGridInterface _grid) { Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/BGroupeCalque.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/BGroupeCalque.java 2008-12-10 14:52:21 UTC (rev 4292) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/BGroupeCalque.java 2008-12-10 23:38:37 UTC (rev 4293) @@ -12,11 +12,14 @@ import java.awt.Component; import java.awt.Graphics; import java.awt.Graphics2D; +import java.awt.Image; import java.util.ArrayList; import java.util.Arrays; +import java.util.HashMap; import java.util.List; import org.fudaa.ctulu.CtuluLibString; +import org.fudaa.ctulu.image.CtuluLibImage; import org.fudaa.ebli.commun.EbliLib; import org.fudaa.ebli.controle.BConfigurableInterface; import org.fudaa.ebli.geometrie.GrBoite; @@ -82,11 +85,35 @@ } } + boolean useCache_; + Image cache_; + + @Override + public void paint(Graphics _g) { + if (useCache_) { + Graphics cg = null; + if (cache_ == null) { + try { + HashMap param = new HashMap(); + CtuluLibImage.setCompatibleImageAsked(param); + cache_ = CtuluLibImage.createImage(getWidth(), getHeight(), param); + cg = cache_.getGraphics(); + } catch (final NullPointerException e) { + cache_ = null; + cg = _g; + } + super.paint(cg); + } + if (cg != _g && cache_ != null) { + _g.drawImage(cache_, 0, 0, this); + } + + } else super.paint(_g); + } + public Color getCouleur() { final BCalque[] cq = getCalques(); - if (cq == null) { - return null; - } + if (cq == null) { return null; } boolean init = false; Color res = null; for (int i = cq.length - 1; i >= 0; i--) { @@ -98,9 +125,7 @@ } else if (!init) { res = c; init = true; - } else if (!c.equals(res)) { - return null; - } + } else if (!c.equals(res)) { return null; } } } return res; @@ -201,9 +226,7 @@ */ public static int getIdx(final String _cqName) { final int idxTmp = _cqName.lastIndexOf('_'); - if (idxTmp < 0) { - return -1; - } + if (idxTmp < 0) { return -1; } try { return Integer.parseInt(_cqName.substring(idxTmp + 1)); } catch (final Exception e) { @@ -219,9 +242,7 @@ private static String findUniqueName(final String _pref, final BCalque _parent, final int _idx) { final BCalque[] cqs = _parent.getCalques(); final String defaultName = _pref + '_' + CtuluLibString.getString(_idx); - if (cqs == null || cqs.length == 0) { - return defaultName; - } + if (cqs == null || cqs.length == 0) { return defaultName; } final String[] name = new String[cqs.length]; final int nb = name.length; boolean found = false; @@ -231,9 +252,7 @@ found = true; } } - if (!found) { - return defaultName; - } + if (!found) { return defaultName; } int lastIdx = 0; String r = null; Arrays.sort(name); @@ -257,15 +276,29 @@ } r = BGroupeCalque.buildName(_pref, lastIdx + 1); } - if (Arrays.binarySearch(name, r) >= 0) { - throw new IllegalArgumentException("cant find unique name " + r); - } + if (Arrays.binarySearch(name, r) >= 0) { throw new IllegalArgumentException("cant find unique name " + r); } if (FuLog.isTrace()) { FuLog.trace("TRL: find unique name " + r); } return r; } - - - + + /** + * @return the useCache + */ + public boolean isUseCache() { + return useCache_; + } + + /** + * @param _useCache the useCache to set + */ + public void setUseCache(boolean _useCache) { + useCache_ = _useCache; + if (!_useCache && cache_ != null) { + cache_.flush(); + cache_ = null; + } + } + } Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/ZCalqueRepereInteraction.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/ZCalqueRepereInteraction.java 2008-12-10 14:52:21 UTC (rev 4292) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/ZCalqueRepereInteraction.java 2008-12-10 23:38:37 UTC (rev 4293) @@ -29,17 +29,23 @@ private Point pointDeb_, pointFinPrec_; private final BVueCalque vc_; private double coefZoomClick_ = 1.5; // Coefficient de zoom (AVANT/ARRIERE) + private final BGroupeCalque gcDonnees_; - public ZCalqueRepereInteraction(final BVueCalque _vc) { + public ZCalqueRepereInteraction(final BVueCalque _vc,BGroupeCalque _gcDonnees) { super(); vc_ = _vc; pointDeb_ = null; pointFinPrec_ = null; _vc.addKeyListener(this); + gcDonnees_=_gcDonnees; /* * addMouseListener(this); addMouseMotionListener(this); addMouseWheelListener(this); */ } + + public boolean alwaysPaint() { + return true; + } public String getDescription() { return EbliLib.getS("Zoom") + (zoomMoins_ ? " -" : " +"); @@ -48,8 +54,8 @@ /** * Dessin de l'icone. * - * @param _c composant dont l'icone peut deriver des proprietes (couleur, ...). Ce parametre peut etre <I>null</I>. - * Il est ignore ici. + * @param _c composant dont l'icone peut deriver des proprietes (couleur, ...). Ce parametre peut etre <I>null</I>. Il + * est ignore ici. * @param _g le graphics sur lequel dessiner l'icone * @param _x lieu cible de l'icone (x) * @param _y lieu cible de l'icone (y) @@ -91,26 +97,27 @@ // EVENEMENTS public void mouseClicked(final MouseEvent _evt) {} - public void mouseEntered(final MouseEvent _evt) {} + public void mouseEntered(final MouseEvent _evt) { + // System.err.println(_evt); - public void mouseExited(final MouseEvent _evt) {} + } + public void mouseExited(final MouseEvent _evt) { + // System.err.println(_evt); + + } + public void mousePressed(final MouseEvent _evt) { - if (!isOkLeftEvent(_evt)) { - return; - } + if (!isOkLeftEvent(_evt)) { return; } + gcDonnees_.setUseCache(true); pointDeb_ = _evt.getPoint(); } - public void mouseReleased(final MouseEvent _evt) { - if (!isOkLeftEvent(_evt)) { - return; - } + gcDonnees_.setUseCache(false); + if (!isOkLeftEvent(_evt)) { return; } - if (pointDeb_ == null) { - return; - } + if (pointDeb_ == null) { return; } GrPoint pointO; GrPoint pointE; @@ -134,30 +141,42 @@ } public void mouseDragged(final MouseEvent _evt) { - if (!isOkLeftEvent(_evt)) { - return; - } - if (pointDeb_ == null) { - return; - } +// if (!isOkLeftEvent(_evt)) { return; } +// if (pointDeb_ == null) { return; } final Point pointFin = _evt.getPoint(); - final Graphics g = getGraphics(); - g.setXORMode(getBackground()); - g.setColor(Color.black); - if (pointFinPrec_ != null) { - g.drawLine(pointDeb_.x, pointDeb_.y, pointFinPrec_.x, pointDeb_.y); - g.drawLine(pointFinPrec_.x, pointDeb_.y, pointFinPrec_.x, pointFinPrec_.y); - g.drawLine(pointFinPrec_.x, pointFinPrec_.y, pointDeb_.x, pointFinPrec_.y); - g.drawLine(pointDeb_.x, pointFinPrec_.y, pointDeb_.x, pointDeb_.y); + if (!contains(pointFin)) { + EbliLib.setIn(pointFin, this); } - g.drawLine(pointDeb_.x, pointDeb_.y, pointFin.x, pointDeb_.y); - g.drawLine(pointFin.x, pointDeb_.y, pointFin.x, pointFin.y); - g.drawLine(pointFin.x, pointFin.y, pointDeb_.x, pointFin.y); - g.drawLine(pointDeb_.x, pointFin.y, pointDeb_.x, pointDeb_.y); +// final Graphics g = getGraphics(); +// g.setXORMode(getBackground()); +// g.setColor(Color.black); +// if (pointFinPrec_ != null) { +// g.drawLine(pointDeb_.x, pointDeb_.y, pointFinPrec_.x, pointDeb_.y); +// g.drawLine(pointFinPrec_.x, pointDeb_.y, pointFinPrec_.x, pointFinPrec_.y); +// g.drawLine(pointFinPrec_.x, pointFinPrec_.y, pointDeb_.x, pointFinPrec_.y); +// g.drawLine(pointDeb_.x, pointFinPrec_.y, pointDeb_.x, pointDeb_.y); +// } +// g.drawLine(pointDeb_.x, pointDeb_.y, pointFin.x, pointDeb_.y); +// g.drawLine(pointFin.x, pointDeb_.y, pointFin.x, pointFin.y); +// g.drawLine(pointFin.x, pointFin.y, pointDeb_.x, pointFin.y); +// g.drawLine(pointDeb_.x, pointFin.y, pointDeb_.x, pointDeb_.y); pointFinPrec_ = pointFin; + repaint(); } + + @Override + public void paintComponent(Graphics _g) { + if (pointDeb_ == null|| pointFinPrec_==null) { return; } + _g.setXORMode(getBackground()); + _g.setColor(Color.black); + _g.drawLine(pointDeb_.x, pointDeb_.y, pointFinPrec_.x, pointDeb_.y); + _g.drawLine(pointFinPrec_.x, pointDeb_.y, pointFinPrec_.x, pointFinPrec_.y); + _g.drawLine(pointFinPrec_.x, pointFinPrec_.y, pointDeb_.x, pointFinPrec_.y); + _g.drawLine(pointDeb_.x, pointFinPrec_.y, pointDeb_.x, pointDeb_.y); + } public void mouseMoved(final MouseEvent _evt) {} + private boolean zoomMoins_; private void setZoomMoins(final boolean _b) { Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/ZCalqueSelectionInteractionAbstract.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/ZCalqueSelectionInteractionAbstract.java 2008-12-10 14:52:21 UTC (rev 4292) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/ZCalqueSelectionInteractionAbstract.java 2008-12-10 23:38:37 UTC (rev 4293) @@ -122,17 +122,21 @@ return trace_; } - public void paintAllInImage(final Graphics2D _g, final GrMorphisme _versEcran, final GrMorphisme _versReel, final GrBoite _clipReel) { + public void paintAllInImage(final Graphics2D _g, final GrMorphisme _versEcran, final GrMorphisme _versReel, + final GrBoite _clipReel) { if (isVisible()) { paintDonnees(_g, _versEcran, _versReel, _clipReel); } } + final BGroupeCalque donnees_; + /** * Cr\xE9ation d'un calque de s\xE9lection sans objets s\xE9lectionnables. */ - public ZCalqueSelectionInteractionAbstract() { + public ZCalqueSelectionInteractionAbstract(final BGroupeCalque _donnees) { super(); + donnees_ = _donnees; setDestructible(false); setTypeTrait(TraceLigne.LISSE); setModeSelection(RECTANGLE); @@ -154,13 +158,29 @@ public final void paintComponent(final Graphics _g) { paintDonnees((Graphics2D) _g, getVersEcran(), getVersReel(), getClipReel(_g)); + if (enCours_) { + donnees_.setUseCache(true); + _g.setXORMode(Color.white); + initTrace(_g); + if (mode_ == RECTANGLE) { + tg_.dessineRectangle((Graphics2D) _g, ptOrig_, ptExt_, false); + } else if (mode_ == POLYGONE) { + if (plHelper_.nombre() < 3) { + tg_.dessinePolyligne((Graphics2D) _g, plHelper_, false); + } else { + tg_.dessinePolygone((Graphics2D) _g, plHelper_, false, false); + } + } + } else { + donnees_.setUseCache(false); + } } // // Appel\xE9 avant chaque trac\xE9 pour d\xE9finir le contexte graphique // private void initTrace(final Graphics _g) { - _g.setXORMode(Color.white); + if (tg_ == null) { tg_ = new TraceGeometrie(GrMorphisme.identite()); } @@ -174,8 +194,7 @@ final String old = modificateur_.getControleDesc(); modificateur_.majControleDesc(_e); if (modificateur_.getControleDesc() != old) { - firePropertyChange(ZEbliCalquePanelController.STATE, old, modificateur_ - .getControleDesc()); + firePropertyChange(ZEbliCalquePanelController.STATE, old, modificateur_.getControleDesc()); } } @@ -183,26 +202,25 @@ final String old = modificateur_.getControleDesc(); modificateur_.majControleDesc(_e); if (modificateur_.getControleDesc() != old) { - firePropertyChange(ZEbliCalquePanelController.STATE, old, modificateur_ - .getControleDesc()); + firePropertyChange(ZEbliCalquePanelController.STATE, old, modificateur_.getControleDesc()); } } - private void paintSelectionPath() { - final Graphics2D g = (Graphics2D) getGraphics(); - if (enCours_) { - initTrace(g); - if (mode_ == RECTANGLE) { - tg_.dessineRectangle(g, ptOrig_, ptExt_, false); - } else if (mode_ == POLYGONE) { - if (plHelper_.nombre() < 3) { - tg_.dessinePolyligne(g, plHelper_, false); - } else { - tg_.dessinePolygone(g, plHelper_, false, false); - } - } - } - } + // private void paintSelectionPath() { + // final Graphics2D g = (Graphics2D) getGraphics(); + // if (enCours_) { + // initTrace(g); + // if (mode_ == RECTANGLE) { + // tg_.dessineRectangle(g, ptOrig_, ptExt_, false); + // } else if (mode_ == POLYGONE) { + // if (plHelper_.nombre() < 3) { + // tg_.dessinePolyligne(g, plHelper_, false); + // } else { + // tg_.dessinePolygone(g, plHelper_, false, false); + // } + // } + // } + // } public abstract void addCalqueActif(ZCalqueAffichageDonneesInterface _calque); @@ -230,7 +248,7 @@ /** * Accesseur de la propriete <I>typeTrait </I>. Elle fixe le type de trait (pointille, tirete, ...) en prenant ses * valeurs dans les champs statiques de <I>TraceLigne </I>. - * + * * @see org.fudaa.ebli.trace.TraceLigne */ public final int getTypeTrait() { @@ -259,14 +277,12 @@ * cr\xE9ation */ public final void mouseDragged(final MouseEvent _evt) { - if (!isOkEvent(_evt)) { - return; - } + if (!isOkEvent(_evt)) { return; } final GrPoint ptSo = new GrPoint(_evt.getX(), _evt.getY(), 0.); if (mode_ == RECTANGLE && enCours_) { - paintSelectionPath(); + // paintSelectionPath(); ptExt_ = ptSo; - paintSelectionPath(); + repaint(); } } @@ -288,21 +304,19 @@ // extr\xE9mit\xE9s du polygone en cours de cr\xE9ation // public final void mouseMoved(final MouseEvent _evt) { - if (!isOkEvent(_evt)) { - return; - } + if (!isOkEvent(_evt)) { return; } if (mode_ == POLYGONE && enCours_) { // effacer ancien chemin - paintSelectionPath(); + // paintSelectionPath(); final GrPoint ptSo = new GrPoint(_evt.getX(), _evt.getY(), 0.); listePoints_.remplace(ptSo, listePoints_.nombre() - 1); - paintSelectionPath(); + repaint(); } } /* - * Ev\xE8nements souris Rectangle : <br> PRESSED => Debut de rectangle <br> DRAGGED => Trac\xE9 du rectangle <br> RELEASED => - * Fin du rectangle Polygone : RELEASED => D\xE9but de cr\xE9ation ou nouveau point cr\xE9\xE9 MOVED => Trac\xE9 des 2 droites + * Ev\xE8nements souris Rectangle : <br> PRESSED => Debut de rectangle <br> DRAGGED => Trac\xE9 du rectangle <br> RELEASED + * => Fin du rectangle Polygone : RELEASED => D\xE9but de cr\xE9ation ou nouveau point cr\xE9\xE9 MOVED => Trac\xE9 des 2 droites * DRAGGED => M\xEAme effet 2 RELEASED => Fin du polygone Button Mask : Rien => Remplacement des anciennes s\xE9lections * SHIFT => Ajout des nouvelles s\xE9lections, suppression si d\xE9j\xE0 s\xE9lectionn\xE9 */ @@ -311,9 +325,7 @@ * Methode invoquee quand on appuie sur un bouton de la souris. Rectangle : D\xE9but de cr\xE9ation. */ public final void mousePressed(final MouseEvent _evt) { - if (!isOkLeftEvent(_evt)) { - return; - } + if (!isOkLeftEvent(_evt)) { return; } if (mode_ == RECTANGLE) { enCours_ = true; // initTrace(); @@ -322,7 +334,7 @@ ptExt_ = ptOrig_; // tg_.dessineRectangle((Graphics2D) getGraphics(), ptOrig_, ptExt_, false); listePoints_.ajoute(ptOrig_); - paintSelectionPath(); + repaint(); } } @@ -337,19 +349,13 @@ * Polygone : Saisie d'un point du polygone, d\xE9but de cr\xE9ation ou fin (si 2 released) <br> */ public final void mouseReleased(final MouseEvent _evt) { - if(isGele()) { - return; - } - if(!_evt.isControlDown() && !_evt.isAltDown()&&!isOkLeftEvent(_evt)) { - return; - } + if (isGele()) { return; } + if (!_evt.isControlDown() && !_evt.isAltDown() && !isOkLeftEvent(_evt)) { return; } majControleDesc(_evt); final GrPoint ptSo = new GrPoint(_evt.getX(), _evt.getY(), 0.); // Saisie d'un seul point if (mode_ == PONCTUEL) { - if (_evt.getClickCount() >= 2 && editionAsked()) { - return; - } + if (_evt.getClickCount() >= 2 && editionAsked()) { return; } listePoints_.vide(); listePoints_.ajoute(ptSo); enCours_ = false; @@ -359,7 +365,7 @@ else if (mode_ == RECTANGLE) { if (enCours_) { // effacer ancien trace - paintSelectionPath(); + // paintSelectionPath(); // Effacement du rectangle pr\xE9c\xE9dent listePoints_.ajoute(new GrPoint(ptSo.x_, ptOrig_.y_, 0.)); listePoints_.ajoute(new GrPoint(ptSo.x_, ptSo.y_, 0.)); @@ -372,16 +378,16 @@ // fin de polygone => Creation du point de fin et du polygone if (_evt.getClickCount() == 2) { // Effacer ancien trace - paintSelectionPath(); + // paintSelectionPath(); enCours_ = false; formeSaisie(); } // Saisie d'un nouveau point else { // Effacer ancien trace - paintSelectionPath(); + // paintSelectionPath(); listePoints_.ajoute(ptSo); - paintSelectionPath(); + repaint(); } } // Premier point saisi @@ -391,14 +397,14 @@ listePoints_.ajoute(ptSo); // Le 2ieme point correspond au point flottant avant clic. listePoints_.ajoute(ptSo); - paintSelectionPath(); + repaint(); } } } /** * Dessin de l'icone. - * + * * @param _c composant dont l'icone peut deriver des proprietes (couleur, ...). Ce parametre peut etre <I>null </I>. * Il est ignore ici. * @param _g le graphics sur lequel dessiner l'icone Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/ZCalqueSelectionInteractionMulti.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/ZCalqueSelectionInteractionMulti.java 2008-12-10 14:52:21 UTC (rev 4292) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/ZCalqueSelectionInteractionMulti.java 2008-12-10 23:38:37 UTC (rev 4293) @@ -39,8 +39,8 @@ /** * Cr\xE9ation d'un calque de s\xE9lection sans objets s\xE9lectionnables. */ - public ZCalqueSelectionInteractionMulti() { - super(); + public ZCalqueSelectionInteractionMulti( final BGroupeCalque _donnees) { + super(_donnees); } private void clearSelectionsCalquesActifs() { Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/ZCalqueSelectionInteractionSimple.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/ZCalqueSelectionInteractionSimple.java 2008-12-10 14:52:21 UTC (rev 4292) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/ZCalqueSelectionInteractionSimple.java 2008-12-10 23:38:37 UTC (rev 4293) @@ -34,8 +34,8 @@ /** * Cr\xE9ation d'un calque de s\xE9lection sans objets s\xE9lectionnables. */ - public ZCalqueSelectionInteractionSimple() { - super(); + public ZCalqueSelectionInteractionSimple( final BGroupeCalque _donnees) { + super(_donnees); } protected boolean editionAsked() { Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/ZEbliCalquePanelController.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/ZEbliCalquePanelController.java 2008-12-10 14:52:21 UTC (rev 4292) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/ZEbliCalquePanelController.java 2008-12-10 23:38:37 UTC (rev 4293) @@ -135,6 +135,8 @@ cqSelectionI_.setCalqueActif(z); if (cqActif_ != null) { cqActif_.addPropertyChangeListener("mode", this); + // pour eventuellement modifie l'etat de la selection + cqActif_.addPropertyChangeListener("visible", this); } } else { cqSelectionI_.setCalqueActif(null); @@ -153,12 +155,16 @@ if (standardActionGroup_ == null) { buildButtonGroupStandard(); } - if (standardActionGroup_ == null) { + if (standardActionGroup_ == null) { buildButtonGroupSpecifique(); - } - - + } + } + + + public void setUseCacheInDonnees(boolean b){ + pn_.getGcDonnees().setUseCache(b); + } protected EbliActionInterface createRepereAction() { final EbliActionPaletteAbstract plAction = new EbliActionPaletteAbstract(EbliResource.EBLI.getString("Rep\xE8re"), @@ -323,11 +329,10 @@ // this.updateMapKeyStroke(standardActionGroup_); } - public EbliActionInterface[] buildButtonGroupSpecifique() { return null; } - + protected final EbliActionInterface[] getSpecificActionGroup() { return specificActionGroup_; } @@ -345,7 +350,7 @@ public final CtuluUI getUI() { return ui_; } - + /** * A overrider. * @@ -398,7 +403,7 @@ addCalqueInteraction(suivi); // cqAdmin_.add(suivi); // S\xE9lection - cqSelectionI_ = new ZCalqueSelectionInteractionSimple(); + cqSelectionI_ = new ZCalqueSelectionInteractionSimple(pn_.getDonneesCalque()); cqSelectionI_.setTitle(EbliResource.EBLI.getString("Interaction")); cqSelectionI_.setName("cqSELECTION"); cqSelectionI_.setDestructible(false); @@ -407,7 +412,7 @@ pn_.getVueCalque().addKeyListener(cqSelectionI_); addCalqueInteraction(cqSelectionI_); // Calque de zoom - cqZoomI_ = new ZCalqueRepereInteraction(pn_.getVueCalque()); + cqZoomI_ = new ZCalqueRepereInteraction(pn_.getVueCalque(),pn_.getDonneesCalque()); cqZoomI_.addPropertyChangeListener(ZEbliCalquePanelController.STATE, this); cqZoomI_.setTitle(EbliResource.EBLI.getString("Agrandir")); cqZoomI_.setName("cqAGRANDIR"); @@ -445,8 +450,6 @@ return r; } - - /** Methode pour vider la selection. */ public void clearSelections() { cqSelectionI_.clearSelections(); @@ -534,8 +537,7 @@ public void initTabAndSpecificAction() { } - - + protected EbliActionInterface[] getApplicationActions() { return pn_.getApplicationActions(); } @@ -591,7 +593,10 @@ } public void propertyChange(final PropertyChangeEvent _evt) { - if ((_evt.getSource() == cqActif_) || ((cqInteractionActif_ != null) && (_evt.getSource() == cqInteractionActif_))) { + if ("visible".equals(_evt.getPropertyName())) { + activeActionForSelectedLayer(); + } else if ((_evt.getSource() == cqActif_) + || ((cqInteractionActif_ != null) && (_evt.getSource() == cqInteractionActif_))) { updateModeText(); } } @@ -721,6 +726,7 @@ public void valueChanged(final TreeSelectionEvent _evt) { if (cqActif_ != null) { cqActif_.removePropertyChangeListener("mode", this); + cqActif_.removePropertyChangeListener("visible", this); cqActif_.setActionsEnable(false); } cqActif_ = pn_.getArbreCalqueModel().getSelectedCalque(); Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/ZebliCalquePersist.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/ZebliCalquePersist.java 2008-12-10 14:52:21 UTC (rev 4292) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/ZebliCalquePersist.java 2008-12-10 23:38:37 UTC (rev 4293) @@ -10,6 +10,7 @@ import org.fudaa.ebli.geometrie.GrBoite; +import com.memoire.fu.FuLog; import com.thoughtworks.xstream.XStream; import com.thoughtworks.xstream.io.xml.DomDriver; @@ -19,26 +20,26 @@ * * @author Adrien Hadoux */ -public class ZebliCalquePersist { +public class ZebliCalquePersist { /** * Path du repertoire dans lequel seront enregistr\xE9 toute les courbes, groupes et model... */ protected String directoryPath_; - + protected XStream parser_; - + protected GrBoite zoom_; - -/** - * Fichier principal qui contient une instance de la classe ZEbliCalquesPanelPersistenceManager - */ + + /** + * Fichier principal qui contient une instance de la classe ZEbliCalquesPanelPersistenceManager + */ private static String MAINFILE = "descriptorCalque.xml"; private static String DATA = "datas.xml"; private static String SPECIFIQUEFILE = "SPECIFICDATAS"; public ZebliCalquePersist(String directoryPath) { - directoryPath_=directoryPath; + directoryPath_ = directoryPath; } /** @@ -47,7 +48,7 @@ * @return */ protected XStream getParser() { - if (parser_ == null) parser_ = initXmlParser(); + if (parser_ == null) parser_ = initXmlParser(); return parser_; } @@ -59,14 +60,10 @@ protected XStream initXmlParser() { XStream xstream = new XStream(new DomDriver()); // -- creation des alias pour que ce soit + parlant dans le xml file --// - - return xstream; } - - /** * Path vers els datas classique du calque * @@ -100,105 +97,95 @@ * @param parameters des parametres supplementaires utiles. * @throws IOException */ - public void savePersitCalqueXml(ZEbliCalquesPanel panelTopersist, Map params) { - - ObjectOutputStream out = null; - try { - out = getParser().createObjectOutputStream(new FileWriter(new File(getMainFilePath()))); - - //-- recuperation des datats persistantes specifiques au panel --// - ZEbliCalquesPanelPersistManager dataPersistantes = panelTopersist.getPersistenceManager(); - - //-- enregistrement des don\xE9nes sp\xE9cifiques du calque -// - //TODO je prefere que fillInfoWith renvoie un objet et de donnees et c'est ce dernier qui est sauve - //dans le out, il suffit d'ecrire la nom de classe du persistManager - dataPersistantes.fillInfoWith(panelTopersist,new File(getSpecifiqueDataFilePath())); - - //-- sauvegarde de la classe dataPersistantes dans le fichier specifiqueData - out.writeObject(dataPersistantes); - - } catch (IOException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } finally { - try { - out.close(); - } catch (IOException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - } - } + public void savePersitCalqueXml(ZEbliCalquesPanel panelTopersist, Map params) { - + ObjectOutputStream out = null; + try { + out = getParser().createObjectOutputStream(new FileWriter(new File(getMainFilePath()))); + // -- recuperation des datats persistantes specifiques au panel --// + ZEbliCalquesPanelPersistManager dataPersistantes = panelTopersist.getPersistenceManager(); + + // -- enregistrement des don\xE9nes sp\xE9cifiques du calque -// + // TODO je prefere que fillInfoWith renvoie un objet et de donnees et c'est ce dernier qui est sauve + // dans le out, il suffit d'ecrire la nom de classe du persistManager + dataPersistantes.fillInfoWith(panelTopersist, new File(getSpecifiqueDataFilePath())); + + // -- sauvegarde de la classe dataPersistantes dans le fichier specifiqueData + out.writeObject(dataPersistantes); + + } catch (IOException e) { + e.printStackTrace(); + } finally { + try { + out.close(); + } catch (IOException e) { + e.printStackTrace(); + } + } + } + // TODO il faut generer la classe du persistencemanager -// public ZEbliCalquesPanel generateCalqueInstance(String className) throws ClassNotFoundException, -// InstantiationException, IllegalAccessException { -// if (className.startsWith("class ")) className = className.substring("class ".length()); -// Class myclass = Class.forName(className, true, Thread.currentThread().getContextClassLoader()); -// Object myModel = myclass.newInstance(); -// if (myModel instanceof ZEbliCalquesPanel) return (ZEbliCalquesPanel) myModel; -// return null; -// -// } + // public ZEbliCalquesPanel generateCalqueInstance(String className) throws ClassNotFoundException, + // InstantiationException, IllegalAccessException { + // if (className.startsWith("class ")) className = className.substring("class ".length()); + // Class myclass = Class.forName(className, true, Thread.currentThread().getContextClassLoader()); + // Object myModel = myclass.newInstance(); + // if (myModel instanceof ZEbliCalquesPanel) return (ZEbliCalquesPanel) myModel; + // return null; + // + // } /** * Methode qui remplit le panel fournit en parametre avec les donn\xE9es sauvegardees. * * @param panelToFill */ - public ZEbliCalquesPanel loadPersitCalqueXml(Map param) - { - - ObjectInputStream in = null; - ZEbliCalquesPanel veritablePanel = null; - - try { - // -- Init: on lit les donn\xE9es sp\xE9cifiques pour avoir la bonne classe zeblicalquepanel --// - // in=getParser().createObjectInputStream(new FileReader(new File(getMainFilePath()))); - - // donnee bidon - // in.readInt(); - // -- lire le type de classe du calque--// - // String className=(String) in.readObject(); - - // -- on creer le type d'objet lu - // ZEbliCalquesPanel panelUseAsStatic; - - // panelUseAsStatic = generateCalqueInstance(className); - - // -- etape 1: on lit les donn\xE9es sp\xE9cifiques pour avoir la data persistantes - in = getParser().createObjectInputStream(new FileReader(new File(getMainFilePath()))); - ZEbliCalquesPanelPersistManager dataPersistantes = (ZEbliCalquesPanelPersistManager) in.readObject(); - zoom_=dataPersistantes.getZoom(); - // -- etape 2 on creer l'obejt calque correspondant a partir des datas persitantes - veritablePanel = dataPersistantes.generateCalquePanel(param,new File(getSpecifiqueDataFilePath())); - - } catch (ClassNotFoundException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } catch (IOException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } finally { - try { - in.close(); - } catch (IOException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - } - - return veritablePanel; + public ZEbliCalquesPanel loadPersitCalqueXml(Map param) { + + ObjectInputStream in = null; + ZEbliCalquesPanel veritablePanel = null; + + try { + // -- Init: on lit les donn\xE9es sp\xE9cifiques pour avoir la bonne classe zeblicalquepanel --// + // in=getParser().createObjectInputStream(new FileReader(new File(getMainFilePath()))); + + // donnee bidon + // in.readInt(); + // -- lire le type de classe du calque--// + // String className=(String) in.readObject(); + + // -- on creer le type d'objet lu + // ZEbliCalquesPanel panelUseAsStatic; + + // panelUseAsStatic = generateCalqueInstance(className); + + // -- etape 1: on lit les donn\xE9es sp\xE9cifiques pour avoir la data persistantes + in = getParser().createObjectInputStream(new FileReader(new File(getMainFilePath()))); + ZEbliCalquesPanelPersistManager dataPersistantes = (ZEbliCalquesPanelPersistManager) in.readObject(); + zoom_ = dataPersistantes.getZoom(); + // -- etape 2 on creer l'obejt calque correspondant a partir des datas persitantes + veritablePanel = dataPersistantes.generateCalquePanel(param, new File(getSpecifiqueDataFilePath())); + + } catch (Exception _e) { + FuLog.error(_e); + } finally { + try { + in.close(); + } catch (IOException _e) { + FuLog.error(_e); + } + } + + return veritablePanel; } -public GrBoite getZoom_() { - return zoom_; -} + public GrBoite getZoom() { + return zoom_; + } -public void setZoom_(GrBoite zoom_) { - this.zoom_ = zoom_; -} + public void setZoom_(GrBoite zoom_) { + this.zoom_ = zoom_; + } } Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/commun/EbliLib.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/commun/EbliLib.java 2008-12-10 14:52:21 UTC (rev 4292) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/commun/EbliLib.java 2008-12-10 23:38:37 UTC (rev 4293) @@ -9,6 +9,7 @@ package org.fudaa.ebli.commun; import java.awt.Color; +import java.awt.Point; import java.awt.event.MouseEvent; import java.util.ArrayList; import java.util.Arrays; @@ -23,10 +24,10 @@ import javax.swing.JDialog; import javax.swing.KeyStroke; +import org.fudaa.ebli.ressource.EbliResource; + import com.memoire.bu.BuDesktop; -import org.fudaa.ebli.ressource.EbliResource; - /** * Ensemble de methodes utilitaires non classees. * @@ -46,9 +47,31 @@ public static Color getAlphaColor(final Color _init, final int _alpha) { if (_init == null || _alpha <= 0 || _alpha >= 255) { return _init; } return new Color(_init.getRed(), _init.getGreen(), _init.getBlue(), _alpha); + } + /** + * @param _initValue la valeur initiale + * @param _min la valeur min autorisee + * @param _max la valeur max autorisee + * @return la valeur _initValue si elle est comprise entre les bornes min,max. Sinon, min si valeur inferieur et max + * si max + */ + private static int setIn(int _initValue, int _min, int _max) { + if (_initValue < _min) return _min; + if (_initValue > _max) return _max; + return _initValue; } + /** + * @param _p Le point a modifier pour qu'il soi a l'interieur de jc + * @param jc le composant a utiliser + */ + public static void setIn(Point _p, JComponent _jc) { + _p.x = setIn(_p.x, 0, _jc.getWidth()); + _p.y = setIn(_p.y, 0, _jc.getHeight()); + + } + public static String getZoomDesc() { return "<table cellpadding='1'><tr><td>" + EbliLib.getS("Un clic gauche") + "</td><td>:" + EbliLib.getS("Zoom centr\xE9 sur le point cliqu\xE9") + "</tr><tr><td>" + EbliLib.getS("Rectangle dessin\xE9") Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/courbe/EGGraphe.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/courbe/EGGraphe.java 2008-12-10 14:52:21 UTC (rev 4292) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/courbe/EGGraphe.java 2008-12-10 23:38:37 UTC (rev 4293) @@ -11,6 +11,7 @@ import gnu.trove.TObjectIntIterator; import java.awt.Color; +import java.awt.Cursor; import java.awt.Dimension; import java.awt.Font; import java.awt.Graphics; @@ -102,6 +103,7 @@ model_.addModelListener(this); cmd_ = new CtuluCommandManager(); repereController_ = new RepereMouseKeyController(this); + setCursor(new Cursor(Cursor.CROSSHAIR_CURSOR)); } private void ajusteXAxe() { Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/courbe/EGInteractionSelection.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/courbe/EGInteractionSelection.java 2008-12-10 14:52:21 UTC (rev 4292) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/courbe/EGInteractionSelection.java 2008-12-10 23:38:37 UTC (rev 4293) @@ -56,6 +56,7 @@ } private void updateSelection(final int _idxSelected) { + repaint(); boolean b = false; if (_idxSelected < 0) { if (select_.isReplaceMode()) { @@ -84,6 +85,7 @@ a_.repaint(); } lastIndex_ = _idxSelected; + getParent().repaint(); } public void inverseSelection() { Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliScene.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliScene.java 2008-12-10 14:52:21 UTC (rev 4292) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliScene.java 2008-12-10 23:38:37 UTC (rev 4293) @@ -113,26 +113,6 @@ */ private final EbliSceneController controller_; - // private class ObjectSelectProvider implements SelectProvider { - // - // public boolean isAimingAllowed(final Widget widget, final Point localLocation, final boolean invertSelection) { - // return false; - // } - // - // public boolean isSelectionAllowed(final Widget widget, final Point localLocation, final boolean invertSelection) { - // return findObject(widget) != null; - // } - // - // public void select(final Widget widget, final Point localLocation, final boolean invertSelection) { - // final Object object = findObject(widget); - // - // setFocusedObject(object); - // if (object != null) { - // if (!invertSelection && getSelectedObjects().contains(object)) return; - // userSelectionSuggested(Collections.singleton(object), invertSelection); - // } else userSelectionSuggested(Collections.emptySet(), invertSelection); - // } - // } public static void refreshScene(final Scene _sc) { _sc.validate(); Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliSceneController.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliSceneController.java 2008-12-10 14:52:21 UTC (rev 4292) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliSceneController.java 2008-12-10 23:38:37 UTC (rev 4293) @@ -64,7 +64,8 @@ rectangularSelection_ = ActionFactory.createRectangularSelectAction(scene_, scene_.getInteractionLayer()); // -- ajoute l'action du zoom ( ctrl + clic) - scene_.getActions().addAction(ActionFactory.createCenteredZoomAction(1.1)); + //suppression pour eviter les bugs sioux +// scene_.getActions().addAction(ActionFactory.createCenteredZoomAction(1.1)); scene_.getActions().addAction(rectangularSelection_); // -- ajouter le menu popup de base Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetCreatorVueCalque.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetCreatorVueCalque.java 2008-12-10 14:52:21 UTC (rev 4292) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetCreatorVueCalque.java 2008-12-10 23:38:37 UTC (rev 4293) @@ -35,9 +35,7 @@ } public EbliWidgetCreatorVueCalque() { - - - + } public EbliWidgetCreatorVueCalque(ZEbliCalquesPanel calque, GrBoite _initZoom) { @@ -56,8 +54,9 @@ positionLegende.x = _dest.getLocation().x + _dest.getIntern().getPreferredSize().width + 5; positionLegende.y = _dest.getPreferredLocation().y; EbliWidgetVueCalque vue = (EbliWidgetVueCalque) _dest.getIntern(); - vue.nodeLegende = _legende.createLegende(positionLegende, _legende.getScene(), getBordure().getIntern().getId(),calque_.getCalqueActif()); - ((EbliWidgetControllerCalque) vue.getController()).setLegendeWidget(_legende,calque_.getCalqueActif()); + vue.nodeLegende = _legende.createLegende(positionLegende, _legende.getScene(), getBordure().getIntern().getId(), + calque_.getCalqueActif()); + ((EbliWidgetControllerCalque) vue.getController()).setLegendeWidget(_legende, calque_.getCalqueActif()); } public EbliWidget create(EbliScene _scene) { @@ -76,7 +75,7 @@ duplicOptions.put("scene", getWidget().getEbliScene()); EbliWidgetCreatorVueCalque creator = new EbliWidgetCreatorVueCalque(getCalque().duplicate(duplicOptions), - /*((EbliWidgetVueCalque)getWidget().getIntern()).getZoom_()*/getCalque().getVueCalque().getViewBoite()); + /* ((EbliWidgetVueCalque)getWidget().getIntern()).getZoom_() */getCalque().getVueCalque().getViewBoite()); duplique.setCreator(creator); // -- ajout de la reference de la legende dans le widget calque --// @@ -98,7 +97,7 @@ public EbliWidgetWithBordure getBordure() { return res; } - + public void initSize(final Dimension rec) { final BCalque[] tousCalques = calque_.getVueCalque().getCalque().getTousCalques(); calque_.getVueCalque().setSize(rec.width, rec.height); @@ -108,6 +107,7 @@ tousCalques[i].setSize(rec.width, rec.height); } } + /** * parametre qui n est rensginee que dans le cas d une duplication. Sinon c est cree des le debut avec le bon * ebliwidgetCalqueLegende qui va. @@ -142,26 +142,27 @@ File createRep = new File(pathUnique); if (createRep.mkdir() || createRep.isDirectory()) { // (new FudaaFilleVisuPersistence(getCalque())).saveZEbliCalquesPanelIn - // getCalque().getPersistenceManager().savePersitCalqueXml(getCalque(), createRep, parameters); - (new ZebliCalquePersist(pathUnique)).savePersitCalqueXml(getCalque(),parameters); + // getCalque().getPersistenceManager().savePersitCalqueXml(getCalque(), createRep, parameters); + (new ZebliCalquePersist(pathUnique)).savePersitCalqueXml(getCalque(), parameters); } - String pathRelative=CtuluLibFile.getRelativeFile(new File(pathUnique), new File((String)parameters.get("pathLayout")), 4); + String pathRelative = CtuluLibFile.getRelativeFile(new File(pathUnique), new File((String) parameters + .get("pathLayout")), 4); return pathRelative; } public void setPersistData(Object data, Map parameters) { - //comment on recupere le dossier ? - //il faut reconstruire le PersistenceManager par reflexion et c'est lui qui produire le ZEbliCalquesPanel + // comment on recupere le dossier ? + // il faut reconstruire le PersistenceManager par reflexion et c'est lui qui produire le ZEbliCalquesPanel if (data == null) calque_ = new ZEbliCalquesPanel(null); else { - String pathCalque = (String)parameters.get("pathLayout")+File.separator+(String) data; + String pathCalque = (String) parameters.get("pathLayout") + File.separator + (String) data; - ZebliCalquePersist persistance=new ZebliCalquePersist(pathCalque); - + ZebliCalquePersist persistance = new ZebliCalquePersist(pathCalque); + calque_ = persistance.loadPersitCalqueXml(parameters); - if(calque_.getVueCalque()!=null && calque_.getVueCalque().getViewBoite()!=null) - initZoom_ = persistance.getZoom_(); + if (calque_ != null && calque_.getVueCalque() != null && calque_.getVueCalque().getViewBoite() != null) initZoom_ = persistance + .getZoom(); } } Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetVueCalque.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetVueCalque.java 2008-12-10 14:52:21 UTC (rev 4292) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetVueCalque.java 2008-12-10 23:38:37 UTC (rev 4293) @@ -219,7 +219,7 @@ public void notifyOpened(final org.netbeans.api.visual.action.InplaceEditorProvider.EditorController controller, final Widget widget, final BuPanel editor) { editingStart(); - calquePanel_.setBorder(BorderFactory.createLineBorder(Color.GRAY, 1)); +// calquePanel_.setBorder(BorderFactory.createLineBorder(Color.GRAY, 1)); } // public void setColorFond(Color newColor) { Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/graphe/EbliWidgetControllerGraphe.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/graphe/EbliWidgetControllerGraphe.java 2008-12-10 14:52:21 UTC (rev 4292) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/graphe/EbliWidgetControllerGraphe.java 2008-12-10 23:38:37 UTC (rev 4293) @@ -1,5 +1,6 @@ package org.fudaa.ebli.visuallibrary.graphe; +import java.awt.Dimension; import java.awt.Point; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; @@ -13,6 +14,7 @@ import javax.swing.JMenuItem; import javax.swing.JPopupMenu; import javax.swing.JScrollPane; +import javax.swing.JSplitPane; import javax.swing.JToolBar; import org.fudaa.ctulu.CtuluCommandContainer; @@ -25,6 +27,7 @@ import org.fudaa.ebli.courbe.EGGraphe; import org.fudaa.ebli.courbe.EGGrapheTreeModel; import org.fudaa.ebli.courbe.EGSpecificActions; +import org.fudaa.ebli.courbe.EGTableGraphePanel; import org.fudaa.ebli.courbe.EGTree; import org.fudaa.ebli.ressource.EbliResource; import org.fudaa.ebli.visuallibrary.EbliNode; @@ -36,7 +39,6 @@ import org.fudaa.ebli.visuallibrary.actions.CommandMasquer; import org.fudaa.ebli.visuallibrary.actions.EbliActionEditorOneClick; import org.fudaa.ebli.visuallibrary.actions.EbliWidgetActionConfigure; -import org.fudaa.ebli.visuallibrary.actions.EbliWidgetActionRatio; import com.memoire.bu.BuMenuBar; import com.memoire.bu.BuPanel; @@ -71,17 +73,16 @@ public EbliWidgetControllerGraphe(final EbliWidgetGraphe widget_, final EbliNodeDefault nodeLegende) { super(widget_); - + widgetGraphe_ = widget_; labelTrace_ = (JLabel) CtuluLibSwing.findChildByName(getGraphePanel(), "lbTools"); // getGraphePanel().remove(labelTrace_); addActionSpecifiques(); - - + setProportional(true); - + } @Override @@ -120,7 +121,8 @@ * Methode a surcharger si on veut effectuer un traitement particulier apres duplication du widget. */ - public void postActionDuplication(final EbliNode node, final EbliNode duplique, ArrayList<EbliNode> listeNodeUndo) { + public void postActionDuplication(final EbliNode node, final EbliNode duplique, + final ArrayList<EbliNode> listeNodeUndo) { listeNodeUndo.add(duplique); // -- il faut verifier que les le node a bien une legende sinon on n ajoute // pas de legende pour le dupliqu\xE9 --// @@ -134,7 +136,7 @@ // -- on ajoute la legende apres duplication --// - if (((EbliWidgetControllerGraphe)widgetGraphe_.getController()).hasLegende()) { + if (((EbliWidgetControllerGraphe) widgetGraphe_.getController()).hasLegende()) { controllerDuDuplique.ajoutLegende(); listeNodeUndo.add(widgetGrapheDuplic.getNodeLegende()); @@ -147,7 +149,8 @@ } - public EbliNode duplication(final ArrayList<EbliNode> listeNodeUndo, EbliScene sceneDestination) { + @Override + public EbliNode duplication(final ArrayList<EbliNode> listeNodeUndo, final EbliScene sceneDestination) { // -- recuperation du node a dupliquer --// final EbliNode n = (EbliNode) widget_.getEbliScene().findObject(widget_); @@ -176,7 +179,8 @@ return duplique; } - public void suppression(final ArrayList<EbliNode> listeNodeUndo, ArrayList<Point> listLocation) { + @Override + public void suppression(final ArrayList<EbliNode> listeNodeUndo, final ArrayList<Point> listLocation) { final EbliNode n = (EbliNode) widget_.getEbliScene().findObject(widget_); listeNodeUndo.add(n); @@ -286,6 +290,7 @@ * * @param _popup */ + @Override public void constructPopupMenuBaseGraphique(final JPopupMenu _popup) { final JMenuItem menuItem4 = _popup.add(EbliResource.EBLI.getString("Configuration graphique")); @@ -445,12 +450,21 @@ final EGGrapheTreeModel treeModel = (EGGrapheTreeModel) getGraphe().getModel(); tree.setModel(treeModel); tree.setSelectionModel(treeModel.getSelectionModel()); - // JSplitPane pane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT); - // pane.setDividerLocation(200);// 0.3D); - // pane.setTopComponent(new JScrollPane(tree)); - // final EGTableGraphePanel tablePanel = new EGTableGraphePanel(); - // tablePanel.setGraphe(getGraphe()); - // pane.setBottomComponent(tablePanel); + + final EGTableGraphePanel tablePanel = new EGTableGraphePanel(); + tablePanel.setGraphe(getGraphe()); + tablePanel.addPanelAction(getGraphePanel()); + final JSplitPane pane = new JSplitPane(JSplitPane.VERTICAL_SPLIT); + + final JScrollPane compTop = new JScrollPane(tree); + compTop.setPreferredSize(new Dimension(150, 400)); + pane.setTopComponent(compTop); + final JScrollPane comp = new JScrollPane(tablePanel); + comp.setPreferredSize(new Dimension(150, 200)); + pane.setBottomComponent(comp); + pane.setDividerLocation(0.5D); + pane.resetToPreferredSizes(); + getGraphePanel().majSelectionListener(tablePanel); // // JSplitPane paneGlobal = new JSplitPane(JSplitPane.VERTICAL_SPLIT); // @@ -459,7 +473,7 @@ // paneGlobal.setTopComponent(getGraphePanel().getInfoPanel()); // paneGlobal.setBottomComponent(new JScrollPane(tree)); - panelTreeGraphe_ = new JScrollPane(tree);// paneGlobal; + panelTreeGraphe_ = pane;// paneGlobal; } return panelTreeGraphe_; Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/graphe/EbliWidgetTitle.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/graphe/EbliWidgetTitle.java 2008-12-10 14:52:21 UTC (rev 4292) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/graphe/EbliWidgetTitle.java 2008-12-10 23:38:37 UTC (rev 4293) @@ -11,6 +11,7 @@ import org.netbeans.api.visual.layout.LayoutFactory.SerialAlignment; import org.netbeans.api.visual.widget.LabelWidget; import org.netbeans.api.visual.widget.Widget; +import org.netbeans.api.visual.widget.LabelWidget.VerticalAlignment; import org.netbeans.modules.visual.layout.FlowLayout; /** @@ -37,9 +38,10 @@ */ public EbliWidgetTitle(final EbliScene _scene, final EGCourbe _cb, final Point preferedLocation) { super(_scene); - setLayout(new FlowLayout(true, SerialAlignment.LEFT_TOP, 0)); + setLayout(new FlowLayout(true, SerialAlignment.CENTER, 0)); intern_ = new LabelWidget(_scene); intern_.setForeground(_cb.getAspectContour()); + intern_.setVerticalAlignment(VerticalAlignment.CENTER); addChild(intern_); setCourbe(_cb); // -- ajouter l option de remplacer le text dans le label --// Modified: branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/layer/MvVisuPanel.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/layer/MvVisuPanel.java 2008-12-10 14:52:21 UTC (rev 4292) +++ branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/layer/MvVisuPanel.java 2008-12-10 23:38:37 UTC (rev 4293) @@ -125,7 +125,7 @@ } protected void updateState() { - final boolean isAll = support_.isAll(); + final boolean isAll = support_!=null && support_.isAll(); allEdge_.setEnabled(!isAll); clearEdge_.setEnabled(support_.isSomethingToView()); addEdge_.setEnabled((pn_.getCalqueActif() instanceof MvLayerGrid) Modified: branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/profile/MvProfileCoteTester.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/profile/MvProfileCoteTester.java 2008-12-10 14:52:21 UTC (rev 4292) +++ branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/profile/MvProfileCoteTester.java 2008-12-10 23:38:37 UTC (rev 4293) @@ -16,6 +16,7 @@ import org.fudaa.dodico.ef.operation.EfLineIntersection; import org.fudaa.dodico.ef.operation.EfLineIntersectionParent; import org.fudaa.dodico.ef.operation.EfLineIntersectionsCorrectionTester; +import org.fudaa.dodico.ef.operation.EfLineIntersectionsResultsI; import org.fudaa.dodico.h2d.type.H2dVariableType; import com.memoire.fu.FuLog; @@ -37,6 +38,8 @@ bathy_ = H2dVariableType.BATHYMETRIE; cote_ = H2dVariableType.COTE_EAU; } + + private boolean addIntersection(final int _tidx, final EfLineIntersection _sup1, final EfLineIntersection _min2, final List _setNewIn) { @@ -108,4 +111,8 @@ ... [truncated message content] |
From: <had...@us...> - 2008-12-11 18:46:01
|
Revision: 4296 http://fudaa.svn.sourceforge.net/fudaa/?rev=4296&view=rev Author: hadouxad Date: 2008-12-11 18:45:55 +0000 (Thu, 11 Dec 2008) Log Message: ----------- Correction recette 9 d?\195?\169cembre Modified Paths: -------------- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/trace/TraceLigne.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetBordureSingle.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetWithBordure.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/commun/courbe/FudaaCourbeWizardImportScope.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostLayoutPanelController.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/persist/TrPostPersistenceManager.java Added Paths: ----------- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetFlecheSimple.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/creator/EbliWidgetCreatorFlecheSimple.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/creator/ShapeCreatorFlecheSimple.java Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/trace/TraceLigne.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/trace/TraceLigne.java 2008-12-11 18:44:43 UTC (rev 4295) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/trace/TraceLigne.java 2008-12-11 18:45:55 UTC (rev 4296) @@ -376,7 +376,9 @@ _g.setColor(oldColor); _g.setStroke(oldStroke); } - + + + /** * Trace un polygone. Il est trace avec le type definit par <i>typeTrait </i>. * Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetBordureSingle.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetBordureSingle.java 2008-12-11 18:44:43 UTC (rev 4295) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetBordureSingle.java 2008-12-11 18:45:55 UTC (rev 4296) @@ -140,9 +140,27 @@ layout_ = new OverlayLayoutGap(insets_); setLayout(layout_); + + + + //-- on redimensionne la frame correctement --// + if(oldTraceligne_.getEpaisseur()!=l.getEpaisseur()){ + //-- on ajoute le delta d'epaisseur --// + float delta=l.getEpaisseur()-oldTraceligne_.getEpaisseur(); + System.out.println("\n***Delta: "+delta); + Rectangle sizeWidget=this.getPreferredBounds(); + //-- on rajoute le double de delta pour l'\xE9paisseur des 2 cot\xE9s --// + sizeWidget.height+=2*delta; + sizeWidget.width+=2*delta; + this.setPreferredBounds(sizeWidget); + oldTraceligne_=new TraceLigne(l) ; + } + + revalidate(); } + TraceLigne oldTraceligne_=new TraceLigne(getTraceLigneModel().buildCopy()); public Insets createInset(final int epaisseur) { Added: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetFlecheSimple.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetFlecheSimple.java (rev 0) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetFlecheSimple.java 2008-12-11 18:45:55 UTC (rev 4296) @@ -0,0 +1,100 @@ +package org.fudaa.ebli.visuallibrary; + +import java.awt.Color; +import java.awt.Graphics2D; +import java.awt.Insets; +import java.awt.Rectangle; + +import org.fudaa.ebli.trace.TraceLigne; +import org.fudaa.ebli.visuallibrary.layout.OverlayLayoutGap; + +/** + * Legende Widget qui permet de construire une fleche simple sans contenu + * + * @author Adrien Hadoux + */ +public class EbliWidgetFlecheSimple extends EbliWidget { + + Insets inGaps_; + int largeurBorder = 15; + int espaceInterieur = 5; + public static int ORIENTATION_NORTH = 0; + public static int ORIENTATION_SOUTH = 1; + public static int ORIENTATION_EAST = 2; + public static int ORIENTATION_WEST = 3; + + public Color couleurContour = Color.black; + public Color couleurFond = Color.white; + + /** + * @param _scene + */ + public EbliWidgetFlecheSimple(final EbliScene _scene, final int orientation) { + super(_scene, true); + inGaps_ = new Insets(largeurBorder + espaceInterieur, largeurBorder + espaceInterieur, largeurBorder + + espaceInterieur, largeurBorder + espaceInterieur); + // Ce layout permet de placer le texte + + setLayout(new OverlayLayoutGap(inGaps_)); + + } + + /* + * protected Rectangle calculateClientArea() { Rectangle res = this.getPreferredBounds(); // TODO Auto-generated + * method stub return new Rectangle(0, 0, 2 (largeurBorder + espaceInterieur) + res.width, 2 (largeurBorder + + * espaceInterieur) + res.height); } + */ + + @Override + protected void paintWidget() { + final Graphics2D g = getGraphics(); + + final Rectangle rec = getClientArea(); + + // -- couleur de fond --// + g.setColor(couleurFond); + g.fillRect(0, 0, rec.width, rec.height); + + g.translate(rec.x, rec.y); + // la ligne + + final TraceLigne l = new TraceLigne(); + + l.setEpaisseur(largeurBorder); + + l.setCouleur(couleurContour); + + l.dessineFleche(g, (int) (l.getEpaisseur() / 2), (rec.height / 2), (int) (rec.width - l.getEpaisseur() / 2), + (rec.height / 2)); + + /* + * Shape shape; l.dessineShape(g, shape); + */ + + g.translate(-rec.x, -rec.y); + + } + + @Override + public void setColorContour(final Color newColor) { + couleurContour = newColor; + repaint(); + } + + @Override + public Color getColorContour() { + return couleurContour; + } + + @Override + public void setColorFond(final Color newColor) { + couleurFond = newColor; + repaint(); + } + + @Override + public Color getColorFond() { + return couleurFond; + } + +} Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetWithBordure.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetWithBordure.java 2008-12-11 18:44:43 UTC (rev 4295) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetWithBordure.java 2008-12-11 18:45:55 UTC (rev 4296) @@ -4,6 +4,7 @@ */ package org.fudaa.ebli.visuallibrary; +import java.awt.Dimension; import java.awt.Graphics2D; import java.awt.Insets; import java.awt.Rectangle; @@ -33,6 +34,9 @@ super(_scene, _controllerDefaut); } + + + @Override protected void paintWidget() { @@ -59,6 +63,7 @@ g.translate(-rec.x, -rec.y); // setBackground(getColorFond()); + } Added: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/creator/EbliWidgetCreatorFlecheSimple.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/creator/EbliWidgetCreatorFlecheSimple.java (rev 0) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/creator/EbliWidgetCreatorFlecheSimple.java 2008-12-11 18:45:55 UTC (rev 4296) @@ -0,0 +1,83 @@ +package org.fudaa.ebli.visuallibrary.creator; + +import java.awt.Point; +import java.util.Map; + +import org.fudaa.ebli.visuallibrary.EbliNode; +import org.fudaa.ebli.visuallibrary.EbliNodeDefault; +import org.fudaa.ebli.visuallibrary.EbliScene; +import org.fudaa.ebli.visuallibrary.EbliWidget; +import org.fudaa.ebli.visuallibrary.EbliWidgetFlecheSimple; + +import org.fudaa.ebli.visuallibrary.EbliWidgetWithBordure; + +/** + * Creator de fleche simple sans contenu. + * @author Adrien Hadoux + * + */ +public class EbliWidgetCreatorFlecheSimple implements EbliWidgetCreator { + + int orientation; + + EbliWidgetFlecheSimple res; + + public EbliWidgetCreatorFlecheSimple(final int orientation) { + super(); + this.orientation = orientation; + + } + + public EbliWidgetCreatorFlecheSimple() { + + } + + public int getG() { + return orientation; + } + + public void setG(final int orientation) { + this.orientation = orientation; + } + + public EbliWidget create(final EbliScene _scene) { + res = new EbliWidgetFlecheSimple(_scene, orientation); + + return res; + } + + public EbliWidget getWidget() { + // TODO Auto-generated method stub + return res; + } + + public EbliNode duplicate(final EbliNode _nodeAdupliquer) { + + final EbliNode duplique = new EbliNodeDefault(); + + duplique.setCreator(new EbliWidgetCreatorFlecheSimple(orientation)); + + duplique.setTitle(_nodeAdupliquer.getTitle()); + // recopie des tailles + duplique.setPreferedSize(_nodeAdupliquer.getPreferedSize()); + // -- calcul nouvelle position + final Point nouvellePosition = new Point(getWidget().getLocation().x, (getWidget().getLocation().y + getWidget() + .getClientArea().height)); + duplique.setPreferedLocation(nouvellePosition); + + return duplique; + } + + public EbliWidgetWithBordure getBordure() { + return null; + } + + public Object getPersistData(final Map parameters) { + return null; + } + + public void setPersistData(final Object data, final Map parameters) { + + } + +} Added: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/creator/ShapeCreatorFlecheSimple.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/creator/ShapeCreatorFlecheSimple.java (rev 0) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/creator/ShapeCreatorFlecheSimple.java 2008-12-11 18:45:55 UTC (rev 4296) @@ -0,0 +1,37 @@ +package org.fudaa.ebli.visuallibrary.creator; + + +import java.awt.Shape; +import java.awt.geom.GeneralPath; +import java.awt.geom.Rectangle2D; +import java.util.Map; + +/** + * Ctreator qui se charge de g\xE9n\xE9rer une fleche simple. + * @author Adrien Hadoux + * + */ +public class ShapeCreatorFlecheSimple implements ShapeCreator { + + public Shape createShapeFor(final Rectangle2D.Float rec, final Map options, final float largeurTrait) { + final Float ratioHeadW = (Float) options.get("arrow.ratioHeadW"); + final Float ratioBaseH = (Float) options.get("arrow.ratioBaseH"); + final float rb = ratioBaseH == null ? 0.3f : ratioBaseH.floatValue(); + final float rh = ratioHeadW == null ? 0.3f : ratioHeadW.floatValue(); + final float middleH = rec.y + rec.height / 2f; + final float hauteurBase = rec.height * rb; + final float largeurHead = rec.width * rh; + final GeneralPath path = new GeneralPath(); + path.moveTo(rec.x, middleH ); + path.lineTo(rec.x + rec.width - largeurTrait, middleH);//- + path.lineTo(rec.x + rec.width - largeurHead, rec.y + largeurTrait / 2);// \ + path.lineTo(rec.x + rec.width - largeurTrait , middleH);//- + path.lineTo(rec.x + rec.width - largeurHead, rec.y + rec.height - largeurTrait / 2);// / + path.lineTo(rec.x + rec.width - largeurTrait , middleH);//- + path.lineTo(rec.x, middleH ); + //path.lineTo(rec.x + rec.width - largeurHead, middleH + hauteurBase / 2); + //path.lineTo(rec.x, middleH + hauteurBase / 2); + path.closePath(); + return path; + } +} Modified: branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/commun/courbe/FudaaCourbeWizardImportScope.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/commun/courbe/FudaaCourbeWizardImportScope.java 2008-12-11 18:44:43 UTC (rev 4295) +++ branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/commun/courbe/FudaaCourbeWizardImportScope.java 2008-12-11 18:45:55 UTC (rev 4296) @@ -669,7 +669,7 @@ FudaaCourbeImporterScope.createGraphe(target_, tabEvol, null, prog); }else if(comBoChoixTypeGraphe_.getSelectedIndex()==1){ - //profil spatial + //evol temporelle int debSeparator=listSeparatorDebPlage_.getSelectedIndex(); int finSeparator=listSeparatorFinPlage_.getSelectedIndex(); int[] selectedVariables= listVariablesGENE2_.getSelectedIndices(); Modified: branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostLayoutPanelController.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostLayoutPanelController.java 2008-12-11 18:44:43 UTC (rev 4295) +++ branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostLayoutPanelController.java 2008-12-11 18:45:55 UTC (rev 4296) @@ -58,6 +58,7 @@ import org.fudaa.ebli.visuallibrary.creator.ShapeCreatorDblFleche; import org.fudaa.ebli.visuallibrary.creator.ShapeCreatorEllipse; import org.fudaa.ebli.visuallibrary.creator.ShapeCreatorFleche; +import org.fudaa.ebli.visuallibrary.creator.ShapeCreatorFlecheSimple; import org.fudaa.ebli.visuallibrary.creator.ShapeCreatorLine; import org.fudaa.ebli.visuallibrary.creator.ShapeCreatorRectangle; import org.fudaa.fudaa.tr.common.TrResource; @@ -324,7 +325,21 @@ return nodeFleche; } + + public EbliNode addFlecheSimple() { + // -- ajout du rectangle --// + final EbliNodeDefault nodeFleche = new EbliNodeDefault(); + nodeFleche.setTitle("Fleche simple"); + nodeFleche.setCreator(new EbliWidgetCreatorShape(new ShapeCreatorFlecheSimple())); + nodeFleche.setPreferedSize(new Dimension(100, 50)); + nodeFleche.setPreferedLocation(new Point(350, 125)); + // ajout du node au layout + addNode(nodeFleche); + + return nodeFleche; + } + public EbliNode addDblFleche() { // -- ajout du rectangle --// final EbliNodeDefault nodeFleche = new EbliNodeDefault(); @@ -411,6 +426,15 @@ } }); + // -- palette fleche simple--// + _l.add(new EbliActionSimple(EbliResource.EBLI.getString("Fleche"), + EbliResource.EBLI.getToolIcon("crystal_bu_link"), "WIDGETFLECHESIMPLE") { + @Override + public void actionPerformed(final ActionEvent _evt) { + addFlecheSimple(); + } + }); + // -- palette fleche --// _l.add(new EbliActionSimple(EbliResource.EBLI.getString("Fleche"), EbliResource.EBLI.getToolIcon("crystal_bu_link"), "WIDGETFLECHE") { @@ -419,7 +443,7 @@ addFleche(); } }); - + // -- palette double fleche --// // crystal_bu_scrollpane_corner.png _l.add(new EbliActionSimple(EbliResource.EBLI.getString("Double Fleche"), EbliResource.EBLI Modified: branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/persist/TrPostPersistenceManager.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/persist/TrPostPersistenceManager.java 2008-12-11 18:44:43 UTC (rev 4295) +++ branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/persist/TrPostPersistenceManager.java 2008-12-11 18:45:55 UTC (rev 4296) @@ -595,7 +595,9 @@ * @throws IOException * @throws ClassNotFoundException */ - public void loadSource(final File file) { + public boolean loadSource(final File file) { + + boolean reussite=true; // -- outputstream du xstream --// ObjectInputStream in = null; try { @@ -646,6 +648,8 @@ } }else{ managerError.addMessageError("setup: path "+path+" invalide. Fichier r\xE9sultat non charg\xE9"); + messageError(true); + reussite= false; } } } @@ -665,11 +669,14 @@ } finally { try { in.close(); + } catch (final IOException e) { // TODO Auto-generated catch block e.printStackTrace(); messageError(false); + } + return reussite; } } @@ -920,7 +927,11 @@ // -- etape 2 sauvegarde du fichier contenant tous les sources ouverts progression("Chargement du fichier descripteur de sources", 15); file = new File(projet_.getAbsolutePath() + File.separator + setupProject); - loadSource(file); + if(! loadSource(file)){ + managerError.addMessageError("Veuillez corriger les chemins des fichiers r\xE9sultats dans le fichier setup et r\xE9it\xE9rez l'op\xE9ration."); + managerError.showDialog(ui_); + return false; + } // -- etape 6; lecture des variables --// progression("Lecture variables", 20); loadVariables(pathVariables); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <had...@us...> - 2008-12-12 18:12:43
|
Revision: 4299 http://fudaa.svn.sourceforge.net/fudaa/?rev=4299&view=rev Author: hadouxad Date: 2008-12-12 18:12:39 +0000 (Fri, 12 Dec 2008) Log Message: ----------- - Resolution bug des menus du calques: les 3 (navigation,dessin,..) sont toujours pr?\195?\169sent lors du chargement/duplication - Correction affichage wizard scope: on peut visualiser les couples choisis pour scopGene/transfo profil spatial - Cr?\195?\169ation de l'option du menu configurer qui rend transparent les widget: cela marche avec le syst?\195?\168me widgetConfigure et TRANSPARENT est une propri?\195?\169t?\195?\169 graphique des widget (a l'instar de color, traceligne...) Gestion de l'info dans la sauvegarde. - Cr?\195?\169ation de l'option nuage de points pour tous les graphes et bien sur pour le bug 31b.(ajout dans l'interface des corr?\195?\169lations) Cette option est ?\195?\169galement sauvegard?\195?\169e dans le projet. - Correction des l?\195?\169gendes et titres pour les formats scope. Modified Paths: -------------- branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/mesure/EvolutionReguliere.java branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/mesure/EvolutionReguliereAbstract.java branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/mesure/EvolutionReguliereInterface.java branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/mesure/EvolutionReguliereTFixe.java branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/telemac/io/ScopeStructure.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/courbe/EGCourbe.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/courbe/EGCourbePersist.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/courbe/EGSpecificActions.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/palette/PaletteSelecteurCouleurPlage.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidget.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetBordureSingle.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetTextEditor.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/actions/WidgetConfigure.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/calque/CalqueLegendeWidgetAdapter.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/graphe/WidgetLegendeManager.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/persist/EbliWidgetSerializeXml.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/commun/courbe/FudaaCourbeImporterScope.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/commun/courbe/FudaaCourbeWizardImportScope.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/profile/MvProfileTreeModel.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/common/TrCourbeTemporelleManager.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/common/TrEvolutionManager.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostCourbeTreeModel.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostProjet.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostVisuPanel.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostVisuPanelPersistManager.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/dialogSpec/TrPostWizardCreateScope.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/dialogSpec/TrPostWizardImportScope.java Modified: branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/mesure/EvolutionReguliere.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/mesure/EvolutionReguliere.java 2008-12-12 17:04:43 UTC (rev 4298) +++ branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/mesure/EvolutionReguliere.java 2008-12-12 18:12:39 UTC (rev 4299) @@ -34,11 +34,22 @@ */ public class EvolutionReguliere extends EvolutionReguliereAbstract { - private class CommandAdd implements CtuluCommand { + private boolean nuagePoints_=false; + + public boolean isNuagePoints() { + return nuagePoints_; + } + + public void setNuagePoints_(boolean nuagePoints_) { + this.nuagePoints_ = nuagePoints_; + } + +private class CommandAdd implements CtuluCommand { + private final double newX_; private final double newY_; - + /** * @param _newX la nouvelle valeur ajoutee * @param _newY Modified: branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/mesure/EvolutionReguliereAbstract.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/mesure/EvolutionReguliereAbstract.java 2008-12-12 17:04:43 UTC (rev 4298) +++ branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/mesure/EvolutionReguliereAbstract.java 2008-12-12 18:12:39 UTC (rev 4299) @@ -80,6 +80,8 @@ return false; } + public abstract boolean isNuagePoints(); + /** * Initialise les tableaux et le nom. * Modified: branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/mesure/EvolutionReguliereInterface.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/mesure/EvolutionReguliereInterface.java 2008-12-12 17:04:43 UTC (rev 4298) +++ branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/mesure/EvolutionReguliereInterface.java 2008-12-12 18:12:39 UTC (rev 4299) @@ -118,7 +118,7 @@ */ int getUsed(); - + public boolean isNuagePoints(); /** * @param _e l'evolution a comparer Modified: branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/mesure/EvolutionReguliereTFixe.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/mesure/EvolutionReguliereTFixe.java 2008-12-12 17:04:43 UTC (rev 4298) +++ branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/mesure/EvolutionReguliereTFixe.java 2008-12-12 18:12:39 UTC (rev 4299) @@ -65,4 +65,10 @@ return super.isEquivalentTo(_e); } +@Override +public boolean isNuagePoints() { + // TODO Auto-generated method stub + return false; +} + } \ No newline at end of file Modified: branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/telemac/io/ScopeStructure.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/telemac/io/ScopeStructure.java 2008-12-12 17:04:43 UTC (rev 4298) +++ branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/telemac/io/ScopeStructure.java 2008-12-12 18:12:39 UTC (rev 4299) @@ -21,6 +21,10 @@ public abstract EvolutionReguliere[] returnEvolReguliere(); + public abstract String getTitleFormFile(); + + + /** * Structure pour les fichiers s ou t Par convention les x sont les premieres * variables. @@ -254,6 +258,16 @@ System.err.print("\n" + getListValuesofAllVariable(i)); } + +@Override +public String getTitleFormFile() { + // TODO Auto-generated method stub + String title=""; + for(String partie:titles_) + title+=" "+partie; + + return title; +} } @@ -352,8 +366,16 @@ insertX(x, pdt); } + @Override + public String getTitleFormFile() { + // TODO Auto-generated method stub + String title=""; + for(String partie:titles_) + title+=" "+partie; + + return title; + } - public void addSeparator(String ligne) { ligne = ligne.replace(KEY.getBlocCommentaireGENE(), ""); @@ -499,6 +521,7 @@ evolReg[i] = new EvolutionReguliere(tabX, tabY, false); evolReg[i].setNom("courbe de " + nomVar); + evolReg[i].setUnite(nomVar); } } @@ -545,8 +568,8 @@ } evolReg[i] = new EvolutionReguliere(tabX, tabY, false); evolReg[i].setNom("courbe de " + nomVar); + evolReg[i].setUnite(nomVar); - } return evolReg; @@ -574,8 +597,8 @@ } evolReg[0] = new EvolutionReguliere(tabX, tabY, false); - evolReg[0].setNom("courbe corr\xE9l\xE9e X="+getVariable(varX+1)+"/Y="+getVariable(varY+1)); - + evolReg[0].setNom("cor\xE9lation:(X="+getVariable(varX+1)+"//Y="+getVariable(varY+1)+")"); + evolReg[0].setUnite(getVariable(varX+1)); return evolReg; } Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/courbe/EGCourbe.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/courbe/EGCourbe.java 2008-12-12 17:04:43 UTC (rev 4298) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/courbe/EGCourbe.java 2008-12-12 18:12:39 UTC (rev 4299) @@ -380,6 +380,15 @@ getEGParent().descendre(this); } + /** + * Boolean si oui ou non le graphe est un nuage de points + */ + protected boolean nuagePoints_=false; + /** + * Taille des points du nuages symbolis\xE9s par des carr\xE9s. + */ + protected int largeurPointsNuage_=5; + public void dessine(final Graphics2D _g, final EGRepere _t) { if (!isVisible_) { return; @@ -433,8 +442,17 @@ rangeDisplayed.expandToInclude(xi, yi); } paintSurface(_g, _t, i); - trLigne.dessineTrait(_g, xie, yie, xpe, ype); - + + if(!nuagePoints_) + trLigne.dessineTrait(_g, xie, yie, xpe, ype); + else{ + //-- trace un + --// + //-- ligne | --// + trLigne.dessineTrait(_g, xie, yie-largeurPointsNuage_/2, xie, yie+largeurPointsNuage_/2); + //--ligne - --// + trLigne.dessineTrait(_g, xie-largeurPointsNuage_/2, yie, xie+largeurPointsNuage_/2, yie); + //dessineRectangle(_g, xie-largeurPointsNuage_/2, yie-largeurPointsNuage_/2, largeurPointsNuage_, largeurPointsNuage_); + } } xpVisible = xiVisible; xpe = xie; @@ -445,7 +463,15 @@ traceTitle(_g, _t, rangeDisplayed); } - public void enDernier() { + public boolean isNuagePoints_() { + return nuagePoints_; +} + +public void setNuagePoints_(boolean nuagePoints_) { + this.nuagePoints_ = nuagePoints_; +} + +public void enDernier() { getEGParent().enDernier(this); } Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/courbe/EGCourbePersist.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/courbe/EGCourbePersist.java 2008-12-12 17:04:43 UTC (rev 4298) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/courbe/EGCourbePersist.java 2008-12-12 18:12:39 UTC (rev 4299) @@ -12,6 +12,7 @@ String title_; int Idgroup; + boolean nuagePoints=false; ///-- les min et max sont purement informatifs --// double Xmin; double Xmax; @@ -33,6 +34,7 @@ private void fillInfoWith(EGCourbeChild courbe,int idgroupe){ this.Idgroup=idgroupe; title_=courbe.getTitle(); + this.nuagePoints=courbe.isNuagePoints_(); Xmin = courbe.getModel().getXMin(); Xmax = courbe.getModel().getXMax(); Ymin = courbe.getModel().getYMin(); @@ -74,6 +76,7 @@ if(tLigneMarqueur_!=null) courbe.setLigneMark(tLigneMarqueur_); + courbe.setNuagePoints_(this.nuagePoints); return courbe; } Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/courbe/EGSpecificActions.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/courbe/EGSpecificActions.java 2008-12-12 17:04:43 UTC (rev 4298) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/courbe/EGSpecificActions.java 2008-12-12 18:12:39 UTC (rev 4299) @@ -116,6 +116,16 @@ menu_.addMenuItem(EbliResource.EBLI.getString("Copier la courbe pour un autre jeu de donn\xE9es"), getCopieSrc(), EbliResource.EBLI.getIcon("crystal_copier"), true, this); + if(nbSelected==1){ + EGCourbe courbe=m.getSelectedComponent(); + if(!courbe.nuagePoints_) + menu_.addMenuItem(EbliResource.EBLI.getString("Nuage de points"), "NUAGE_POINTS", EbliResource.EBLI.getIcon("curves") + , true, this); + else + menu_.addMenuItem(EbliResource.EBLI.getString("Courbe classique"), "NUAGE_POINTS", BuResource.BU + .getIcon("crystal_oscilloscope"), true, this); + } + } @@ -151,6 +161,10 @@ if (n == 1) { target_.getModel().duplicateCourbe(cmd_, target_.getSelectedComponent()); } + }else if("NUAGE_POINTS".equals(com)){ + //-- on permutte entre nuage de points et classique --// + target_.getSelectedComponent().nuagePoints_=!target_.getSelectedComponent().nuagePoints_; + target_.getModel().fireCourbeAspectChanged(null, false); } else if ("COPIESRC".equals(com)) { target_.getModel().duplicateCourbeForSrc(cmd_, target_.getSelectedComponent()); Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/palette/PaletteSelecteurCouleurPlage.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/palette/PaletteSelecteurCouleurPlage.java 2008-12-12 17:04:43 UTC (rev 4298) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/palette/PaletteSelecteurCouleurPlage.java 2008-12-12 18:12:39 UTC (rev 4299) @@ -137,9 +137,12 @@ final int oldSize = plages_.size(); plages_.clear(); fireAllSupr(oldSize); - for (int i = 0; i < nb; i++) { - plages_.add(_pal.getPlageInterface(i).copy()); - } +// for (int i = 0; i < nb; i++) { +// plages_.add(_pal.getPlageInterface(i).copy()); +// } + for (int i = nb-1; i >= 0; i--) { + plages_.add(_pal.getPlageInterface(i).copy()); + } fireAdd(0, nb - 1); isAdjusting_ = false; list_.setSelectedIndex(0); Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidget.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidget.java 2008-12-12 17:04:43 UTC (rev 4298) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidget.java 2008-12-12 18:12:39 UTC (rev 4299) @@ -48,6 +48,8 @@ public final static String ROTATION = "rotation"; + public final static String TRANSPARENCE = "Transpa"; + protected EbliWidgetController controller_; /** * L'identifiant unique du widget @@ -92,6 +94,10 @@ // -- ajout de l angle de rotation par default PI --// propGraphique.put(ROTATION, Math.PI); + + //-- ajout de la trnaparence a false --// + propGraphique.put( EbliWidget.TRANSPARENCE,false); + } /** @@ -112,8 +118,19 @@ } - public boolean canColorBackground() { - return true; + + + + public boolean getTransparent() { + return (Boolean) propGraphique.get(TRANSPARENCE); +} + +public void setTransparent(boolean transparent) { + propGraphique.put(TRANSPARENCE, new Boolean(transparent)); +} + +public boolean canColorBackground() { + return true && !getTransparent(); } public boolean canColorForeground() { @@ -185,6 +202,7 @@ mapDupliquee.put(COLORFOND, getColorFond()); mapDupliquee.put(ROTATION, getRotation()); mapDupliquee.put(FONT, getFormeFont()); + mapDupliquee.put(TRANSPARENCE, getTransparent()); return mapDupliquee; } Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetBordureSingle.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetBordureSingle.java 2008-12-12 17:04:43 UTC (rev 4298) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetBordureSingle.java 2008-12-12 18:12:39 UTC (rev 4299) @@ -120,7 +120,7 @@ final TraceLigne l = new TraceLigne(getTraceLigneModel()); // // --test on autorise que si son widget fils le permet --// - if (this.getIntern().canColorBackground()) { + if (this.getIntern().canColorBackground() && !this.getTransparent()) { getGraphics().setColor(getColorFond()); getGraphics().fillRect(0, 0, (int) (rec.width - l.getEpaisseur()), (int) (rec.height - l.getEpaisseur())); } @@ -205,7 +205,7 @@ @Override protected void setPropertyCmd(final String _key, final Object _prop, final CtuluCommandContainer _cmd) { - if (_key.equals(LINEMODEL) || _key.equals(COLORCONTOUR) || _key.equals(COLORFOND)) { + if (_key.equals(LINEMODEL) || _key.equals(COLORCONTOUR) || _key.equals(COLORFOND) ||_key.equals(TRANSPARENCE)) { super.setPropertyCmd(_key, _prop, _cmd); } else { intern_.setPropertyCmd(_key, _prop, _cmd); @@ -226,6 +226,7 @@ mapMeltingPot.put(ROTATION, intern_.getRotation()); mapMeltingPot.put(FONT, intern_.getFormeFont()); mapMeltingPot.put(COLORFOND, intern_.getColorFond()); + mapMeltingPot.put(TRANSPARENCE, intern_.getTransparent()); return mapMeltingPot; } Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetTextEditor.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetTextEditor.java 2008-12-12 17:04:43 UTC (rev 4298) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetTextEditor.java 2008-12-12 18:12:39 UTC (rev 4299) @@ -50,9 +50,16 @@ final EbliWidgetControllerTextEditor controller = new EbliWidgetControllerTextEditor(this); controller.setEditable(true); setController(controller); + } - public boolean canRotate() { +// @Override +//public boolean canColorBackground() { +// // TODO Auto-generated method stub +// return false; +//} + +public boolean canRotate() { return false; } Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/actions/WidgetConfigure.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/actions/WidgetConfigure.java 2008-12-12 17:04:43 UTC (rev 4298) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/actions/WidgetConfigure.java 2008-12-12 18:12:39 UTC (rev 4299) @@ -11,6 +11,7 @@ import org.fudaa.ebli.commun.EbliLib; import org.fudaa.ebli.controle.BConfigurableComposite; import org.fudaa.ebli.controle.BConfigurableInterface; +import org.fudaa.ebli.controle.BSelecteurCheckBox; import org.fudaa.ebli.controle.BSelecteurColorChooserBt; import org.fudaa.ebli.controle.BSelecteurFont; import org.fudaa.ebli.controle.BSelecteurInterface; @@ -130,6 +131,12 @@ listeComposants.add(modelF); } + + + BSelecteurCheckBox selectionTransparence=new BSelecteurCheckBox(EbliWidget.TRANSPARENCE, "Transparence"); + + listeComposants.add(selectionTransparence); + final BSelecteurInterface[] tableau = new BSelecteurInterface[listeComposants.size()]; return listeComposants.toArray(tableau); } Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/calque/CalqueLegendeWidgetAdapter.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/calque/CalqueLegendeWidgetAdapter.java 2008-12-12 17:04:43 UTC (rev 4298) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/calque/CalqueLegendeWidgetAdapter.java 2008-12-12 18:12:39 UTC (rev 4299) @@ -98,7 +98,7 @@ final Widget ws = new Widget(_scene); ws.setLayout(new FlowLayout(true, SerialAlignment.LEFT_TOP, 5)); if (listeplages.getNbPlages() != 0) { - for (int j = 0; j < listeplages.getNbPlages(); j++) { + for (int j = listeplages.getNbPlages()-1; j >=0 ; j--) { final BPlageInterface plage = listeplages.getPlageInterface(j); Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/graphe/WidgetLegendeManager.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/graphe/WidgetLegendeManager.java 2008-12-12 17:04:43 UTC (rev 4298) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/graphe/WidgetLegendeManager.java 2008-12-12 18:12:39 UTC (rev 4299) @@ -86,16 +86,16 @@ return newBounds; } - - + + boolean suppressionOccured=false; - + public void majSuppression(){ suppressionOccured=true; repaint(); } - + @Override protected void paintWidget() { @@ -213,84 +213,89 @@ // le gap // res.setLayout(new OverlayLayout()); for (int i = 0; i < cs.length; i++) { - final EbliWidget line = new EbliWidget(scene); - line.setLayout(new FlowLayout(false, SerialAlignment.CENTER, 5)); - // creation de la widget titre - final EbliWidgetTitle tw = new EbliWidgetTitle(scene, cs[i], null); + if(cs[i].getTitle().equals("X")||cs[i].getTitle().equals("Y")){ + //-- on n'affiche pas les l\xE9gendes X et Y + }else{ + final EbliWidget line = new EbliWidget(scene); + line.setLayout(new FlowLayout(false, SerialAlignment.CENTER, 5)); - // creation de la widget ligne - final EbliWidgetLine lw = new EbliWidgetLine(scene, cs[i], null); - line.setUseBorder(false); - lw.setUseBorder(false); - tw.setUseBorder(false); + // creation de la widget titre + final EbliWidgetTitle tw = new EbliWidgetTitle(scene, cs[i], null); - lw.setEnabled(false); - line.addChild(lw); - line.addChild(tw); - res.addChild(line); + // creation de la widget ligne + final EbliWidgetLine lw = new EbliWidgetLine(scene, cs[i], null); + line.setUseBorder(false); + lw.setUseBorder(false); + tw.setUseBorder(false); - // -- ajouter le listener EGGraphe pour ecouter et \xE9ettre a jour els - // l\xE9gendes --// - g.getModel().addModelListener(new EGGrapheModelListener() { + lw.setEnabled(false); + line.addChild(lw); + line.addChild(tw); + res.addChild(line); - public void structureChanged() { - if(g.getModel().contains(lw.cb_)){ - line.repaint(); - tw.majLabel(); - }else{ - //-- il faut supprimer --// - res.removeChild(line); - res.majSuppression(); + // -- ajouter le listener EGGraphe pour ecouter et \xE9ettre a jour els + // l\xE9gendes --// + g.getModel().addModelListener(new EGGrapheModelListener() { + + public void structureChanged() { + if(g.getModel().contains(lw.cb_)){ + line.repaint(); + tw.majLabel(); + }else{ + //-- il faut supprimer --// + res.removeChild(line); + res.majSuppression(); + } + } - } + public void courbeContentChanged(final EGObject _c, final boolean restore) { + if(g.getModel().contains(lw.cb_)){ + line.repaint(); + tw.majLabel(); + }else{ + //-- il faut supprimer --// + res.removeChild(line); + res.majSuppression(); + } + } - public void courbeContentChanged(final EGObject _c, final boolean restore) { - if(g.getModel().contains(lw.cb_)){ - line.repaint(); - tw.majLabel(); - }else{ - //-- il faut supprimer --// - res.removeChild(line); - res.majSuppression(); + public void courbeAspectChanged(final EGObject _c, final boolean _visibil) { + if(g.getModel().contains(lw.cb_)){ + line.repaint(); + tw.majLabel(); + }else{ + //-- il faut supprimer --// + res.removeChild(line); + res.majSuppression(); + } } - } - public void courbeAspectChanged(final EGObject _c, final boolean _visibil) { - if(g.getModel().contains(lw.cb_)){ - line.repaint(); - tw.majLabel(); - }else{ - //-- il faut supprimer --// - res.removeChild(line); - res.majSuppression(); + public void axeContentChanged(final EGAxe _c) { + if(g.getModel().contains(lw.cb_)){ + line.repaint(); + tw.majLabel(); + }else{ + //-- il faut supprimer --// + res.removeChild(line); + res.majSuppression(); + } } - } - public void axeContentChanged(final EGAxe _c) { - if(g.getModel().contains(lw.cb_)){ - line.repaint(); - tw.majLabel(); - }else{ - //-- il faut supprimer --// - res.removeChild(line); - res.majSuppression(); + public void axeAspectChanged(final EGAxe _c) { + if(g.getModel().contains(lw.cb_)){ + line.repaint(); + tw.majLabel(); + }else{ + //-- il faut supprimer --// + res.removeChild(line); + res.majSuppression(); + } } - } + }); - public void axeAspectChanged(final EGAxe _c) { - if(g.getModel().contains(lw.cb_)){ - line.repaint(); - tw.majLabel(); - }else{ - //-- il faut supprimer --// - res.removeChild(line); - res.majSuppression(); - } - } - }); - + } } res.setController(new EbliWidgetControllerMenuOnly(res, false)); Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/persist/EbliWidgetSerializeXml.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/persist/EbliWidgetSerializeXml.java 2008-12-12 17:04:43 UTC (rev 4298) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/persist/EbliWidgetSerializeXml.java 2008-12-12 18:12:39 UTC (rev 4299) @@ -57,7 +57,7 @@ Color colorModel; Font font; double rotation; - + boolean transparent=false; /** * Donn\xE9es du traceligneModel */ @@ -115,7 +115,7 @@ this.typeTrait = widget.getParentBordure().getTraceLigneModel().getTypeTrait(); this.colorModel = widget.getParentBordure().getTraceLigneModel().getCouleur(); } - + this.transparent=widget.getParentBordure().getTransparent(); // --cas particulier, si widget non visible les dimension bonnes sont celles du parent preferredbounds--// if (!widget.getParentBordure().isVisible()) { if (widget.getParentBordure().getPreferredBounds() != null) { @@ -180,6 +180,7 @@ newNode.getWidget().setFormeFont(font); newNode.getWidget().setColorContour(foreground); newNode.getWidget().setRotation(rotation); + newNode.getWidget().setTransparent(transparent); final TraceLigneModel model = new TraceLigneModel(typeTrait, epaisseurTrait, colorModel); newNode.getWidget().setTraceLigneModel(model); newNode.getWidget().getParentBordure().setVisible(isVisible); @@ -356,4 +357,12 @@ IdGroup = idGroup; } +public boolean isTransparent() { + return transparent; } + +public void setTransparent(boolean transparent) { + this.transparent = transparent; +} + +} Modified: branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/commun/courbe/FudaaCourbeImporterScope.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/commun/courbe/FudaaCourbeImporterScope.java 2008-12-12 17:04:43 UTC (rev 4298) +++ branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/commun/courbe/FudaaCourbeImporterScope.java 2008-12-12 18:12:39 UTC (rev 4299) @@ -33,14 +33,20 @@ */ - public static void createGraphe(FudaaCourbeImporter.Target target,ScopeStructure _data, CtuluCommandManager _mng,ProgressionInterface _prog){ + public static void createGraphe(FudaaCourbeImporter.Target target,ScopeStructure _data, CtuluCommandManager _mng,ProgressionInterface _prog,boolean nuagePoints){ - createGraphe(target,_data.returnEvolReguliere(), _mng, _prog); + createGraphe(target,_data.returnEvolReguliere(), _mng, _prog,nuagePoints); } - public static void createGraphe(FudaaCourbeImporter.Target target,EvolutionReguliere[] _data, CtuluCommandManager _mng,ProgressionInterface _prog){ + public static void createGraphe(FudaaCourbeImporter.Target target,EvolutionReguliere[] _data, CtuluCommandManager _mng,ProgressionInterface _prog,boolean nuagePoints){ + //-- on indique si il faut prendre en compte comme \xE9tant un nuage de points --// + if(nuagePoints){ + for(int i=0;i<_data.length;i++){ + _data[i].setNuagePoints_(nuagePoints); + } + } target.importCourbes(_data, _mng, _prog); } Modified: branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/commun/courbe/FudaaCourbeWizardImportScope.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/commun/courbe/FudaaCourbeWizardImportScope.java 2008-12-12 17:04:43 UTC (rev 4298) +++ branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/commun/courbe/FudaaCourbeWizardImportScope.java 2008-12-12 18:12:39 UTC (rev 4299) @@ -13,6 +13,7 @@ import javax.swing.AbstractAction; import javax.swing.BorderFactory; import javax.swing.DefaultListModel; +import javax.swing.JCheckBox; import javax.swing.JComboBox; import javax.swing.JComponent; import javax.swing.JLabel; @@ -39,6 +40,7 @@ import org.fudaa.dodico.telemac.io.ScopeTFileFormat; import org.fudaa.ebli.commun.EbliActionSimple; import org.fudaa.ebli.courbe.EGGraphe; +import org.fudaa.ebli.ressource.EbliResource; import org.fudaa.fudaa.commun.FudaaLib; import org.fudaa.fudaa.commun.impl.FudaaCommonImplementation; import org.fudaa.fudaa.commun.impl.FudaaGuiLib; @@ -77,7 +79,7 @@ */ int typeFormat_; File fileChoosen_=null; - ScopeStructure data_; + protected ScopeStructure data_; EGGraphe result_; //choix du fichier @@ -401,6 +403,8 @@ } + + JCheckBox choixNuagePoints_; /** * Creation du panel scopGene pour choisir ses parametres * @return @@ -549,8 +553,10 @@ //-- panel reserv\xE9s au corr\xE9lations --// + JPanel panelCorrelation=new JPanel(new BorderLayout()); JPanel paramCorrel=new JPanel(new GridLayout(2,2)); - container.add(paramCorrel, TrResource.getS("Corr\xE9lation")); + panelCorrelation.add(paramCorrel,BorderLayout.CENTER); + container.add(panelCorrelation, TrResource.getS("Corr\xE9lation")); listeVar=new String[dataG().getNbVariables()-1]; for(int i=1;i<dataG().getNbVariables();i++) @@ -585,6 +591,9 @@ pane.setBorder(BorderFactory.createTitledBorder(TrResource.getS("Plage associ\xE9e \xE0 la variable Y"))); paramCorrel.add(pane); + choixNuagePoints_=new JCheckBox(EbliResource.EBLI.getString("Nuage de points")); + panelCorrelation.add(choixNuagePoints_,BorderLayout.SOUTH); + return content2; } @@ -654,7 +663,7 @@ dataST().restreindreStructure(listVariablesST_.getSelectedIndices(),Double.parseDouble(plageDeb_.getText()),Double.parseDouble(plageFin_.getText())); impl_.setMainProgression(30); impl_.setMainMessage(CtuluLib.getS("Cr\xE9ation du graphe")); - FudaaCourbeImporterScope.createGraphe(target_, data_, null, prog); + FudaaCourbeImporterScope.createGraphe(target_, data_, null, prog,false); } else{ //-- format scopeGen, selon le type de format g\xE9n\xE9r\xE9--// @@ -666,7 +675,7 @@ impl_.setMainProgression(30); impl_.setMainMessage(CtuluLib.getS("Cr\xE9ation du graphe")); - FudaaCourbeImporterScope.createGraphe(target_, tabEvol, null, prog); + FudaaCourbeImporterScope.createGraphe(target_, tabEvol, null, prog,false); }else if(comBoChoixTypeGraphe_.getSelectedIndex()==1){ //evol temporelle @@ -679,7 +688,7 @@ impl_.setMainProgression(30); impl_.setMainMessage(CtuluLib.getS("Cr\xE9ation du graphe")); //on cree les evol reguliere SPECIFIQUES pour ces courbes. - FudaaCourbeImporterScope.createGraphe(target_, dataG().returnEvolRegulierePourTemporelles(), null, prog); + FudaaCourbeImporterScope.createGraphe(target_, dataG().returnEvolRegulierePourTemporelles(), null, prog,false); }else{ //correlation @@ -692,7 +701,10 @@ int plageX=listSeparatorCorrel1_.getSelectedIndex(); int plageY=listSeparatorCorrel2_.getSelectedIndex(); - FudaaCourbeImporterScope.createGraphe(target_, dataG().returnEvolReguliereCorrelation(varX,varY,plageX,plageY), null, prog); + //-- recuperation du choix nuage de points ou non + boolean nuagePoints=choixNuagePoints_.isSelected(); + + FudaaCourbeImporterScope.createGraphe(target_, dataG().returnEvolReguliereCorrelation(varX,varY,plageX,plageY), null, prog,nuagePoints); } Modified: branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/profile/MvProfileTreeModel.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/profile/MvProfileTreeModel.java 2008-12-12 17:04:43 UTC (rev 4298) +++ branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/profile/MvProfileTreeModel.java 2008-12-12 18:12:39 UTC (rev 4299) @@ -656,6 +656,10 @@ final List<EGCourbeChild> childs = new ArrayList<EGCourbeChild>(_crb.length); for (int i = 0; i < _crb.length; i++) { final EGCourbeChild child = new EGCourbeChild(gr, new FudaaCourbeModel(new EvolutionReguliere(_crb[i]))); + + //-- on met a jour si la courbe est un nuage de points ou non --// + child.setNuagePoints_(_crb[i].isNuagePoints()); + childs.add(child); gr.addEGComponent(child); } Modified: branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/common/TrCourbeTemporelleManager.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/common/TrCourbeTemporelleManager.java 2008-12-12 17:04:43 UTC (rev 4298) +++ branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/common/TrCourbeTemporelleManager.java 2008-12-12 18:12:39 UTC (rev 4299) @@ -141,6 +141,10 @@ final EGCourbeChild courbe = new EGCourbeChild(_g, new FudaaCourbeModel(_e)); // courbe.setTitre(_e.getNom()); courbe.setAspectContour(BPalettePlageDefault.getColor(_idx)); + + //-- on met a jour si la courbe est un nuage de points ou non --// + courbe.setNuagePoints_(_e.isNuagePoints()); + if (_g == null) { groupNull_.addEGComponent(courbe); } else { Modified: branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/common/TrEvolutionManager.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/common/TrEvolutionManager.java 2008-12-12 17:04:43 UTC (rev 4298) +++ branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/common/TrEvolutionManager.java 2008-12-12 18:12:39 UTC (rev 4299) @@ -97,6 +97,11 @@ final FudaaCourbeModel m = new FudaaCourbeModel(_e); testEvolutionAdded(_e); final EGCourbeSimple c = new EGCourbeSimple(_v, m); + + //-- on met a jour si la courbe est un nuage de points ou non --// + c.setNuagePoints_(_e.isNuagePoints()); + + // c.setTitre(m.e_.getNom()); c.setAspectContour(BPalettePlageDefault.getColor(getNbEGObject())); return c; Modified: branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostCourbeTreeModel.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostCourbeTreeModel.java 2008-12-12 17:04:43 UTC (rev 4298) +++ branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostCourbeTreeModel.java 2008-12-12 18:12:39 UTC (rev 4299) @@ -657,6 +657,10 @@ for (int i = 0; i < _crb.length; i++) { final EGCourbeChild child = new EGCourbeChild(gr, new FudaaCourbeModel(new EvolutionReguliere(_crb[i]))); childs.add(child); + + //-- on met a jour si la courbe est un nuage de points ou non --// + child.setNuagePoints_(_crb[i].isNuagePoints()); + gr.addEGComponent(child); } Modified: branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostProjet.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostProjet.java 2008-12-12 17:04:43 UTC (rev 4298) +++ branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostProjet.java 2008-12-12 18:12:39 UTC (rev 4299) @@ -909,7 +909,10 @@ public void addGrapheNodeInCurrentScene(final EGFillePanel _pn, final String _desc) { final EbliNodeDefault nodeG = new EbliNodeDefault(); nodeG.setCreator(new EbliWidgetCreatorGraphe(_pn)); + if(_desc==null) nodeG.setTitle("Graphe " + idxFilleG_++); + else + nodeG.setTitle("Graphe " + (idxFilleG_++)+":"+_desc); nodeG.setPreferedSize(new Dimension(600, 400)); nodeG.setPreferedLocation(new Point(20, 20)); Modified: branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostVisuPanel.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostVisuPanel.java 2008-12-12 17:04:43 UTC (rev 4298) +++ branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostVisuPanel.java 2008-12-12 18:12:39 UTC (rev 4299) @@ -326,6 +326,9 @@ // -- chargement de l etat dans le calque duplique --// duplic.getDonneesCalque().getPersistenceMng().restore(savedData, duplic, duplic.getDonneesCalque(), null); + //-- creation des actions specifiques au calque --// + duplic.getController().buildActions(); + return duplic; } Modified: branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostVisuPanelPersistManager.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostVisuPanelPersistManager.java 2008-12-12 17:04:43 UTC (rev 4298) +++ branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostVisuPanelPersistManager.java 2008-12-12 18:12:39 UTC (rev 4299) @@ -124,6 +124,9 @@ // if(zoom_!=null) // newPanel.getVueCalque().changeRepere(newPanel, zoom_); + //-- creation des actions specifiques au calque --// + newPanel.getController().buildActions(); + return newPanel; } Modified: branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/dialogSpec/TrPostWizardCreateScope.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/dialogSpec/TrPostWizardCreateScope.java 2008-12-12 17:04:43 UTC (rev 4298) +++ branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/dialogSpec/TrPostWizardCreateScope.java 2008-12-12 18:12:39 UTC (rev 4299) @@ -45,7 +45,7 @@ final TrPostWizardCreateScope wizard = new TrPostWizardCreateScope(projet_, model); final BuWizardDialog DialogWizard = new BuWizardDialog(ui_.getFrame(), wizard); // --affichage du wizard --// - DialogWizard.setSize(600, 500); + DialogWizard.setSize(600, 600); DialogWizard.setLocationRelativeTo(ui_.getFrame()); DialogWizard.setVisible(true); } @@ -62,7 +62,7 @@ @Override public void createGraphImported() { final EGGraphe graphe = new EGGraphe(modelTarget_); - projet_.addGrapheNodeInCurrentScene(new EGFillePanel(graphe), "Graphe import\xE9 (format scope)"); + projet_.addGrapheNodeInCurrentScene(new EGFillePanel(graphe), data_.getTitleFormFile()); } } Modified: branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/dialogSpec/TrPostWizardImportScope.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/dialogSpec/TrPostWizardImportScope.java 2008-12-12 17:04:43 UTC (rev 4298) +++ branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/dialogSpec/TrPostWizardImportScope.java 2008-12-12 18:12:39 UTC (rev 4299) @@ -38,7 +38,7 @@ final TrPostWizardImportScope wizard = new TrPostWizardImportScope(projet_, target_); final BuWizardDialog DialogWizard = new BuWizardDialog(ui_.getFrame(), wizard); // --affichage du wizard --// - DialogWizard.setSize(600, 500); + DialogWizard.setSize(600, 600); DialogWizard.setLocationRelativeTo(ui_.getFrame()); DialogWizard.setVisible(true); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <de...@us...> - 2008-12-14 20:44:10
|
Revision: 4300 http://fudaa.svn.sourceforge.net/fudaa/?rev=4300&view=rev Author: deniger Date: 2008-12-14 20:44:06 +0000 (Sun, 14 Dec 2008) Log Message: ----------- maquetee v7 Modified Paths: -------------- branches/Prepro-0.92-SNAPSHOT/ctulu/src/org/fudaa/ctulu/CtuluLibString.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/courbe/EGCourbe.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/courbe/EGCourbeConfigureTarget.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliScene.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/graphe/EbliWidgetGraphe.java Modified: branches/Prepro-0.92-SNAPSHOT/ctulu/src/org/fudaa/ctulu/CtuluLibString.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ctulu/src/org/fudaa/ctulu/CtuluLibString.java 2008-12-12 18:12:39 UTC (rev 4299) +++ branches/Prepro-0.92-SNAPSHOT/ctulu/src/org/fudaa/ctulu/CtuluLibString.java 2008-12-14 20:44:06 UTC (rev 4300) @@ -55,9 +55,7 @@ public final static String EMPTY_STRING = ""; public static boolean containsVirgule(final String _num) { - if (isEmpty(_num)) { - return false; - } + if (isEmpty(_num)) { return false; } final String s = _num.trim(); try { Double.parseDouble(s); @@ -76,15 +74,11 @@ * @return true si la chaine est vide ou null ou si elle ne contient que des espaces */ public static boolean isEmpty(final String _s) { - if (_s == null || _s == EMPTY_STRING) { - return true; - } + if (_s == null || _s == EMPTY_STRING) { return true; } final int nb = _s.length(); for (int i = nb - 1; i >= 0; i--) { - if (!Character.isWhitespace(_s.charAt(i))) { - return false; - } + if (!Character.isWhitespace(_s.charAt(i))) { return false; } } return true; @@ -105,17 +99,13 @@ * @return true si c'est un nombre */ public static boolean isNumeric(final String _s) { - if (isEmpty(_s)) { - return false; - } + if (isEmpty(_s)) { return false; } final String s = _s.trim(); try { Double.parseDouble(s); return true; } catch (final NumberFormatException e) { - if (s.indexOf(',') > 0) { - return isNumeric(FuLib.replace(s, CtuluLibString.VIR, CtuluLibString.DOT)); - } + if (s.indexOf(',') > 0) { return isNumeric(FuLib.replace(s, CtuluLibString.VIR, CtuluLibString.DOT)); } return false; } } @@ -208,9 +198,7 @@ public static String adjustSize(final int _taille, final String _s, boolean _addSpaceBefore) { final String s = _s == null ? EMPTY_STRING : _s; final int l = s.length(); - if (l > _taille) { - return s.substring(0, _taille); - } + if (l > _taille) { return s.substring(0, _taille); } final StringBuffer r = new StringBuffer(_taille); if (!_addSpaceBefore) { r.append(s); @@ -260,9 +248,7 @@ public static String adjustSize(final int _taille, final String _s, boolean _addSpaceBefore, final char _charToUse) { final String s = _s == null ? EMPTY_STRING : _s; final int l = s.length(); - if (l > _taille) { - return s.substring(0, _taille); - } + if (l > _taille) { return s.substring(0, _taille); } final StringBuffer r = new StringBuffer(_taille); if (!_addSpaceBefore) { r.append(s); @@ -327,12 +313,8 @@ } public static String arrayToString(final double[] _o, final String _sep) { - if (_o == null) { - return getNullString(); - } - if (_o.length == 0) { - return getEmptyTableau(); - } + if (_o == null) { return getNullString(); } + if (_o.length == 0) { return getEmptyTableau(); } final StringBuffer r = new StringBuffer(); r.append(_o[0]); for (int i = 1; i < _o.length; i++) { @@ -346,12 +328,8 @@ * @return une chaine contenant tous les entiers separees par des virgules */ public static String arrayToString(final long[] _o) { - if (_o == null) { - return getNullString(); - } - if (_o.length == 0) { - return getEmptyTableau(); - } + if (_o == null) { return getNullString(); } + if (_o.length == 0) { return getEmptyTableau(); } final StringBuffer r = new StringBuffer(); r.append(_o[0]); for (int i = 1; i < _o.length; i++) { @@ -361,12 +339,8 @@ } public static String arrayToString(final float[] _o) { - if (_o == null) { - return getNullString(); - } - if (_o.length == 0) { - return getEmptyTableau(); - } + if (_o == null) { return getNullString(); } + if (_o.length == 0) { return getEmptyTableau(); } final StringBuffer r = new StringBuffer(); r.append(_o[0]); for (int i = 1; i < _o.length; i++) { @@ -380,12 +354,8 @@ * @return une chaine contenant tous les entiers separees par des virgules */ public static String arrayToString(final int[] _array) { - if (_array == null) { - return getNullString(); - } - if (_array.length == 0) { - return getEmptyTableau(); - } + if (_array == null) { return getNullString(); } + if (_array.length == 0) { return getEmptyTableau(); } final StringBuffer r = new StringBuffer(); r.append(_array[0]); for (int i = 1; i < _array.length; i++) { @@ -400,12 +370,8 @@ * virgules. */ public static String arrayToString(final Object[] _o) { - if (_o == null) { - return getNullString(); - } - if (_o.length == 0) { - return getEmptyTableau(); - } + if (_o == null) { return getNullString(); } + if (_o.length == 0) { return getEmptyTableau(); } final StringBuffer r = new StringBuffer(); r.append(_o[0].toString()); for (int i = 1; i < _o.length; i++) { @@ -415,9 +381,7 @@ } public static String arrayToHtmlString(final Object[] _o) { - if ((_o == null) || (_o.length == 1)) { - return EMPTY_STRING; - } + if ((_o == null) || (_o.length == 1)) { return EMPTY_STRING; } final StringBuffer r = new StringBuffer("<html><body>"); r.append(_o[0].toString()); for (int i = 1; i < _o.length; i++) { @@ -443,9 +407,7 @@ * @return la chaine */ public static String arrayToString(final String[] _tab, final String _sep) { - if (_tab == null) { - return CtuluLibString.EMPTY_STRING; - } + if (_tab == null) { return CtuluLibString.EMPTY_STRING; } final int n = _tab.length; if (n > 0) { final StringBuffer obj = new StringBuffer(); @@ -466,9 +428,7 @@ * @return la chaine avec la premier lettre en majuscule. */ public static String capitalyze(final String _s) { - if (isEmpty(_s)) { - return _s; - } + if (isEmpty(_s)) { return _s; } final String prem = _s.substring(0, 1); return prem.toUpperCase() + _s.substring(1); } @@ -478,9 +438,7 @@ * @return le tableau de string correspondant. Renvoie null si la taille est null ou si _v null. */ public static String[] enTableau(final Collection _v) { - if ((_v == null) || (_v.size() == 0)) { - return null; - } + if ((_v == null) || (_v.size() == 0)) { return null; } final String[] r = new String[_v.size()]; _v.toArray(r); return r; @@ -497,9 +455,7 @@ public static String findPrefixInTab(final String[] _tabToTest, final String _prefixe) { for (int i = _tabToTest.length - 1; i >= 0; i--) { final String s = _tabToTest[i]; - if (_prefixe.startsWith(s)) { - return s; - } + if (_prefixe.startsWith(s)) { return s; } } return null; } @@ -515,9 +471,7 @@ if (_tab != null) { for (int i = _tab.length - 1; i >= 0; i--) { final String s = _tab[i]; - if (s.endsWith(_end)) { - return s; - } + if (s.endsWith(_end)) { return s; } } } return null; @@ -533,9 +487,7 @@ public static String findStringIn(final String[] _stringToLookFor, final String _sToTest) { for (int i = _stringToLookFor.length - 1; i >= 0; i--) { final String s = _stringToLookFor[i]; - if (_sToTest.indexOf(s) >= 0) { - return s; - } + if (_sToTest.indexOf(s) >= 0) { return s; } } return null; } @@ -548,9 +500,7 @@ public static String findStringStartsWith(final String[] _tab, final String _start) { for (int i = _tab.length - 1; i >= 0; i--) { final String s = _tab[i]; - if (s.startsWith(_start)) { - return s; - } + if (s.startsWith(_start)) { return s; } } return null; } @@ -586,9 +536,7 @@ * @return descriprion */ public static String getObjectInString(final Object _o, final boolean _verbose) { - if (_o == null) { - return "null"; - } + if (_o == null) { return "null"; } final StringBuffer b = new StringBuffer(); if (_o.getClass().isArray()) { final int n = Array.getLength(_o); @@ -661,9 +609,7 @@ * @return table cle,valeur ( voir doc) */ public static synchronized Map parseArgs(final String[] _args) { - if (_args == null) { - return null; - } + if (_args == null) { return null; } final int l = _args.length; final Map r = new HashMap(l); int index; @@ -689,21 +635,17 @@ * @return le tableau des champs ou null si un des 2 parametres est nul. */ public static String[] parseString(final String _s, final String _sepChar) { - if ((_s == null) || (_sepChar == null)) { - return null; - } + if ((_s == null) || (_sepChar == null)) { return null; } return enTableau(parseStringList(_s, _sepChar)); } public static double[] parseStringDouble(final String _s, final String _sepChar) { - if ((_s == null) || (_sepChar == null)) { - return null; - } + if ((_s == null) || (_sepChar == null)) { return null; } final List l = (parseStringList(_s, _sepChar)); final TDoubleArrayList res = new TDoubleArrayList(); for (int i = 0; i < l.size(); i++) { try { - res.add(Double.parseDouble((String) l.get(i))); + res.add(CtuluDoubleParser.parseValue((String) l.get(i))); } catch (final NumberFormatException _evt) { FuLog.error(_evt); @@ -721,9 +663,7 @@ * @return le tableau des champs ou null si un des 2 parametres est nul. */ public static List parseStringList(final String _s, final String _sepChar) { - if ((_s == null) || (_sepChar == null)) { - return null; - } + if ((_s == null) || (_sepChar == null)) { return null; } final StringTokenizer tk = new StringTokenizer(_s, _sepChar); final List l = new ArrayList(); while (tk.hasMoreTokens()) { Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/courbe/EGCourbe.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/courbe/EGCourbe.java 2008-12-12 18:12:39 UTC (rev 4299) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/courbe/EGCourbe.java 2008-12-14 20:44:06 UTC (rev 4300) @@ -138,31 +138,32 @@ if (isMarkMaxLine() || isMarkMinLine()) { r = EGCourbeModelDefault.getLocalMinMax(_t.getXAxe(), getModel()); } - if (r != null && isMarkMinLine() && getAxeY().containsPoint(r.min_)) { + EGAxeVertical axeY = getAxeY(); + if (r != null && isMarkMinLine() && axeY.containsPoint(r.min_)) { trMarqueur = getLineMarkeur(); - final int yie = _t.getYEcran(r.min_, getAxeY()); + final int yie = _t.getYEcran(r.min_, axeY); trMarqueur.dessineTrait(_g, xmin, yie, xmax, yie); initTraceBox(); tbox_.setColorBoite(tLigneMarqueur_.getCouleur()); int x = xmin + 3; - final String str = getAxeY().getStringAffiche(r.min_); - if (getAxeY().isDroite()) { + final String str = axeY.getStringAffiche(r.min_); + if (axeY.isDroite()) { x = xmax - 6 - _g.getFontMetrics().stringWidth(str); } tbox_.paintBox(_g, x, yie, str); } - if (r != null && isMarkMaxLine() && getAxeY().containsPoint(r.max_)) { + if (r != null && isMarkMaxLine() && axeY.containsPoint(r.max_)) { if (trMarqueur == null) { trMarqueur = getLineMarkeur(); } - final int yie = _t.getYEcran(r.max_, getAxeY()); + final int yie = _t.getYEcran(r.max_, axeY); trMarqueur.dessineTrait(_g, xmin, yie, xmax, yie); initTraceBox(); tbox_.setColorBoite(tLigneMarqueur_.getCouleur()); int x = xmin + 3; - final String str = getAxeY().getStringAffiche(r.max_); - if (getAxeY().isDroite()) { + final String str = axeY.getStringAffiche(r.max_); + if (axeY.isDroite()) { x = xmax - 6 - _g.getFontMetrics().stringWidth(str); } tbox_.paintBox(_g, x, yie, str); @@ -174,11 +175,11 @@ initTraceBox(); tbox_.setColorBoite(tLigneMarqueur_.getCouleur()); for (int i = 0; i < markH_.length; i++) { - if (getAxeY().containsPoint(markH_[i])) { - final int yie = _t.getYEcran(markH_[i], getAxeY()); + if (axeY.containsPoint(markH_[i])) { + final int yie = _t.getYEcran(markH_[i], axeY); int x = xmin + 3; - final String str = getAxeY().getStringAffiche(markH_[i]); - if (getAxeY().isDroite()) { + final String str = axeY.getStringAffiche(markH_[i]); + if (axeY.isDroite()) { x = xmax - 6 - _g.getFontMetrics().stringWidth(str); } trMarqueur.dessineTrait(_g, xmin, yie, xmax, yie); Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/courbe/EGCourbeConfigureTarget.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/courbe/EGCourbeConfigureTarget.java 2008-12-12 18:12:39 UTC (rev 4299) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/courbe/EGCourbeConfigureTarget.java 2008-12-14 20:44:06 UTC (rev 4300) @@ -126,7 +126,7 @@ final double[] marks = target_.getMarks(); String res = null; - if (marks != null) { + if (marks != null&& marks.length>0) { res = CtuluLibString.arrayToString(marks, ";"); } return res == null ? CtuluLibString.EMPTY_STRING : res; Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliScene.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliScene.java 2008-12-12 18:12:39 UTC (rev 4299) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliScene.java 2008-12-14 20:44:06 UTC (rev 4300) @@ -6,7 +6,9 @@ import java.awt.image.BufferedImage; import java.beans.PropertyChangeListener; import java.beans.PropertyChangeSupport; +import java.util.Collections; import java.util.Iterator; +import java.util.List; import java.util.Map; import java.util.Set; @@ -16,11 +18,16 @@ import org.fudaa.ctulu.image.CtuluImageProducer; import org.fudaa.ctulu.image.CtuluLibImage; import org.fudaa.ebli.visuallibrary.tree.EbliWidgetJXTreeTableModel; +import org.netbeans.api.visual.action.InplaceEditorProvider; +import org.netbeans.api.visual.action.WidgetAction; +import org.netbeans.api.visual.action.WidgetAction.Chain; import org.netbeans.api.visual.graph.GraphScene; import org.netbeans.api.visual.widget.LayerWidget; import org.netbeans.api.visual.widget.Scene; import org.netbeans.api.visual.widget.Widget; +import sun.misc.Cleaner; + /** * classe de gestion de la scene principale * @@ -30,7 +37,7 @@ EbliWidgetInterface<EbliSceneController> { int idx_ = 0; - + CtuluUI ctuluUi_; /** @@ -47,6 +54,31 @@ ctuluUi_ = _ctuluUi; } + public void stopEditing() { + Set<?> objects2 = getSelectedObjects(); + if (objects2 != null) { + for (Iterator iterator = objects2.iterator(); iterator.hasNext();) { + Object object = (Object) iterator.next(); + stopEditing(findWidget(object)); + + } + } + } + + protected void stopEditing(Widget w) { + if(w==null) return; + Chain actions = w.getActions(); + for (WidgetAction widgetAction : actions.getActions()) { + if (widgetAction instanceof InplaceEditorProvider.EditorController + && ((InplaceEditorProvider.EditorController) widgetAction).isEditorVisible()) { + ((InplaceEditorProvider.EditorController) widgetAction).closeEditor(true); + } + } + for (Widget widget : w.getChildren()) { + stopEditing(widget); + } + } + protected String generateId() { // return CtuluLibString.getString(idx_++); return CtuluLibGenerator.getInstance().deliverUniqueStringId(); @@ -113,7 +145,6 @@ */ private final EbliSceneController controller_; - public static void refreshScene(final Scene _sc) { _sc.validate(); _sc.repaint(); @@ -320,66 +351,55 @@ return null; } - - + /** * Methode qui redimensionne proportionellement les widget \xE0 la scene + * * @param size */ - public void resizeInnerWidget(Dimension newSize,Dimension oldSize){ - // this.getVisu().setPreferredSize(newSize); - if(getNodes().size()==0) - return; - for (final Iterator<EbliNode> it2 = getNodes().iterator(); it2.hasNext();) { + public void resizeInnerWidget(Dimension newSize, Dimension oldSize) { + // this.getVisu().setPreferredSize(newSize); + if (getNodes().size() == 0) return; + for (final Iterator<EbliNode> it2 = getNodes().iterator(); it2.hasNext();) { - final EbliNode currentNode = it2.next(); - if (currentNode != null && currentNode.hasWidget()) { + final EbliNode currentNode = it2.next(); + if (currentNode != null && currentNode.hasWidget()) { - - Rectangle oldRectangle=currentNode.getWidget().getPreferredBounds(); + Rectangle oldRectangle = currentNode.getWidget().getPreferredBounds(); - double proportionW=newSize.width*oldRectangle.width/oldSize.width; - double proportionH=newSize.width*oldRectangle.height/oldSize.height; - - - // -- retaillage --// - currentNode.getWidget().setPreferredBounds( - new Rectangle(new Dimension((int)proportionW, (int)proportionH))); + double proportionW = newSize.width * oldRectangle.width / oldSize.width; + double proportionH = newSize.width * oldRectangle.height / oldSize.height; - - // -- rafraichissement de la scene --// - this.refresh(); + // -- retaillage --// + currentNode.getWidget().setPreferredBounds(new Rectangle(new Dimension((int) proportionW, (int) proportionH))); - } - } - - // this.setPreferredSize(newSize); - - + // -- rafraichissement de la scene --// + this.refresh(); + + } + } + + // this.setPreferredSize(newSize); + } - - - - public void moveWidgetTo(EbliWidget widget, int position){ - - //-- ne marche pas.......................... --// - - -// -// if (widget.getParentWidget() == null) -// return; -// List<Widget> children = getChildren(); -// int i = children.indexOf (widget); -// if (i < 0) -// return; -// children.remove (i); -// children.add (position, widget); -// widget.revalidate (); -// widget.getParentWidget().revalidate (); -// refresh(); - - + + public void moveWidgetTo(EbliWidget widget, int position) { + + // -- ne marche pas.......................... --// + + // + // if (widget.getParentWidget() == null) + // return; + // List<Widget> children = getChildren(); + // int i = children.indexOf (widget); + // if (i < 0) + // return; + // children.remove (i); + // children.add (position, widget); + // widget.revalidate (); + // widget.getParentWidget().revalidate (); + // refresh(); + } - - + } Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/graphe/EbliWidgetGraphe.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/graphe/EbliWidgetGraphe.java 2008-12-12 18:12:39 UTC (rev 4299) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/graphe/EbliWidgetGraphe.java 2008-12-14 20:44:06 UTC (rev 4300) @@ -152,7 +152,7 @@ } // mode edition - if (imageGraphe == null || imageGraphe.getWidth() != rec.width || imageGraphe.getHeight() != rec.height) { + if (imageGraphe == null || imageGraphe.getWidth() != (rec.width-1) || imageGraphe.getHeight() != (rec.height-1)) { FuLog.debug("EWI: recreate image"); final Map params = new HashMap(); CtuluLibImage.setCompatibleImageAsked(params); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <had...@us...> - 2009-01-12 19:49:04
|
Revision: 4345 http://fudaa.svn.sourceforge.net/fudaa/?rev=4345&view=rev Author: hadouxad Date: 2009-01-12 19:48:55 +0000 (Mon, 12 Jan 2009) Log Message: ----------- Corrections Compte rendu des 2 lots + fiches de recettes LNHE Modified Paths: -------------- branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/telemac/io/ScopeStructure.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/courbe/EGCourbeModelDefault.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/courbe/EGModel.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliScene.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetShape.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/actions/EbliWidgetActionAlign.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/actions/EbliWidgetActionDuplicateLayout.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/calque/CalqueLegendeWidgetAdapter.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetControllerCalque.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/graphe/EbliWidgetControllerGraphe.java Modified: branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/telemac/io/ScopeStructure.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/telemac/io/ScopeStructure.java 2009-01-12 11:28:25 UTC (rev 4344) +++ branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/telemac/io/ScopeStructure.java 2009-01-12 19:48:55 UTC (rev 4345) @@ -520,7 +520,7 @@ } evolReg[i] = new EvolutionReguliere(tabX, tabY, false); - evolReg[i].setNom("courbe de " + nomVar); + evolReg[i].setNom("courbe de " + nomVar.replace(" ", "")); evolReg[i].setUnite(nomVar); } @@ -529,11 +529,39 @@ } /** + * Methode qui essaie d'extraire le nombre de la chaine de separator (utilis\xE9 pour les evol temporelles). + * Si n'y arrive pas, retourne l'indice du separateur. + * Normalement les separateurs sont de la forme suivante: + * VAR = VALUE c'est value qui nous interesse. + * @param indiceSeparator + * @return + */ + public double getValueExtractOfSeparator(int indiceSeparator){ + + String separator=getSeparator(indiceSeparator); + + if(separator.lastIndexOf(' ')!=-1){ + String sub=separator.substring(separator.lastIndexOf(' '), separator.length()); + + try{ + double value=Double.parseDouble(sub); + + return value; + + }catch(NumberFormatException e){ + return indiceSeparator; + } + + } + return indiceSeparator; + } + + /** * A utiliser poru transformer scopgen en evol temporelles. * On cree une courbe par variables, et on prend les points de tous les separaor pou les former. * @return */ - public EvolutionReguliere[] returnEvolRegulierePourTemporelles() { + public EvolutionReguliere[] returnEvolRegulierePourTemporelles(double xVoulu) { EvolutionReguliere[] evolReg = new EvolutionReguliere[getNbVariables()-1]; @@ -549,12 +577,29 @@ //on recupere les x de ce separator List<Double> listX=getListValueForVariableForSeparator(getSeparator(k), 0); - //on recupere les y de la variable de la courbe + //on recupere tous les y de la variable de la courbe List<Double> listY=getListValueForVariableForSeparator(getSeparator(k), i+1); + + //-- le x correspond \xE0 la valeur du caractere de separation--// + double x=getValueExtractOfSeparator(k); + + //-- il faut recuperer le y le plus proche du x voulu en regardant les indices --// + + //-- recuperation de l'indice du x le plus proche --// + int indiceXproche=0; + double min=Math.abs(xVoulu- listX.get(0)); + for(int g=0;g<listX.size();g++) + if(min>Math.abs(xVoulu- listX.get(g))){ + min=Math.abs(xVoulu- listX.get(g)); + indiceXproche=g; + } + + double y=listY.get(indiceXproche); + //on ajoute tout cela au x et y totaux - listeTOTALX.addAll(listX); - listeTOTALY.addAll(listY); + listeTOTALX.add(x); + listeTOTALY.add(y); } @@ -567,7 +612,7 @@ tabY[j] = listeTOTALY.get(j); } evolReg[i] = new EvolutionReguliere(tabX, tabY, false); - evolReg[i].setNom("courbe de " + nomVar); + evolReg[i].setNom(nomVar.replace(" ", "")+" sur ["+getSeparator(0).replace(" ", "")+";"+getSeparator(getNbSeparator()-1).replace(" ", "")+"] pour X choisi="+xVoulu); evolReg[i].setUnite(nomVar); } @@ -597,7 +642,7 @@ } evolReg[0] = new EvolutionReguliere(tabX, tabY, false); - evolReg[0].setNom("cor\xE9lation:(X="+getVariable(varX+1)+"//Y="+getVariable(varY+1)+")"); + evolReg[0].setNom("cor\xE9lation:(X="+getVariable(varX+1).replace(" ", "")+"//Y="+getVariable(varY+1).replace(" ", "")+")"); evolReg[0].setUnite(getVariable(varX+1)); return evolReg; @@ -622,7 +667,7 @@ restreindreStructure(listVariables); //on interpole pour le x choisi - restreindreStructure(xchoosen); + //restreindreStructure(xchoosen); printResults(); } Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/courbe/EGCourbeModelDefault.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/courbe/EGCourbeModelDefault.java 2009-01-12 11:28:25 UTC (rev 4344) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/courbe/EGCourbeModelDefault.java 2009-01-12 19:48:55 UTC (rev 4345) @@ -218,4 +218,10 @@ return duplic; } + +//@Override +//public String getUnite() { +// // TODO Auto-generated method stub +// return null; +//} } \ No newline at end of file Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/courbe/EGModel.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/courbe/EGModel.java 2009-01-12 11:28:25 UTC (rev 4344) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/courbe/EGModel.java 2009-01-12 19:48:55 UTC (rev 4345) @@ -188,5 +188,7 @@ * @return */ EGModel duplicate(); + + //String getUnite(); } Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliScene.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliScene.java 2009-01-12 11:28:25 UTC (rev 4344) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliScene.java 2009-01-12 19:48:55 UTC (rev 4345) @@ -6,6 +6,7 @@ import java.awt.image.BufferedImage; import java.beans.PropertyChangeListener; import java.beans.PropertyChangeSupport; +import java.util.ArrayList; import java.util.Collections; import java.util.Iterator; import java.util.List; @@ -17,6 +18,7 @@ import org.fudaa.ctulu.CtuluUI; import org.fudaa.ctulu.image.CtuluImageProducer; import org.fudaa.ctulu.image.CtuluLibImage; +import org.fudaa.ebli.visuallibrary.calque.EbliWidgetVueCalque; import org.fudaa.ebli.visuallibrary.tree.EbliWidgetJXTreeTableModel; import org.netbeans.api.visual.action.InplaceEditorProvider; import org.netbeans.api.visual.action.WidgetAction; @@ -352,6 +354,26 @@ } + + public List<EbliWidget> getAllVue2d(){ + + List<EbliWidget> liste=new ArrayList<EbliWidget>(); + + for (final Object objet : this.getObjects()) { + if (objet instanceof EbliNode) { + final EbliNode cible = (EbliNode) objet; + + if(cible.getWidget().getIntern() instanceof EbliWidgetVueCalque) + liste.add(cible.getWidget().getIntern() ); + + + } + } + return liste; + + + } + /** * Methode qui redimensionne proportionellement les widget \xE0 la scene * Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetShape.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetShape.java 2009-01-12 11:28:25 UTC (rev 4344) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetShape.java 2009-01-12 19:48:55 UTC (rev 4345) @@ -113,9 +113,16 @@ g.setPaint(fg_); // --couleur de fond --// - g.setColor(getColorFond()); - g.fill(shape); - + //g.setColor(getColorFond()); + //g.fill(shape); + // // --test on autorise que si son widget fils le permet --// + if (!this.getTransparent()) { + g.setColor(getColorFond()); + g.fill(shape); + } + + + g.setPaint(old); } tl.dessineShape(g, shape); Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/actions/EbliWidgetActionAlign.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/actions/EbliWidgetActionAlign.java 2009-01-12 11:28:25 UTC (rev 4344) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/actions/EbliWidgetActionAlign.java 2009-01-12 19:48:55 UTC (rev 4345) @@ -66,7 +66,7 @@ public static class Center extends EbliWidgetActionAlign { public Center(final EbliScene _scene) { - super(EbliResource.EBLI.getString("Centrer verticalement"), EbliResource.EBLI.getToolIcon("aocenterv"), + super(EbliResource.EBLI.getString("Centrer horizontalement"), EbliResource.EBLI.getToolIcon("aocenterv"), "CENTERV", _scene); } @@ -147,7 +147,7 @@ public static class Middle extends EbliWidgetActionAlign { public Middle(final EbliScene _scene) { - super(EbliResource.EBLI.getString("Centrer horizontalement"), EbliResource.EBLI.getToolIcon("aocenterh"), + super(EbliResource.EBLI.getString("Centrer verticalement"), EbliResource.EBLI.getToolIcon("aocenterh"), "CENTERH", _scene); } Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/actions/EbliWidgetActionDuplicateLayout.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/actions/EbliWidgetActionDuplicateLayout.java 2009-01-12 11:28:25 UTC (rev 4344) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/actions/EbliWidgetActionDuplicateLayout.java 2009-01-12 19:48:55 UTC (rev 4345) @@ -37,10 +37,10 @@ final CtuluCommandContainer cmd_; public EbliWidgetActionDuplicateLayout(final EbliScene _scene) { - super(_scene, EbliResource.EBLI.getString("Dupliquer la sc\xE8ne"), CtuluResource.CTULU + super(_scene, EbliResource.EBLI.getString("Dupliquer le layout"), CtuluResource.CTULU .getIcon("crystal_cascade.png"), "DUPLICATE"); - putValue(NAME, EbliResource.EBLI.getString("Dupliquer la sc\xE8ne")); + putValue(NAME, EbliResource.EBLI.getString("Dupliquer le layout")); cmd_ = _scene.getCmdMng(); } Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/calque/CalqueLegendeWidgetAdapter.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/calque/CalqueLegendeWidgetAdapter.java 2009-01-12 11:28:25 UTC (rev 4344) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/calque/CalqueLegendeWidgetAdapter.java 2009-01-12 19:48:55 UTC (rev 4345) @@ -17,6 +17,7 @@ import org.fudaa.ebli.calque.BCalqueLegendePanel; import org.fudaa.ebli.palette.BPalettePlageInterface; import org.fudaa.ebli.palette.BPalettePlageLegende; +import org.fudaa.ebli.ressource.EbliResource; import org.fudaa.ebli.trace.BPlageInterface; import org.fudaa.ebli.visuallibrary.EbliNode; import org.fudaa.ebli.visuallibrary.EbliNodeDefault; @@ -62,7 +63,7 @@ for (int i = 0; i < listeC.length; i++) { final Component c = listeC[i]; - if (c instanceof JLabel) { + if (c instanceof JLabel && !((JLabel)c).getText().equals(EbliResource.EBLI.getString("R\xE9sultats"))) { final LabelWidget titre = new LabelWidget(_scene); titre.setAlignment(Alignment.CENTER); Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetControllerCalque.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetControllerCalque.java 2009-01-12 11:28:25 UTC (rev 4344) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetControllerCalque.java 2009-01-12 19:48:55 UTC (rev 4345) @@ -178,6 +178,8 @@ // duplication du node en question final EbliNode duplique = n.duplicate(null); + duplique.setTitle("Calque "+(sceneDestination.getAllVue2d().size()+1)); + // -- redimensionnement du duplicata --// ((EbliWidgetCreatorVueCalque) duplique.getCreator()).initSize(getVisuPanel().getVueCalque().getCalque().getSize()); Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/graphe/EbliWidgetControllerGraphe.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/graphe/EbliWidgetControllerGraphe.java 2009-01-12 11:28:25 UTC (rev 4344) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/graphe/EbliWidgetControllerGraphe.java 2009-01-12 19:48:55 UTC (rev 4345) @@ -5,7 +5,9 @@ import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.util.ArrayList; +import java.util.HashMap; import java.util.Iterator; +import java.util.List; import javax.swing.JComponent; import javax.swing.JLabel; @@ -23,9 +25,12 @@ import org.fudaa.ebli.commun.EbliActionInterface; import org.fudaa.ebli.commun.EbliActionSimple; import org.fudaa.ebli.commun.EbliComponentFactory; +import org.fudaa.ebli.courbe.EGCourbe; import org.fudaa.ebli.courbe.EGFillePanel; import org.fudaa.ebli.courbe.EGGraphe; +import org.fudaa.ebli.courbe.EGGrapheModel; import org.fudaa.ebli.courbe.EGGrapheTreeModel; +import org.fudaa.ebli.courbe.EGModel; import org.fudaa.ebli.courbe.EGSpecificActions; import org.fudaa.ebli.courbe.EGTableGraphePanel; import org.fudaa.ebli.courbe.EGTree; @@ -70,6 +75,12 @@ EbliWidgetGraphe widgetGraphe_; EbliActionEditorOneClick<BuPanel> editorAction_; + + /** + * Liste qui contient les parametres d'origines des titres, + * doit etre relanc\xE9 dans le cas ou l'on ajoute de nouveau une legende. + */ + HashMap<EGCourbe,String> listeTitlesOrigins_=new HashMap<EGCourbe,String>(); public EbliWidgetControllerGraphe(final EbliWidgetGraphe widget_, final EbliNodeDefault nodeLegende) { super(widget_); @@ -82,6 +93,9 @@ addActionSpecifiques(); setProportional(true); + + initTitlesOrigins(widgetGraphe_.panelGraphe_.getGraphe().getModel()); + } @@ -310,6 +324,25 @@ }); } + /** + * Initialise les titres d origines du graphe. + * @param model + */ + public void initTitlesOrigins(EGGrapheModel model){ + EGCourbe[] listeCourbes=model.getCourbes(); + for(int i=0;i<listeCourbes.length;i++) + listeTitlesOrigins_.put(listeCourbes[i], listeCourbes[i].getTitle()); + + } + public void reinitTitlesOrigins(EGGrapheModel model){ + EGCourbe[] listeCourbes=model.getCourbes(); + for(int i=0;i<listeCourbes.length;i++) + if(listeTitlesOrigins_.get(listeCourbes[i])!=null) + listeCourbes[i].setTitle(listeTitlesOrigins_.get(listeCourbes[i])); + + } + + public void ajoutLegende() { // -- creation de la l\xE9gende --// if (widget_.getEbliScene() != null) { @@ -340,6 +373,10 @@ widgetGraphe_.getNodeLegende().setPreferedSize(widgetGraphe_.getNodeLegende().getWidget().getPreferredSize()); widget_.getEbliScene().refresh(); + + + //-- reinitialisation des titres de la legendes --// + reinitTitlesOrigins(widgetGraphe_.panelGraphe_.getGraphe().getModel()); } else if (widgetGraphe_.getNodeLegende().hasWidget()) { // -- cas ou la legende est masquee --// widgetGraphe_.getNodeLegende().getWidget().setVisible(true); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <de...@us...> - 2009-01-13 20:42:51
|
Revision: 4350 http://fudaa.svn.sourceforge.net/fudaa/?rev=4350&view=rev Author: deniger Date: 2009-01-13 20:42:41 +0000 (Tue, 13 Jan 2009) Log Message: ----------- correction oubli de commit @override est mal utilise Modified Paths: -------------- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/commun/EbliEditorArrow.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/courbe/EGCourbeModelDefault.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/courbe/EGModel.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetArrowEditor.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/commun/courbe/FudaaCourbeDefautModel.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/commun/courbe/FudaaCourbeTimeModel.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/profile/MVProfileCourbeModel.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/profile/MvProfileCoordinatesModel.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/telemac/TrTelemacBoundaryCourbeModel.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/telemac/TrTelemacWeirCourbeModel.java Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/commun/EbliEditorArrow.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/commun/EbliEditorArrow.java 2009-01-13 19:16:54 UTC (rev 4349) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/commun/EbliEditorArrow.java 2009-01-13 20:42:41 UTC (rev 4350) @@ -264,13 +264,10 @@ return i; } - @Override public Dimension getDefaultImageDimension() { - // TODO Auto-generated method stub return getSize(); } - @Override public BufferedImage produceImage(Map _params) { final BufferedImage i = CtuluLibImage.createImage(getWidth(), getHeight(), _params); final Graphics2D g2d = i.createGraphics(); @@ -379,15 +376,11 @@ repaint(); } - @Override public void mouseEntered(MouseEvent e) { - // TODO Auto-generated method stub } - @Override public void mouseExited(MouseEvent e) { - // TODO Auto-generated method stub } /** @@ -400,7 +393,6 @@ * marqueur qui s'active dans le cas du drag and drop et qui marque le point initial ainsi que le point destination jusqu'au lacher. */ boolean marqueurDeplacement_=false; - @Override public void mousePressed(MouseEvent e) { // TODO Auto-generated method stub if(!ajout()){ @@ -415,7 +407,6 @@ } - @Override public void mouseReleased(MouseEvent e) { // TODO Auto-generated method stub if(!ajout() && positionPointToMove_!=-1){ @@ -428,8 +419,7 @@ } } - Point positionDeplacement_=null; - @Override + Point positionDeplacement_; public void mouseDragged(MouseEvent e) { //System.out.println("Souris dragged: "+positionPointToMove_); if(marqueurDeplacement_){ @@ -438,9 +428,7 @@ } } - @Override public void mouseMoved(MouseEvent e) { - // TODO Auto-generated method stub System.out.println("Souris MOVED: "+positionPointToMove_); } Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/courbe/EGCourbeModelDefault.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/courbe/EGCourbeModelDefault.java 2009-01-13 19:16:54 UTC (rev 4349) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/courbe/EGCourbeModelDefault.java 2009-01-13 20:42:41 UTC (rev 4350) @@ -7,6 +7,8 @@ */ package org.fudaa.ebli.courbe; +import java.util.Map; + import org.fudaa.ctulu.CtuluCommandContainer; import org.fudaa.ctulu.CtuluLibArray; import org.fudaa.ctulu.CtuluListSelectionInterface; @@ -219,6 +221,12 @@ return duplic; } + public Object getPersistSpecificDatas() { + return null; + } + + public void setPersistSpecificDatas(Object _data, Map _infos) {} + //@Override //public String getUnite() { // // TODO Auto-generated method stub Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/courbe/EGModel.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/courbe/EGModel.java 2009-01-13 19:16:54 UTC (rev 4349) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/courbe/EGModel.java 2009-01-13 20:42:41 UTC (rev 4350) @@ -7,6 +7,8 @@ */ package org.fudaa.ebli.courbe; +import java.util.Map; + import org.fudaa.ctulu.CtuluCommandContainer; import org.fudaa.ctulu.CtuluListSelectionInterface; import org.fudaa.ctulu.collection.CourbeInterface; @@ -188,7 +190,14 @@ * @return */ EGModel duplicate(); + + /** + * @return + */ + Object getPersistSpecificDatas(); + void setPersistSpecificDatas(Object data, Map infos); + //String getUnite(); } Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetArrowEditor.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetArrowEditor.java 2009-01-13 19:16:54 UTC (rev 4349) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetArrowEditor.java 2009-01-13 20:42:41 UTC (rev 4350) @@ -17,109 +17,94 @@ import com.memoire.fu.FuLog; - - /** * Classe editeur de Fleche + * * @author Adrien Hadoux - * */ -public class EbliWidgetArrowEditor extends EbliWidget implements InplaceEditorProvider<EbliEditorArrow>{ +public class EbliWidgetArrowEditor extends EbliWidget implements InplaceEditorProvider<EbliEditorArrow> { - public EbliEditorArrow editor_; - BufferedImage imageFleche; - - - public EbliWidgetArrowEditor(EbliScene scene,EbliEditorArrow editor) { - super(scene, false); - // TODO Auto-generated constructor stub - editor_=editor; - editor_.model_=getTraceLigneModel(); - editor_.foreground_=getColorContour(); - // -- creation de l action pour editor --// - //final WidgetAction editorAction = ActionFactory.createInplaceEditorAction(this); + public EbliEditorArrow editor_; + BufferedImage imageFleche; - // -- ajout de l action au widget correspondant --// - // this.getActions().addAction(editorAction); + public EbliWidgetArrowEditor(EbliScene scene, EbliEditorArrow editor) { + super(scene, false); + // TODO Auto-generated constructor stub + editor_ = editor; + editor_.model_ = getTraceLigneModel(); + editor_.foreground_ = getColorContour(); + // -- creation de l action pour editor --// + // final WidgetAction editorAction = ActionFactory.createInplaceEditorAction(this); - final EbliWidgetControllerFlecheEditor controller = new EbliWidgetControllerFlecheEditor(this); - controller.setEditable(true); - setController(controller); - - } + // -- ajout de l action au widget correspondant --// + // this.getActions().addAction(editorAction); + final EbliWidgetControllerFlecheEditor controller = new EbliWidgetControllerFlecheEditor(this); + controller.setEditable(true); + setController(controller); - protected void paintWidget() { - final Rectangle rec = getClientArea(); - final Graphics2D g = getGraphics(); - // g.translate(rec.x, rec.y); - if (rec.width > 0 && rec.height > 0) { + } + protected void paintWidget() { + final Rectangle rec = getClientArea(); + final Graphics2D g = getGraphics(); + // g.translate(rec.x, rec.y); + if (rec.width > 0 && rec.height > 0) { - // mode edition - //if (imageFleche == null || imageFleche.getWidth() != (rec.width-1) || imageFleche.getHeight() != (rec.height-1)) { - FuLog.debug("EWI: recreate image"); - final Map params = new HashMap(); - CtuluLibImage.setCompatibleImageAsked(params); - editor_.model_=getTraceLigneModel(); - editor_.foreground_=getColorContour(); - imageFleche = editor_.produceImage(rec.width - 1, rec.height - 1, params); + // mode edition + // if (imageFleche == null || imageFleche.getWidth() != (rec.width-1) || imageFleche.getHeight() != + // (rec.height-1)) { + FuLog.debug("EWI: recreate image"); + final Map params = new HashMap(); + CtuluLibImage.setCompatibleImageAsked(params); + editor_.model_ = getTraceLigneModel(); + editor_.foreground_ = getColorContour(); + imageFleche = editor_.produceImage(rec.width - 1, rec.height - 1, params); - //} - g.drawImage(imageFleche, rec.x, rec.y, rec.width - 1, rec.height - 1, null); - } - } - - - @Override - public EbliEditorArrow createEditorComponent( - org.netbeans.api.visual.action.InplaceEditorProvider.EditorController controller, - Widget widget) { - //-- on met a jour le traceligne model --// - editor_.model_=getTraceLigneModel(); - editor_.foreground_=getColorContour(); - final Rectangle rec = getClientArea(); - editor_.setSize(new Dimension(rec.width,rec.height)); - editor_.setPreferredSize(new Dimension(rec.width,rec.height)); - - return editor_; - } + // } + g.drawImage(imageFleche, rec.x, rec.y, rec.width - 1, rec.height - 1, null); + } + } - @Override - public EnumSet<org.netbeans.api.visual.action.InplaceEditorProvider.ExpansionDirection> getExpansionDirections( - org.netbeans.api.visual.action.InplaceEditorProvider.EditorController controller, - Widget widget, EbliEditorArrow editor) { - // TODO Auto-generated method stub - return null; - } + public EbliEditorArrow createEditorComponent( + org.netbeans.api.visual.action.InplaceEditorProvider.EditorController controller, Widget widget) { + // -- on met a jour le traceligne model --// + editor_.model_ = getTraceLigneModel(); + editor_.foreground_ = getColorContour(); + final Rectangle rec = getClientArea(); + editor_.setSize(new Dimension(rec.width, rec.height)); + editor_.setPreferredSize(new Dimension(rec.width, rec.height)); - @Override - public Rectangle getInitialEditorComponentBounds( - org.netbeans.api.visual.action.InplaceEditorProvider.EditorController controller, - Widget widget, EbliEditorArrow editor, Rectangle viewBounds) { - // TODO Auto-generated method stub - final Rectangle rec = convertLocalToScene(getClientArea()); - rec.width -= 1; - rec.height -= 1; - return rec; - } + return editor_; + } - @Override - public void notifyClosing( - org.netbeans.api.visual.action.InplaceEditorProvider.EditorController controller, - Widget widget, EbliEditorArrow editor, boolean commit) { - // TODO Auto-generated method stub - imageFleche =null; - repaint(); - editingStop(); - } + public EnumSet<org.netbeans.api.visual.action.InplaceEditorProvider.ExpansionDirection> getExpansionDirections( + org.netbeans.api.visual.action.InplaceEditorProvider.EditorController controller, Widget widget, + EbliEditorArrow editor) { + // TODO Auto-generated method stub + return null; + } - @Override - public void notifyOpened( - org.netbeans.api.visual.action.InplaceEditorProvider.EditorController controller, - Widget widget, EbliEditorArrow editor) { - // TODO Auto-generated method stub - editingStart(); - } + public Rectangle getInitialEditorComponentBounds( + org.netbeans.api.visual.action.InplaceEditorProvider.EditorController controller, Widget widget, + EbliEditorArrow editor, Rectangle viewBounds) { + // TODO Auto-generated method stub + final Rectangle rec = convertLocalToScene(getClientArea()); + rec.width -= 1; + rec.height -= 1; + return rec; + } + public void notifyClosing(org.netbeans.api.visual.action.InplaceEditorProvider.EditorController controller, + Widget widget, EbliEditorArrow editor, boolean commit) { + imageFleche = null; + repaint(); + editingStop(); + } + + public void notifyOpened(org.netbeans.api.visual.action.InplaceEditorProvider.EditorController controller, + Widget widget, EbliEditorArrow editor) { + editingStart(); + } + } Modified: branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/commun/courbe/FudaaCourbeDefautModel.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/commun/courbe/FudaaCourbeDefautModel.java 2009-01-13 19:16:54 UTC (rev 4349) +++ branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/commun/courbe/FudaaCourbeDefautModel.java 2009-01-13 20:42:41 UTC (rev 4350) @@ -46,7 +46,8 @@ return false; } - public static void defaultFill(EvolutionReguliereInterface _e, InfoData _table, CtuluListSelectionInterface _selectedPt) { + public static void defaultFill(EvolutionReguliereInterface _e, InfoData _table, + CtuluListSelectionInterface _selectedPt) { if (_e.isUsed()) { _table.put(FudaaLib.getS("Courbe utilis\xE9e"), CtuluLibString.getString(_e.getUsed()) + CtuluLibString.ESPACE + CtuluLib.getS("fois")); @@ -162,15 +163,11 @@ return new FudaaCourbeDefautModel(this.e_.getCopy(this.e_.getListener())); } -@Override -public Object getPersistSpecificDatas() { - // TODO Auto-generated method stub - return null; -} + public Object getPersistSpecificDatas() { + return null; + } -@Override -public void setPersistSpecificDatas(Object data, Map infos) { - // TODO Auto-generated method stub - -} + public void setPersistSpecificDatas(Object data, Map infos) { + + } } \ No newline at end of file Modified: branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/commun/courbe/FudaaCourbeTimeModel.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/commun/courbe/FudaaCourbeTimeModel.java 2009-01-13 19:16:54 UTC (rev 4349) +++ branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/commun/courbe/FudaaCourbeTimeModel.java 2009-01-13 20:42:41 UTC (rev 4350) @@ -42,10 +42,10 @@ /** * ACHTUNG!!!; constructeur utilis\xE9 uniquement pour la persistance des donnees!!! */ - public FudaaCourbeTimeModel(){ - + public FudaaCourbeTimeModel() { + } - + public void fillWithInfo(InfoData _table, CtuluListSelectionInterface _selectedPt) {} protected void clearCache() { @@ -92,9 +92,7 @@ } public int getNbValues() { - if (y_ == null) { - return 0; - } + if (y_ == null) { return 0; } return time_.length; } @@ -207,29 +205,19 @@ public EGModel duplicate() { FudaaCourbeTimeModel duplic = new FudaaCourbeTimeModel(this.time_); - if (this.yRange_ != null) - duplic.yRange_ = new CtuluRange(this.yRange_); - if(this.nom_!=null) - duplic.nom_ = nom_; - if (this.y_ != null) - duplic.y_ = CtuluLibArray.copy(y_); - - + if (this.yRange_ != null) duplic.yRange_ = new CtuluRange(this.yRange_); + if (this.nom_ != null) duplic.nom_ = nom_; + if (this.y_ != null) duplic.y_ = CtuluLibArray.copy(y_); + return duplic; } -@Override -public Object getPersistSpecificDatas() { - // TODO Auto-generated method stub - return null; -} + public Object getPersistSpecificDatas() { + return null; + } -@Override -public void setPersistSpecificDatas(Object data, Map infos) { - // TODO Auto-generated method stub - -} + public void setPersistSpecificDatas(Object data, Map infos) { + } - } \ No newline at end of file Modified: branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/profile/MVProfileCourbeModel.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/profile/MVProfileCourbeModel.java 2009-01-13 19:16:54 UTC (rev 4349) +++ branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/profile/MVProfileCourbeModel.java 2009-01-13 20:42:41 UTC (rev 4350) @@ -62,8 +62,7 @@ title_ = _variable.toString(); time_ = _timeStep; builder_ = _builder; - if(builder_!=null) - res_ = builder_.createResults(_timeStep, _prog); + if (builder_ != null) res_ = builder_.createResults(_timeStep, _prog); y_ = new TDoubleArrayList(res_.getNbIntersect()); computeY(_prog); } @@ -242,16 +241,12 @@ } } -@Override -public Object getPersistSpecificDatas() { - // TODO Auto-generated method stub - return null; -} + public Object getPersistSpecificDatas() { + return null; + } -@Override -public void setPersistSpecificDatas(Object data, Map infos) { - // TODO Auto-generated method stub - -} + public void setPersistSpecificDatas(Object data, Map infos) { + } + } Modified: branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/profile/MvProfileCoordinatesModel.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/profile/MvProfileCoordinatesModel.java 2009-01-13 19:16:54 UTC (rev 4349) +++ branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/profile/MvProfileCoordinatesModel.java 2009-01-13 20:42:41 UTC (rev 4350) @@ -190,16 +190,12 @@ return duplic; } -@Override -public Object getPersistSpecificDatas() { - // TODO Auto-generated method stub - return null; -} + public Object getPersistSpecificDatas() { + return null; + } -@Override -public void setPersistSpecificDatas(Object data, Map infos) { - // TODO Auto-generated method stub - -} + public void setPersistSpecificDatas(Object data, Map infos) { + } + } Modified: branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/telemac/TrTelemacBoundaryCourbeModel.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/telemac/TrTelemacBoundaryCourbeModel.java 2009-01-13 19:16:54 UTC (rev 4349) +++ branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/telemac/TrTelemacBoundaryCourbeModel.java 2009-01-13 20:42:41 UTC (rev 4350) @@ -246,16 +246,12 @@ } -@Override -public Object getPersistSpecificDatas() { - // TODO Auto-generated method stub - return null; -} + public Object getPersistSpecificDatas() { + return null; + } -@Override -public void setPersistSpecificDatas(Object data, Map infos) { - // TODO Auto-generated method stub - -} + public void setPersistSpecificDatas(Object data, Map infos) { + } + } \ No newline at end of file Modified: branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/telemac/TrTelemacWeirCourbeModel.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/telemac/TrTelemacWeirCourbeModel.java 2009-01-13 19:16:54 UTC (rev 4349) +++ branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/telemac/TrTelemacWeirCourbeModel.java 2009-01-13 20:42:41 UTC (rev 4350) @@ -168,15 +168,11 @@ return new TrTelemacWeirCourbeModel(this.i_, this.mng_, this.cote_, CtuluLibArray.copy(this.x_)); } -@Override -public Object getPersistSpecificDatas() { - // TODO Auto-generated method stub - return null; -} + public Object getPersistSpecificDatas() { + return null; + } -@Override -public void setPersistSpecificDatas(Object data, Map infos) { - // TODO Auto-generated method stub - -} + public void setPersistSpecificDatas(Object data, Map infos) { + + } } \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <de...@us...> - 2009-01-14 02:23:31
|
Revision: 4352 http://fudaa.svn.sourceforge.net/fudaa/?rev=4352&view=rev Author: deniger Date: 2009-01-14 01:43:21 +0000 (Wed, 14 Jan 2009) Log Message: ----------- Modified Paths: -------------- branches/Prepro-0.92-SNAPSHOT/ctulu/src/com/memoire/bu/BuCheckBox3States.java branches/Prepro-0.92-SNAPSHOT/ctulu/src/com/memoire/bu/BuLib.java branches/Prepro-0.92-SNAPSHOT/ctulu/src/com/memoire/bu/BuMenu.java branches/Prepro-0.92-SNAPSHOT/ctulu/src/com/memoire/bu/BuMenuBar.java branches/Prepro-0.92-SNAPSHOT/ctulu/src/com/memoire/bu/BuMenuRecentFiles.java branches/Prepro-0.92-SNAPSHOT/ctulu/src/org/fudaa/ctulu/CtuluArkLoader.java branches/Prepro-0.92-SNAPSHOT/ctulu/src/org/fudaa/ctulu/CtuluArkSaver.java branches/Prepro-0.92-SNAPSHOT/ctulu/src/org/fudaa/ctulu/CtuluLibGeometrie.java branches/Prepro-0.92-SNAPSHOT/ctulu/src/org/fudaa/ctulu/CtuluListSelection.java branches/Prepro-0.92-SNAPSHOT/ctulu/src/org/fudaa/ctulu/ProgressionUpdater.java branches/Prepro-0.92-SNAPSHOT/ctulu/src/org/fudaa/ctulu/gis/GISAttribute.java branches/Prepro-0.92-SNAPSHOT/ctulu/src/org/fudaa/ctulu/gis/GISAttributeConstants.java branches/Prepro-0.92-SNAPSHOT/ctulu/src/org/fudaa/ctulu/gis/GISAttributeInterface.java branches/Prepro-0.92-SNAPSHOT/ctulu/src/org/fudaa/ctulu/gis/GISAttributeModel.java branches/Prepro-0.92-SNAPSHOT/ctulu/src/org/fudaa/ctulu/gis/GISAttributeString.java branches/Prepro-0.92-SNAPSHOT/ctulu/src/org/fudaa/ctulu/gis/GISCollectionData.java branches/Prepro-0.92-SNAPSHOT/ctulu/src/org/fudaa/ctulu/gis/GISDataModel.java branches/Prepro-0.92-SNAPSHOT/ctulu/src/org/fudaa/ctulu/gis/GISDataModelAbstract.java branches/Prepro-0.92-SNAPSHOT/ctulu/src/org/fudaa/ctulu/gis/GISDataModelFeatureAdapter.java branches/Prepro-0.92-SNAPSHOT/ctulu/src/org/fudaa/ctulu/gis/GISDataModelFilterAdapter.java branches/Prepro-0.92-SNAPSHOT/ctulu/src/org/fudaa/ctulu/gis/GISGeometry.java branches/Prepro-0.92-SNAPSHOT/ctulu/src/org/fudaa/ctulu/gis/GISGeometryCollection.java branches/Prepro-0.92-SNAPSHOT/ctulu/src/org/fudaa/ctulu/gis/GISGeometryFactory.java branches/Prepro-0.92-SNAPSHOT/ctulu/src/org/fudaa/ctulu/gis/GISGuiBuilder.java branches/Prepro-0.92-SNAPSHOT/ctulu/src/org/fudaa/ctulu/gis/GISLib.java branches/Prepro-0.92-SNAPSHOT/ctulu/src/org/fudaa/ctulu/gis/GISLigneBrisee.java branches/Prepro-0.92-SNAPSHOT/ctulu/src/org/fudaa/ctulu/gis/GISMultiPoint.java branches/Prepro-0.92-SNAPSHOT/ctulu/src/org/fudaa/ctulu/gis/GISMultiPolygoneWithHole.java branches/Prepro-0.92-SNAPSHOT/ctulu/src/org/fudaa/ctulu/gis/GISMultiPolyligne.java branches/Prepro-0.92-SNAPSHOT/ctulu/src/org/fudaa/ctulu/gis/GISPoint.java branches/Prepro-0.92-SNAPSHOT/ctulu/src/org/fudaa/ctulu/gis/GISPolygone.java branches/Prepro-0.92-SNAPSHOT/ctulu/src/org/fudaa/ctulu/gis/GISPolygoneWithHole.java branches/Prepro-0.92-SNAPSHOT/ctulu/src/org/fudaa/ctulu/gis/GISPolyligne.java branches/Prepro-0.92-SNAPSHOT/ctulu/src/org/fudaa/ctulu/gis/GISRien.java branches/Prepro-0.92-SNAPSHOT/ctulu/src/org/fudaa/ctulu/gis/GISVisitorChooser.java branches/Prepro-0.92-SNAPSHOT/ctulu/src/org/fudaa/ctulu/gis/GISZone.java branches/Prepro-0.92-SNAPSHOT/ctulu/src/org/fudaa/ctulu/gis/GISZoneAttributeFactory.java branches/Prepro-0.92-SNAPSHOT/ctulu/src/org/fudaa/ctulu/gis/GISZoneCollection.java branches/Prepro-0.92-SNAPSHOT/ctulu/src/org/fudaa/ctulu/gis/GISZoneCollectionLigneBrisee.java branches/Prepro-0.92-SNAPSHOT/ctulu/src/org/fudaa/ctulu/gis/GISZoneCollectionPoint.java branches/Prepro-0.92-SNAPSHOT/ctulu/src/org/fudaa/ctulu/gis/gml/GISGMLZoneExporter.java branches/Prepro-0.92-SNAPSHOT/ctulu/src/org/fudaa/ctulu/gis/gml/GMLReader.java branches/Prepro-0.92-SNAPSHOT/ctulu/src/org/fudaa/ctulu/gui/CtuluDialog.java branches/Prepro-0.92-SNAPSHOT/ctulu/src/org/fudaa/ctulu/image/CtuluLibImage.java branches/Prepro-0.92-SNAPSHOT/ctulu/src/org/fudaa/ctulu/interpolation/InterpolationSupportGISAdapter.java branches/Prepro-0.92-SNAPSHOT/ctulu/src/org/fudaa/ctulu/interpolation/InterpolationSupportPoint.java branches/Prepro-0.92-SNAPSHOT/ctulu/src/org/fudaa/ctulu/interpolation/Interpolator.java branches/Prepro-0.92-SNAPSHOT/ctulu/src/org/fudaa/ctulu/interpolation/bilinear/InterpolationBilinearSupportSorted.java branches/Prepro-0.92-SNAPSHOT/ctulu/src/org/fudaa/ctulu/interpolation/bilinear/InterpolatorBilinear.java branches/Prepro-0.92-SNAPSHOT/ctulu/test/org/fudaa/ctulu/interpolation/TestJInterpolation.java branches/Prepro-0.92-SNAPSHOT/dodico/idl/code/mascaret.idl branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/albe/DResultatsAlbe.java branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/dico/DicoAnalyzer.java branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/ef/EfGridDataInterpolationValuesAdapter.java branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/ef/interpolation/EfInterpolationGridSupportAdapter.java branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/fortran/FileOpWriterCharSimpleAbstract.java branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/mascaret/DCalculMascaret.java branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/mascaret/DParametresMascaret.java branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/mascaret/MascaretClient.java branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/olb/OLBExec.java branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/rubar/io/RubarStReader.java branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/rubar/io/RubarStWriter.java branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/sinavi3/DCalculSinavi3.java branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/sinavi3/DParametresSinavi3.java branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/sinavi3/DResultatsSinavi3.java branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/telemac/dico/DicoArtemisv5p8.java branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/telemac/dico/DicoEstel2dv5p8.java branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/telemac/dico/DicoPostel3dv5p8.java branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/telemac/dico/DicoSisyphev5p8.java branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/telemac/dico/DicoSpartacus2dv5p8.java branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/telemac/dico/DicoStbtelv5p8.java branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/telemac/dico/DicoSubief2dv5p8.java branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/telemac/dico/DicoSubief3dv5p8.java branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/telemac/dico/DicoTelemac2dv5p8.java branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/telemac/dico/DicoTelemac3dv5p8.java branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/telemac/dico/DicoTomawacv5p8.java branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/telemac/io/SinusxReader.java branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/telemac/io/SinusxWriter.java branches/Prepro-0.92-SNAPSHOT/dodico/test/org/fudaa/dodico/all/TestCParametresMascaret.java branches/Prepro-0.92-SNAPSHOT/dodico/test/org/fudaa/dodico/all/TestMascaretCalage.java branches/Prepro-0.92-SNAPSHOT/dodico/test/org/fudaa/dodico/h2d/TestJMaillage.java branches/Prepro-0.92-SNAPSHOT/dodico/test/org/fudaa/dodico/reflux/TestJDunes.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/BArbreCalque.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/BArbreCalqueModel.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/BCalque.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/BCalqueImagePersistence.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/BCalqueInteraction.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/BCalquePersistenceGroupe.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/BCalquePersistenceInterface.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/BCalquePersistenceSingle.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/BCalqueSaverInterface.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/BCalqueVisitor.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/BGroupeCalque.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/ZCalqueAffichageDonnees.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/ZCalqueAffichageDonneesAbstract.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/ZCalqueAffichageDonneesInterface.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/ZCalqueAffichageDonneesMultiSpecial.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/ZCalqueAffichageInterface.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/ZCalqueClickInteraction.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/ZCalqueFleche.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/ZCalqueGrille.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/ZCalqueImageRaster.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/ZCalqueLigneBrisee.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/ZCalquePoint.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/ZCalquePolygone.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/ZCalquePolyligne.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/ZCalqueSegment.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/ZCalqueSelectionInteractionAbstract.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/ZCalqueSelectionInteractionMulti.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/ZCalqueSelectionInteractionSimple.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/ZEbliCalquePanelController.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/ZEbliCalquesPanel.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/ZEbliFilleCalques.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/ZModeleDonnees.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/ZModeleGeom.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/ZModeleLigneBrisee.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/ZSelectionTrace.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/action/CalqueActionInteraction.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/action/CalqueGISEditionAction.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/action/CalqueSelectionAction.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/action/CalqueZoomOnSelectedAction.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/dessin/DeForme.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/edition/BPaletteEdition.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/edition/EbliAtomicsEditorPanel.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/edition/EbliSingleObjectEditorPanel.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/edition/ZCalqueDeplacement.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/edition/ZCalqueDeplacementPanel.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/edition/ZCalqueDeplacementTargetInterface.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/edition/ZCalqueEditable.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/edition/ZCalqueEditionGroup.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/edition/ZCalqueEditionInteraction.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/edition/ZCalqueEditionInteractionTargetI.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/edition/ZCalqueLigneBriseeEditable.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/edition/ZCalquePointEditable.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/edition/ZEditionAttibutesContainer.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/edition/ZEditionAttributesCreatorInterface.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/edition/ZEditorDefault.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/edition/ZEditorInterface.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/edition/ZEditorLigneBriseePanel.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/edition/ZEditorPanelInterface.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/edition/ZModeleLigneBriseeDefault.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/edition/ZModeleLigneBriseeEditable.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/edition/ZModelePointEditable.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/edition/ZModelePointEditableInterface.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/find/CalqueFindComponentPolygone.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/find/CalqueFindCourbeTreeModel.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/commun/BPalettePanelInterface.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/commun/EbliActionAbstract.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/commun/EbliActionInterface.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/commun/EbliActionPaletteAbstract.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/commun/EbliActionPaletteSpecAbstract.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/commun/EbliActionPaletteTreeModel.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/commun/EbliListeSelectionMulti.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/commun/EbliListeSelectionMultiInterface.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/controle/BConfigurableInterface.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/controle/BConfigurableSectionInterface.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/courbe/EGGrapheModelListener.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/palette/PaletteEditAction.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/ressource/draw-add-pt.png branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/ressource/node-add.png branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/trace/TraceIcon.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/trace/TracePoint.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/trace/TraceSurface.java branches/Prepro-0.92-SNAPSHOT/ebli/test/org/fudaa/ebli/all/TestZCalquePoint.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/albe/AlbeDeplacementReactionResultats.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/albe/AlbeFilleNoteDeCalculs.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/albe/AlbeFilleResultatsCombinaison.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/albe/AlbeImplementation.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/albe/AlbeLancementCalculsFrame.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/albe/AlbeLib.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/albe/AlbeMobilisationDefenseResultats.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/albe/AlbeRecapitulatifResultats.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/albe/AlbeRes.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/albe/AlbeResistancePieuResultats.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/albe/AlbeResultatsRecapitulatifsBrowserFrame.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/albe/WHtmlContent.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/albe/astuces.txt branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/commun/FudaaProjectInterface.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/commun/impl/FudaaCommonImplementation.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/commun/save/FilleVisuSaver.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/commun/save/FudaaFilleVisuPersistence.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/commun/save/FudaaSavable.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/commun/save/FudaaSaveLib.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/commun/save/FudaaSaveProject.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/commun/save/FudaaSaveZipLoader.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/commun/save/FudaaSaveZipLoaderAdapter.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/commun/save/FudaaSaveZipWriter.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/commun/undo/FudaaUndoCmdMngListener.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/hydraulique1d/Hydraulique1dBaseImplementation.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/hydraulique1d/Hydraulique1dExport.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/hydraulique1d/Hydraulique1dImport.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/hydraulique1d/Hydraulique1dPoint.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/hydraulique1d/Hydraulique1dProfilModel.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/hydraulique1d/Hydraulique1dProjet.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/hydraulique1d/conv/CConversionHydraulique1d.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/hydraulique1d/conv/ConvH1D_Masc.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/hydraulique1d/conv/ConvMasc_H1D.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/hydraulique1d/conv/ConvUnite.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/hydraulique1d/editor/Hydraulique1dApportEditor.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/hydraulique1d/editor/Hydraulique1dBiefEditor.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/hydraulique1d/editor/Hydraulique1dBornesGrapheEditor.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/hydraulique1d/editor/Hydraulique1dConcentrationsInitialesEditor.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/hydraulique1d/editor/Hydraulique1dConditionsInitialesEditor.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/hydraulique1d/editor/Hydraulique1dCrueCalagePanel.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/hydraulique1d/editor/Hydraulique1dCruesCalageEditor.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/hydraulique1d/editor/Hydraulique1dCustomizer.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/hydraulique1d/editor/Hydraulique1dCustomizerImprimable.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/hydraulique1d/editor/Hydraulique1dDeversoirEditor.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/hydraulique1d/editor/Hydraulique1dExtremLibreEditor.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/hydraulique1d/editor/Hydraulique1dFiltrageProfilEditor.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/hydraulique1d/editor/Hydraulique1dGraphesResultatsEditor.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/hydraulique1d/editor/Hydraulique1dInsererProfilEditor.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/hydraulique1d/editor/Hydraulique1dLaissesEditor.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/hydraulique1d/editor/Hydraulique1dLigneInitialeEditor.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/hydraulique1d/editor/Hydraulique1dLissageProfilEditor.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/hydraulique1d/editor/Hydraulique1dListeLoiCombo.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/hydraulique1d/editor/Hydraulique1dListingsCalageEditor.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/hydraulique1d/editor/Hydraulique1dLoiHydrauliqueCellEditor.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/hydraulique1d/editor/Hydraulique1dLoiHydrauliqueEditor2.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/hydraulique1d/editor/Hydraulique1dLoiHydrauliqueLibraryEditor.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/hydraulique1d/editor/Hydraulique1dLoiSeuilEditor2.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/hydraulique1d/editor/Hydraulique1dMaillageEditor.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/hydraulique1d/editor/Hydraulique1dMeteoEditor.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/hydraulique1d/editor/Hydraulique1dModeleQEauEditor.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/hydraulique1d/editor/Hydraulique1dNoeudFluvEditor.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/hydraulique1d/editor/Hydraulique1dNoeudTransEditor.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/hydraulique1d/editor/Hydraulique1dNoeudTransParamEditor.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/hydraulique1d/editor/Hydraulique1dNoyauEditor.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/hydraulique1d/editor/Hydraulique1dParametresCalageEditor.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/hydraulique1d/editor/Hydraulique1dParametresGenerauxAvancesEditor.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/hydraulique1d/editor/Hydraulique1dParametresGenerauxEditor.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/hydraulique1d/editor/Hydraulique1dParametresRepriseEditor.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/hydraulique1d/editor/Hydraulique1dParametresResultatsEditor.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/hydraulique1d/editor/Hydraulique1dParametresResultatsQualiteDEauEditor.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/hydraulique1d/editor/Hydraulique1dParametresTemporelsEditor.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/hydraulique1d/editor/Hydraulique1dParamsGenerauxQualiteDEauEditor.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/hydraulique1d/editor/Hydraulique1dParamsPhysiqueQEEditor.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/hydraulique1d/editor/Hydraulique1dPerteChargeEditor.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/hydraulique1d/editor/Hydraulique1dPlanimetrageEditor.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/hydraulique1d/editor/Hydraulique1dResultatsGenerauxEditor.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/hydraulique1d/editor/Hydraulique1dSectionsSeriesEditor.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/hydraulique1d/editor/Hydraulique1dSeuilAvecLoiEditor.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/hydraulique1d/editor/Hydraulique1dSeuilChooser.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/hydraulique1d/editor/Hydraulique1dSeuilLoiEditor.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/hydraulique1d/editor/Hydraulique1dSeuilVanneEditor.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/hydraulique1d/editor/Hydraulique1dSitesEditor.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/hydraulique1d/editor/Hydraulique1dSourceEditor.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/hydraulique1d/editor/Hydraulique1dTableauZoneEditor.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/hydraulique1d/editor/Hydraulique1dTableauxEditor.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/hydraulique1d/editor/Hydraulique1dTranslaterProfilEditor.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/hydraulique1d/editor/Hydraulique1dVariablesResultatsEditor.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/hydraulique1d/editor/Hydraulique1dVisuInitialeEditor.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/hydraulique1d/editor/Hydraulique1dZoneFrottementCalageEditor.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/hydraulique1d/editor/Hydraulique1dZoneFrottementEditor.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/hydraulique1d/editor/Hydraulique1dZoneSecheEditor.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/hydraulique1d/editor/PanneauGraphesResultats.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/hydraulique1d/editor/casier/Hydraulique1dCasierApportDebitPanel.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/hydraulique1d/editor/casier/Hydraulique1dCasierCaracLiaisonPanel.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/hydraulique1d/editor/casier/Hydraulique1dCasierEditor.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/hydraulique1d/editor/casier/Hydraulique1dCasierGeometriePanel.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/hydraulique1d/editor/casier/Hydraulique1dCasierLiaisonEditor.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/hydraulique1d/editor/casier/Hydraulique1dCasierNumeriqueEditor.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/hydraulique1d/editor/casier/Hydraulique1dCasierPlanimEditor.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/hydraulique1d/editor/casier/Hydraulique1dCasierSemiPointsEditor.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/hydraulique1d/editor/casier/Hydraulique1dCasierTableauPlanimPanel.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/hydraulique1d/editor/casier/Hydraulique1dCasierTableauXYZPanel.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/hydraulique1d/editor/casier/tableau/Hydraulique1dCasierTabPlanimModel.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/hydraulique1d/editor/casier/tableau/Hydraulique1dCasierTabXYZ.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/hydraulique1d/editor/casier/tableau/Hydraulique1dCasierTabXYZModel.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/hydraulique1d/editor/profil/Hydraulique1dProfilEditor.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/hydraulique1d/editor/profil/Hydraulique1dProfilSimpleEditor.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/hydraulique1d/editor/profil/Hydraulique1dProfilTableauPanel.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/hydraulique1d/graphe/Hydraulique1dGrapheProfilDataset.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/hydraulique1d/ihmhelper/Hydraulique1dIHMRepository.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/hydraulique1d/ihmhelper/Hydraulique1dIHM_Apport2.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/hydraulique1d/ihmhelper/Hydraulique1dIHM_Base.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/hydraulique1d/ihmhelper/Hydraulique1dIHM_Bief.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/hydraulique1d/ihmhelper/Hydraulique1dIHM_Casier.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/hydraulique1d/ihmhelper/Hydraulique1dIHM_CasierLiaison.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/hydraulique1d/ihmhelper/Hydraulique1dIHM_CasierNumerique.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/hydraulique1d/ihmhelper/Hydraulique1dIHM_CasierPlanim.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/hydraulique1d/ihmhelper/Hydraulique1dIHM_CasierSemiPoints.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/hydraulique1d/ihmhelper/Hydraulique1dIHM_ConcentrationsInitiales.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/hydraulique1d/ihmhelper/Hydraulique1dIHM_ConditionsInitiales.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/hydraulique1d/ihmhelper/Hydraulique1dIHM_CruesCalage.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/hydraulique1d/ihmhelper/Hydraulique1dIHM_Deversoir.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/hydraulique1d/ihmhelper/Hydraulique1dIHM_ExtremiteLibre.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/hydraulique1d/ihmhelper/Hydraulique1dIHM_GraphesResultats.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/hydraulique1d/ihmhelper/Hydraulique1dIHM_Laisse.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/hydraulique1d/ihmhelper/Hydraulique1dIHM_LibraryLoiHydraulique.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/hydraulique1d/ihmhelper/Hydraulique1dIHM_LigneInitiale.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/hydraulique1d/ihmhelper/Hydraulique1dIHM_ListingsCalage.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/hydraulique1d/ihmhelper/Hydraulique1dIHM_LoiHydraulique2.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/hydraulique1d/ihmhelper/Hydraulique1dIHM_Maillage2.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/hydraulique1d/ihmhelper/Hydraulique1dIHM_Meteo.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/hydraulique1d/ihmhelper/Hydraulique1dIHM_ModeleQEau.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/hydraulique1d/ihmhelper/Hydraulique1dIHM_Noyau.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/hydraulique1d/ihmhelper/Hydraulique1dIHM_ParamCalage.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/hydraulique1d/ihmhelper/Hydraulique1dIHM_ParamGeneraux.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/hydraulique1d/ihmhelper/Hydraulique1dIHM_ParamReprise.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/hydraulique1d/ihmhelper/Hydraulique1dIHM_ParamResultat.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/hydraulique1d/ihmhelper/Hydraulique1dIHM_ParamResultatQualiteDEau.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/hydraulique1d/ihmhelper/Hydraulique1dIHM_ParamTemporel.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/hydraulique1d/ihmhelper/Hydraulique1dIHM_ParamsGenerauxQualiteDEau.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/hydraulique1d/ihmhelper/Hydraulique1dIHM_ParamsPhysiqueQE.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/hydraulique1d/ihmhelper/Hydraulique1dIHM_Planimetrage2.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/hydraulique1d/ihmhelper/Hydraulique1dIHM_Profil.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/hydraulique1d/ihmhelper/Hydraulique1dIHM_ProfilResultats.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/hydraulique1d/ihmhelper/Hydraulique1dIHM_ResultatsGeneraux.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/hydraulique1d/ihmhelper/Hydraulique1dIHM_SectionsParSections.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/hydraulique1d/ihmhelper/Hydraulique1dIHM_SectionsParSerie2.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/hydraulique1d/ihmhelper/Hydraulique1dIHM_SeuilAvecLoi.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/hydraulique1d/ihmhelper/Hydraulique1dIHM_SeuilLoi.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/hydraulique1d/ihmhelper/Hydraulique1dIHM_SeuilVanne.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/hydraulique1d/ihmhelper/Hydraulique1dIHM_SitesStockage.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/hydraulique1d/ihmhelper/Hydraulique1dIHM_Source.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/hydraulique1d/ihmhelper/Hydraulique1dIHM_Tableaux.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/hydraulique1d/ihmhelper/Hydraulique1dIHM_VariableResultat.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/hydraulique1d/ihmhelper/Hydraulique1dIHM_VisuInitiale.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/hydraulique1d/ihmhelper/Hydraulique1dIHM_ZonesFrottement.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/hydraulique1d/ihmhelper/Hydraulique1dIHM_ZonesFrottementACaler.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/hydraulique1d/ihmhelper/Hydraulique1dIHM_ZonesFrottementCalees.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/hydraulique1d/ihmhelper/Hydraulique1dIHM_ZonesSeches.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/hydraulique1d/reseau/Hydraulique1dReseauApport.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/hydraulique1d/reseau/Hydraulique1dReseauBarragePrincipal.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/hydraulique1d/reseau/Hydraulique1dReseauBiefCourbe.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/hydraulique1d/reseau/Hydraulique1dReseauBiefDroit.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/hydraulique1d/reseau/Hydraulique1dReseauCasier.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/hydraulique1d/reseau/Hydraulique1dReseauDeversoir.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/hydraulique1d/reseau/Hydraulique1dReseauExtremLibre.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/hydraulique1d/reseau/Hydraulique1dReseauFrame.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/hydraulique1d/reseau/Hydraulique1dReseauGridAdapter.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/hydraulique1d/reseau/Hydraulique1dReseauLiaisonCasier.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/hydraulique1d/reseau/Hydraulique1dReseauMouseAdapter.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/hydraulique1d/reseau/Hydraulique1dReseauNoeud.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/hydraulique1d/reseau/Hydraulique1dReseauPerteCharge.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/hydraulique1d/reseau/Hydraulique1dReseauSeuil.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/hydraulique1d/reseau/Hydraulique1dReseauSingularite.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/hydraulique1d/reseau/Hydraulique1dReseauSource.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/hydraulique1d/reseau/Hydraulique1dReseauVerificateur.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/hydraulique1d/tableau/Hydraulique1dLigneConcentrationsInitialesTableau.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/hydraulique1d/tableau/Hydraulique1dLigneLaisseTableau.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/hydraulique1d/tableau/Hydraulique1dLigneLigneDEauTableau.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/hydraulique1d/tableau/Hydraulique1dLigneOptionsTraceurTableau.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/hydraulique1d/tableau/Hydraulique1dLigneParamsPhysiqueQETableau.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/hydraulique1d/tableau/Hydraulique1dLigneProfilTableau.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/hydraulique1d/tableau/Hydraulique1dLigneSiteTableau.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/hydraulique1d/tableau/Hydraulique1dLigneZoneFrottementTableau.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/hydraulique1d/tableau/Hydraulique1dLigneZoneTableau.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/hydraulique1d/tableau/Hydraulique1dLigneZoneTailleTableau.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/hydraulique1d/tableau/Hydraulique1dTableauConcInitsModel.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/hydraulique1d/tableau/Hydraulique1dTableauLaisseModel.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/hydraulique1d/tableau/Hydraulique1dTableauLigneEauModel.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/hydraulique1d/tableau/Hydraulique1dTableauOptionsTraceurModel.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/hydraulique1d/tableau/Hydraulique1dTableauParamsPhysQEModel.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/hydraulique1d/tableau/Hydraulique1dTableauProfilsModel.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/hydraulique1d/tableau/Hydraulique1dTableauSiteModel.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/hydraulique1d/tableau/Hydraulique1dTableauZoneFrottementCalageModel.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/hydraulique1d/tableau/Hydraulique1dTableauZoneFrottementModel.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/hydraulique1d/tableau/Hydraulique1dTableauZoneModel.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/hydraulique1d/tableau/Hydraulique1dTableauZoneSecheModel.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/hydraulique1d/tableau/Hydraulique1dTableauZoneTailleModel.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/mascaret/MascaretImplementation.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/export/MvExportFactory.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/impl/MvActLoadDefault.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/layer/MvEdgeNumberLayer.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/layer/MvElementLayer.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/layer/MvElementNumberLayer.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/layer/MvFrontierLayerAbstract.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/layer/MvIsoPaintersLayer.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/layer/MvNodeNumberLayer.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/layer/MvVisuPanel.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/package.html branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/profile/MvLineChooser.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/profile/MvProfileLayerModelForCourbe.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/oscar/OscarDeformeeResultatsBruts.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/oscar/OscarDiagrammePressionsResultatsBruts.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/oscar/OscarEffortsParametresEffortsEnTeteDeRideau.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/oscar/OscarEffortsTranchantsResultatsBruts.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/oscar/OscarFilleNoteDeCalculs.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/oscar/OscarImplementation.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/oscar/OscarLib.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/oscar/OscarMomentsFlechissantsResultatsBruts.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/oscar/OscarOuvrageParametres.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/oscar/OscarPredimensionnementResultatsBruts.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/oscar/WHtmlContent.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/sig/FSigGeomSrcData.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/sig/FSigGeomSrcDataUtils.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/sig/FSigLib.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/sig/FSigLineSingleModel.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/sig/FSigResource.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/sig/layer/FSigEditor.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/sig/layer/FSigImageImportAction.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/sig/layer/FSigLayerAction.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/sig/layer/FSigLayerExporter.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/sig/layer/FSigLayerFilter.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/sig/layer/FSigLayerGroup.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/sig/layer/FSigVisuPanel.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/sig/persistence/FSigLayerPointPersistence.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/sig/wizard/FSigDataModelSinusxAdapter.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/sig/wizard/FSigFileLoadResult.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/sig/wizard/FSigFileLoaderI.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/sig/wizard/FSigFileLoaderRubarSt.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/sig/wizard/FSigFileLoaderSinusX.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/sig/wizard/FSigImageWizardPanelController.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/sig/wizard/FSigImageWizardStepCalage.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/sig/wizard/FSigImageWizardStepImage.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/sig/wizard/FSigImageWizardTask.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/sig/wizard/FSigWizardDefaultPanel.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/sig/wizard/FSigWizardFileMng.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/sig/wizard/FSigWizardImport.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/sig/wizard/FSigWizardImportHelper.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/sig/wizard/FSigWizardStepInterface.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/sig/wizard/FSigWizardVariableModifier.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/sinavi2/Sinavi2FilleAffBiefs.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/sinavi2/Sinavi2FilleAffEcluses.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/sinavi2/Sinavi2ResAttentesBateaux.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/sinavi2/Sinavi2ResAttentesElements.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/sinavi3/GenarrFrameAffichage.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/sinavi3/GenarrListeNavires.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/sinavi3/GenarrModeleTable.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/sinavi3/GenarrNavire.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/sinavi3/LoiDeterministeTableModel.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/sinavi3/Sinavi3AlgorithmeAttentesGenerales.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/sinavi3/Sinavi3AlgorithmeDureesParcours.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/sinavi3/Sinavi3AlgorithmeTOUTESDureesParcours.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/sinavi3/Sinavi3DataSimulation.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/sinavi3/Sinavi3DessinerPort.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/sinavi3/Sinavi3DessinerPortFrame.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/sinavi3/Sinavi3DonneesGeneralesParametres.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/sinavi3/Sinavi3Ecluse.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/sinavi3/Sinavi3FrameGenerationRappelDonnees.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/sinavi3/Sinavi3FrameSaisieDonneesGenerales.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/sinavi3/Sinavi3FrameSaisieHoraires.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/sinavi3/Sinavi3FrameSaisieHorairesComplet.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/sinavi3/Sinavi3FrameSaisieHorairesCompletSemaine.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/sinavi3/Sinavi3FrameSaisieLoiDeterministe.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/sinavi3/Sinavi3FrameSaisieLoiJournaliere.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/sinavi3/Sinavi3GenereNoteHtml.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/sinavi3/Sinavi3Implementation.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/sinavi3/Sinavi3ModeleDurManeuvreEclEntrant.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/sinavi3/Sinavi3ModeleDurManeuvreEclSortant.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/sinavi3/Sinavi3ModeleExcel.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/sinavi3/Sinavi3ModeleVitesseBiefAvalant.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/sinavi3/Sinavi3ModeleVitesseBiefMontant.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/sinavi3/Sinavi3Modeletrajets.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/sinavi3/Sinavi3PanelAffichageEcluse.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/sinavi3/Sinavi3PanelGestionTrajetsBateaux.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/sinavi3/Sinavi3PanelReglesCroisementBief.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/sinavi3/Sinavi3PanelReglestrematageBief.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/sinavi3/Sinavi3PanelSaisieBateaux.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/sinavi3/Sinavi3PanelSaisieBief.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/sinavi3/Sinavi3PanelSaisieEcluse.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/sinavi3/Sinavi3PanelSaisieGare.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/sinavi3/Sinavi3PreferencesPanel.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/sinavi3/Sinavi3ResultatComparaisonAttenteElement.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/sinavi3/Sinavi3ResultatComparaisonAttentetrajet.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/sinavi3/Sinavi3ResultatComparaisonDureeParcours.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/sinavi3/Sinavi3ResultatComparaisonGenerationBateaux.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/sinavi3/Sinavi3ResultatGenerationBateaux.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/sinavi3/Sinavi3ResultatHistorique.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/sinavi3/Sinavi3ResultatsAttenteGeneraleCategories.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/sinavi3/Sinavi3ResultatsAttenteGeneraleElement.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/sinavi3/Sinavi3ResultatsAttenteTrajet.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/sinavi3/Sinavi3ResultatsCroisementsBief.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/sinavi3/Sinavi3ResultatsDureesParcours.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/sinavi3/Sinavi3ResultatsTrematagesBief.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/sinavi3/Sinavi3TraduitHoraires.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/sinavi3/Sinavi3VisualiserBateaux.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/sinavi3/Sinavi3VisualiserGares.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/sipor/GenarrModeleTable.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/sipor/SiporDataSimulation.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/sipor/SiporDessinerPort.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/sipor/SiporDonneesGeneralesParametres.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/sipor/SiporFrameGenerationRappelDonnees.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/sipor/SiporFrameSaisieHoraires.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/sipor/SiporFrameSaisieHorairesComplet.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/sipor/SiporFrameSaisieHorairesCompletSemaine.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/sipor/SiporGenereNoteHtml.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/sipor/SiporModeleDureeParcoursCercles.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/sipor/SiporModeleDureeParcoursChenaux.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/sipor/SiporModeleExcel.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/common/TrCommonImplementation.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/common/TrFileFormatManager.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/data/TrBcLayerGroup.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/data/TrGisProjectEditor.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/data/TrRefluxBcBoundaryMiddleLayer.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/data/TrSiPlanEditorPanel.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/data/TrSiProfilLayer.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/data/TrSiProfilModel.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/data/TrVisuPanel.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrIsoLayerDefault.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostTrajectoireLineLayer.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/rubar/TrRubarDonneesBrutesLayer.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/rubar/TrRubarOuvrageLayer.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/telemac/TrTelemacBcBoundaryBlockLayer.java Added Paths: ----------- branches/Prepro-0.92-SNAPSHOT/ctulu/src/com/memoire/bu/crystal_couperligne.png branches/Prepro-0.92-SNAPSHOT/ctulu/src/org/fudaa/ctulu/gis/GISCoordinateSequenceContainerInterface.java branches/Prepro-0.92-SNAPSHOT/ctulu/src/org/fudaa/ctulu/gis/GISDataModelPointMultiPointAdapter.java branches/Prepro-0.92-SNAPSHOT/ctulu/src/org/fudaa/ctulu/gis/GISSequencesCoordinateSequence.java branches/Prepro-0.92-SNAPSHOT/ctulu/src/org/fudaa/ctulu/gis/GISVisitorGeometryCollector.java branches/Prepro-0.92-SNAPSHOT/ctulu/src/org/fudaa/ctulu/gis/GISZoneCollectionGeometry.java branches/Prepro-0.92-SNAPSHOT/ctulu/src/org/fudaa/ctulu/gis/GISZoneCollectionMultiPoint.java branches/Prepro-0.92-SNAPSHOT/ctulu/src/org/fudaa/ctulu/interpolation/InterpolationTargetGISAdapter.java branches/Prepro-0.92-SNAPSHOT/ctulu/src/org/fudaa/ctulu/interpolation/SupportCoordinate.java branches/Prepro-0.92-SNAPSHOT/ctulu/src/org/fudaa/ctulu/interpolation/SupportLocationI.java branches/Prepro-0.92-SNAPSHOT/ctulu/src/org/fudaa/ctulu/interpolation/SupportLocationXYComparator.java branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/hydraulique1d/metier/ branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/hydraulique1d/metier/DeserializerHandlerVersion04.java branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/hydraulique1d/metier/DeserializerHandlerVersion05.java branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/hydraulique1d/metier/EnumMetierCondLimiteImposee.java branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/hydraulique1d/metier/EnumMetierCritereArret.java branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/hydraulique1d/metier/EnumMetierFormatFichier.java branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/hydraulique1d/metier/EnumMetierLimiteCalcule.java branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/hydraulique1d/metier/EnumMetierMethodeMaillage.java branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/hydraulique1d/metier/EnumMetierOptionStockage.java branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/hydraulique1d/metier/EnumMetierRegime.java branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/hydraulique1d/metier/EnumMetierSensDebitLiaison.java branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/hydraulique1d/metier/EnumMetierTypeCompositionLits.java branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/hydraulique1d/metier/EnumMetierTypeFrottement.java branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/hydraulique1d/metier/EnumMetierTypeNombre.java branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/hydraulique1d/metier/EnumMetierUnite.java branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/hydraulique1d/metier/Identifieur.java branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/hydraulique1d/metier/MetierBarragePrincipal.java branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/hydraulique1d/metier/MetierBief.java branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/hydraulique1d/metier/MetierCalculHydraulique1d.java branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/hydraulique1d/metier/MetierCasier.java branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/hydraulique1d/metier/MetierConditionsInitiales.java branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/hydraulique1d/metier/MetierDefinitionSections.java branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/hydraulique1d/metier/MetierDefinitionSectionsParSections.java branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/hydraulique1d/metier/MetierDefinitionSectionsParSeries.java branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/hydraulique1d/metier/MetierDefinitionSectionsParSeriesUnitaire.java branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/hydraulique1d/metier/MetierDescriptionVariable.java branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/hydraulique1d/metier/MetierDonneesHydrauliques.java branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/hydraulique1d/metier/MetierEtude1d.java branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/hydraulique1d/metier/MetierExtremite.java branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/hydraulique1d/metier/MetierHydraulique1d.java branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/hydraulique1d/metier/MetierInformationTemps.java branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/hydraulique1d/metier/MetierLaisse.java branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/hydraulique1d/metier/MetierLiaison.java branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/hydraulique1d/metier/MetierLigneEauInitiale.java branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/hydraulique1d/metier/MetierLigneEauPoint.java branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/hydraulique1d/metier/MetierLimite.java branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/hydraulique1d/metier/MetierLoiHydraulique.java branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/hydraulique1d/metier/MetierMaillage.java branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/hydraulique1d/metier/MetierNoeud.java branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/hydraulique1d/metier/MetierOptionsListing.java branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/hydraulique1d/metier/MetierOptionsListingTracer.java branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/hydraulique1d/metier/MetierParametresGeneraux.java branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/hydraulique1d/metier/MetierParametresGenerauxCasier.java branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/hydraulique1d/metier/MetierParametresReprise.java branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/hydraulique1d/metier/MetierParametresResultats.java branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/hydraulique1d/metier/MetierParametresStockage.java branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/hydraulique1d/metier/MetierParametresTailleMaxFichier.java branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/hydraulique1d/metier/MetierParametresTemporels.java branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/hydraulique1d/metier/MetierProfil.java branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/hydraulique1d/metier/MetierReseau.java branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/hydraulique1d/metier/MetierResultatsBief.java branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/hydraulique1d/metier/MetierResultatsBiefPasTemps.java branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/hydraulique1d/metier/MetierResultatsGeneraux.java branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/hydraulique1d/metier/MetierResultatsTemporelSpatial.java branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/hydraulique1d/metier/MetierResultatsTemporelSpatialBief.java branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/hydraulique1d/metier/MetierSectionCalculee.java branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/hydraulique1d/metier/MetierSectionCalculeePasTemps.java branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/hydraulique1d/metier/MetierSingularite.java branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/hydraulique1d/metier/MetierSite.java branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/hydraulique1d/metier/MetierZone.java branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/hydraulique1d/metier/MetierZoneFrottement.java branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/hydraulique1d/metier/MetierZonePlanimetrage.java branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/hydraulique1d/metier/SMetierIdentifieur.java branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/hydraulique1d/metier/SMetierIndiceZoneStockage.java branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/hydraulique1d/metier/calageauto/ branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/hydraulique1d/metier/calageauto/EnumMetierMethodeOpt.java branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/hydraulique1d/metier/calageauto/EnumMetierTypeLit.java branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/hydraulique1d/metier/calageauto/MetierApportCrueCalageAuto.java branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/hydraulique1d/metier/calageauto/MetierCalageAuto.java branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/hydraulique1d/metier/calageauto/MetierCrueCalageAuto.java branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/hydraulique1d/metier/calageauto/MetierMesureCrueCalageAuto.java branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/hydraulique1d/metier/calageauto/MetierParametresCalageAuto.java branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fuda... [truncated message content] |
From: <de...@us...> - 2009-01-14 02:23:56
|
Revision: 4353 http://fudaa.svn.sourceforge.net/fudaa/?rev=4353&view=rev Author: deniger Date: 2009-01-14 01:46:16 +0000 (Wed, 14 Jan 2009) Log Message: ----------- Modified Paths: -------------- branches/Prepro-0.92-SNAPSHOT/ant-properties.xml branches/Prepro-0.92-SNAPSHOT/fudaa-distrib/albe/build.xml branches/Prepro-0.92-SNAPSHOT/fudaa-distrib/build.xml branches/Prepro-0.92-SNAPSHOT/fudaa-distrib/mascaret/izpack/izpack_fudaa_mascaret.xml branches/Prepro-0.92-SNAPSHOT/fudaa-distrib/oscar/build.xml Added Paths: ----------- branches/Prepro-0.92-SNAPSHOT/fudaa-distrib/albe/albe.PNG branches/Prepro-0.92-SNAPSHOT/fudaa-distrib/albe/albe.bat branches/Prepro-0.92-SNAPSHOT/fudaa-distrib/albe/albe.ico branches/Prepro-0.92-SNAPSHOT/fudaa-distrib/albe/albe.jpg branches/Prepro-0.92-SNAPSHOT/fudaa-distrib/albe/izpack/ branches/Prepro-0.92-SNAPSHOT/fudaa-distrib/albe/izpack/Unix_shortcutSpec.xml branches/Prepro-0.92-SNAPSHOT/fudaa-distrib/albe/izpack/izpack_fudaa_albe.xml branches/Prepro-0.92-SNAPSHOT/fudaa-distrib/albe/izpack/shortcutSpec.xml branches/Prepro-0.92-SNAPSHOT/fudaa-distrib/commun/standalone-compiler.jar branches/Prepro-0.92-SNAPSHOT/fudaa-distrib/modeleur/ branches/Prepro-0.92-SNAPSHOT/fudaa-distrib/modeleur/build.xml branches/Prepro-0.92-SNAPSHOT/fudaa-distrib/modeleur/images/ branches/Prepro-0.92-SNAPSHOT/fudaa-distrib/modeleur/images/gpl.png branches/Prepro-0.92-SNAPSHOT/fudaa-distrib/modeleur/images/mdl-logo.png branches/Prepro-0.92-SNAPSHOT/fudaa-distrib/modeleur/images/update.png branches/Prepro-0.92-SNAPSHOT/fudaa-distrib/modeleur/images/web.png branches/Prepro-0.92-SNAPSHOT/fudaa-distrib/modeleur/jars/ branches/Prepro-0.92-SNAPSHOT/fudaa-distrib/modeleur/jars/.htaccess branches/Prepro-0.92-SNAPSHOT/fudaa-distrib/modeleur/jars/fudaa-mdl.jar.var branches/Prepro-0.92-SNAPSHOT/fudaa-distrib/modeleur/mdl.jnlp branches/Prepro-0.92-SNAPSHOT/fudaa-distrib/modeleur/mdl.properties branches/Prepro-0.92-SNAPSHOT/fudaa-distrib/oscar/Licence.txt branches/Prepro-0.92-SNAPSHOT/fudaa-distrib/oscar/izpack/ branches/Prepro-0.92-SNAPSHOT/fudaa-distrib/oscar/izpack/Unix_shortcutSpec.xml branches/Prepro-0.92-SNAPSHOT/fudaa-distrib/oscar/izpack/izpack_fudaa_oscar.xml branches/Prepro-0.92-SNAPSHOT/fudaa-distrib/oscar/izpack/shortcutSpec.xml branches/Prepro-0.92-SNAPSHOT/fudaa-distrib/oscar/izpack/standalone-compiler.jar branches/Prepro-0.92-SNAPSHOT/fudaa-distrib/oscar/oscar.JPG branches/Prepro-0.92-SNAPSHOT/fudaa-distrib/oscar/oscar.PNG branches/Prepro-0.92-SNAPSHOT/fudaa-distrib/oscar/oscar.bat branches/Prepro-0.92-SNAPSHOT/fudaa-distrib/oscar/oscar.ico branches/Prepro-0.92-SNAPSHOT/fudaa-distrib/sinavi3/ branches/Prepro-0.92-SNAPSHOT/fudaa-distrib/sinavi3/Licence.txt branches/Prepro-0.92-SNAPSHOT/fudaa-distrib/sinavi3/build.xml branches/Prepro-0.92-SNAPSHOT/fudaa-distrib/sinavi3/izpack/ branches/Prepro-0.92-SNAPSHOT/fudaa-distrib/sinavi3/izpack/Unix_shortcutSpec.xml branches/Prepro-0.92-SNAPSHOT/fudaa-distrib/sinavi3/izpack/izpack_fudaa_sinavi3.xml branches/Prepro-0.92-SNAPSHOT/fudaa-distrib/sinavi3/izpack/shortcutSpec.xml branches/Prepro-0.92-SNAPSHOT/fudaa-distrib/sinavi3/izpack/standalone-compiler.jar branches/Prepro-0.92-SNAPSHOT/fudaa-distrib/sinavi3/sinavi3.PNG branches/Prepro-0.92-SNAPSHOT/fudaa-distrib/sinavi3/sinavi3.bat branches/Prepro-0.92-SNAPSHOT/fudaa-distrib/sinavi3/sinavi3.ico branches/Prepro-0.92-SNAPSHOT/fudaa-distrib/sinavi3/sinavi3.jpg Removed Paths: ------------- branches/Prepro-0.92-SNAPSHOT/fudaa-distrib/albe/izpack/Unix_shortcutSpec.xml branches/Prepro-0.92-SNAPSHOT/fudaa-distrib/albe/izpack/izpack_fudaa_albe.xml branches/Prepro-0.92-SNAPSHOT/fudaa-distrib/albe/izpack/shortcutSpec.xml branches/Prepro-0.92-SNAPSHOT/fudaa-distrib/modeleur/build.xml branches/Prepro-0.92-SNAPSHOT/fudaa-distrib/modeleur/images/ branches/Prepro-0.92-SNAPSHOT/fudaa-distrib/modeleur/images/gpl.png branches/Prepro-0.92-SNAPSHOT/fudaa-distrib/modeleur/images/mdl-logo.png branches/Prepro-0.92-SNAPSHOT/fudaa-distrib/modeleur/images/update.png branches/Prepro-0.92-SNAPSHOT/fudaa-distrib/modeleur/images/web.png branches/Prepro-0.92-SNAPSHOT/fudaa-distrib/modeleur/jars/ branches/Prepro-0.92-SNAPSHOT/fudaa-distrib/modeleur/jars/.htaccess branches/Prepro-0.92-SNAPSHOT/fudaa-distrib/modeleur/jars/fudaa-mdl.jar.var branches/Prepro-0.92-SNAPSHOT/fudaa-distrib/modeleur/mdl.jnlp branches/Prepro-0.92-SNAPSHOT/fudaa-distrib/modeleur/mdl.properties branches/Prepro-0.92-SNAPSHOT/fudaa-distrib/oscar/izpack/Unix_shortcutSpec.xml branches/Prepro-0.92-SNAPSHOT/fudaa-distrib/oscar/izpack/izpack_fudaa_oscar.xml branches/Prepro-0.92-SNAPSHOT/fudaa-distrib/oscar/izpack/shortcutSpec.xml branches/Prepro-0.92-SNAPSHOT/fudaa-distrib/oscar/izpack/standalone-compiler.jar branches/Prepro-0.92-SNAPSHOT/fudaa-distrib/sinavi3/Licence.txt branches/Prepro-0.92-SNAPSHOT/fudaa-distrib/sinavi3/build.xml branches/Prepro-0.92-SNAPSHOT/fudaa-distrib/sinavi3/izpack/ branches/Prepro-0.92-SNAPSHOT/fudaa-distrib/sinavi3/izpack/Unix_shortcutSpec.xml branches/Prepro-0.92-SNAPSHOT/fudaa-distrib/sinavi3/izpack/izpack_fudaa_sinavi3.xml branches/Prepro-0.92-SNAPSHOT/fudaa-distrib/sinavi3/izpack/shortcutSpec.xml branches/Prepro-0.92-SNAPSHOT/fudaa-distrib/sinavi3/izpack/standalone-compiler.jar branches/Prepro-0.92-SNAPSHOT/fudaa-distrib/sinavi3/sinavi3.PNG branches/Prepro-0.92-SNAPSHOT/fudaa-distrib/sinavi3/sinavi3.bat branches/Prepro-0.92-SNAPSHOT/fudaa-distrib/sinavi3/sinavi3.ico branches/Prepro-0.92-SNAPSHOT/fudaa-distrib/sinavi3/sinavi3.jpg Modified: branches/Prepro-0.92-SNAPSHOT/ant-properties.xml =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ant-properties.xml 2009-01-14 01:43:21 UTC (rev 4352) +++ branches/Prepro-0.92-SNAPSHOT/ant-properties.xml 2009-01-14 01:46:16 UTC (rev 4353) @@ -1,10 +1,10 @@ <?xml version="1.0" encoding="ISO-8859-1"?> <!-- ! @creation 2006-02-02 -! @modification $Date: 2006-09-28 10:03:45 $ +! @modification $Date: 2008-01-17 11:36:59 $ ! @license GNU General Public License 2 ! @copyright (c)1998-2001 CETMEF 2 bd Gambetta F-60231 Compiegne -! @version $Id: ant-properties.xml,v 1.8 2006-09-28 10:03:45 deniger Exp $ +! @version $Id: ant-properties.xml,v 1.8.8.1 2008-01-17 11:36:59 bmarchan Exp $ ! @author Fred deniger ! ! Ce fichier ant n'est pas \xE0 utiliser tel quel. Il faut utiliser le build de @@ -88,9 +88,9 @@ <property name="build.compiler.deprecation" value="off" /> <property name="build.compiler.failonerror" value="false" /> - <property name="java.maxmemory" value="128M" /> + <property name="java.maxmemory" value="1024M" /> <property name="javadoc.link" value="http://java.sun.com/j2se/1.4/docs/api/" /> - <property name="javadoc.maxmemory" value="128M" /> + <property name="javadoc.maxmemory" value="1024M" /> <property name="javadoc.version" value="true" /> <property name="javadoc.use" value="true" /> <property name="javadoc.author" value="true" /> Copied: branches/Prepro-0.92-SNAPSHOT/fudaa-distrib/albe/albe.PNG (from rev 4350, trunk/fudaa_devel/fudaa-distrib/albe/albe.PNG) =================================================================== (Binary files differ) Copied: branches/Prepro-0.92-SNAPSHOT/fudaa-distrib/albe/albe.bat (from rev 4350, trunk/fudaa_devel/fudaa-distrib/albe/albe.bat) =================================================================== --- branches/Prepro-0.92-SNAPSHOT/fudaa-distrib/albe/albe.bat (rev 0) +++ branches/Prepro-0.92-SNAPSHOT/fudaa-distrib/albe/albe.bat 2009-01-14 01:46:16 UTC (rev 4353) @@ -0,0 +1,6 @@ +echo off +cls +echo Execution de Fudaa-Albe en cours... +java.exe -Xmx256m -DFUDAA_SERVEUR=serveurs\albe -jar fudaa-albe.jar +cls +echo Fin d'execution de Fudaa-Albe \ No newline at end of file Copied: branches/Prepro-0.92-SNAPSHOT/fudaa-distrib/albe/albe.ico (from rev 4350, trunk/fudaa_devel/fudaa-distrib/albe/albe.ico) =================================================================== (Binary files differ) Copied: branches/Prepro-0.92-SNAPSHOT/fudaa-distrib/albe/albe.jpg (from rev 4350, trunk/fudaa_devel/fudaa-distrib/albe/albe.jpg) =================================================================== (Binary files differ) Modified: branches/Prepro-0.92-SNAPSHOT/fudaa-distrib/albe/build.xml =================================================================== --- branches/Prepro-0.92-SNAPSHOT/fudaa-distrib/albe/build.xml 2009-01-14 01:43:21 UTC (rev 4352) +++ branches/Prepro-0.92-SNAPSHOT/fudaa-distrib/albe/build.xml 2009-01-14 01:46:16 UTC (rev 4353) @@ -1,16 +1,17 @@ <?xml version="1.0" encoding="ISO-8859-15"?> <!-- ! @creation 2006-9-28 -! @modification $Date: 2007-10-29 15:06:12 $ +! @modification $Date: 2008-11-28 12:00:00 $ ! @license GNU General Public License 2 ! @copyright (c)1998-2001 CETMEF 2 bd Gambetta F-60231 Compiegne -! @version $Id: build.xml,v 1.1 2007-10-29 15:06:12 clavreul Exp $ +! @version $Id: build.xml,v 1.2 2008-11-28 12:00:00 fargeix Exp $ ! @author Nicolas Clavreul ! ! build permettant de construire le jar --> <project name="albe" default="deploy" basedir="."> <import file="../ant-deploy.xml" /> + <taskdef name="izpack" classpath="../commun/standalone-compiler.jar" classname="com.izforge.izpack.ant.IzPackTask" /> <property name="this.main.class" value="Albe" /> <!-- @@ -87,4 +88,9 @@ </genjar> </target> --> + + <taskdef resource="genjar.properties"/> + <target name="createInstaller" description="cree l'installeur Albe"> + <izpack input="izpack/izpack_fudaa_albe.xml" output="../../../distrib/build/jar/albe/Fudaa_Albe_Install.jar" basedir="." /> + </target> </project> Deleted: branches/Prepro-0.92-SNAPSHOT/fudaa-distrib/albe/izpack/Unix_shortcutSpec.xml =================================================================== --- trunk/fudaa_devel/fudaa-distrib/albe/izpack/Unix_shortcutSpec.xml 2009-01-13 20:42:41 UTC (rev 4350) +++ branches/Prepro-0.92-SNAPSHOT/fudaa-distrib/albe/izpack/Unix_shortcutSpec.xml 2009-01-14 01:46:16 UTC (rev 4353) @@ -1,40 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" standalone="yes" ?> -<shortcuts> - <programGroup defaultName="Fudaa Albe" location="applications"/> - <shortcut - name="Lancer Albe" - programGroup="yes" - desktop="yes" - applications="no" - startMenu="no" - startup="no" - target="$JAVA_HOME/bin/java" - commandLine="-DINSTALLDIR=$INSTALL_PATH -DFUDAA_SERVEUR=$INSTALL_PATH/serveurs/albe -cp $INSTALL_PATH/fudaa-albe.jar org.fudaa.fudaa.albe.Albe" - workingDirectory="$INSTALL_PATH" - type="Application" - iconFile="$INSTALL_PATH/albe.png" - initialState="noShow" - description="Lance le logiciel Albe"> - <createForPack name="Albe"/> - </shortcut> - - <shortcut - name="Supprimer Albe" - programGroup="yes" - desktop="yes" - applications="no" - startMenu="no" - startup="no" - target="$JAVA_HOME/bin/java" - commandLine="-jar "$INSTALL_PATH/Uninstaller/uninstaller.jar"" - initialState="noShow" - iconFile="trashcan_full" - iconIndex="0" - workingDirectory="" - type="Application" - encoding="UTF-8" - description="Supprime le logiciel Albe"> - <createForPack name="Albe"/> - </shortcut> - -</shortcuts> \ No newline at end of file Copied: branches/Prepro-0.92-SNAPSHOT/fudaa-distrib/albe/izpack/Unix_shortcutSpec.xml (from rev 4350, trunk/fudaa_devel/fudaa-distrib/albe/izpack/Unix_shortcutSpec.xml) =================================================================== --- branches/Prepro-0.92-SNAPSHOT/fudaa-distrib/albe/izpack/Unix_shortcutSpec.xml (rev 0) +++ branches/Prepro-0.92-SNAPSHOT/fudaa-distrib/albe/izpack/Unix_shortcutSpec.xml 2009-01-14 01:46:16 UTC (rev 4353) @@ -0,0 +1,40 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes" ?> +<shortcuts> + <programGroup defaultName="Fudaa Albe" location="applications"/> + <shortcut + name="Lancer Albe" + programGroup="yes" + desktop="yes" + applications="no" + startMenu="no" + startup="no" + target="$JAVA_HOME/bin/java" + commandLine="-DINSTALLDIR=$INSTALL_PATH -DFUDAA_SERVEUR=$INSTALL_PATH/serveurs/albe -cp $INSTALL_PATH/fudaa-albe.jar org.fudaa.fudaa.albe.Albe" + workingDirectory="$INSTALL_PATH" + type="Application" + iconFile="$INSTALL_PATH/albe.png" + initialState="noShow" + description="Lance le logiciel Albe"> + <createForPack name="Albe"/> + </shortcut> + + <shortcut + name="Supprimer Albe" + programGroup="yes" + desktop="yes" + applications="no" + startMenu="no" + startup="no" + target="$JAVA_HOME/bin/java" + commandLine="-jar "$INSTALL_PATH/Uninstaller/uninstaller.jar"" + initialState="noShow" + iconFile="trashcan_full" + iconIndex="0" + workingDirectory="" + type="Application" + encoding="UTF-8" + description="Supprime le logiciel Albe"> + <createForPack name="Albe"/> + </shortcut> + +</shortcuts> \ No newline at end of file Deleted: branches/Prepro-0.92-SNAPSHOT/fudaa-distrib/albe/izpack/izpack_fudaa_albe.xml =================================================================== --- trunk/fudaa_devel/fudaa-distrib/albe/izpack/izpack_fudaa_albe.xml 2009-01-13 20:42:41 UTC (rev 4350) +++ branches/Prepro-0.92-SNAPSHOT/fudaa-distrib/albe/izpack/izpack_fudaa_albe.xml 2009-01-14 01:46:16 UTC (rev 4353) @@ -1,91 +0,0 @@ -<?xml version="1.0" encoding="iso-8859-1" standalone="yes" ?> - -<!-- - A sample installation file. - Use it as a base for your own installers :-) - - To compile it : - - go in the bin directory where you installed IzPack - - call "compile ../sample/install.xml -b ../sample" ---> - -<installation version="1.0"> - - <!-- - The info section. - The meaning of the tags should be natural ... - --> - <info> - <appname>Albe</appname> - <appversion>1.1.1</appversion> - <authors> - <author name="Sabrina DELATTRE" email="de...@fu..."/> - </authors> - <url>http://www.cetmef.developpement-durable.gouv.fr/</url> - </info> - - <!-- - The gui preferences indication. - Sets the installer window to 640x480. It will not be able to change the size. - --> - <guiprefs width="800" height="520" resizable="no"/> - - <variables> - <variable name="$DesktopShortcutCheckboxEnabled" value="true"/> - </variables> - - <!-- - The locale section. - Asks here to include the English and French langpacks. - --> - <locale> - <langpack iso3="fra"/> - </locale> - - <!-- - The resources section. - The ids must be these ones if you want to use the LicencePanel and/or the InfoPanel. - --> - <resources> - <res id="LicencePanel.licence" src="../commun/licence.txt"/> - <res id="shortcutSpec.xml" src="izpack/shortcutSpec.xml"/> - <res id="Unix_shortcutSpec.xml" src="izpack/Unix_shortcutSpec.xml"/> - <res src="albe.jpg" id="Installer.image.0"/> - </resources> - - <!-- - The panels section. - We indicate here which panels we want to use. The order will be respected. - --> - <panels> - <panel classname="HelloPanel" id="hellopanel"/> - <panel classname="LicencePanel" id="licensepanel"/> - <panel classname="TargetPanel" id="targetpanel"/> - <panel classname="PacksPanel" id="packspanel"/> - <panel classname="InstallPanel" id="installpanel"/> - <panel classname="ShortcutPanel" id="shortcutpanel"/> - <panel classname="FinishPanel" id="finishpanel"/> - </panels> - - <!-- - The packs section. - We specify here our packs. - --> - - <packs> - <pack name="Albe" required="yes"> - <description>Installe tous les composants du logiciel Albe</description> - <file src="../commun/licence.txt" targetdir="$INSTALL_PATH"/> - <file src="albe.bat" targetdir="$INSTALL_PATH"/> - <file src="albe.ico" targetdir="$INSTALL_PATH"/> - <file src="albe.png" targetdir="$INSTALL_PATH"/> - <file src="../../../distrib/build/jar/albe/fudaa-albe.jar" targetdir="$INSTALL_PATH"/> - <file src="../../aide/src/albe" targetdir="$INSTALL_PATH/aide"/> - <file src="../../fudaa/serveurs/albe" targetdir="$INSTALL_PATH/serveurs"/> - <executable targetfile="$INSTALL_PATH/serveurs/albe/bin/linux/albe_linux.x" stage="never"/> - </pack> - </packs> - - <native type="izpack" name="ShellLink.dll"/> - -</installation> Copied: branches/Prepro-0.92-SNAPSHOT/fudaa-distrib/albe/izpack/izpack_fudaa_albe.xml (from rev 4350, trunk/fudaa_devel/fudaa-distrib/albe/izpack/izpack_fudaa_albe.xml) =================================================================== --- branches/Prepro-0.92-SNAPSHOT/fudaa-distrib/albe/izpack/izpack_fudaa_albe.xml (rev 0) +++ branches/Prepro-0.92-SNAPSHOT/fudaa-distrib/albe/izpack/izpack_fudaa_albe.xml 2009-01-14 01:46:16 UTC (rev 4353) @@ -0,0 +1,91 @@ +<?xml version="1.0" encoding="iso-8859-1" standalone="yes" ?> + +<!-- + A sample installation file. + Use it as a base for your own installers :-) + + To compile it : + - go in the bin directory where you installed IzPack + - call "compile ../sample/install.xml -b ../sample" +--> + +<installation version="1.0"> + + <!-- + The info section. + The meaning of the tags should be natural ... + --> + <info> + <appname>Albe</appname> + <appversion>1.1.1</appversion> + <authors> + <author name="Sabrina DELATTRE" email="de...@fu..."/> + </authors> + <url>http://www.cetmef.developpement-durable.gouv.fr/</url> + </info> + + <!-- + The gui preferences indication. + Sets the installer window to 640x480. It will not be able to change the size. + --> + <guiprefs width="800" height="520" resizable="no"/> + + <variables> + <variable name="$DesktopShortcutCheckboxEnabled" value="true"/> + </variables> + + <!-- + The locale section. + Asks here to include the English and French langpacks. + --> + <locale> + <langpack iso3="fra"/> + </locale> + + <!-- + The resources section. + The ids must be these ones if you want to use the LicencePanel and/or the InfoPanel. + --> + <resources> + <res id="LicencePanel.licence" src="../commun/licence.txt"/> + <res id="shortcutSpec.xml" src="izpack/shortcutSpec.xml"/> + <res id="Unix_shortcutSpec.xml" src="izpack/Unix_shortcutSpec.xml"/> + <res src="albe.jpg" id="Installer.image.0"/> + </resources> + + <!-- + The panels section. + We indicate here which panels we want to use. The order will be respected. + --> + <panels> + <panel classname="HelloPanel" id="hellopanel"/> + <panel classname="LicencePanel" id="licensepanel"/> + <panel classname="TargetPanel" id="targetpanel"/> + <panel classname="PacksPanel" id="packspanel"/> + <panel classname="InstallPanel" id="installpanel"/> + <panel classname="ShortcutPanel" id="shortcutpanel"/> + <panel classname="FinishPanel" id="finishpanel"/> + </panels> + + <!-- + The packs section. + We specify here our packs. + --> + + <packs> + <pack name="Albe" required="yes"> + <description>Installe tous les composants du logiciel Albe</description> + <file src="../commun/licence.txt" targetdir="$INSTALL_PATH"/> + <file src="albe.bat" targetdir="$INSTALL_PATH"/> + <file src="albe.ico" targetdir="$INSTALL_PATH"/> + <file src="albe.png" targetdir="$INSTALL_PATH"/> + <file src="../../../distrib/build/jar/albe/fudaa-albe.jar" targetdir="$INSTALL_PATH"/> + <file src="../../aide/src/albe" targetdir="$INSTALL_PATH/aide"/> + <file src="../../fudaa/serveurs/albe" targetdir="$INSTALL_PATH/serveurs"/> + <executable targetfile="$INSTALL_PATH/serveurs/albe/bin/linux/albe_linux.x" stage="never"/> + </pack> + </packs> + + <native type="izpack" name="ShellLink.dll"/> + +</installation> Deleted: branches/Prepro-0.92-SNAPSHOT/fudaa-distrib/albe/izpack/shortcutSpec.xml =================================================================== --- trunk/fudaa_devel/fudaa-distrib/albe/izpack/shortcutSpec.xml 2009-01-13 20:42:41 UTC (rev 4350) +++ branches/Prepro-0.92-SNAPSHOT/fudaa-distrib/albe/izpack/shortcutSpec.xml 2009-01-14 01:46:16 UTC (rev 4353) @@ -1,36 +0,0 @@ -<shortcuts> - <skipIfNotSupported/> - <programGroup defaultName="Applications Fudaa\Albe" location="applications"/> - <shortcut - name="Lancer Albe" - programGroup="yes" - desktop="yes" - applications="no" - startMenu="no" - startup="no" - target="$INSTALL_PATH\albe.bat" - commandLine="" - workingDirectory="$INSTALL_PATH" - iconFile="$INSTALL_PATH\albe.ico" - initialState="noShow" - description="Lance le logiciel Albe"> - <createForPack name="Albe"/> - </shortcut> - - <shortcut - name="Supprimer Albe" - programGroup="yes" - desktop="no" - applications="no" - startMenu="no" - startup="no" - target="$INSTALL_PATH\Uninstaller\uninstaller.jar" - commandLine="" - iconFile="%SystemRoot%\system32\SHELL32.dll" - iconIndex="31" - description="Supprime le logiciel Albe"> - - <createForPack name="Albe"/> - </shortcut> - -</shortcuts> Copied: branches/Prepro-0.92-SNAPSHOT/fudaa-distrib/albe/izpack/shortcutSpec.xml (from rev 4350, trunk/fudaa_devel/fudaa-distrib/albe/izpack/shortcutSpec.xml) =================================================================== --- branches/Prepro-0.92-SNAPSHOT/fudaa-distrib/albe/izpack/shortcutSpec.xml (rev 0) +++ branches/Prepro-0.92-SNAPSHOT/fudaa-distrib/albe/izpack/shortcutSpec.xml 2009-01-14 01:46:16 UTC (rev 4353) @@ -0,0 +1,36 @@ +<shortcuts> + <skipIfNotSupported/> + <programGroup defaultName="Applications Fudaa\Albe" location="applications"/> + <shortcut + name="Lancer Albe" + programGroup="yes" + desktop="yes" + applications="no" + startMenu="no" + startup="no" + target="$INSTALL_PATH\albe.bat" + commandLine="" + workingDirectory="$INSTALL_PATH" + iconFile="$INSTALL_PATH\albe.ico" + initialState="noShow" + description="Lance le logiciel Albe"> + <createForPack name="Albe"/> + </shortcut> + + <shortcut + name="Supprimer Albe" + programGroup="yes" + desktop="no" + applications="no" + startMenu="no" + startup="no" + target="$INSTALL_PATH\Uninstaller\uninstaller.jar" + commandLine="" + iconFile="%SystemRoot%\system32\SHELL32.dll" + iconIndex="31" + description="Supprime le logiciel Albe"> + + <createForPack name="Albe"/> + </shortcut> + +</shortcuts> Modified: branches/Prepro-0.92-SNAPSHOT/fudaa-distrib/build.xml =================================================================== --- branches/Prepro-0.92-SNAPSHOT/fudaa-distrib/build.xml 2009-01-14 01:43:21 UTC (rev 4352) +++ branches/Prepro-0.92-SNAPSHOT/fudaa-distrib/build.xml 2009-01-14 01:46:16 UTC (rev 4353) @@ -49,7 +49,7 @@ <mkdir dir="${fudaa.dist.classes.test.dir}" /> <echo message="debug=${build.compiler.debug}" /> <echo message="optimize=${build.compiler.optimize}" /> - <echo message="Vous devez utiliser java 1.4" /> + <echo message="Vous devez utiliser java 1.5" /> <echo message="version utilisee: ${ant.java.version}" /> <ant dir="${ctulu.dir}" antfile="${ctulu.build.file}" target="build" inheritAll="false"> <property name="build.compiler" value="${build.compiler}" /> Copied: branches/Prepro-0.92-SNAPSHOT/fudaa-distrib/commun/standalone-compiler.jar (from rev 4350, trunk/fudaa_devel/fudaa-distrib/commun/standalone-compiler.jar) =================================================================== (Binary files differ) Modified: branches/Prepro-0.92-SNAPSHOT/fudaa-distrib/mascaret/izpack/izpack_fudaa_mascaret.xml =================================================================== --- branches/Prepro-0.92-SNAPSHOT/fudaa-distrib/mascaret/izpack/izpack_fudaa_mascaret.xml 2009-01-14 01:43:21 UTC (rev 4352) +++ branches/Prepro-0.92-SNAPSHOT/fudaa-distrib/mascaret/izpack/izpack_fudaa_mascaret.xml 2009-01-14 01:46:16 UTC (rev 4353) @@ -1,110 +1,111 @@ -<?xml version="1.0" encoding="UTF-8" standalone="yes" ?> -<!-- - A sample installation file. - Use it as a base for your own installers :-) - - To compile it : - - go in the bin directory where you installed IzPack - - call "compile ../sample/install.xml -b ../sample" - - --> -<installation version="1.0"> - <!-- - The info section. - The meaning of the tags should be natural ... - - --> -<info> - <appname>Fudaa-Mascaret</appname> - <appversion>3.1 alpha 1</appversion> - <variable name="released-on" value="13/12/2007" /> - <authors> - <author name="EDF Recherche et Développement" email="" /> - <author name="CETMEF" email="" /> - </authors> - <url>http://rd.edf.com</url> - </info> -<native type="izpack" name="ShellLink.dll" /> - <!-- - The gui preferences indication. - Sets the installer window to 800x420. It will be able to change the size. - - --> - <guiprefs width="800" height="420" resizable="yes" /> - <!-- - The locale section. - Asks here to include the French langpacks. - - --> - <locale> - <langpack iso3="fra" /> - </locale> - <!-- - The resources section. - The ids must be these ones if you want to use the LicencePanel and/or the InfoPanel. - - --> - <resources> - <res src="izpack/shortcutSpec.xml" id="shortcutSpec.xml" /> - <res src="Licence.txt" id="LicencePanel.licence"/> - <res src="Readme.txt" id="InfoPanel.info" /> - <res src="fudaamascaret.jpg" id="Installer.image"/> - <!-- res src="izpack/RegistrySpec.xml" id="RegistrySpec.xml"/ --> - </resources> - - <!-- - The panels section. - We indicate here which panels we want to use. The order will be respected. - - --> - <panels> - <panel classname="HelloPanel" /> - <panel classname="InfoPanel" /> - <panel classname="LicencePanel" /> - <panel classname="TargetPanel" /> - <panel classname="PacksPanel" /> - <panel classname="InstallPanel" /> - <panel classname="ShortcutPanel" /> - <panel classname="FinishPanel" /> - </panels> - <!-- - The packs section. - We specify here our packs. - --> - <packs> - <pack name="Core" required="yes"> - <description>L'application de base intégrant l'interface graphique Fudaa-Mascaret et le code de calcul Mascaret</description> - <file src="../../../distrib/build/jar/mascaret/fudaa-mascaret.jar" targetdir="$INSTALL_PATH" /> - <file src="../../fudaa/serveurs" targetdir="$INSTALL_PATH" /> - <file src="fudaa-mascaret.bat" targetdir="$INSTALL_PATH" /> - <file src="icons" targetdir="$INSTALL_PATH" /> - <parsable targetfile="$INSTALL_PATH/fudaa-mascaret.bat" /> <!-- The file will be parsed --> - </pack> - <pack name="Exemples" required="no"> - <description>Quelques exemples de fichiers d'entrée de Fudaa-Mascaret</description> - <file src="exemples" targetdir="$INSTALL_PATH" /> <!-- Reccursive adding --> - </pack> - <pack name="Docs" required="no"> - <description>Le guide de prise en main de Fudaa-Mascaret</description> - <file src="doc" targetdir="$INSTALL_PATH" /> <!-- Reccursive adding --> - </pack> - <pack name="Sources" required="no"> - <description>Le code source du projet Fudaa</description> - <fileset dir="../.." targetdir="$INSTALL_PATH/src"> - <include name="ctulu/src/**/*.*" /> - <include name="dodico/idl/**/*.*" /> - <include name="dodico/src/**/*.*" /> - <include name="ebli/src/**/*.*" /> - <include name="fudaa/src/**/*.*" /> - </fileset> - </pack> - </packs> - - <!-- The native libraries to add --> - <native type="izpack" name="ShellLink.dll" /> - <native type="3rdparty" name="COIOSHelper.dll" stage="both"> - <os family="windows"/> - </native> - - - </installation> \ No newline at end of file +<?xml version="1.0" encoding="UTF-8" standalone="yes" ?> +<!-- + A sample installation file. + Use it as a base for your own installers :-) + + To compile it : + - go in the bin directory where you installed IzPack + - call "compile ../sample/install.xml -b ../sample" + + --> +<installation version="1.0"> + <!-- + The info section. + The meaning of the tags should be natural ... + + --> +<info> + <appname>Fudaa-Mascaret</appname> + <appversion>3.1 alpha 1</appversion> + <variable name="released-on" value="13/12/2007" /> + <authors> + <author name="EDF Recherche et Développement" email="" /> + <author name="CETMEF" email="" /> + </authors> + <url>http://rd.edf.com</url> + </info> +<native type="izpack" name="ShellLink.dll" /> + <!-- + The gui preferences indication. + Sets the installer window to 800x420. It will be able to change the size. + + --> + <guiprefs width="800" height="420" resizable="yes" /> + <!-- + The locale section. + Asks here to include the French langpacks. + + --> + <locale> + <langpack iso3="fra" /> + </locale> + <!-- + The resources section. + The ids must be these ones if you want to use the LicencePanel and/or the InfoPanel. + + --> + <resources> + <res src="izpack/shortcutSpec.xml" id="shortcutSpec.xml" /> + <res src="Licence.txt" id="LicencePanel.licence"/> + <res src="Readme.txt" id="InfoPanel.info" /> + <res src="fudaamascaret.jpg" id="Installer.image"/> + <!-- res src="izpack/RegistrySpec.xml" id="RegistrySpec.xml"/ --> + </resources> + + <!-- + The panels section. + We indicate here which panels we want to use. The order will be respected. + + --> + <panels> + <panel classname="HelloPanel" /> + <panel classname="InfoPanel" /> + <panel classname="LicencePanel" /> + <panel classname="TargetPanel" /> + <panel classname="PacksPanel" /> + <panel classname="InstallPanel" /> + <panel classname="ShortcutPanel" /> + <panel classname="FinishPanel" /> + </panels> + <!-- + The packs section. + We specify here our packs. + --> + <packs> + <pack name="Core" required="yes"> + <description>L'application de base intégrant l'interface graphique Fudaa-Mascaret et le code de calcul Mascaret</description> + <file src="../../../distrib/build/jar/mascaret/fudaa-mascaret.jar" targetdir="$INSTALL_PATH" /> + <file src="../../fudaa/serveurs" targetdir="$INSTALL_PATH" /> + <file src="../../aide/src/mascaret" targetdir="$INSTALL_PATH/aide/src" /> + <file src="fudaa-mascaret.bat" targetdir="$INSTALL_PATH" /> + <file src="icons" targetdir="$INSTALL_PATH" /> + <parsable targetfile="$INSTALL_PATH/fudaa-mascaret.bat" /> <!-- The file will be parsed --> + </pack> + <pack name="Exemples" required="no"> + <description>Quelques exemples de fichiers d'entrée de Fudaa-Mascaret</description> + <file src="exemples" targetdir="$INSTALL_PATH" /> <!-- Reccursive adding --> + </pack> + <pack name="Docs" required="no"> + <description>Le guide de prise en main de Fudaa-Mascaret</description> + <file src="doc" targetdir="$INSTALL_PATH" /> <!-- Reccursive adding --> + </pack> + <pack name="Sources" required="no"> + <description>Le code source du projet Fudaa</description> + <fileset dir="../.." targetdir="$INSTALL_PATH/src"> + <include name="ctulu/src/**/*.*" /> + <include name="dodico/idl/**/*.*" /> + <include name="dodico/src/**/*.*" /> + <include name="ebli/src/**/*.*" /> + <include name="fudaa/src/**/*.*" /> + </fileset> + </pack> + </packs> + + <!-- The native libraries to add --> + <native type="izpack" name="ShellLink.dll" /> + <native type="3rdparty" name="COIOSHelper.dll" stage="both"> + <os family="windows"/> + </native> + + + </installation> Deleted: branches/Prepro-0.92-SNAPSHOT/fudaa-distrib/modeleur/build.xml =================================================================== --- trunk/fudaa_devel/fudaa-distrib/modeleur/build.xml 2009-01-13 20:42:41 UTC (rev 4350) +++ branches/Prepro-0.92-SNAPSHOT/fudaa-distrib/modeleur/build.xml 2009-01-14 01:46:16 UTC (rev 4353) @@ -1,239 +0,0 @@ -<?xml version="1.0" encoding="ISO-8859-1"?> -<!-- -! @file distribution.xml -! @creation 2002-04-05 -! @modification $Date: 2008-02-14 17:07:35 $ -! @license GNU General Public License 2 -! @copyright (c)1998-2001 CETMEF 2 bd Gambetta F-60231 Compiegne -! @version $Id: build.xml,v 1.1.2.1 2008-02-14 17:07:35 bmarchan Exp $ -! @author Fred deniger -! -! Voir les fichiers fudaa.default.properties et ANT_README.txt pour la liste -! des taches et pour modifier des parametres. -! Pour mettre \xE0 jour les sites distants, le fichier ant.properties doit \xEAtre correctement renseign\xE9. -! Il se peut que eclipse d\xE9tecte une erreur dans ce script comme quoi la cible 'build' n'est pas trouv\xE9 -! mais il ne faut pas en tenir compte: elle est import\xE9e dans le fichier '../ant-deploy.xml'. ---> -<project name="modeleur" default="deploy" basedir="."> - - <!--on importe les taches du fichier ant-deploy.xml--> - <import file="../ant-deploy.xml" /> - - <property name="this.main.class" value="Mdl" /> - <property name="this.dir" location="./" /> - <property name="jnlp.file.name" value="mdl.jnlp" /> - <property name="jnlp.file" location="${this.dir}/${jnlp.file.name}" /> - <property name="prop.file" location="${this.dir}/mdl.properties" /> - <property file="${prop.file}" /> - <property name="ssh.install.dir" value="/home/fudaa/www/install" /> - <property name="mdl.install.dir" value="${ssh.install.dir}/mdl" /> - - <!--Construit les 2 fichiers jnlp \xE0 utiliser: un avec la 3D et l'autre sans. - Le lien pour la 3D est r\xE9cup\xE9r\xE9 dans le fichier "java3D-link.txt"--> - <target name="buildJnlp" depends=".testChemins" description="Construit le contenu des fichiers jnlp"> - <copy overwrite="true" file="${jnlp.file}" todir="${this.build.dir}" filtering="true"> - <filterset> - <filter token="version" value="v${@version@}" /> - </filterset> - </copy> - </target> - - <target name="deployAndSend" - depends="deploy,sendToFudaaFr" - description="Construit les jars et met a jour les sites distants"> - </target> - - - <!-- depends="rebuild"--> - <target name="deploy" - depends=" .testChemins" - description="efface les classes, recompile le tout,cree et signe le jar. - Les fichiers Jnlp sont \xE9galament cr\xE9\xE9s"> - <antcall target="createJar" /> - <antcall target="signJar" /> - <!--Le build Zip reconstruit deja les fichiers jnlp --> - <antcall target="buildJnlp" /> - </target> - - <!--Envoie Tout ce qui est necessaire sauf l'aide:car elle ne bouge pas beaucoup! --> - <target name="sendToFudaaFr" - depends="setProxy,.testChemins" - description="Met a jour les sites distants ( sauf le jar d'aide)"> - <scp file="${this.build.dir}/${jnlp.file.name}" - todir="${ssh.username}:${ssh.password}@${ssh.host}:${mdl.install.dir}" - trust="true" /> - <scp todir="${ssh.username}:${ssh.password}@${ssh.host}:${mdl.install.dir}/images" trust="true"> - <fileset dir="${basedir}/images" excludes="*.xcf" /> - </scp> - - <!--Pour que le tout marche il faut que le jar et le jar.pack.gz soient dans un dossier inf\xE9rieur--> - <scp file="${this.jar.file}.pack.gz" - todir="${ssh.username}:${ssh.password}@${ssh.host}:${mdl.install.dir}/jars/last" - trust="true" /> - <scp file="${this.jar.file}" - todir="${ssh.username}:${ssh.password}@${ssh.host}:${mdl.install.dir}/jars/last" - trust="true" /> - - <scp file="${basedir}/jars/fudaa-mdl.jar.var" - todir="${ssh.username}:${ssh.password}@${ssh.host}:${mdl.install.dir}/jars" - trust="true" /> - <scp file="${basedir}/jars/.htaccess" - todir="${ssh.username}:${ssh.password}@${ssh.host}:${mdl.install.dir}/jars" - trust="true" /> - </target> - - - - <target name="createJar" depends=".testCheminGenJar" description="cree fudaa_modeleur.jar"> - <!--On prepare le dossier de destination et on efface les anciens jars pour \xE9viter les conflits: - des fois la tache genjar essaie de mettre \xE0 jour le jar ce qui prend du temps et peut \xEAtre source d'erreur - subtile--> - <mkdir dir="${this.jar.dir}" /> - <delete file="${this.jar.file}" /> - <genjar jarfile="${this.jar.file}"> - <classpath path="${fudaaDist.classpath}" /> - <manifest generateEntryAttributes="no"> - <attribute name="Main-Class" value="org.fudaa.fudaa.modeleur.Mdl" /> - </manifest> - <class name="org.fudaa.fudaa.modeleur.Mdl" /> - <!--Cette classe GrData est ajout\xE9e \xE0 cause d'un bogue avec db4o qui ne retrouvait pas ces petits--> - <class name="org.fudaa.ebli.geometrie.GrData" /> - <!--Pour ces librairies, tous les fichiers et toutes les ressources sont n\xE9cessaires--> - <library jar="${ctulu.lib.dir}/db4o.jar" /> - <library jar="${ctulu.lib.dir}/fgis.jar" /> - <library jar="${ctulu.lib.dir}/looks.jar" /> - <library jar="${ctulu.lib.dir}/jep.jar" /> - <!--Pas de CORBA pour Fudaa-Modeleur--> - <classfilter> - <exclude name="org.fudaa.dodico.corba." /> - <exclude name="org.fudaa.dodico.usine." /> - </classfilter> - <!--Les ressources utilis\xE9es--> - <!--On utilise pas les icones de bu mais ceux de crystal, d'ou les excludes--> - <resource> - <fileset dir="${fudaa.dist.classes.dir}"> - <patternset refid="ressources.fic" /> - <include name="org/fudaa/dodico/commun/" /> - <include name="org/fudaa/ctulu/" /> - <include name="com/memoire/bu/" /> - <include name="com/hexidec/ekit/" /> - <include name="com/memoire/dja/" /> - <exclude name="com/memoire/dja/*_24.*" /> - <exclude name="com/memoire/dja/logo*.*" /> - <exclude name="com/memoire/dja/banner*.*" /> - <exclude name="com/memoire/bu/alma_*" /> - <exclude name="com/memoire/bu/*_16.*" /> - <exclude name="com/memoire/bu/*_20.*" /> - <exclude name="com/memoire/bu/*_22.*" /> - <exclude name="com/memoire/bu/*_24.*" /> - <exclude name="com/memoire/bu/*_26.*" /> - <exclude name="com/memoire/bu/*_32.*" /> - <exclude name="com/memoire/bu/*_48.*" /> - <exclude name="com/memoire/bu/*_64.*" /> - <exclude name="com/memoire/bu/crystal22_*" /> - <include name="com/memoire/dnd/" /> - <include name="com/memoire/bu/crystal*" /> - <include name="org/fudaa/dodico/h2d/" /> - <include name="org/fudaa/dodico/reflux/" /> - <include name="org/fudaa/ebli/ressource/" /> - <exclude name="org/fudaa/ebli/ressource/volume" /> - <exclude name="org/fudaa/ebli/ressource/echellez*" /> - <exclude name="org/fudaa/ebli/ressource/lumiere*" /> - <exclude name="org/fudaa/ebli/ressource/texture*" /> - <include name="org/fudaa/fudaa/ressource/" /> - <exclude name="org/fudaa/fudaa/ressource/connecter*" /> - <exclude name="org/fudaa/fudaa/ressource/astuces/" /> - <include name="org/fudaa/fudaa/sig/" /> - <include name="org/fudaa/fudaa/modeleur/" /> - <include name="ghm/followgui/" /> - </fileset> - </resource> - </genjar> - <!--Important car utilis\xE9 par geotools pour ces factories--> - <zip destfile="${this.jar.file}" update="true" compress="true"> - <zipgroupfileset file="${ctulu.lib.dir}/fgis.jar" - includes="META-INF/services/**,META-INF/registry*" /> - </zip> - </target> - - - <!--Signe les jars cr\xE9es. Il faut utilise le sdk 1.5 pour cette tache a cause - de l'exe pack--> - <target name="signJar" depends=".testChemins"> - <property name="jarsigner" location="${java.home}/../bin/jarsigner"> - </property> - <property file="${cert.dir}/fudaa-jar.txt" /> - <signjar jar="${this.jar.file}" - alias="${fudaa.alias}" - storepass="${fudaa.password}" - keystore="${cert.dir}/fudaa.keystore" /> - <echo>RePack200 ${this.jar.name}</echo> - <exec newenvironment="true" - dir="${this.jar.dir}" - executable="${java.home}/bin/pack200" - failonerror="true" - vmlauncher="false"> - <arg line="--repack ${this.jar.name}" /> - </exec> - <echo>RePack200 ${this.jar.name} END</echo> - <signjar jar="${this.jar.file}" - alias="${fudaa.alias}" - storepass="${fudaa.password}" - keystore="${cert.dir}/fudaa.keystore" /> - <!--Je ne sais pas pourquoi il faut le faire 2 fois - il semble qu'il y ait un bug dans les exe java - --> - <!--A retester avec les nouvelles versions de Java--> - <echo>RePack200 ${this.jar.name} ENCORE ...</echo> - <exec newenvironment="true" - dir="${this.jar.dir}" - executable="${java.home}/bin/pack200" - failonerror="true" - vmlauncher="false"> - <arg line="--repack ${this.jar.name}" /> - </exec> - <echo>RePack200 ${this.jar.name} ENCORE END</echo> - <signjar jar="${this.jar.file}" - alias="${fudaa.alias}" - storepass="${fudaa.password}" - keystore="${cert.dir}/fudaa.keystore" /> - <echo>Test ${this.jar.name}</echo> - <exec dir="${this.jar.dir}" - executable="${jarsigner}" - newenvironment="true" - failonerror="true" - vmlauncher="false"> - <arg line="-verify ${this.jar.name}" /> - </exec> - <echo>Test ${this.jar.name} END</echo> - <delete file="${this.jar.dir}/${this.jar.name}.pack.gz" /> - <echo>Pack200 ${this.jar.name}</echo> - <exec newenvironment="true" - dir="${this.jar.dir}" - executable="${java.home}/bin/pack200" - failonerror="true" - vmlauncher="false"> - <arg line="${this.jar.name}.pack.gz ${this.jar.name}" /> - </exec> - <echo>Pack200 ${this.jar.name} END</echo> - <!--On teste la signature pour \xE9viter de balancer n'importe quoi sur le site--> - <echo>Test ${this.jar.name}.pack.gz</echo> - <exec newenvironment="true" - dir="${this.jar.dir}" - executable="${java.home}/bin/unpack200" - failonerror="true" - vmlauncher="false"> - <arg line="${this.jar.name}.pack.gz ${this.jar.name}.pack.gz.jar" /> - </exec> - <exec dir="${this.jar.dir}" - executable="${jarsigner}" - newenvironment="true" - failonerror="true" - vmlauncher="false"> - <arg line="-verify ${this.jar.name}.pack.gz.jar" /> - </exec> - <delete file="${this.jar.dir}/${this.jar.name}.pack.gz.jar" /> - <echo>Test ${this.jar.name}.pack.gz END</echo> - </target> - -</project> Copied: branches/Prepro-0.92-SNAPSHOT/fudaa-distrib/modeleur/build.xml (from rev 4350, trunk/fudaa_devel/fudaa-distrib/modeleur/build.xml) =================================================================== --- branches/Prepro-0.92-SNAPSHOT/fudaa-distrib/modeleur/build.xml (rev 0) +++ branches/Prepro-0.92-SNAPSHOT/fudaa-distrib/modeleur/build.xml 2009-01-14 01:46:16 UTC (rev 4353) @@ -0,0 +1,239 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> +<!-- +! @file distribution.xml +! @creation 2002-04-05 +! @modification $Date: 2008-02-14 17:07:35 $ +! @license GNU General Public License 2 +! @copyright (c)1998-2001 CETMEF 2 bd Gambetta F-60231 Compiegne +! @version $Id: build.xml,v 1.1.2.1 2008-02-14 17:07:35 bmarchan Exp $ +! @author Fred deniger +! +! Voir les fichiers fudaa.default.properties et ANT_README.txt pour la liste +! des taches et pour modifier des parametres. +! Pour mettre \xE0 jour les sites distants, le fichier ant.properties doit \xEAtre correctement renseign\xE9. +! Il se peut que eclipse d\xE9tecte une erreur dans ce script comme quoi la cible 'build' n'est pas trouv\xE9 +! mais il ne faut pas en tenir compte: elle est import\xE9e dans le fichier '../ant-deploy.xml'. +--> +<project name="modeleur" default="deploy" basedir="."> + + <!--on importe les taches du fichier ant-deploy.xml--> + <import file="../ant-deploy.xml" /> + + <property name="this.main.class" value="Mdl" /> + <property name="this.dir" location="./" /> + <property name="jnlp.file.name" value="mdl.jnlp" /> + <property name="jnlp.file" location="${this.dir}/${jnlp.file.name}" /> + <property name="prop.file" location="${this.dir}/mdl.properties" /> + <property file="${prop.file}" /> + <property name="ssh.install.dir" value="/home/fudaa/www/install" /> + <property name="mdl.install.dir" value="${ssh.install.dir}/mdl" /> + + <!--Construit les 2 fichiers jnlp \xE0 utiliser: un avec la 3D et l'autre sans. + Le lien pour la 3D est r\xE9cup\xE9r\xE9 dans le fichier "java3D-link.txt"--> + <target name="buildJnlp" depends=".testChemins" description="Construit le contenu des fichiers jnlp"> + <copy overwrite="true" file="${jnlp.file}" todir="${this.build.dir}" filtering="true"> + <filterset> + <filter token="version" value="v${@version@}" /> + </filterset> + </copy> + </target> + + <target name="deployAndSend" + depends="deploy,sendToFudaaFr" + description="Construit les jars et met a jour les sites distants"> + </target> + + + <!-- depends="rebuild"--> + <target name="deploy" + depends=" .testChemins" + description="efface les classes, recompile le tout,cree et signe le jar. + Les fichiers Jnlp sont \xE9galament cr\xE9\xE9s"> + <antcall target="createJar" /> + <antcall target="signJar" /> + <!--Le build Zip reconstruit deja les fichiers jnlp --> + <antcall target="buildJnlp" /> + </target> + + <!--Envoie Tout ce qui est necessaire sauf l'aide:car elle ne bouge pas beaucoup! --> + <target name="sendToFudaaFr" + depends="setProxy,.testChemins" + description="Met a jour les sites distants ( sauf le jar d'aide)"> + <scp file="${this.build.dir}/${jnlp.file.name}" + todir="${ssh.username}:${ssh.password}@${ssh.host}:${mdl.install.dir}" + trust="true" /> + <scp todir="${ssh.username}:${ssh.password}@${ssh.host}:${mdl.install.dir}/images" trust="true"> + <fileset dir="${basedir}/images" excludes="*.xcf" /> + </scp> + + <!--Pour que le tout marche il faut que le jar et le jar.pack.gz soient dans un dossier inf\xE9rieur--> + <scp file="${this.jar.file}.pack.gz" + todir="${ssh.username}:${ssh.password}@${ssh.host}:${mdl.install.dir}/jars/last" + trust="true" /> + <scp file="${this.jar.file}" + todir="${ssh.username}:${ssh.password}@${ssh.host}:${mdl.install.dir}/jars/last" + trust="true" /> + + <scp file="${basedir}/jars/fudaa-mdl.jar.var" + todir="${ssh.username}:${ssh.password}@${ssh.host}:${mdl.install.dir}/jars" + trust="true" /> + <scp file="${basedir}/jars/.htaccess" + todir="${ssh.username}:${ssh.password}@${ssh.host}:${mdl.install.dir}/jars" + trust="true" /> + </target> + + + + <target name="createJar" depends=".testCheminGenJar" description="cree fudaa_modeleur.jar"> + <!--On prepare le dossier de destination et on efface les anciens jars pour \xE9viter les conflits: + des fois la tache genjar essaie de mettre \xE0 jour le jar ce qui prend du temps et peut \xEAtre source d'erreur + subtile--> + <mkdir dir="${this.jar.dir}" /> + <delete file="${this.jar.file}" /> + <genjar jarfile="${this.jar.file}"> + <classpath path="${fudaaDist.classpath}" /> + <manifest generateEntryAttributes="no"> + <attribute name="Main-Class" value="org.fudaa.fudaa.modeleur.Mdl" /> + </manifest> + <class name="org.fudaa.fudaa.modeleur.Mdl" /> + <!--Cette classe GrData est ajout\xE9e \xE0 cause d'un bogue avec db4o qui ne retrouvait pas ces petits--> + <class name="org.fudaa.ebli.geometrie.GrData" /> + <!--Pour ces librairies, tous les fichiers et toutes les ressources sont n\xE9cessaires--> + <library jar="${ctulu.lib.dir}/db4o.jar" /> + <library jar="${ctulu.lib.dir}/fgis.jar" /> + <library jar="${ctulu.lib.dir}/looks.jar" /> + <library jar="${ctulu.lib.dir}/jep.jar" /> + <!--Pas de CORBA pour Fudaa-Modeleur--> + <classfilter> + <exclude name="org.fudaa.dodico.corba." /> + <exclude name="org.fudaa.dodico.usine." /> + </classfilter> + <!--Les ressources utilis\xE9es--> + <!--On utilise pas les icones de bu mais ceux de crystal, d'ou les excludes--> + <resource> + <fileset dir="${fudaa.dist.classes.dir}"> + <patternset refid="ressources.fic" /> + <include name="org/fudaa/dodico/commun/" /> + <include name="org/fudaa/ctulu/" /> + <include name="com/memoire/bu/" /> + <include name="com/hexidec/ekit/" /> + <include name="com/memoire/dja/" /> + <exclude name="com/memoire/dja/*_24.*" /> + <exclude name="com/memoire/dja/logo*.*" /> + <exclude name="com/memoire/dja/banner*.*" /> + <exclude name="com/memoire/bu/alma_*" /> + <exclude name="com/memoire/bu/*_16.*" /> + <exclude name="com/memoire/bu/*_20.*" /> + <exclude name="com/memoire/bu/*_22.*" /> + <exclude name="com/memoire/bu/*_24.*" /> + <exclude name="com/memoire/bu/*_26.*" /> + <exclude name="com/memoire/bu/*_32.*" /> + <exclude name="com/memoire/bu/*_48.*" /> + <exclude name="com/memoire/bu/*_64.*" /> + <exclude name="com/memoire/bu/crystal22_*" /> + <include name="com/memoire/dnd/" /> + <include name="com/memoire/bu/crystal*" /> + <include name="org/fudaa/dodico/h2d/" /> + <include name="org/fudaa/dodico/reflux/" /> + <include name="org/fudaa/ebli/ressource/" /> + <exclude name="org/fudaa/ebli/ressource/volume" /> + <exclude name="org/fudaa/ebli/ressource/echellez*" /> + <exclude name="org/fudaa/ebli/ressource/lumiere*" /> + <exclude name="org/fudaa/ebli/ressource/texture*" /> + <include name="org/fudaa/fudaa/ressource/" /> + <exclude name="org/fudaa/fudaa/ressource/connecter*" /> + <exclude name="org/fudaa/fudaa/ressource/astuces/" /> + <include name="org/fudaa/fudaa/sig/" /> + <include name="org/fudaa/fudaa/modeleur/" /> + <include name="ghm/followgui/" /> + </fileset> + </resource> + </genjar> + <!--Important car utilis\xE9 par geotools pour ces factories--> + <zip destfile="${this.jar.file}" update="true" compress="true"> + <zipgroupfileset file="${ctulu.lib.dir}/fgis.jar" + includes="META-INF/services/**,META-INF/registry*" /> + </zip> + </target> + + + <!--Signe les jars cr\xE9es. Il faut utilise le sdk 1.5 pour cette tache a cause + de l'exe pack--> + <target name="signJar" depends=".testChemins"> + <property name="jarsigner" location="${java.home}/../bin/jarsigner"> + </property> + <property file="${cert.dir}/fudaa-jar.txt" /> + <signjar jar="${this.jar.file}" + alias="${fudaa.alias}" + storepass="${fudaa.password}" + keystore="${cert.dir}/fudaa.keystore" /> + <echo>RePack200 ${this.jar.name}</echo> + <exec newenvironment="true" + dir="${this.jar.dir}" + executable="${java.home}/bin/pack200" + failonerror="true" + vmlauncher="false"> + <arg line="--repack ${this.jar.name}" /> + </exec> + <echo>RePack200 ${this.jar.name} END</echo> + <signjar jar="${this.jar.file}" + alias="${fudaa.alias}" + storepass="${fudaa.password}" + keystore="${cert.dir}/fudaa.keystore" /> + <!--Je ne sais pas pourquoi il faut le faire 2 fois + il semble qu'il y ait un bug dans les exe java + --> + <!--A retester avec les nouvelles versions de Java--> + <echo>RePack200 ${this.jar.name} ENCORE ...</echo> + <exec newenvironment="true" + dir="${this.jar.dir}" + executable="${java.home}/bin/pack200" + failonerror="true" + vmlauncher="false"> + <arg line="--repack ${this.jar.name}" /> + </exec> + <echo>RePack200 ${this.jar.name} ENCORE END</echo> + <signjar jar="${this.jar.file}" + alias="${fudaa.alias}" + storepass="${fudaa.password}" + keystore="${cert.dir}/fudaa.keystore" /> + <echo>Test ${this.jar.name}</echo> + <exec dir="${this.jar.dir}" + executable="${jarsigner}" + newenvironment="true" + failonerror="true" + vmlauncher="false"> + <arg line="-verify ${this.jar.name}" /> + </exec> + <echo>Test ${this.jar.name} END</echo> + <delete file="${this.jar.dir}/${this.jar.name}.pack.gz" /> + <echo>Pack200 ${this.jar.name}</echo> + <exec newenvironment="true" + dir="${this.jar.dir}" + executable="${java.home}/bin/pack200" + failonerror="true" + vmlauncher="false"> + <arg line="${this.jar.name}.pack.gz ${this.jar.name}" /> + </exec> + <echo>Pack200 ${this.jar.name} END</echo> + <!--On teste la signature pour \xE9viter de balancer n'importe quoi sur le site--> + <echo>Test ${this.jar.name}.pack.gz</echo> + <exec newenvironment="true" + dir="${this.jar.dir}" + executable="${java.home}/bin/unpack200" + failonerror="true" + vmlauncher="false"> + <arg line="${this.jar.name}.pack.gz ${this.jar.name}.pack.gz.jar" /> + </exec> + <exec dir="${this.jar.dir}" + executable="${jarsigner}" + newenvironment="true" + failonerror="true" + vmlauncher="false"> + <arg line="-verify ${this.jar.name}.pack.gz.jar" /> + </exec> + <delete file="${this.jar.dir}/${this.jar.name}.pack.gz.jar" /> + <echo>Test ${this.jar.name}.pack.gz END</echo> + </target> + +</project> Deleted: branches/Prepro-0.92-SNAPSHOT/fudaa-distrib/modeleur/images/gpl.png =================================================================== (Binary files differ) Copied: branches/Prepro-0.92-SNAPSHOT/fudaa-distrib/modeleur/images/gpl.png (from rev 4350, trunk/fudaa_devel/fudaa-distrib/modeleur/images/gpl.png) =================================================================== (Binary files differ) Deleted: branches/Prepro-0.92-SNAPSHOT/fudaa-distrib/modeleur/images/mdl-logo.png =================================================================== (Binary files differ) Copied: branches/Prepro-0.92-SNAPSHOT/fudaa-distrib/modeleur/images/mdl-logo.png (from rev 4350, trunk/fudaa_devel/fudaa-distrib/modeleur/images/mdl-logo.png) =================================================================== (Binary files differ) Deleted: branches/Prepro-0.92-SNAPSHOT/fudaa-distrib/modeleur/images/update.png =================================================================== (Binary files differ) Copied: branches/Prepro-0.92-SNAPSHOT/fudaa-distrib/modeleur/images/update.png (from rev 4350, trunk/fudaa_devel/fudaa-distrib/modeleur/images/update.png) =================================================================== (Binary files differ) Deleted: branches/Prepro-0.92-SNAPSHOT/fudaa-distrib/modeleur/images/web.png =================================================================== (Binary files differ) Copied: branches/Prepro-0.92-SNAPSHOT/fudaa-distrib/modeleur/images/web.png (from rev 4350, trunk/fudaa_devel/fudaa-distrib/modeleur/images/web.png) =================================================================== (Binary files differ) Deleted: branches/Prepro-0.92-SNAPSHOT/fudaa-distrib/modeleur/jars/.htaccess =================================================================== --- trunk/fudaa_devel/fudaa-distrib/modeleur/jars/.htaccess 2009-01-13 20:42:41 UTC (rev 4350) +++ branches/Prepro-0.92-SNAPSHOT/fudaa-distrib/modeleur/jars/.htaccess 2009-01-14 01:46:16 UTC (rev 4353) @@ -1,14 +0,0 @@ -# Return the right mime type for JARs -AddType application/x-java-archive .jar -# Enable type maps -AddHandler application/x-type-map .var -Options +MultiViews - -<Files *.pack.gz> - # Enable the Content-Encoding header for .jar.pack.gz files - AddEncoding pack200-gzip .jar - # Stop mod_gzip from messing with the Content-Encoding - # response for these files - RemoveEncoding .gz -</Files> - Copied: branches/Prepro-0.92-SNAPSHOT/fudaa-distrib/modeleur/jars/.htaccess (from rev 4350, trunk/fudaa_devel/fudaa-distrib/modeleur/jars/.htaccess) =================================================================== --- branches/Prepro-0.92-SNAPSHOT/fudaa-distrib/modeleur/jars/.htaccess (rev 0) +++ branches/Prepro-0.92-SNAPSHOT/fudaa-distrib/modeleur/jars/.htaccess 2009-01-14 01:46:16 UTC (rev 4353) @@ -0,0 +1,14 @@ +# Return the right mime type for JARs +AddType application/x-java-archive .jar +# Enable type maps +AddHandler application/x-type-map .var +Options +MultiViews + +<Files *.pack.gz> + # Enable the Content-Encoding header for .jar.pack.gz files + AddEncoding pack200-gzip .jar + # Stop mod_gzip from messing with the Content-Encoding + # response for these files + RemoveEncoding .gz +</Files> + Deleted: branches/Prepro-0.92-SNAPSHOT/fudaa-distrib/modeleur/jars/fudaa-mdl.jar.var =================================================================== --- trunk/fudaa_devel/fudaa-distrib/modeleur/jars/fudaa-mdl.jar.var 2009-01-13 20:42:41 UTC (rev 4350) +++ branches/Prepro-0.92-SNAPSHOT/fudaa-distrib/modeleur/jars/fudaa-mdl.jar.var 2009-01-14 01:46:16 UTC (rev 4353) @@ -1,9 +0,0 @@ -URI: fudaa-modeleur.jar - -URI: last/fudaa-modeleur.jar -Content-Type: x-java-archive - -URI: last/fudaa-modeleur.jar.pack.gz -Content-Type: x-java-archive -Content-Encoding: pack200-gzip - Copied: branches/Prepro-0.92-SNAPSHOT/fudaa-distrib/modeleur/jars/fudaa-mdl.jar.var (from rev 4350, trunk/fudaa_devel/fudaa-distrib/modeleur/jars/fudaa-mdl.jar.var) =================================================================== --- branches/Prepro-0.92-SNAPSHOT/fudaa-distrib/modeleur/jars/fudaa-mdl.jar.var (rev 0) +++ branches/Prepro-0.92-SNAPSHOT/fudaa-distrib/modeleur/jars/fudaa-mdl.jar.var 2009-01-14 01:46:16 UTC (rev 4353) @@ -0,0 +1,9 @@ +URI: fudaa-modeleur.jar + +URI: last/fudaa-modeleur.jar +Content-Type: x-java-archive + +URI: last/fudaa-modeleur.jar.pack.gz +Content-Type: x-java-archive +Content-Encoding: pack200-gzip + Deleted: branches/Prepro-0.92-SNAPSHOT/fudaa-distrib/modeleur/mdl.jnlp =================================================================== --- trunk/fudaa_devel/fudaa-distrib/modeleur/mdl.jnlp 2009-01-13 20:42:41 UTC (rev 4350) +++ branches/Prepro-0.92-SNAPSHOT/fudaa-distrib/modeleur/mdl.jnlp 2009-01-14 01:46:16 UTC (rev 4353) @@ -1,66 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<jnlp - spec="1.0+" - codebase="http://fudaa.fr/install/mdl" - href="mdl.jnlp"> - <information> - <title>Fudaa-Modeleur</title> - <vendor>CETMEF DRIM</vendor> - <homepage href="http://fudaa.fr"/> - <description>Fudaa-Modeleur @version@</description> - <description kind="tooltip">Fudaa-Modeleur </description> - <description kind="short">Fudaa-Modeleur </description> - <icon href="images/mdl-logo.png"/> - <offline-allowed/> - <shortcut online="false"> - <desktop/> - <menu submenu="Fudaa-Modeleur "/> - </shortcut> - </information> -<!--EN--> - <information ... [truncated message content] |
From: <de...@us...> - 2009-01-15 22:56:35
|
Revision: 4360 http://fudaa.svn.sourceforge.net/fudaa/?rev=4360&view=rev Author: deniger Date: 2009-01-15 22:22:54 +0000 (Thu, 15 Jan 2009) Log Message: ----------- Modified Paths: -------------- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/BCalquePersistenceGroupe.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/BGroupeCalque.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/calque/CalqueLegendeWidgetAdapter.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetCalqueLegende.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetControllerCalque.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetCreatorLegende.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetFusionCalques.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetVueCalque.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/commun/courbe/FudaaCourbeImporterScope.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/commun/courbe/FudaaCourbeWizardImportScope.java Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/BCalquePersistenceGroupe.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/BCalquePersistenceGroupe.java 2009-01-15 19:48:24 UTC (rev 4359) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/BCalquePersistenceGroupe.java 2009-01-15 22:22:54 UTC (rev 4360) @@ -81,7 +81,8 @@ } target.initFrom(_saver.getUI()); // B.M. Les fils sont restitu\xE9s plus tard. A priori redondant, et provoque des pbs. -// restoreAndSordChild(target, _saver, _pn, _parent, _prog); + //Fred ils ne sont pas restitu\xE9s plus tard et c'est la seul methode qui permet de le retrier dans l'ordre sauvegard\xE9 + restoreAndSordChild(target, _saver, _pn, _parent, _prog); return target.getName(); } Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/BGroupeCalque.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/BGroupeCalque.java 2009-01-15 19:48:24 UTC (rev 4359) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/BGroupeCalque.java 2009-01-15 22:22:54 UTC (rev 4360) @@ -305,20 +305,20 @@ * On force le mode visible dependant des sous calques, car les calques sont des components. * Les components fils ne sont affich\xE9s que si les components parents sont visibles. */ -// public boolean isVisible() { -// return getTousCalques().length==1 ? super.isVisible():isAllChildrenUnvisible() ? false:true; -// } + public boolean isVisible() { + return getTousCalques().length==1 ? super.isVisible():isAllChildrenUnvisible() ? false:true; + } /** * Met les sous calques en mode visible/invisible.<br> */ -// public void setVisible(boolean _b) { -// super.setVisible(_b); -// -// final BCalque[] c=getCalques(); -// for (int i=0; i<c.length; i++) { -// c[i].setVisible(_b); -// } -// } + public void setVisible(boolean _b) { + super.setVisible(_b); + + final BCalque[] c=getCalques(); + for (int i=0; i<c.length; i++) { + c[i].setVisible(_b); + } + } } Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/calque/CalqueLegendeWidgetAdapter.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/calque/CalqueLegendeWidgetAdapter.java 2009-01-15 19:48:24 UTC (rev 4359) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/calque/CalqueLegendeWidgetAdapter.java 2009-01-15 22:22:54 UTC (rev 4360) @@ -6,6 +6,8 @@ import java.awt.Component; import java.awt.Point; +import java.util.HashMap; +import java.util.Map; import javax.swing.JLabel; import javax.swing.JList; @@ -13,8 +15,10 @@ import org.fudaa.ebli.calque.BArbreCalqueModel; import org.fudaa.ebli.calque.BCalque; +import org.fudaa.ebli.calque.BCalqueAffichage; import org.fudaa.ebli.calque.BCalqueLegende; import org.fudaa.ebli.calque.BCalqueLegendePanel; +import org.fudaa.ebli.commun.EbliLib; import org.fudaa.ebli.palette.BPalettePlageInterface; import org.fudaa.ebli.palette.BPalettePlageLegende; import org.fudaa.ebli.ressource.EbliResource; @@ -41,196 +45,198 @@ @SuppressWarnings("serial") public class CalqueLegendeWidgetAdapter extends BCalqueLegende { - /** - * Mananger statique qui se charge de creer \xE9a widget associee au calque. - * - * @param _calqueLegende le panel legende qui sera recopie version widget - * @param _scene la scene - * @return la widfget de la legende. - */ - public static EbliWidgetCalqueLegende updateLegendeWidget(final EbliWidgetCalqueLegende _widgetLegende, - final BCalqueLegendePanel _calqueLegende, final EbliScene _scene) { + /** + * Mananger statique qui se charge de creer \xE9a widget associee au calque. + * + * @param _calqueLegende le panel legende qui sera recopie version widget + * @param _scene la scene + * @return la widfget de la legende. + */ + public static EbliWidgetCalqueLegende updateLegendeWidget(final EbliWidgetCalqueLegende _widgetLegende, + final BCalqueLegendePanel _calqueLegende, final EbliScene _scene) { - // --creation de la widget conteneur --// - BPalettePlageInterface listeplages = null; - // widgetLegende_ = new WidgetCalqueLegende(_scene, false, model, - // _calqueLegende); - _widgetLegende.setLayout(new FlowLayout(true, SerialAlignment.CENTER, 5)); - _widgetLegende.setBorder(BorderFactory.createEmptyBorder(10)); + // --creation de la widget conteneur --// + BPalettePlageInterface listeplages = null; + // widgetLegende_ = new WidgetCalqueLegende(_scene, false, model, + // _calqueLegende); + _widgetLegende.setLayout(new FlowLayout(true, SerialAlignment.CENTER, 5)); + _widgetLegende.setBorder(BorderFactory.createEmptyBorder(10)); - if (_calqueLegende != null) { - final Component[] listeC = _calqueLegende.getComponents(); + if (_calqueLegende != null) { + final Component[] listeC = _calqueLegende.getComponents(); - for (int i = 0; i < listeC.length; i++) { - final Component c = listeC[i]; - if (c instanceof JLabel && !((JLabel)c).getText().equals(EbliResource.EBLI.getString("R\xE9sultats"))) { + for (int i = 0; i < listeC.length; i++) { + final Component c = listeC[i]; + if (c instanceof JLabel && !((JLabel) c).getText().equals(EbliResource.EBLI.getString("R\xE9sultats"))) { - final LabelWidget titre = new LabelWidget(_scene); - titre.setAlignment(Alignment.CENTER); - titre.setVerticalAlignment(VerticalAlignment.CENTER); - titre.setLabel(((JLabel) c).getText()); - titre.setEnabled(true); - titre.setFont(c.getFont()); - _widgetLegende.addChild(titre); - } + final LabelWidget titre = new LabelWidget(_scene); + titre.setAlignment(Alignment.CENTER); + titre.setVerticalAlignment(VerticalAlignment.CENTER); + titre.setLabel(((JLabel) c).getText()); + titre.setEnabled(true); + titre.setFont(c.getFont()); + _widgetLegende.addChild(titre); + } - if (c instanceof BPalettePlageLegende) { + if (c instanceof BPalettePlageLegende) { - final BPalettePlageLegende pal = (BPalettePlageLegende) c; + final BPalettePlageLegende pal = (BPalettePlageLegende) c; - // --recuperation de la liste des plages --// - listeplages = pal.getModel(); - if(listeplages!=null){ - // --creation du titre --// - LabelWidget titre = new LabelWidget(_scene); - titre.setAlignment(Alignment.CENTER); - titre.setVerticalAlignment(VerticalAlignment.CENTER); - titre.setLabel(listeplages.getTitre()); - titre.setFont(pal.getFont()); - titre.setEnabled(true); - _widgetLegende.addChild(titre); - final LabelWidget sstitre = new LabelWidget(_scene); - sstitre.setAlignment(Alignment.CENTER); - titre.setFont(pal.getFont()); - sstitre.setVerticalAlignment(VerticalAlignment.CENTER); - sstitre.setLabel(listeplages.getSousTitre()); - sstitre.setEnabled(true); - _widgetLegende.addChild(sstitre); - final Widget ws = new Widget(_scene); - ws.setLayout(new FlowLayout(true, SerialAlignment.LEFT_TOP, 5)); - if (listeplages.getNbPlages() != 0) { - for (int j = listeplages.getNbPlages()-1; j >=0 ; j--) { + // --recuperation de la liste des plages --// + listeplages = pal.getModel(); + if (listeplages != null) { + // --creation du titre --// + LabelWidget titre = new LabelWidget(_scene); + titre.setAlignment(Alignment.CENTER); + titre.setVerticalAlignment(VerticalAlignment.CENTER); + titre.setLabel(listeplages.getTitre()); + titre.setFont(pal.getFont()); + titre.setEnabled(true); + _widgetLegende.addChild(titre); + final LabelWidget sstitre = new LabelWidget(_scene); + sstitre.setAlignment(Alignment.CENTER); + titre.setFont(pal.getFont()); + sstitre.setVerticalAlignment(VerticalAlignment.CENTER); + sstitre.setLabel(listeplages.getSousTitre()); + sstitre.setEnabled(true); + _widgetLegende.addChild(sstitre); + final Widget ws = new Widget(_scene); + ws.setLayout(new FlowLayout(true, SerialAlignment.LEFT_TOP, 5)); + if (listeplages.getNbPlages() != 0) { + for (int j = listeplages.getNbPlages() - 1; j >= 0; j--) { - final BPlageInterface plage = listeplages.getPlageInterface(j); + final BPlageInterface plage = listeplages.getPlageInterface(j); - // -- ajout d'une widget plage --// - final EbliWidgetPlage lw = new EbliWidgetPlage(_scene, plage, null); + // -- ajout d'une widget plage --// + final EbliWidgetPlage lw = new EbliWidgetPlage(_scene, plage, null); - lw.setUseBorder(false); - lw.setEnabled(true); + lw.setUseBorder(false); + lw.setEnabled(true); - ws.addChild(lw); + ws.addChild(lw); - } - } else { - // liste des plages est vide il s agit d une autre legende - final Component[] lcomp = pal.getComponents(); - for (int j = 0; j < lcomp.length; j++) { - final Component co = lcomp[j]; + } + } else { + // liste des plages est vide il s agit d une autre legende + final Component[] lcomp = pal.getComponents(); + for (int j = 0; j < lcomp.length; j++) { + final Component co = lcomp[j]; - if (co instanceof JPanel) { - final JPanel panel = (JPanel) co; + if (co instanceof JPanel) { + final JPanel panel = (JPanel) co; - for (int k = 0; k < panel.getComponents().length; k++) { + for (int k = 0; k < panel.getComponents().length; k++) { - if (panel.getComponents()[k] instanceof JLabel) { - titre = new LabelWidget(_scene); - titre.setAlignment(Alignment.CENTER); - titre.setVerticalAlignment(VerticalAlignment.CENTER); - titre.setLabel(((JLabel) panel.getComponents()[k]).getText()); - titre.setEnabled(true); - ws.addChild(titre); - } else if (panel.getComponents()[k] instanceof JList) { - final JList jlst = (JList) panel.getComponents()[k]; - for (int g = 0; g < jlst.getModel().getSize(); g++) { - titre = new LabelWidget(_scene); - titre.setAlignment(Alignment.CENTER); - titre.setVerticalAlignment(VerticalAlignment.CENTER); - titre.setLabel((String) jlst.getModel().getElementAt(g)); - titre.setEnabled(true); - ws.addChild(titre); - } + if (panel.getComponents()[k] instanceof JLabel) { + titre = new LabelWidget(_scene); + titre.setAlignment(Alignment.CENTER); + titre.setVerticalAlignment(VerticalAlignment.CENTER); + titre.setLabel(((JLabel) panel.getComponents()[k]).getText()); + titre.setEnabled(true); + ws.addChild(titre); + } else if (panel.getComponents()[k] instanceof JList) { + final JList jlst = (JList) panel.getComponents()[k]; + for (int g = 0; g < jlst.getModel().getSize(); g++) { + titre = new LabelWidget(_scene); + titre.setAlignment(Alignment.CENTER); + titre.setVerticalAlignment(VerticalAlignment.CENTER); + titre.setLabel((String) jlst.getModel().getElementAt(g)); + titre.setEnabled(true); + ws.addChild(titre); + } - } + } - } + } - } + } - } + } - } - _widgetLegende.addChild(ws); - _widgetLegende.setLegendsWidget(ws); - }//fin du if listeplage==null - } - } + } + _widgetLegende.addChild(ws); + _widgetLegende.setLegendsWidget(ws); + }// fin du if listeplage==null + } + } - _widgetLegende.setController(new EbliWidgetControllerLegendeCalque(_widgetLegende)); + _widgetLegende.setController(new EbliWidgetControllerLegendeCalque(_widgetLegende)); - // -- prendre en compte le resize automatique --// - _widgetLegende.getEbliScene().refresh(); - // _widgetLegende.setFormeFont(new Font("Helvetica", Font.PLAIN, 10)); + // -- prendre en compte le resize automatique --// + _widgetLegende.getEbliScene().refresh(); + // _widgetLegende.setFormeFont(new Font("Helvetica", Font.PLAIN, 10)); - return _widgetLegende; - } else { - FuLog.warning("createLegendeWidget retourne widget null"); - return null; - } - } + return _widgetLegende; + } else { + FuLog.warning("createLegendeWidget retourne widget null"); + return null; + } + } - // public static Dimension createSizeForWidget(int _nbLibelles) { - // return new Dimension(WIDTH_LEGENDE + MAX_BORDURE, _nbLibelles * (LENGHT_PER_LEGENDE + MAX_BORDURE / 2)); - // } + // public static Dimension createSizeForWidget(int _nbLibelles) { + // return new Dimension(WIDTH_LEGENDE + MAX_BORDURE, _nbLibelles * (LENGHT_PER_LEGENDE + MAX_BORDURE / 2)); + // } - public static void reconstructWidget(EbliWidgetCalqueLegende widgetLegende_, - final BCalqueLegendePanel _calqueLegende, final EbliScene _scene/* , BArbreCalqueModel model */) { + public static void reconstructWidget(EbliWidgetCalqueLegende widgetLegende_, + final BCalqueLegendePanel _calqueLegende, final EbliScene _scene/* , BArbreCalqueModel model */) { - final EbliWidgetWithBordure parent = (EbliWidgetWithBordure) widgetLegende_.getParentWidget(); + final EbliWidgetWithBordure parent = (EbliWidgetWithBordure) widgetLegende_.getParentWidget(); - widgetLegende_ = updateLegendeWidget(widgetLegende_, _calqueLegende, _scene); + widgetLegende_ = updateLegendeWidget(widgetLegende_, _calqueLegende, _scene); - parent.repaint(); + parent.repaint(); - } + } - BCalqueLegendePanel legendePanel_; + Map<BCalque, BCalqueLegendePanel> legendePanel_ = new HashMap<BCalque, BCalqueLegendePanel>(); - EbliScene scene_; + EbliScene scene_; - public EbliScene getScene() { - return scene_; - } + public EbliScene getScene() { + return scene_; + } - public void setScene(final EbliScene _scene) { - scene_ = _scene; - } + public void setScene(final EbliScene _scene) { + scene_ = _scene; + } - public CalqueLegendeWidgetAdapter(final EbliScene _scene, final BArbreCalqueModel model) { - super(); - scene_ = _scene; - // modelTreeCalque_ = model; + public CalqueLegendeWidgetAdapter(final EbliScene _scene, final BArbreCalqueModel model) { + super(); + scene_ = _scene; + // modelTreeCalque_ = model; - } + } - /** - * override de calqueLegende qui recupere le panel legende associe - */ - @Override - protected void addLegendToPanel(final BCalqueLegendePanel _pnLeg) { + /** + * override de calqueLegende qui recupere le panel legende associe + */ + @Override + protected void addLegendToPanel(final BCalqueLegendePanel _pnLeg) { + legendePanel_.put(_pnLeg.getCalque(), _pnLeg); + } - legendePanel_ = _pnLeg; + @Override + public void enleve(BCalqueAffichage _cq) { + legendePanel_.remove(_cq); + } - // createLegende(); - } + /** + * cree la legende en widget. + * + * @return EbliNode cree ajoute a la scene. + */ + public EbliNode createLegende(final Point _location, final EbliScene _scene, final String _id, BCalque _calqueCible) { + setScene(_scene); + final EbliNodeDefault def = new EbliNodeDefault(); + def.setPreferedLocation(_location); + // def.setPreferedSize(new Dimension(150, 250)); + def.setCreator(new EbliWidgetCreatorLegende(legendePanel_.get(_calqueCible), _id, _calqueCible)); + def.setTitle(EbliLib.getS("L\xE9gende calque") + " " + _calqueCible.getTitle()); + // TODO non stable + _scene.addNode(def); + _scene.refresh(); - /** - * cree la legende en widget. - * - * @return EbliNode cree ajoute a la scene. - */ - public EbliNode createLegende(final Point _location, final EbliScene _scene, final String id,BCalque calqueCible) { - setScene(_scene); - final EbliNodeDefault def = new EbliNodeDefault(); - def.setPreferedLocation(_location); - // def.setPreferedSize(new Dimension(150, 250)); - def.setCreator(new EbliWidgetCreatorLegende(legendePanel_, id,calqueCible)); - def.setTitle("L\xE9gende calque"); - // TODO non stable - _scene.addNode(def); - _scene.refresh(); + return def; + } - return def; - } - } Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetCalqueLegende.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetCalqueLegende.java 2009-01-15 19:48:24 UTC (rev 4359) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetCalqueLegende.java 2009-01-15 22:22:54 UTC (rev 4360) @@ -124,43 +124,8 @@ return null; } - // protected int getMaxTitle(final Font boldFt) { - // final FontMetrics ftmBold = this.getGraphics().getFontMetrics(boldFt); - // int maxWidth = 0; - // // -- mise a jour de la widget avec la nouvelle font - // final List<Widget> listePlage = getChildren(); - // for (final Iterator<Widget> it = listePlage.iterator(); it.hasNext();) { - // final Widget widget = it.next(); - // // -- test si il s agit d un widget plage --// - // if (widget instanceof LabelWidget && (((LabelWidget) widget).getLabel() != null)) { - // final LabelWidget lbWidget = (LabelWidget) widget; - // maxWidth = Math.max(maxWidth, ftmBold.stringWidth(lbWidget.getLabel()) + 5); - // // lbWidget.setPreferredBounds(boundsTitre); - // } - // } - // - // return maxWidth; - // - // } + - // protected int getMaxWidthLegende(final Font ft) { - // final FontMetrics ftm = this.getGraphics().getFontMetrics(ft); - // int maxWidth = 0; - // // -- mise a jour de la widget avec la nouvelle font - // final List<Widget> listePlage = getChildren(); - // for (final Iterator<Widget> it = listePlage.iterator(); it.hasNext();) { - // final Widget widget = it.next(); - // // -- test si il s agit d un widget plage --// - // if (widget instanceof EbliWidgetPlage) { - // final EbliWidgetPlage new_widget = (EbliWidgetPlage) widget; - // maxWidth = Math.max(maxWidth, ftm.stringWidth(new_widget.getInternWidget().getLabel())); - // } - // } - // - // return maxWidth; - // - // } - public void notifyClosing(final EditorController _controller, final Widget _widget, final JComponent _editor, final boolean _commit) { editingStop(); Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetControllerCalque.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetControllerCalque.java 2009-01-15 19:48:24 UTC (rev 4359) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetControllerCalque.java 2009-01-15 22:22:54 UTC (rev 4360) @@ -178,7 +178,7 @@ // duplication du node en question final EbliNode duplique = n.duplicate(null); - duplique.setTitle("Calque "+(sceneDestination.getAllVue2d().size()+1)); + duplique.setTitle(EbliLib.getS("Calque")+" "+(sceneDestination.getAllVue2d().size()+1)); // -- redimensionnement du duplicata --// ((EbliWidgetCreatorVueCalque) duplique.getCreator()).initSize(getVisuPanel().getVueCalque().getCalque().getSize()); @@ -220,7 +220,7 @@ if (calqueActif != null && calqueActif instanceof BCalqueAffichage) { if (this.legendeWidget_.get(calqueActif) == null) { // legendeWidget_ = (CalqueLegendeWidgetAdapter) widgetCalque_.calquePanel_.getCqLegend(); - legendeWidget_.put(widgetCalque_.calquePanel_.getCalqueActif(), + legendeWidget_.put(calqueActif, (CalqueLegendeWidgetAdapter) widgetCalque_.calquePanel_.getCqLegend()); final CalqueLegendeWidgetAdapter legendeAdapter = this.legendeWidget_.get(calqueActif); Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetCreatorLegende.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetCreatorLegende.java 2009-01-15 19:48:24 UTC (rev 4359) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetCreatorLegende.java 2009-01-15 22:22:54 UTC (rev 4360) @@ -110,7 +110,7 @@ else { CoupleData datas=(CoupleData) data; if(data !=null){ - String idCalque = (String) datas.idPosessor; + String idCalque = datas.idPosessor; int indexCalque=datas.indiceCalqueCible; if(idCalque!=null){ @@ -124,8 +124,7 @@ //-- recuperation du bon calque --// calqueCible_= (BCalque) calque.getArbreCalqueModel().getChild(calque.getArbreCalqueModel().getRoot(), indexCalque); IdPossessor_=idCalque; - //g=new BCalqueLegendePanel((BCalqueAffichage) calqueCible_,calqueCible_.getTitle()); - BCalqueLegendePanel legendePanel=((CalqueLegendeWidgetAdapter)calque.getCqLegend()).legendePanel_; + BCalqueLegendePanel legendePanel=((CalqueLegendeWidgetAdapter)calque.getCqLegend()).legendePanel_.get(calqueCible_); g=legendePanel; // -- mise a jour des sattelites --// ((EbliWidgetControllerCalque) widget.getController()).setNodeLegende((EbliNode) parameters.get("node")); @@ -145,7 +144,7 @@ calqueCible_= (BCalque) calque.getArbreCalqueModel().getChild(calque.getArbreCalqueModel().getRoot(), indexCalque); IdPossessor_=idCalque; //g=new BCalqueLegendePanel((BCalqueAffichage) calqueCible_,calqueCible_.getTitle()); - BCalqueLegendePanel legendePanel=((CalqueLegendeWidgetAdapter)calque.getCqLegend()).legendePanel_; + BCalqueLegendePanel legendePanel=((CalqueLegendeWidgetAdapter)calque.getCqLegend()).legendePanel_.get(calqueCible_);; g=legendePanel; // -- mise a jour des sattelites --// ((EbliWidgetControllerCalque) widget.getController()).setNodeLegende((EbliNode) parameters.get("node")); Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetFusionCalques.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetFusionCalques.java 2009-01-15 19:48:24 UTC (rev 4359) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetFusionCalques.java 2009-01-15 22:22:54 UTC (rev 4360) @@ -55,58 +55,54 @@ // -- on met a jour le modele de zoom pour toutes les filles en prenant le // dernier widget (= la widget temoin) - GrBoite boite = null; - ZEbliCalquesPanel pn = null; + ZEbliCalquesPanel pn = listeWidgetCalque_.get(listeWidgetCalque_.size() - 1).calquePanel_; + changeAllZoomFrom(pn.getVueCalque()); for (int i = listeWidgetCalque_.size() - 1; i >= 0; i--) { EbliWidgetVueCalque vue = listeWidgetCalque_.get(i); - if (boite == null) { - boite = vue.getViewBoite(); + vue.calquePanel_.getVueCalque().addPropertyChangeListener("repere", this); - pn = vue.calquePanel_; - } - // } else if (vue.getViewBoite() != null) { - // boite.ajuste(vue.getViewBoite()); - // // vue.calquePanel_.getVueCalque().changeRepere(vue.calquePanel_, - // boite, - // // 0, 0); - // vue.image = null; - // vue.repaint(); - // } - // vue.calquePanel_.getVueCalque().addPropertyChangeListener("repere", this); - vue.calquePanel_.getVueCalque().addPropertyChangeListener("repereEvt", this); - vue.image = null; - vue.repaint(); - } - if (boite != null) { - // -- on force le redimensionnement de la widget calque initiale avec le - // meme zoom - // -- le fait de faire appel a ceci mettra a jour les zooms de toutes les - // autres widgets - pn.getVueCalque().changeRepere(pn, boite, 0, 0); - } getEbliScene().refresh(); } + private final Object sync = new Object(); + public void propertyChange(final PropertyChangeEvent _evt) { +// synchronized (sync) { - if (!noCyclePropertieChange) return; - noCyclePropertieChange = false; - // listeWidgetCalque_.get(0).calquePanel_.getVueCalque().changeViewBoite( - // _source, _boite, _rapide) - System.err.println("on recommence le tout"); - final BVueCalque vueCalque = (BVueCalque) _evt.getSource(); - RepereEvent newRepere = (RepereEvent) _evt.getNewValue(); + if (!noCyclePropertieChange) return; + noCyclePropertieChange = false; + // listeWidgetCalque_.get(0).calquePanel_.getVueCalque().changeViewBoite( + // _source, _boite, _rapide) + final BVueCalque vueCalque = (BVueCalque) _evt.getSource(); + if (getVueInEdition() != vueCalque) { + noCyclePropertieChange = true; + return; + } + // RepereEvent newRepere = (RepereEvent) _evt.getNewValue(); + changeAllZoomFrom(vueCalque); + noCyclePropertieChange = true; + getEbliScene().refresh(); +// } + } + + private BVueCalque getVueInEdition() { for (final Iterator<Widget> it = getChildren().iterator(); it.hasNext();) { final EbliWidgetVueCalque widget = (EbliWidgetVueCalque) ((EbliWidget) it.next()).getIntern(); + if (widget.isInEditMode()) return widget.calquePanel_.getVueCalque(); + } + return null; + } + + private void changeAllZoomFrom(final BVueCalque vueCalque) { + for (final Iterator<Widget> it = getChildren().iterator(); it.hasNext();) { + final EbliWidgetVueCalque widget = (EbliWidgetVueCalque) ((EbliWidget) it.next()).getIntern(); if (widget.calquePanel_.getVueCalque() != vueCalque) { - widget.repereModifie(newRepere); + widget.setZoom(vueCalque.getViewBoite()); } } - noCyclePropertieChange = true; - getEbliScene().refresh(); } /** @@ -117,7 +113,7 @@ EbliWidgetVueCalque widgetCalque; if (child instanceof EbliWidgetVueCalque) widgetCalque = (EbliWidgetVueCalque) child; else widgetCalque = (EbliWidgetVueCalque) ((EbliWidget) child.getChildren().get(0)).getIntern(); - widgetCalque.calquePanel_.getVueCalque().getAbstractCalque().removePropertyChangeListener("repereEvt", this); + widgetCalque.calquePanel_.getVueCalque().getAbstractCalque().removePropertyChangeListener("repere", this); } Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetVueCalque.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetVueCalque.java 2009-01-15 19:48:24 UTC (rev 4359) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetVueCalque.java 2009-01-15 22:22:54 UTC (rev 4360) @@ -14,15 +14,13 @@ import java.util.Observable; import java.util.Observer; -import javax.swing.BorderFactory; - +import org.fudaa.ctulu.CtuluLib; import org.fudaa.ctulu.image.CtuluLibImage; import org.fudaa.ebli.animation.EbliAnimatedInterface; import org.fudaa.ebli.animation.EbliAnimationAdapterInterface; import org.fudaa.ebli.calque.BCalque; import org.fudaa.ebli.calque.ZEbliCalquesPanel; import org.fudaa.ebli.geometrie.GrBoite; -import org.fudaa.ebli.repere.RepereEvent; import org.fudaa.ebli.visuallibrary.EbliNode; import org.fudaa.ebli.visuallibrary.EbliNodeDefault; import org.fudaa.ebli.visuallibrary.EbliScene; @@ -48,9 +46,9 @@ Window frame_; - BufferedImage image; + BufferedImage image_; -// public GrBoite initZoom_; + // public GrBoite initZoom_; BuPanel conteneurEditor; @@ -71,7 +69,7 @@ public EbliWidgetVueCalque(final EbliScene _scene, final ZEbliCalquesPanel _vue, final GrBoite _initZoom) { super(_scene); calquePanel_ = _vue; -// initZoom_ = _initZoom; + // initZoom_ = _initZoom; zoom_ = _initZoom; calquePanel_.setBorder(null); @@ -81,8 +79,7 @@ public void update(final Observable _o, final Object _arg) { if (!isInEditMode() && "t".equals(_arg)) { - image = null; - // repaint(); + clearCacheImage(); } } @@ -105,12 +102,8 @@ public void notifyClosing(final org.netbeans.api.visual.action.InplaceEditorProvider.EditorController controller, final Widget widget, final BuPanel editor, final boolean commit) { editingStop(); - zoom_ = calquePanel_.getVueCalque().getViewBoite(); - image = null; - + setZoom(calquePanel_.getVueCalque().getViewBoite()); getEbliScene().refresh(); - // calquePanel_.setBorder(BuBorders.EMPTY1111); - this.repaint(); } /** @@ -145,7 +138,7 @@ return (EbliWidgetControllerCalque) getController(); } -// boolean first_ = true; + boolean zoomChanged_ = true; @Override protected void paintWidget() { @@ -159,34 +152,20 @@ final Graphics2D g = getGraphics(); initSize(rec); -// if (first_) { -// first_ = false; -// if (initZoom_ != null && initZoom_.getDeltaX() > 0 && initZoom_.getDeltaY() > 0) { -// calquePanel_.getVueCalque().changeRepere(this, initZoom_); -// -// // -- tres important!!: le zoom doit prendre la valeur initial du zoom pour conserver le bon angle si on fais -// // le cas suivant: -// // -- lros du chargement d un calque avec zoom specifique, suivi d'un agrandissement ou reduction: il faut que -// // le zoom!=null pour ne pas reinitialiser le repere (cf boucle suivante) -// zoom_ = initZoom_; -// initZoom_ = null; -// } else calquePanel_.restaurer(); -// -// // -- ACHTUNG!!! si on enleve la creation de l'image ici, elle se fera dans l'autre if et ecrasera le zoom -// // init!! --// -// final Map params = new HashMap(); -// CtuluLibImage.setCompatibleImageAsked(params); -// image = calquePanel_.produceImage(rec.width, rec.height, params); -// -// } - // mode edition - if (image == null || image.getWidth() != rec.width || image.getHeight() != rec.height) { + boolean sizeChanged = image_ != null && (image_.getWidth() != rec.width || image_.getHeight() != rec.height); + if (image_ == null || sizeChanged) { FuLog.debug("EWI: recreate image"); - if (zoom_ != null && zoom_.getDeltaX() > 0 && zoom_.getDeltaY() > 0) { - calquePanel_.getVueCalque().changeRepere(this, zoom_); + // on doit retailler la vue changement de taille. + if (sizeChanged || zoomChanged_) { + zoomChanged_ = false; + if (zoom_ != null && zoom_.getDeltaX() > 0 && zoom_.getDeltaY() > 0) { + // GrBoite zoomEnCours = calquePanel_.getVueCalque().getViewBoite(); + calquePanel_.getVueCalque().changeRepere(this, zoom_, 0, 0); - } else calquePanel_.restaurer(); + } else calquePanel_.restaurer(); + } + final Map params = new HashMap(); CtuluLibImage.setCompatibleImageAsked(params); // a ameliorer: il ne faudrait pas recreer l'image a chaque fois @@ -196,7 +175,7 @@ // GrBoite zoomMemoire=calquePanel_.getVueCalque().getViewBoite(); // -- on redessinne --// - image = calquePanel_.produceImage(rec.width, rec.height, params); + image_ = calquePanel_.produceImage(rec.width, rec.height, params); // -- on remet le repere au max de la clientArea de la widget --// // calquePanel_.getVueCalque().changeRepere(this, zoomMemoire); @@ -204,7 +183,7 @@ // calquePanel_.restaurer(); } - g.drawImage(image, rec.x, rec.y, rec.width, rec.height, null); + g.drawImage(image_, rec.x, rec.y, rec.width, rec.height, null); } } @@ -305,28 +284,24 @@ } - public BufferedImage getImage() { - return image; - } - - public void setImage(BufferedImage image) { - this.image = image; - } - protected GrBoite getZoom() { return zoom_; } - protected void setZoom(GrBoite zoom_) { - this.zoom_ = zoom_; + protected void setZoom(GrBoite _zoom) { + if (CtuluLib.isEquals(_zoom, zoom_)) return; + clearCacheImage(); + this.zoom_ = _zoom; + zoomChanged_=true; +// repaint(); + } - protected void repereModifie(RepereEvent _newRepere) { - image = null; - calquePanel_.getVueCalque().repereModifie(_newRepere); - - zoom_ = calquePanel_.getVueCalque().getViewBoite(); - repaint(); + /** + * Nettoie l'image utilise pour sauvegarder l'affichage + */ + public void clearCacheImage() { + image_ = null; } } Modified: branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/commun/courbe/FudaaCourbeImporterScope.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/commun/courbe/FudaaCourbeImporterScope.java 2009-01-15 19:48:24 UTC (rev 4359) +++ branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/commun/courbe/FudaaCourbeImporterScope.java 2009-01-15 22:22:54 UTC (rev 4360) @@ -1,23 +1,12 @@ package org.fudaa.fudaa.commun.courbe; -import java.awt.event.ActionEvent; +import java.io.File; import org.fudaa.ctulu.CtuluCommandManager; import org.fudaa.ctulu.ProgressionInterface; import org.fudaa.dodico.mesure.EvolutionReguliere; import org.fudaa.dodico.telemac.io.ScopeStructure; -import org.fudaa.ebli.commun.EbliActionSimple; -import org.fudaa.ebli.courbe.EGCourbeChild; -import org.fudaa.ebli.courbe.EGCourbeModelDefault; -import org.fudaa.ebli.courbe.EGGraphe; -import org.fudaa.ebli.courbe.EGGrapheTreeModel; -import org.fudaa.ebli.courbe.EGGroup; -import org.fudaa.ebli.courbe.EGModel; -import org.fudaa.fudaa.commun.impl.FudaaCommonImplementation; -import com.memoire.bu.BuResource; -import com.memoire.bu.BuWizardDialog; - /** * Gere l'importation de donn\xE9es scope s ou t et cr\xE9e un graphe temporel ou spatial selon le format * S'utilise avec le wizard FudaaCourbeWizardImportScope @@ -28,15 +17,15 @@ /** * Action qui genere un wizard pour le parametrage des structures import\xE9es. - * @author Adrien Hadoux - * + * @param _fileChosen + * @param target + * @param _data + * @param _mng + * @param _prog + * @param nuagePoints */ - - - public static void createGraphe(FudaaCourbeImporter.Target target,ScopeStructure _data, CtuluCommandManager _mng,ProgressionInterface _prog,boolean nuagePoints){ - - - createGraphe(target,_data.returnEvolReguliere(), _mng, _prog,nuagePoints); + public static void createGraphe(File _fileChosen,FudaaCourbeImporter.Target target,ScopeStructure _data, CtuluCommandManager _mng,ProgressionInterface _prog,boolean nuagePoints){ + createGraphe(target,_data.returnEvolReguliere(_fileChosen), _mng, _prog,nuagePoints); } public static void createGraphe(FudaaCourbeImporter.Target target,EvolutionReguliere[] _data, CtuluCommandManager _mng,ProgressionInterface _prog,boolean nuagePoints){ @@ -53,43 +42,43 @@ - /** - * genere un graphe spatial - * @param data_ - * @return - */ - public static void createGrapheSpatialGrapheOLD(FudaaCourbeImporter.Target target,ScopeStructure.SorT data_,ProgressionInterface prog){ - - EGGrapheTreeModel model=new EGGrapheTreeModel(); - double[] tabX=new double[data_.getAllX().size()]; - for(int i=0;i<data_.getAllX().size();i++) - tabX[i]=data_.getX(i); - - - for(int i=0;i<data_.getNbVariables();i++){ - - EGGroup varg=new EGGroup(); - varg.setTitle(data_.getVariable(i)); - model.add(varg); - - //--remplissage de valeurs --// - //tableau des y - double[] tabY=new double[tabX.length]; - - for(int j=0;j<tabX.length;j++) - tabY[j]=data_.getValueOfvariable(i, j); - EGCourbeModelDefault modelCourbe=new EGCourbeModelDefault(tabX,tabY); - EGCourbeChild courbe=new EGCourbeChild(varg,modelCourbe); - - varg.addEGComponent(courbe); - - } - - - EGGraphe graphe=new EGGraphe(model); - - - - } +// /** +// * genere un graphe spatial +// * @param data_ +// * @return +// */ +// public static void createGrapheSpatialGrapheOLD(FudaaCourbeImporter.Target target,ScopeStructure.SorT data_,ProgressionInterface prog){ +// +// EGGrapheTreeModel model=new EGGrapheTreeModel(); +// double[] tabX=new double[data_.getAllX().size()]; +// for(int i=0;i<data_.getAllX().size();i++) +// tabX[i]=data_.getX(i); +// +// +// for(int i=0;i<data_.getNbVariables();i++){ +// +// EGGroup varg=new EGGroup(); +// varg.setTitle(data_.getVariable(i)); +// model.add(varg); +// +// //--remplissage de valeurs --// +// //tableau des y +// double[] tabY=new double[tabX.length]; +// +// for(int j=0;j<tabX.length;j++) +// tabY[j]=data_.getValueOfvariable(i, j); +// EGCourbeModelDefault modelCourbe=new EGCourbeModelDefault(tabX,tabY); +// EGCourbeChild courbe=new EGCourbeChild(varg,modelCourbe); +// +// varg.addEGComponent(courbe); +// +// } +// +// +// EGGraphe graphe=new EGGraphe(model); +// +// +// +// } } Modified: branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/commun/courbe/FudaaCourbeWizardImportScope.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/commun/courbe/FudaaCourbeWizardImportScope.java 2009-01-15 19:48:24 UTC (rev 4359) +++ branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/commun/courbe/FudaaCourbeWizardImportScope.java 2009-01-15 22:22:54 UTC (rev 4360) @@ -663,7 +663,7 @@ dataST().restreindreStructure(listVariablesST_.getSelectedIndices(),Double.parseDouble(plageDeb_.getText()),Double.parseDouble(plageFin_.getText())); impl_.setMainProgression(30); impl_.setMainMessage(CtuluLib.getS("Cr\xE9ation du graphe")); - FudaaCourbeImporterScope.createGraphe(target_, data_, null, prog,false); + FudaaCourbeImporterScope.createGraphe(fileChoosen_,target_, data_, null, prog,false); } else{ //-- format scopeGen, selon le type de format g\xE9n\xE9r\xE9--// @@ -688,7 +688,7 @@ impl_.setMainProgression(30); impl_.setMainMessage(CtuluLib.getS("Cr\xE9ation du graphe")); //on cree les evol reguliere SPECIFIQUES pour ces courbes. - FudaaCourbeImporterScope.createGraphe(target_, dataG().returnEvolRegulierePourTemporelles(xchoosen), null, prog,false); + FudaaCourbeImporterScope.createGraphe(target_, dataG().returnEvolRegulierePourTemporelles(xchoosen,fileChoosen_), null, prog,false); }else{ //correlation @@ -704,7 +704,7 @@ //-- recuperation du choix nuage de points ou non boolean nuagePoints=choixNuagePoints_.isSelected(); - FudaaCourbeImporterScope.createGraphe(target_, dataG().returnEvolReguliereCorrelation(varX,varY,plageX,plageY), null, prog,nuagePoints); + FudaaCourbeImporterScope.createGraphe(target_, dataG().returnEvolReguliereCorrelation(varX,varY,plageX,plageY,fileChoosen_), null, prog,nuagePoints); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <had...@us...> - 2009-01-16 18:56:27
|
Revision: 4379 http://fudaa.svn.sourceforge.net/fudaa/?rev=4379&view=rev Author: hadouxad Date: 2009-01-16 18:56:21 +0000 (Fri, 16 Jan 2009) Log Message: ----------- post Modified Paths: -------------- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/ZEbliCalquesPanel.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/courbe/EGCourbeModelDefault.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/courbe/EGGrapheModel.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/courbe/EGGraphePersist.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/courbe/EGGrapheSimpleModel.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/courbe/EGGrapheTreeModel.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/courbe/EGGroup.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/courbe/EGModel.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/courbe/EGSpecificActions.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/courbe/EGTableGraphePanel.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/graphe/EbliWidgetControllerGraphe.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/commun/courbe/FudaaCourbeDefautModel.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/commun/courbe/FudaaCourbeTimeModel.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/commun/courbe/ScopeCourbeModel.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/profile/MVProfileCourbeModel.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/profile/MvProfileCoordinatesModel.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/profile/MvProfileTreeModel.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/ScopCourbeTreeModel.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostCourbeAddVariableAction.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostCourbeModel.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostCourbeTreeModel.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostLayoutFille.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostVisuPanel.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/telemac/TrTelemacBoundaryCourbeModel.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/telemac/TrTelemacWeirCourbeModel.java Added Paths: ----------- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/courbe/EGActionAfficheOrigineCourbe.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrReplayCurvesData.java Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/ZEbliCalquesPanel.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/ZEbliCalquesPanel.java 2009-01-16 13:36:14 UTC (rev 4378) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/ZEbliCalquesPanel.java 2009-01-16 18:56:21 UTC (rev 4379) @@ -955,7 +955,7 @@ return (BCalqueLegende) getCqInfos().getCalqueParNom("cqLegende"); } - protected void removeCalqueLegend() { + public void removeCalqueLegend() { if (getCqLegend() != null) getCqInfos().remove(getCqLegend()); // getCqLegend().setVisible(false); } Added: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/courbe/EGActionAfficheOrigineCourbe.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/courbe/EGActionAfficheOrigineCourbe.java (rev 0) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/courbe/EGActionAfficheOrigineCourbe.java 2009-01-16 18:56:21 UTC (rev 4379) @@ -0,0 +1,69 @@ +package org.fudaa.ebli.courbe; + +import java.awt.event.ActionEvent; +import java.util.HashMap; + +import javax.swing.Icon; + +import org.fudaa.ctulu.CtuluResource; +import org.fudaa.ctulu.CtuluUI; +import org.fudaa.ebli.commun.EbliActionSimple; +import org.fudaa.ebli.ressource.EbliResource; + +/** + * Action qui utilise les methodes viewGenerationSource() des modeles de courbes. + * Permet pour les modeles qui surcharge la methode d'afficher dans l'implementation fudaa voulue l'origine de la cr\xE9ation de la courbe. + * @author Adrien Hadoux + * + */ +public class EGActionAfficheOrigineCourbe extends EbliActionSimple{ + + /** + * Action utilis\xE9e uniquement pour les courbes unitaires (accessible via clic droit sur la courbe). + * @author genesis + * + */ + public static class CourbeOnly extends EGActionAfficheOrigineCourbe{ + EGModel model_; + public CourbeOnly(EGModel model,CtuluUI _impl){ + super(); + model_=model; + impl_=_impl; + } + public void actionPerformed(ActionEvent _e) { + if(model_!=null) + model_.viewGenerationSource(new HashMap(),impl_); + } + } + + EGFillePanel panelGraphe_; + CtuluUI impl_; + public EGActionAfficheOrigineCourbe(EGFillePanel _panel,CtuluUI _impl) { + this(); + panelGraphe_=_panel; + impl_=_impl; + } + public EGActionAfficheOrigineCourbe() { + super(EbliResource.EBLI.getString("Origine"),CtuluResource.CTULU.getIcon("crystal_visibilite"), "ORIGINE"); + } + @Override + public void actionPerformed(ActionEvent _e) { + + if(panelGraphe_.getGraphe().getSelectedComponent()==null || !(panelGraphe_.getGraphe().getSelectedComponent() instanceof EGCourbe)){ + impl_.error(EbliResource.EBLI.getString("Aucune courbe s\xE9lectionn\xE9e"),EbliResource.EBLI.getString("Aucune courbe s\xE9lectionn\xE9e"),true); + return; + }else if(panelGraphe_.getGraphe().getSelectedComponent().getModel()==null || !(panelGraphe_.getGraphe().getSelectedComponent().getModel() instanceof EGModel)){ + impl_.error(EbliResource.EBLI.getString("Aucune courbe s\xE9lectionn\xE9e"),EbliResource.EBLI.getString("Aucune courbe s\xE9lectionn\xE9e"),true); + return; + } + + //-- on recupere la courbe selectionnee dans le graphe --// + + EGModel modelSelectionne=panelGraphe_.getGraphe().getSelectedComponent().getModel(); + + modelSelectionne.viewGenerationSource(new HashMap(),impl_); + + + } + +} Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/courbe/EGCourbeModelDefault.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/courbe/EGCourbeModelDefault.java 2009-01-16 13:36:14 UTC (rev 4378) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/courbe/EGCourbeModelDefault.java 2009-01-16 18:56:21 UTC (rev 4379) @@ -13,6 +13,7 @@ import org.fudaa.ctulu.CtuluLibArray; import org.fudaa.ctulu.CtuluListSelectionInterface; import org.fudaa.ctulu.CtuluRange; +import org.fudaa.ctulu.CtuluUI; import org.fudaa.ebli.palette.BPaletteInfo.InfoData; /** @@ -221,6 +222,10 @@ return duplic; } + public void viewGenerationSource(Map infos, CtuluUI impl){ + + } + public Object getPersistSpecificDatas() { return null; } Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/courbe/EGGrapheModel.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/courbe/EGGrapheModel.java 2009-01-16 13:36:14 UTC (rev 4378) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/courbe/EGGrapheModel.java 2009-01-16 18:56:21 UTC (rev 4379) @@ -15,6 +15,8 @@ import org.fudaa.ctulu.CtuluCommandManager; import org.fudaa.ebli.commun.EbliActionInterface; +import java.util.List; + /** * @author Fred Deniger * @version $Id: EGGrapheModel.java,v 1.8 2007-02-01 16:12:04 deniger Exp $ @@ -177,5 +179,14 @@ */ public void setSpecificPersitDatas(Object sepcPersitData,Map Params); + + /** + * Methode qui retournes les actions sp\xE9cifiques AUX COURBES d'un graphe en fonction de son treemodel. + * Ces actions seront situ\xE9es dans le menu popup de la courbe (ie via clic droit sur la courbe dans l'arbre des courbes). + * Par exemple dans tr, le TrPostCourbeTreeModel retourne des actions d'ajout de variables pour les \xE9volutions temporelles. + * @return + */ + public List<EbliActionInterface> getSpecificsActionsCurvesOnly(EGGraphe _target); + } \ No newline at end of file Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/courbe/EGGraphePersist.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/courbe/EGGraphePersist.java 2009-01-16 13:36:14 UTC (rev 4378) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/courbe/EGGraphePersist.java 2009-01-16 18:56:21 UTC (rev 4379) @@ -284,6 +284,9 @@ in.close(); + + //-- on finalise les actions d'un graphe --// + model.finalizePersistance(); //-- Etape finale: creation du graphe --// graphe=new EGGraphe(model); graphe.transformer_.setXAxe(axeX); Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/courbe/EGGrapheSimpleModel.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/courbe/EGGrapheSimpleModel.java 2009-01-16 13:36:14 UTC (rev 4378) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/courbe/EGGrapheSimpleModel.java 2009-01-16 18:56:21 UTC (rev 4379) @@ -810,4 +810,10 @@ } + +public List<EbliActionInterface> getSpecificsActionsCurvesOnly(EGGraphe _target) { + // TODO Auto-generated method stub + return null; +} + } \ No newline at end of file Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/courbe/EGGrapheTreeModel.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/courbe/EGGrapheTreeModel.java 2009-01-16 13:36:14 UTC (rev 4378) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/courbe/EGGrapheTreeModel.java 2009-01-16 18:56:21 UTC (rev 4379) @@ -1132,4 +1132,18 @@ } + +public List<EbliActionInterface> getSpecificsActionsCurvesOnly(EGGraphe _target) { + // TODO Auto-generated method stub + return null; +} + + +/** + * Methode qui est appelee apres avoir charg\xE9 un model de graphe persistant. Doit etre surcharg\xE9 a plus haut niveau pour effectuer des actions de finalisation specifiques. + */ +public void finalizePersistance(){ + +} + } \ No newline at end of file Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/courbe/EGGroup.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/courbe/EGGroup.java 2009-01-16 13:36:14 UTC (rev 4378) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/courbe/EGGroup.java 2009-01-16 18:56:21 UTC (rev 4379) @@ -162,6 +162,10 @@ return Collections.enumeration(comp_); } + public List getChildren() { + return comp_; + } + public boolean contains(final EGCourbe _i) { return comp_.contains(_i); } Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/courbe/EGModel.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/courbe/EGModel.java 2009-01-16 13:36:14 UTC (rev 4378) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/courbe/EGModel.java 2009-01-16 18:56:21 UTC (rev 4379) @@ -11,6 +11,7 @@ import org.fudaa.ctulu.CtuluCommandContainer; import org.fudaa.ctulu.CtuluListSelectionInterface; +import org.fudaa.ctulu.CtuluUI; import org.fudaa.ctulu.collection.CourbeInterface; import org.fudaa.ebli.palette.BPaletteInfo; @@ -191,11 +192,24 @@ */ EGModel duplicate(); + /** - * @return + * Methode qui une fois appel\xE9e se charge de creer un module ou interface qui affiche l'origine de la cr\xE9ation de la courbe. + * @param infos + * @param CtuluUI: l'implementation dans laquelle afficher les informations */ + void viewGenerationSource(Map infos, CtuluUI impl); + + /** + * retourner les infos persistantes de la courbe du mod\xE8le. + */ Object getPersistSpecificDatas(); + /** + *recuperer les infos persistantes de la courbe qui vont permettre de recr\xE9er le mod\xE8le. + * @param data + * @param infos + */ void setPersistSpecificDatas(Object data, Map infos); Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/courbe/EGSpecificActions.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/courbe/EGSpecificActions.java 2009-01-16 13:36:14 UTC (rev 4378) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/courbe/EGSpecificActions.java 2009-01-16 18:56:21 UTC (rev 4379) @@ -16,8 +16,10 @@ import org.fudaa.ctulu.CtuluCommandManager; import org.fudaa.ctulu.CtuluLib; import org.fudaa.ctulu.CtuluResource; +import org.fudaa.ctulu.CtuluUI; import org.fudaa.ctulu.gui.CtuluDialogPanel; import org.fudaa.ctulu.gui.CtuluPopupMenu; +import org.fudaa.ebli.commun.EbliActionInterface; import org.fudaa.ebli.commun.EbliLib; import org.fudaa.ebli.ressource.EbliResource; @@ -50,6 +52,13 @@ target_ = _target; } + + CtuluUI ui_; + public EGSpecificActions(final EGGraphe _target,CtuluUI _ui) { + this(_target); + ui_=_ui; + } + private static String getActLast() { return "DERNIER"; } @@ -124,13 +133,21 @@ else menu_.addMenuItem(EbliResource.EBLI.getString("Courbe classique"), "NUAGE_POINTS", BuResource.BU .getIcon("crystal_oscilloscope"), true, this); + + //-- action origine de la courbe. --// + menu_.add(new EGActionAfficheOrigineCourbe.CourbeOnly(courbe.getModel(),ui_)); + + if(target_.getModel().getSpecificsActionsCurvesOnly(target_)!=null) + for(EbliActionInterface action:target_.getModel().getSpecificsActionsCurvesOnly(target_)) + menu_.add(action); + } } - + if(_evt!=null) menu_.show(_evt.getComponent(), _evt.getX(), _evt.getY()); } @@ -266,4 +283,12 @@ } +public CtuluPopupMenu getMenu() { + if(menu_==null) + buildPopupMenu(null); + return menu_; +} + + + } \ No newline at end of file Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/courbe/EGTableGraphePanel.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/courbe/EGTableGraphePanel.java 2009-01-16 13:36:14 UTC (rev 4378) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/courbe/EGTableGraphePanel.java 2009-01-16 18:56:21 UTC (rev 4379) @@ -436,10 +436,15 @@ EvolTable t_; + + public EGTableGraphePanel() { + this(true); + } + boolean afficheNomCourbe_=true; /** * Initialise tous les composants n\xE9cessaires. */ - public EGTableGraphePanel() { + public EGTableGraphePanel(boolean afficheNomCourbe) { setLayout(new BuBorderLayout(5, 1, true, true)); setBorder(BorderFactory.createEmptyBorder(2, 5, 5, 2)); lb_ = new BuLabel(); @@ -447,7 +452,9 @@ lb_.setHorizontalTextPosition(SwingConstants.CENTER); lb_.setVerticalAlignment(SwingConstants.CENTER); lb_.setVerticalTextPosition(SwingConstants.CENTER); - add(lb_, BuBorderLayout.NORTH); + afficheNomCourbe_=afficheNomCourbe; + if(afficheNomCourbe) + add(lb_, BuBorderLayout.NORTH); t_ = new EvolTable() { public TableCellEditor getCellEditor(final int _row, final int _column) { @@ -624,7 +631,8 @@ updateButtons(); final BuPanel north = new BuPanel(); north.setLayout(new BuBorderLayout(2, 2, true, false)); - north.add(lb_, BuBorderLayout.NORTH); + if(afficheNomCourbe_) + north.add(lb_, BuBorderLayout.NORTH); final BuPanel pnBt = new BuPanel(); pnBt.setLayout(new BuButtonLayout(1, SwingConstants.LEFT)); pnBt.add(btAdd_); Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/graphe/EbliWidgetControllerGraphe.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/graphe/EbliWidgetControllerGraphe.java 2009-01-16 13:36:14 UTC (rev 4378) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/graphe/EbliWidgetControllerGraphe.java 2009-01-16 18:56:21 UTC (rev 4379) @@ -2,6 +2,7 @@ import java.awt.BorderLayout; import java.awt.Dimension; +import java.awt.FlowLayout; import java.awt.Point; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; @@ -27,6 +28,7 @@ import org.fudaa.ebli.commun.EbliActionInterface; import org.fudaa.ebli.commun.EbliActionSimple; import org.fudaa.ebli.commun.EbliComponentFactory; +import org.fudaa.ebli.courbe.EGActionAfficheOrigineCourbe; import org.fudaa.ebli.courbe.EGCourbe; import org.fudaa.ebli.courbe.EGFillePanel; import org.fudaa.ebli.courbe.EGGraphe; @@ -99,7 +101,9 @@ initTitlesOrigins(widgetGraphe_.panelGraphe_.getGraphe().getModel()); - + + + } @Override @@ -475,7 +479,7 @@ return menuGraphe_; } - + /** * Recupere les objets graphique tree et panel infos associe au calque. * @@ -485,19 +489,19 @@ public JComponent getOverviewComponent() { if (panelTreeGraphe_ == null) { - final EGTree tree = new EGTree(); - tree.setActions(new EGSpecificActions(getGraphe())); + final EGTree tree_ = new EGTree(); + tree_.setActions(new EGSpecificActions(getGraphe(),getWidget().getEbliScene().getCtuluUi() )); final EGGrapheTreeModel treeModel = (EGGrapheTreeModel) getGraphe().getModel(); - tree.setModel(treeModel); - tree.setSelectionModel(treeModel.getSelectionModel()); + tree_.setModel(treeModel); + tree_.setSelectionModel(treeModel.getSelectionModel()); - final EGTableGraphePanel tablePanel = new EGTableGraphePanel(); + final EGTableGraphePanel tablePanel = new EGTableGraphePanel(false); tablePanel.setGraphe(getGraphe()); tablePanel.addPanelAction(getGraphePanel()); final JSplitPane pane = new JSplitPane(JSplitPane.VERTICAL_SPLIT); - final JScrollPane compTop = new JScrollPane(tree); - compTop.setPreferredSize(new Dimension(150, 400)); + final JScrollPane compTop = new JScrollPane(tree_); + compTop.setPreferredSize(new Dimension(150, 200)); pane.setTopComponent(compTop); //-- panel global qui contient la paletet d'infos + tableau de valeurs --// @@ -505,12 +509,22 @@ final JSplitPane panelBottom = new JSplitPane(JSplitPane.VERTICAL_SPLIT); EGPaletteInfo paletteInfos=new EGPaletteInfo( getGraphePanel()); paletteInfos.setAvailable(true); - // final JScrollPane paletteInfos = new JScrollPane(paEg); - paletteInfos.setPreferredSize(new Dimension(150, 80)); - panelBottom.setTopComponent(paletteInfos); + paletteInfos.setPreferredSize(new Dimension(150, 120)); + //-- ajout des actions origine et replayData pour les graphes--// + BuPanel panelBoutons=new BuPanel(new FlowLayout(FlowLayout.LEFT)); + EGActionAfficheOrigineCourbe origine=new EGActionAfficheOrigineCourbe(getGraphePanel(),getWidget().getEbliScene().getCtuluUi()); + panelBoutons.add(origine.buildButton(EbliComponentFactory.INSTANCE)); + + + BuPanel miseEnPage=new BuPanel(new BorderLayout()); + miseEnPage.add(paletteInfos,BorderLayout.CENTER); + miseEnPage.add(panelBoutons,BorderLayout.SOUTH); + miseEnPage.setPreferredSize(new Dimension(150, 150)); + panelBottom.setTopComponent(miseEnPage); + final JScrollPane comp = new JScrollPane(tablePanel); - comp.setPreferredSize(new Dimension(150, 200)); + comp.setPreferredSize(new Dimension(150, 150)); panelBottom.setBottomComponent(comp); pane.setBottomComponent(panelBottom); Modified: branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/commun/courbe/FudaaCourbeDefautModel.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/commun/courbe/FudaaCourbeDefautModel.java 2009-01-16 13:36:14 UTC (rev 4378) +++ branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/commun/courbe/FudaaCourbeDefautModel.java 2009-01-16 18:56:21 UTC (rev 4379) @@ -13,6 +13,7 @@ import org.fudaa.ctulu.CtuluLib; import org.fudaa.ctulu.CtuluLibString; import org.fudaa.ctulu.CtuluListSelectionInterface; +import org.fudaa.ctulu.CtuluUI; import org.fudaa.dodico.mesure.EvolutionReguliereInterface; import org.fudaa.ebli.courbe.EGModel; import org.fudaa.ebli.palette.BPaletteInfo.InfoData; @@ -176,4 +177,7 @@ public void setPersistSpecificDatas(Object data, Map infos) { } + public void viewGenerationSource(Map infos, CtuluUI impl){ + + } } \ No newline at end of file Modified: branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/commun/courbe/FudaaCourbeTimeModel.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/commun/courbe/FudaaCourbeTimeModel.java 2009-01-16 13:36:14 UTC (rev 4378) +++ branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/commun/courbe/FudaaCourbeTimeModel.java 2009-01-16 18:56:21 UTC (rev 4379) @@ -13,6 +13,7 @@ import org.fudaa.ctulu.CtuluLibArray; import org.fudaa.ctulu.CtuluListSelectionInterface; import org.fudaa.ctulu.CtuluRange; +import org.fudaa.ctulu.CtuluUI; import org.fudaa.ebli.courbe.EGModel; import org.fudaa.ebli.palette.BPaletteInfo.InfoData; @@ -219,5 +220,7 @@ public void setPersistSpecificDatas(Object data, Map infos) { } - + public void viewGenerationSource(Map infos, CtuluUI impl){ + + } } \ No newline at end of file Modified: branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/commun/courbe/ScopeCourbeModel.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/commun/courbe/ScopeCourbeModel.java 2009-01-16 13:36:14 UTC (rev 4378) +++ branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/commun/courbe/ScopeCourbeModel.java 2009-01-16 18:56:21 UTC (rev 4379) @@ -5,6 +5,7 @@ import java.util.Map; import org.fudaa.ctulu.CtuluListSelectionInterface; +import org.fudaa.ctulu.CtuluUI; import org.fudaa.dodico.mesure.EvolutionReguliere; import org.fudaa.dodico.telemac.io.ScopeStructure; import org.fudaa.ebli.courbe.EGModel; @@ -97,5 +98,12 @@ return new ScopeCourbeModel((EvolutionReguliere)this.e_.getCopy(this.e_.getListener())); } - + public void viewGenerationSource(Map infos, CtuluUI impl){ + if(infos_.get(ScopeStructure.NOM_FICHIER)!=null){ + String msg="Cette courbe est issue du fichier "+infos_.get(ScopeStructure.NOM_FICHIER); + impl.message("Origine de la courbe scop", msg, false); + }else{ + impl.message("Origine de la courbe scop", "Impossible de trouver", false); + } + } } Modified: branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/profile/MVProfileCourbeModel.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/profile/MVProfileCourbeModel.java 2009-01-16 13:36:14 UTC (rev 4378) +++ branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/profile/MVProfileCourbeModel.java 2009-01-16 18:56:21 UTC (rev 4379) @@ -18,6 +18,7 @@ import org.fudaa.ctulu.CtuluCommandContainer; import org.fudaa.ctulu.CtuluListSelectionInterface; import org.fudaa.ctulu.CtuluRange; +import org.fudaa.ctulu.CtuluUI; import org.fudaa.ctulu.CtuluVariable; import org.fudaa.ctulu.ProgressionInterface; import org.fudaa.dodico.ef.EfGridData; @@ -28,9 +29,11 @@ import org.fudaa.ebli.palette.BPaletteInfo.InfoData; import org.fudaa.ebli.visuallibrary.EbliWidget; import org.fudaa.fudaa.tr.common.TrResource; +import org.fudaa.fudaa.tr.post.TrPostCommonImplementation; import org.fudaa.fudaa.tr.post.TrPostProjet; import org.fudaa.fudaa.tr.post.TrPostSource; import org.fudaa.fudaa.tr.post.TrPostVisuPanel; +import org.fudaa.fudaa.tr.post.TrReplayCurvesData; import org.fudaa.fudaa.tr.post.actions.TrPostProfileAction; import com.vividsolutions.jts.geom.LineString; @@ -390,6 +393,35 @@ //-- rejouer les donn\xE9es --// this.computeY(projet.impl_.getMainProgression()); } + public void viewGenerationSource(Map infos, CtuluUI impl){ + if(!(impl instanceof TrPostCommonImplementation)){ + impl.error(TrResource.getS("Impossible de r\xE9cup\xE9rer la bonne interface fudaa")); + return; + } + TrPostCommonImplementation implementation=(TrPostCommonImplementation)impl; + //-- on cree une vue 2d a partir du fichier source fourni et on le centre sur le point interpol\xE9 ou non --// + TrReplayCurvesData.getInstance().constructProfilSpatialOrigine(this, implementation); + + } + + public EfGridData getData() { + return data_; + } + + public void setData(EfGridData _data) { + this.data_ = _data; + } + + public EfLineIntersectionsResultsBuilder getBuilder() { + return builder_; + } + + public void setBuilder(EfLineIntersectionsResultsBuilder _builder) { + this.builder_ = _builder; + } + + + } Modified: branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/profile/MvProfileCoordinatesModel.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/profile/MvProfileCoordinatesModel.java 2009-01-16 13:36:14 UTC (rev 4378) +++ branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/profile/MvProfileCoordinatesModel.java 2009-01-16 18:56:21 UTC (rev 4379) @@ -11,6 +11,7 @@ import org.fudaa.ctulu.CtuluCommandContainer; import org.fudaa.ctulu.CtuluListSelectionInterface; +import org.fudaa.ctulu.CtuluUI; import org.fudaa.ctulu.ProgressionInterface; import org.fudaa.dodico.ef.operation.EfLineIntersectionsResultsBuilder; import org.fudaa.dodico.ef.operation.EfLineIntersectionsResultsI; @@ -197,5 +198,7 @@ public void setPersistSpecificDatas(Object data, Map infos) { } - + public void viewGenerationSource(Map infos, CtuluUI impl){ + + } } Modified: branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/profile/MvProfileTreeModel.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/profile/MvProfileTreeModel.java 2009-01-16 13:36:14 UTC (rev 4378) +++ branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/profile/MvProfileTreeModel.java 2009-01-16 18:56:21 UTC (rev 4379) @@ -12,6 +12,7 @@ import java.awt.EventQueue; import java.util.ArrayList; import java.util.Arrays; +import java.util.HashMap; import java.util.Iterator; import java.util.List; import java.util.Map; @@ -57,6 +58,7 @@ import org.fudaa.fudaa.meshviewer.MvResource; import org.fudaa.fudaa.meshviewer.export.MvExportChooseVarAndTime; import org.fudaa.fudaa.tr.post.ScopCourbeTreeModel; +import org.fudaa.fudaa.tr.post.TrPostCourbeModel; import org.fudaa.fudaa.tr.post.TrPostProjet; import org.fudaa.fudaa.tr.post.TrPostSource; import org.fudaa.fudaa.tr.post.actions.TrPostProfileAction; @@ -708,6 +710,66 @@ } + + public void finalizePersistance(){ + + //-- recupere les groupes de la persistance qui doivent etre supprim\xE9 car ne sont pas des liens directs avec les variables H2dVariableType du projet--// + ArrayList<EGGroup> listeGroupeAsupprimer=new ArrayList<EGGroup>(); + + + for(int i=0;i<this.getNbEGObject();i++){ + EGObject eg=this.getEGObject(i); + if((this.getEGObject(i) instanceof EGGroup) && !(this.getEGObject(i) instanceof MvProfileCourbeGroup)){ + + EGGroup groupe=(EGGroup) this.getEGObject(i); + ArrayList<EGCourbeChild> listeCourbeToAdd=new ArrayList<EGCourbeChild>(); + MvProfileCourbeGroup nvGroupe=null; + for(int k=0;k<groupe.getChildCount();k++){ + if(groupe.getCourbeAt(k)!=null){ + EGCourbeChild courbe=groupe.getCourbeAt(k); + + if(courbe.getModel()!=null && (courbe.getModel() instanceof MVProfileCourbeModel)){ + // List childrens=groupe.getChildren(); + MVProfileCourbeModel model=(MVProfileCourbeModel) courbe.getModel(); + //-- recherche ou creation du bon groupe correspondant--// + nvGroupe=getGroup(model.variable_,true); + //nvGroupe.addEGComponent(courbe); + + listeCourbeToAdd.add(courbe); + + + }else{ + //-- on cree le groupe sans car la courbe n'est pas profil spatioal, elel peut etre socpgen--// + nvGroupe=getGroup(H2dVariableType.SANS,true); + //nvGroupe.addEGComponent(courbe); + //listeVar.put(groupe, MvProfileFillePanel.createGroupFor(H2dVariableType.SANS)); + listeCourbeToAdd.add(courbe); + } + + } + + } + + //-- ajout de la liste des children dans le bon groupe --// + nvGroupe.addEGComponent(listeCourbeToAdd); + + //-- ajout du groupe dans la liste a supprimer --// + listeGroupeAsupprimer.add(groupe); + } + } + + this.fireStructureChanged(); + //-- ensuite on vire tout les eggroup et on les remplies dans les goup --// + for(EGGroup groupe:listeGroupeAsupprimer){ + + super.remove(groupe); + + } + + + + } + @Override public EGGrapheModel duplicate(final EGGrapheDuplicator _duplicator) { final MvProfileTreeModel duplic = new MvProfileTreeModel(); Modified: branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/ScopCourbeTreeModel.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/ScopCourbeTreeModel.java 2009-01-16 13:36:14 UTC (rev 4378) +++ branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/ScopCourbeTreeModel.java 2009-01-16 18:56:21 UTC (rev 4379) @@ -133,5 +133,9 @@ return duplic; } + + public String getSelectedSpecificCourbeInfos(){ + return null; + } } Modified: branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostCourbeAddVariableAction.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostCourbeAddVariableAction.java 2009-01-16 13:36:14 UTC (rev 4378) +++ branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostCourbeAddVariableAction.java 2009-01-16 18:56:21 UTC (rev 4379) @@ -26,7 +26,6 @@ import org.fudaa.ebli.commun.EbliActionSimple; import org.fudaa.ebli.courbe.EGCourbe; import org.fudaa.ebli.courbe.EGGraphe; -import org.fudaa.fudaa.commun.impl.FudaaCommonImplementation; import com.memoire.bu.BuBorderLayout; import com.memoire.bu.BuBorders; @@ -77,22 +76,26 @@ @Override public void actionPerformed(final ActionEvent _e) { final TrPostCourbeTreeModel model = (TrPostCourbeTreeModel) model_.getModel(); - //final EGCourbe selectedComponent = model_.getSelectedComponent(); + final EGCourbe selectedComponent = model_.getSelectedComponent(); // final EGCourbe selectedComponent = model_.getModel().getCourbes()[0]; TrPostSource src = null; // if (selectedComponent != null && selectedComponent.getModel() instanceof TrPostCourbeModel) { // src = ((TrPostCourbeModel) selectedComponent.getModel()).getSource(); // } + if(selectedComponent==null || !(selectedComponent.getModel() instanceof TrPostCourbeModel)){ + impl_.error("Impossibe, on ne peut ajouter des variables que pour une \xE9volution temporelle. \n La courbe choisie n'est pas une \xE9volution temporelle."); + return; + } + final TrPostCourbeModel modelEvol=(TrPostCourbeModel)selectedComponent.getModel(); + //-- creation d'un lister de fichier source --// final String[] values = impl_.c_.formattageDonnees(false); final int selectedSource = selectSource(values, (String) getValue(Action.NAME), impl_.getFrame()); if(selectedSource !=-1) src=impl_.c_.getSource(selectedSource); - - if (src == null) return; final TrPostSource finalSrc = src; @@ -103,13 +106,13 @@ var.removeAll(model.varSupported_); - if(model.objIdx_==null){ - model.objIdx_=new int[src.getTime().getNbTimeStep()]; - for(int i=0;i<src.getTime().getNbTimeStep();i++) - model.objIdx_[i]=i; - } - if(model.intepolPt_==null) - model.intepolPt_ = new HashSet(); +// if(model.objIdx_==null){ +// model.objIdx_=new int[src.getTime().getNbTimeStep()]; +// for(int i=0;i<src.getTime().getNbTimeStep();i++) +// model.objIdx_[i]=i; +// } +// if(model.intepolPt_==null) +// model.intepolPt_ = new HashSet(); final H2dVariableType[] vars = (H2dVariableType[]) var.toArray(new H2dVariableType[var.size()]); final Object[] selected = select(vars, (String) getValue(Action.NAME), impl_.getFrame()); @@ -118,7 +121,7 @@ @Override public void act() { - model.addVariables(finalSrc, Arrays.asList(selected), new ProgressionBuAdapter(this), model_.getCmd()); + model.addVariables(modelEvol,finalSrc, Arrays.asList(selected), new ProgressionBuAdapter(this), model_.getCmd()); EventQueue.invokeLater(new Runnable() { public void run() { Modified: branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostCourbeModel.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostCourbeModel.java 2009-01-16 13:36:14 UTC (rev 4378) +++ branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostCourbeModel.java 2009-01-16 18:56:21 UTC (rev 4379) @@ -7,20 +7,30 @@ */ package org.fudaa.fudaa.tr.post; +import java.awt.Dimension; +import java.awt.Rectangle; import java.io.IOException; import java.util.ArrayList; import java.util.List; import java.util.Map; import java.util.Set; +import javax.swing.JScrollPane; + import org.fudaa.ctulu.CtuluCommandContainer; +import org.fudaa.ctulu.CtuluLib; import org.fudaa.ctulu.CtuluLibArray; import org.fudaa.ctulu.CtuluLibString; import org.fudaa.ctulu.CtuluListSelectionInterface; import org.fudaa.ctulu.CtuluRange; +import org.fudaa.ctulu.CtuluUI; import org.fudaa.ctulu.collection.CtuluArrayDouble; +import org.fudaa.ctulu.gui.CtuluDialogPanel; import org.fudaa.dodico.ef.EfData; import org.fudaa.dodico.h2d.type.H2dVariableType; +import org.fudaa.ebli.calque.BArbreCalque; +import org.fudaa.ebli.calque.BCalque; +import org.fudaa.ebli.calque.BCalqueLegende; import org.fudaa.ebli.courbe.EGCourbeChild; import org.fudaa.ebli.courbe.EGGroup; import org.fudaa.ebli.courbe.EGModel; @@ -30,6 +40,10 @@ import org.fudaa.fudaa.commun.courbe.FudaaCourbeTimeModel; import org.fudaa.fudaa.tr.common.TrResource; +import com.memoire.bu.BuBorderLayout; +import com.memoire.bu.BuBorders; +import com.memoire.bu.BuLabel; +import com.memoire.bu.BuScrollPane; import com.memoire.fu.FuLog; import com.vividsolutions.jts.geom.Coordinate; @@ -51,22 +65,22 @@ */ public TrPostSource source_; - + public final static class Interpolated extends TrPostCourbeModel { - TrPostInterpolatePoint ptIdx_; + TrPostInterpolatePoint ptIdx_; - - /** - * ACHTUNG: constructeur utilis\xE9 uniquement pour la persistance des donn\xE9es!!! - */ - public Interpolated(){ - super(); - } - - + /** + * ACHTUNG: constructeur utilis\xE9 uniquement pour la persistance des donn\xE9es!!! + */ + public Interpolated(){ + super(); + } + + + /** * @param _ptIdx * @param _varIdx * @param _timeIdx @@ -124,47 +138,47 @@ if(point!=null && (point instanceof TrPostInterpolatePoint)) ptIdx_=(TrPostInterpolatePoint) point; } - + public String getInfosPoint() { - + return TrResource.getS("Point interpol\xE9:")+" ("+ptIdx_.x_+";"+ptIdx_.y_+")"; } - + @Override public boolean replayData(TrPostSource src, H2dVariableType var,EGGroup groupe,Map infos) { try{ - //-- creation d un nouveau node pour les donnees en entree --// - EGCourbeChild newCurve = TrPostCourbeModel.buildCourbeModel(var, this.ptIdx_,groupe, src); - - //-- on remplace les anciennes valeurs par les nouvelles calculees --// - infos.put("MODELREPLAY", newCurve); - -// this.y_=((Node)newCurve.getModel()).y_; -// this.time_=((Node)newCurve.getModel()).time_; - + //-- creation d un nouveau node pour les donnees en entree --// + EGCourbeChild newCurve = TrPostCourbeModel.buildCourbeModel(var, this.ptIdx_,groupe, src); + + //-- on remplace les anciennes valeurs par les nouvelles calculees --// + infos.put("MODELREPLAY", newCurve); + + // this.y_=((Node)newCurve.getModel()).y_; + // this.time_=((Node)newCurve.getModel()).time_; + }catch(Exception e){ e.printStackTrace(); return false; } return true; } - - - public EGModel duplicate() { - Interpolated duplic = new Interpolated(this.source_,new TrPostInterpolatePoint(this.ptIdx_),this.var_); - if (this.yRange_ != null) duplic.yRange_ = new CtuluRange(this.yRange_); - if (this.nom_ != null) duplic.nom_ = nom_; - if (this.y_ != null) duplic.y_ = CtuluLibArray.copy(y_); - return duplic; - } + public EGModel duplicate() { + Interpolated duplic = new Interpolated(this.source_,new TrPostInterpolatePoint(this.ptIdx_),this.var_); + if (this.yRange_ != null) duplic.yRange_ = new CtuluRange(this.yRange_); + if (this.nom_ != null) duplic.nom_ = nom_; + if (this.y_ != null) duplic.y_ = CtuluLibArray.copy(y_); + + return duplic; + } + } public final static class Node extends TrPostCourbeModel { - int ptIdx_; + int ptIdx_; /** * @param _ptIdx @@ -176,14 +190,14 @@ ptIdx_ = _ptIdx; } - + /** * ACHTUNG: constructeur utilis\xE9 uniquement pour la persistance des donn\xE9es!!! */ public Node(){ super(); } - + @Override protected void updateY() { createY(); @@ -197,7 +211,7 @@ FuLog.error(e); } // } - } + } // final EfData data = source_.getData(_var, _timeIdx); // if (data == null) { // FuLog.warning("TRP: data is null for " + _var); @@ -250,16 +264,16 @@ @Override public boolean replayData(TrPostSource src, H2dVariableType var,EGGroup groupe,Map infos) { try{ - //-- creation d un nouveau node pour les donnees en entree --// - EGCourbeChild newCurve = TrPostCourbeModel.buildCourbeModel(var, this.ptIdx_,groupe, src); - - //-- on remplace les anciennes valeurs par les nouvelles calculees --// - infos.put("MODELREPLAY", newCurve); -// this.y_=((Node)newCurve.getModel()).y_; -// this.time_=((Node)newCurve.getModel()).time_; - - - + //-- creation d un nouveau node pour les donnees en entree --// + EGCourbeChild newCurve = TrPostCourbeModel.buildCourbeModel(var, this.ptIdx_,groupe, src); + + //-- on remplace les anciennes valeurs par les nouvelles calculees --// + infos.put("MODELREPLAY", newCurve); + // this.y_=((Node)newCurve.getModel()).y_; + // this.time_=((Node)newCurve.getModel()).time_; + + + }catch(Exception e){ e.printStackTrace(); return false; @@ -268,18 +282,18 @@ } public EGModel duplicate() { - Node duplic = new Node(this.source_,this.ptIdx_,this.var_,CtuluLibArray.copy(time_)); - if (this.yRange_ != null) duplic.yRange_ = new CtuluRange(this.yRange_); - if (this.nom_ != null) duplic.nom_ = nom_; - if (this.y_ != null) duplic.y_ = CtuluLibArray.copy(y_); + Node duplic = new Node(this.source_,this.ptIdx_,this.var_,CtuluLibArray.copy(time_)); + if (this.yRange_ != null) duplic.yRange_ = new CtuluRange(this.yRange_); + if (this.nom_ != null) duplic.nom_ = nom_; + if (this.y_ != null) duplic.y_ = CtuluLibArray.copy(y_); - return duplic; - } - + return duplic; + } + @Override public String getInfosPoint() { - + return TrResource.getS("Point r\xE9el ")+ptIdx_+":("+this.source_.getGrid().getPtX(ptIdx_)+";"+this.source_.getGrid().getPtY(ptIdx_)+")"; } @@ -319,7 +333,7 @@ source_ = _src; var_ = _varIdx; } - + /** * ACTHUNG: constructeur utilis\xE9 uniquement pour la persistance des donn\xE9es!!! */ @@ -379,38 +393,38 @@ y_ = new double[source_.getNbTimeStep()]; } } - - - + + + public boolean addValue(double[] _x, double[] _y, CtuluCommandContainer _cmd) { - + time_ = CtuluLibArray.copy(_x); - y_ = CtuluLibArray.copy(_y); - -// for(int i=0;i<Math.min(_x.length,_y.lenght);i++){ -// -// } - + y_ = CtuluLibArray.copy(_y); + + // for(int i=0;i<Math.min(_x.length,_y.lenght);i++){ + // + // } + return true; } - - + + public void fillWithInfo(InfoData _table, CtuluListSelectionInterface _selectedPt) { if(EbliWidget.AMELIO_LOT_VISIBLE){ _table.put(TrResource.getS("Type"),"Evolution temporelle"); _table.put(TrResource.getS("Fichier r\xE9sultat"),this.source_.getFile().getName()); - _table.put(TrResource.getS("Chemin complet"),this.source_.getFile().getAbsolutePath()); - _table.put(TrResource.getS("Titre Fichier r\xE9sultat"),this.source_.getTitle()); - _table.put(TrResource.getS("Infos Point initial"),this.getInfosPoint()); - _table.put(TrResource.getS("Variable"),this.getVar().getName()+" en "+this.getVar().getCommonUnitString()); - - - + _table.put(TrResource.getS("Chemin complet"),this.source_.getFile().getAbsolutePath()); + _table.put(TrResource.getS("Titre Fichier r\xE9sultat"),this.source_.getTitle()); + _table.put(TrResource.getS("Infos Point initial"),this.getInfosPoint()); + _table.put(TrResource.getS("Variable"),this.getVar().getName()+" en "+this.getVar().getCommonUnitString()); + + + } } - - + + public Object getPersistSpecificDatas() { //-- retourne le quatuor point, pdt,variable et fichier source @@ -422,7 +436,7 @@ listeData.add(getSelectionPoint()); return listeData; } - + public abstract String getInfosPoint(); public abstract Object getSelectionPoint(); public abstract void setSelectionPoint(Object point); @@ -432,9 +446,9 @@ */ public abstract boolean replayData(TrPostSource src,H2dVariableType var,EGGroup groupe,Map infos); - + public void setPersistSpecificDatas(Object data, Map infos) { - if(data ==null || !(data instanceof ArrayList))return; + if(data ==null || !(data instanceof ArrayList))return; ArrayList<Object> liste=(ArrayList<Object>)data; String idSource=(String) liste.get(0); TrPostProjet projet = (TrPostProjet) infos.get("TrPostProjet"); @@ -446,13 +460,13 @@ this.source_=src; else{ ((List<String>) infos.get("errorMsg")) - .add("Erreur, la frame graphe ne trouve pas le fichier r\xE9sultat qui correspond \xE0 l'ID " + idSource); - return; + .add("Erreur, la frame graphe ne trouve pas le fichier r\xE9sultat qui correspond \xE0 l'ID " + idSource); + return; } }else{ ((List<String>) infos.get("errorMsg")) - .add("Erreur, la frame graphe ne trouve pas le fichier r\xE9sultat qui correspond \xE0 l'ID " + idSource); - return; + .add("Erreur, la frame graphe ne trouve pas le fichier r\xE9sultat qui correspond \xE0 l'ID " + idSource); + return; } // -- etape 2:times: ce sont les x donn\xE9es indirectement. --// @@ -460,18 +474,18 @@ // -- etape 3:variable --// String idVar=(String)liste.get(1); H2dVariableType var=null;//(H2dVariableType) liste.get(1); - + //-- recherche dans les sources de la variable par id --// for(int i=0;i<src.getAvailableVar().length;i++) if(src.getAvailableVar()[i].getID().equals(idVar)) var=src.getAvailableVar()[i]; - + if(var!=null) this.var_=var; else{ ((List<String>) infos.get("errorMsg")) - .add("Erreur, la frame graphe ne trouve pas la variable qui correspond \xE0 l'ID " + idVar); - return; + .add("Erreur, la frame graphe ne trouve pas la variable qui correspond \xE0 l'ID " + idVar); + return; } Object point=liste.get(2); if(point!=null) @@ -479,34 +493,45 @@ //-- FAUT il rejouer les donnees?? --// //final List<String> listeReloadSource=(List<String>) infos.get("RELOAD"); - + //if(listeReloadSource!=null && projet!=null && this.source_!=null && listeReloadSource.contains(idSource)){ - //-- on rejoue les donn\xE9es : methode specialisee replayData--// - this.updateY(); + //-- on rejoue les donn\xE9es : methode specialisee replayData--// + this.updateY(); //} + + + // if(listeReloadSource!=null && projet!=null && this.source_!=null && listeReloadSource.contains(idSource)){ + // //-- on rejoue les donn\xE9es : methode specialisee replayData--// + // EGGroup groupe =(EGGroup)infos.get("GROUPE"); + // if(groupe!=null){ + // + // + // if(replayData(this.source_, var,groupe,infos)){ + // + // }else{ + // //-- message d'erreur: rejoue des donnees foireux --// + // ((List<String>) infos.get("errorMsg")) + // .add("Erreur, Impossible de rejouer les donn\xE9es de la courbe "+this.nom_+" pour le fichier r\xE9sultat " + idSource+". Les donn\xE9es pr\xE9c\xE9dentes seront charg\xE9es."); + // } + // }else{ + // //-- message d erreur: impossible de rejoeur les donnees --// + // ((List<String>) infos.get("errorMsg")) + // .add("Erreur, Impossible de rejouer les donn\xE9es de la courbe "+this.nom_+" pour le fichier r\xE9sultat " + idSource+". Les donn\xE9es pr\xE9c\xE9dentes seront charg\xE9es."); + // } + // } + + + } + public void viewGenerationSource(Map infos, CtuluUI impl){ + + if(!(impl instanceof TrPostCommonImplementation)){ + impl.error(TrResource.getS("Impossible de r\xE9cup\xE9rer la bonne interface fudaa")); + return; + } + TrPostCommonImplementation implementation=(TrPostCommonImplementation)impl; + + //-- on cree une vue 2d a partir du fichier source fourni et on le centre sur le point interpol\xE9 ou non --// + TrReplayCurvesData.getInstance().constructEvolTemporelleOrigine(this, implementation); - -// if(listeReloadSource!=null && projet!=null && this.source_!=null && listeReloadSource.contains(idSource)){ -// //-- on rejoue les donn\xE9es : methode specialisee replayData--// -// EGGroup groupe =(EGGroup)infos.get("GROUPE"); -// if(groupe!=null){ -// -// -// if(replayData(this.source_, var,groupe,infos)){ -// -// }else{ -// //-- message d'erreur: rejoue des donnees foireux --// -// ((List<String>) infos.get("errorMsg")) -// .add("Erreur, Impossible de rejouer les donn\xE9es de la courbe "+this.nom_+" pour le fichier r\xE9sultat " + idSource+". Les donn\xE9es pr\xE9c\xE9dentes seront charg\xE9es."); -// } -// }else{ -// //-- message d erreur: impossible de rejoeur les donnees --// -// ((List<String>) infos.get("errorMsg")) -// .add("Erreur, Impossible de rejouer les donn\xE9es de la courbe "+this.nom_+" pour le fichier r\xE9sultat " + idSource+". Les donn\xE9es pr\xE9c\xE9dentes seront charg\xE9es."); -// } -// } - - } - } \ No newline at end of file Modified: branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostCourbeTreeModel.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostCourbeTreeModel.java 2009-01-16 13:36:14 UTC (rev 4378) +++ branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostCourbeTreeModel.java 2009-01-16 18:56:21 UTC (rev 4379) @@ -31,10 +31,12 @@ import org.fudaa.dodico.h2d.type.H2dVariableType; import org.fudaa.dodico.mesure.EvolutionReguliere; import org.fudaa.dodico.mesure.EvolutionReguliereInterface; +import org.fudaa.ebli.commun.EbliActionInterface; import org.fudaa.ebli.courbe.EGAxeHorizontal; import org.fudaa.ebli.courbe.EGAxeVertical; import org.fudaa.ebli.courbe.EGCourbe; import org.fudaa.ebli.courbe.EGCourbeChild; +import org.fudaa.ebli.courbe.EGGraphe; import org.fudaa.ebli.courbe.EGGrapheDuplicator; import org.fudaa.ebli.courbe.EGGrapheModel; import org.fudaa.ebli.courbe.EGGrapheTreeModel; @@ -331,7 +333,16 @@ } - protected void addVariables(final TrPostSource _src, final List _var, final ProgressionInterface _prog, + /** + * Ajoute une variable par rapport a une courbe evolution temporelle selectionnee. + * La variable a ete choisie ainsi que le fichier source. + * @param modelCourbe + * @param _src + * @param _var + * @param _prog + * @param _cmd + */ + protected void addVariables(TrPostCourbeModel modelCourbe,final TrPostSource _src, final List _var, final ProgressionInterface _prog, final CtuluCommandContainer _cmd) { // buildTimeSteps(); @@ -349,23 +360,29 @@ // fusion graphes _var.removeAll(varSupported_); - final int nbPt = objIdx_.length; + //final int nbPt = objIdx_.length; final double[] timesInSec = _src.getTime().getTimeListModel().getTimesInSec(); - final TrPostCourbeModel[] model = new TrPostCourbeModel[_var.size() * (nbPt + intepolPt_.size())]; + final TrPostCourbeModel[] model = new TrPostCourbeModel[_var.size()];//_var.size() * (nbPt + intepolPt_.size())]; int idx = 0; final List courbeToMem = _cmd == null ? null : new ArrayList(); final List groupToMem = _cmd == null ? null : new ArrayList(); for (int i = 0; i < _var.size(); i++) { final H2dVariableType var = (H2dVariableType) _var.get(i); final EGGroup g = getGroupFor(var); - for (int idxPt = 0; idxPt < nbPt; idxPt++) { - final EGCourbeChild c = TrPostCourbeModel.buildCourbeModel(var, objIdx_[idxPt], g, _src); + // for (int idxPt = 0; idxPt < nbPt; idxPt++) { + + //-- cas reel --// + if(modelCourbe instanceof TrPostCourbeModel.Node){ + final EGCourbeChild c = TrPostCourbeModel.buildCourbeModel(var, ((Integer)modelCourbe.getSelectionPoint()).intValue(), g, _src); courbeToMem.add(c); groupToMem.add(g); model[idx++] = (TrPostCourbeModel) c.getModel(); } - for (final Iterator iter = intepolPt_.iterator(); iter.hasNext();) { - final TrPostInterpolatePoint element = (TrPostInterpolatePoint) iter.next(); + else{ + //for (final Iterator iter = intepolPt_.iterator(); iter.hasNext();) { + //-- cas point interpol\xE9 --// + + final TrPostInterpolatePoint element = (TrPostInterpolatePoint)modelCourbe.getSelectionPoint(); final EGCourbeChild c = TrPostCourbeModel.buildCourbeModel(var, element, g, _src); courbeToMem.add(c); groupToMem.add(g); @@ -415,6 +432,9 @@ } + + + private void buildUpdating() { if (updating_ == null) { updating_ = new EGGroup(); @@ -980,6 +1000,30 @@ /** + * parcours la liste de ses courbes et range les fons groupes de variables correspondant + */ + public void finalizePersistance(){ + for(int i=0;i<this.getNbEGObject();i++){ + + if(this.getEGObject(i) instanceof EGGroup){ + + EGGroup groupe=(EGGroup) this.getEGObject(i); + for(int k=0;k<groupe.getChildCount();k++){ + if(groupe.getCourbeAt(k)!=null){ + EGCourbeChild courbe=groupe.getCourbeAt(k); + if(courbe.getModel()!=null && (courbe.getModel() instanceof TrPostCourbeModel)){ + TrPostCourbeModel model=(TrPostCourbeModel) courbe.getModel(); + varGroup_.put(model.var_, groupe); + } + } + } + } + } + + + } + + /** * Methode qui affiche les infos principales de la courbe choisie * @return */ @@ -1022,5 +1066,19 @@ this.impl_ = projet.impl_; } + + + /** + * Les actions des courbes specifiques: l'ajout de variable. + */ + public List<EbliActionInterface> getSpecificsActionsCurvesOnly(EGGraphe _target) { + List<EbliActionInterface> listeActions=new ArrayList<EbliActionInterface>(); + + //-- action d'ajout des variables --// + listeActions.add(new TrPostCourbeAddVariableAction(projet_.impl_, _target)); + + return listeActions; + + } } Modified: branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostLayoutFille.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostLayoutFille.java 2009-01-16 13:36:14 UTC (rev 4378) +++ branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostLayoutFille.java 2009-01-16 18:56:21 UTC (rev 4379) @@ -46,6 +46,7 @@ import org.fudaa.ebli.visuallibrary.calque.EbliWidgetCreatorVueCalque; import org.fudaa.ebli.visuallibrary.creator.EbliWidgetCreatorArrowEditor; import org.fudaa.ebli.visuallibrary.creator.EbliWidgetCreatorTextEditor; +import org.fudaa.ebli.visuallibrary.graphe.EbliWidgetControllerGraphe; import org.fudaa.ebli.visuallibrary.graphe.EbliWidgetCreatorGraphe; import org.fudaa.fudaa.commun.courbe.FudaaCourbeImporter; import org.fudaa.fudaa.commun.courbe.FudaaCourbeImporter.Target; @@ -327,14 +328,20 @@ // TrPostVisuPanel _calque = (TrPostVisuPanel) creator.getCalquepanelProvenance(); // TODO trop dangereux... // listeActions.add(new TrPostCourbeAddPointsAction(projet_.impl_, _graphe.getGraphe(), _calque)); - if (!(_graphe.getGraphe().getModel() instanceof MvProfileTreeModel)) listeActions - .add(new TrPostCourbeAddVariableAction(projet_.impl_, _graphe.getGraphe())); + // if (!(_graphe.getGraphe().getModel() instanceof MvProfileTreeModel)) listeActions +// .add(new TrPostCourbeAddVariableAction(projet_.impl_, _graphe.getGraphe())); + + //-- action ajout de variable --// +// if (_graphe.getGraphe().getModel() instanceof TrPostCourbeTreeModel){ +// ((EbliWidgetControllerGraphe)_controller).tree_.getActions().getMenu().add(new TrPostCourbeAddVariableAction(projet_.impl_, _graphe.getGraphe())); +// +// } if (_graphe.getGraphe().getModel() instanceof MvProfileTreeModel) { listeActions .add(new TrPostActionBilan(((MvProfileTreeModel) _graphe.getGraphe().getModel()), projet_.getImpl())); - // listeActions.add(new TrPostActionCubature(((MvProfileTreeModel) _graphe.getGraphe().getModel()), projet_ - // .getImpl())); +// listeActions.add(new TrPostActionCubature(((MvProfileTreeModel) _graphe.getGraphe().getModel()), projet_ +// .getImpl())); } // -- ajout de l'importation dans les courbes de l'action --// Modified: branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostVisuPanel.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostVisuPanel.java 2009-01-16 13:36:14 UTC (rev 4378) +++ branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostVisuPanel.java 2009-01-16 18:56:21 UTC (rev 4379) @@ -179,7 +179,8 @@ projet_ = _controller; info_ = new TrPostInfoDelegate(source_, getEbliFormatter()); addCqInfos(source_.getGrid()); - addCqLegende(_leg); + if(_leg!=null) + addCqLegende(_leg); addCqMaillage(source_.getGrid(), info_); final MvGridLayerGroup gr = getGridGroup(); gr.getPointLayer().setVisible(false); Added: branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrReplayCurvesData.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrReplayCurvesData.java (rev 0) +++ branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrReplayCurvesData.java 2009-01-16 18:56:21 UTC (rev 4379) @@ -0,0 +1,233 @@ +package org.fudaa.fudaa.tr.post; + +import java.awt.Color; +import java.awt.Dimension; +import java.awt.Rectangle; +import java.util.Vector; + +import javax.swing.JComponent; +import javax.swing.JScrollPane; +import javax.swing.JTable; +import javax.swing.table.DefaultTableModel; +import javax.swing.table.TableModel; + +import org.fudaa.ctulu.gis.GISZoneCollectionPoint; +import org.fudaa.ctulu.gui.CtuluDialogPanel; +import org.fudaa.ebli.calque.BArbreCalque; +import org.fudaa.ebli.calque.BCalque; +import org.fudaa.ebli.calque.BCalqueLegende; +import org.fudaa.ebli.calque.ZCalquePoint; +import org.fudaa.ebli.calque.edition.ZModelePointEditable; +import org.fudaa.ebli.courbe.EGModel; +import org.fudaa.ebli.trace.TraceIcon; +import org.fudaa.ebli.trace.TraceIconModel; +import org.fudaa.ebli.trace.TraceLigneModel; +import org.fudaa.ebli.visuallibrary.calque.CalqueLegendeWidgetAdapter; +import org.fudaa.fudaa.meshviewer.profile.MVProfileCourbeModel; +import org.fudaa.fudaa.sig.layer.FSigEditor; +import org.fudaa.fudaa.sig.layer.FSigLayerPointEditable; +import org.fudaa.fudaa.tr.common.TrResource; + +import com.memoire.bu.BuBorderLayout; +import com.memoire.bu.BuBorders; +import com.vividsolutions.jts.geom.Coordinate; +import com.vividsolutions.jts.geom.LineString; + + + +/** + * Classe qui se charge d'afficher et rejouer les donn\xE9es d'origine des courbes TR. + * C'set a dire les courbes spatiales et evolutions temporelles. + * @author Adrien Hadoux + * + */ +public class TrReplayCurvesData { + + /** + * Classe singleton. + * Permet de stocker en memoire les constructions pour optimiser les calculs. + */ + private static TrReplayCurvesData instance_; + + /** + * Vue 2d gardee en memoire si on fait plusieurs appels cons\xE9cutifs \xE0 des courbes qui ont le meme fichier source. + */ + private TrPostVisuPanel memoire_; + private TrPostSource srcMemoire_; + + + public static TrReplayCurvesData getInstance(){ + + if(instance_==null) + instance_=new TrReplayCurvesData(); + return instance_; + + } + + /** + * Retourne une nouvelle vue 2d en fonction des parametres fournis. + * Dans le cas ou les parametres fournis ont deja constitu\xE9 le pr\xE9c\xE9dent appel, on retourne la construction graphique pr\xE9c\xE9dente. + * @param implementation + * @param src + * @return + */ + private TrPostVisuPanel createVue2d(TrPostCommonImplementation implementation,TrPostSource src){ + //-- petite optimisation --// + if(srcMemoire_!=null && memoire_!=null && srcMemoire_==src) + return memoire_; + + BCalqueLegende legende=new BCalqueLegende(); + TrPostVisuPanel vue2d=new TrPostVisuPanel(implementation,implementation.c_,legende,src); + vue2d.removeCalqueLegend(); + + vue2d.restaurer(); + Rectangle rec=new Rectangle(300,300); + vue2d.setPreferredSize(new Dimension(300,300)); + final BCalque[] tousCalques = vue2d.getVueCalque().getCalque().getTousCalques(); + vue2d.getVueCalque().setSize(rec.width, rec.height); + // calquePanel_.setPreferredSize(new Dimension(rec.width, rec.height)); + vue2d.getVueCalque().getCalque().setSize(rec.width, rec.height); + for (int i = 0; i < tousCalques.length; i++) { + tousCalques[i].setSize(rec.width, rec.height); + } + vue2d.restaurer(); + return vue2d; + } + + /** + * Cree la dialog qui affiche tout le contenu d'origine du graphe. + * @param vue2d + * @param implementation + * @param modele + */ + private void createDialogOrigine(TrPostVisuPanel vue2d, TrPostCommonImplementation implementation, EGModel modele,JComponent composantAdditionnel){ + //final JScrollPane arbreVue2d = new JScrollPane(new BArbreCalque(vue2d.getArbreCalqueModel())); + implementation.createTask(TrResource.getS("Origine ")+" "+modele.getTitle()); + final CtuluDialogPanel pn = new CtuluDialogPanel(false); + pn.setLayout(new BuBorderLayout()); + pn.setBorder(BuBorders.EMPTY3333); + //pn.add(new BuLabel(CtuluLib.getS("S\xE9lectionner le fichier r\xE9sultat")), BuBorderLayout.NORTH); + pn.add(vue2d,BuBorderLayout.CENTER); + if(composantAdditionnel!=null) + pn.add(composantAdditionnel,BuBorderLayout.EAST); + //pn.add(arbreVue2d,BuBorderLayout.EAST); + pn.add(vue2d.getLabelSuiviSouris(),BuBorderLayout.SOUTH); + pn.afficheModale(implementation.getParentComponent(), TrResource.getS("Origine ")+" "+modele.getTitle()); + + + implementation.clearMainProgression(); + } + + /** + * Constructeur d'une dialog qui affiche l... [truncated message content] |