From: <de...@us...> - 2009-01-29 22:45:03
|
Revision: 4426 http://fudaa.svn.sourceforge.net/fudaa/?rev=4426&view=rev Author: deniger Date: 2009-01-29 22:44:57 +0000 (Thu, 29 Jan 2009) Log Message: ----------- Modified Paths: -------------- branches/Prepro-0.92-SNAPSHOT/ctulu/src/com/memoire/bu/BuSplashScreen.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/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/EbliWidgetArrowEditor.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetEditModeListener.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/calque/EbliWidgetCalqueLegende.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/EbliWidgetGraphe.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/commun/impl/Fudaa.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/commun/impl/FudaaSplashScreen.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/post/TrPostFlecheContentDefaultSaver.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/TrPostUserVariableSaver.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/TrPostDataCreatedSaver.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/persist/TrPostPersistenceManager.java Modified: branches/Prepro-0.92-SNAPSHOT/ctulu/src/com/memoire/bu/BuSplashScreen.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ctulu/src/com/memoire/bu/BuSplashScreen.java 2009-01-29 18:53:28 UTC (rev 4425) +++ branches/Prepro-0.92-SNAPSHOT/ctulu/src/com/memoire/bu/BuSplashScreen.java 2009-01-29 22:44:57 UTC (rev 4426) @@ -17,6 +17,8 @@ import java.lang.reflect.InvocationTargetException; import javax.swing.JComponent; +import javax.swing.JLabel; +import javax.swing.JPanel; import javax.swing.JWindow; import javax.swing.SwingConstants; import javax.swing.SwingUtilities; @@ -38,8 +40,8 @@ /* * class XMultiLabel extends BuLabelMultiLine { protected void paintComponent(Graphics _g) { Color - * old=getForeground(); setForeground(Color.white); for(int i=-1;i<=1;i++) for(int j=-1;j<=1;j++) { - * _g.translate(i,j); super.paintComponent(_g); _g.translate(-i,-j); } setForeground(old); super.paintComponent(_g); } } + * old=getForeground(); setForeground(Color.white); for(int i=-1;i<=1;i++) for(int j=-1;j<=1;j++) { _g.translate(i,j); + * super.paintComponent(_g); _g.translate(-i,-j); } setForeground(old); super.paintComponent(_g); } } */ private ClassLoader loader_; @@ -50,7 +52,7 @@ protected JComponent content_; - protected BuPanel panel_; + protected JPanel panel_; protected BuPanel left_; protected BuProgressBar progression_; protected BuLabel load_; @@ -86,7 +88,7 @@ } public void build() { - panel_ = new BuPanel(); + panel_ = new JPanel(); panel_.setLayout(new BuBorderLayout()); BuPicture ml_logo = null; @@ -225,94 +227,83 @@ run(); } - public void run() - { - long avant,apres,diff; - avant=System.currentTimeMillis(); + public void run() { + long avant, apres, diff; + avant = System.currentTimeMillis(); // BuUpdateGUI.repaintNow(content_);//this); - int i,j,p,pp,m,l; - String ps=null; + int i, j, p, pp, m, l; + String ps = null; /* * String paquet=base_; i=paquet.lastIndexOf('.'); if(i>=0) paquet=paquet.substring(0,i+1); else paquet=""; */ // System.err.println("PAQUET="+paquet); + pp = -1; - pp=-1; + l = 0; + for (i = 0; i < classes_.length; i++) + l += classes_[i].length; - l=0; - for(i=0; i<classes_.length;i++) - l+=classes_[i].length; - - m=0; - for(i=0; i<classes_.length;i++) - for(j=0; j<classes_[i].length;j++) - { - String n=classes_[i][j]; - // int k=n.lastIndexOf('.'); - // setText(k>=0 ? n.substring(k+1) : n); - String t=n; - int k=t.indexOf('$'); - if(k>=0) t=t.substring(0,k); - k=t.lastIndexOf('.'); - if(k>=0) t=t.substring(0,k); - k=t.lastIndexOf('.'); - if(k>=0) t=t.substring(k+1); - if(!t.equals(ps)) - { + m = 0; + for (i = 0; i < classes_.length; i++) + for (j = 0; j < classes_[i].length; j++) { + String n = classes_[i][j]; + // int k=n.lastIndexOf('.'); + // setText(k>=0 ? n.substring(k+1) : n); + String t = n; + int k = t.indexOf('$'); + if (k >= 0) t = t.substring(0, k); + k = t.lastIndexOf('.'); + if (k >= 0) t = t.substring(0, k); + k = t.lastIndexOf('.'); + if (k >= 0) t = t.substring(k + 1); + if (!t.equals(ps)) { setText(t); - ps=t; + ps = t; } - // if(k<0) n=paquet+n; - try - { - if(loader_==null) - Class.forName(n); - else loader_.loadClass(n); // Class.forName(n,false,loader_); + // if(k<0) n=paquet+n; + try { + if (loader_ == null) Class.forName(n); + else loader_.loadClass(n); // Class.forName(n,false,loader_); - // Class c=Class.forName(n); - // FuClassLoaderDedicated.putGlobal(c); - } - catch(Exception ex) - { - /* System.err.println("Error loading class "+n); */ - break; - } - - Thread.yield(); - /* - * try { Thread.sleep(5); } catch(Exception ex) { } - */ + // Class c=Class.forName(n); + // FuClassLoaderDedicated.putGlobal(c); + } catch (Exception ex) { + /* System.err.println("Error loading class "+n); */ + break; + } - m++; - p=100*m/l; - if(p!=pp) - { - setProgression(p); - pp=p; - } + Thread.yield(); + /* + * try { Thread.sleep(5); } catch(Exception ex) { } + */ + + m++; + p = 100 * m / l; + if (p != pp) { + setProgression(p); + pp = p; + } } setText(""); setProgression(100); - apres=System.currentTimeMillis(); - if(apres<avant+delai_) - { - delai_=avant+delai_-apres; - avant=apres; - do - { - try { Thread.sleep(50); } - catch(Exception ex) { } + apres = System.currentTimeMillis(); + if (apres < avant + delai_) { + delai_ = avant + delai_ - apres; + avant = apres; + do { + try { + Thread.sleep(50); + } catch (Exception ex) {} - diff=System.currentTimeMillis()-avant; - p=(int)(diff*100/delai_); - setProgression(p); - } - while(delai_>diff); + diff = System.currentTimeMillis() - avant; + p = (int) (diff * 100 / delai_); + setProgression(p); + } while (delai_ > diff); } } 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-29 18:53:28 UTC (rev 4425) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/ZEbliCalquesPanel.java 2009-01-29 22:44:57 UTC (rev 4426) @@ -23,7 +23,6 @@ import java.awt.print.PageFormat; import java.awt.print.Printable; import java.util.ArrayList; -import java.util.Collection; import java.util.Collections; import java.util.HashMap; import java.util.List; @@ -40,15 +39,14 @@ import javax.swing.JPopupMenu; import javax.swing.JScrollPane; import javax.swing.JTabbedPane; -import javax.swing.JTable; import javax.swing.ListCellRenderer; import javax.swing.SwingUtilities; import javax.swing.event.TreeModelEvent; import javax.swing.event.TreeModelListener; -import javax.swing.table.DefaultTableModel; import javax.swing.tree.TreeModel; import org.fudaa.ctulu.CtuluLibString; +import org.fudaa.ctulu.CtuluSelectionInterface; import org.fudaa.ctulu.CtuluUI; import org.fudaa.ctulu.gui.CtuluLibSwing; import org.fudaa.ctulu.gui.CtuluTreeComboboxModel; @@ -80,15 +78,16 @@ /** * Fenetre d'affichage de calques contenant des services de base. (position souris, zoom fenetre, selection, - * transformations spatiales). Il est possible d'ajouter des boutons grace aux methodes <code>addButtonGroup</code>. - * Par defaut, 3 groupes de boutons sont proposes : selection, standard et navigation. Ils peuvent etre supprimes ou + * transformations spatiales). Il est possible d'ajouter des boutons grace aux methodes <code>addButtonGroup</code>. Par + * defaut, 3 groupes de boutons sont proposes : selection, standard et navigation. Ils peuvent etre supprimes ou * modifies avec les methodes remove * * @version $Id: ZEbliCalquesPanel.java,v 1.55.4.4 2008-05-13 12:10:36 bmarchan Exp $ * @author Guillaume Desnoix , Axel von Arnim, Fred deniger */ public class ZEbliCalquesPanel extends BuPanel implements EbliFilleCalquesInterface, BCalqueContextuelListener, - CtuluImageProducer, BCalqueSaverTargetInterface, EbliFindable, ActionListener, ZSelectionListener { + CtuluImageProducer, BCalqueSaverTargetInterface, EbliFindable, ActionListener, ZSelectionListener, + CtuluSelectionInterface { protected class AnimAdapter extends EbliAnimationSourceAbstract { @@ -257,6 +256,7 @@ /** * Rempli le menu avec les actions de la scene + * * @param _m le menu a remplir */ protected void fillMenuWithSceneActions(final JMenu _m) { @@ -271,7 +271,7 @@ * @param _m le menu a remplir */ protected void fillMenuWithSceneActions(final JPopupMenu _m) { - if (scene_!= null && scene_.getActions() != null) { + if (scene_ != null && scene_.getActions() != null) { EbliComponentFactory.INSTANCE.addActionsToMenu(scene_.getActions(), _m); } } @@ -292,14 +292,14 @@ /** * contient des informations de cr\xE9ation du vue2d. */ - public final static String NOM_FIC=EbliResource.EBLI.getString("Fichier res"); - public final static String PATH_FIC=EbliResource.EBLI.getString("Chemin"); - public final static String TITRE_FIC=EbliResource.EBLI.getString("Titre"); - public final static String MAILLAGE_FIC=EbliResource.EBLI.getString("Maillage utilis\xE9"); - public final static String DIFF_FIC=EbliResource.EBLI.getString("Diff\xE9rentiel fichiers"); - - public Map<String,String> infosCreation_=new HashMap<String,String>(); - + public final static String NOM_FIC = EbliResource.EBLI.getString("Fichier res"); + public final static String PATH_FIC = EbliResource.EBLI.getString("Chemin"); + public final static String TITRE_FIC = EbliResource.EBLI.getString("Titre"); + public final static String MAILLAGE_FIC = EbliResource.EBLI.getString("Maillage utilis\xE9"); + public final static String DIFF_FIC = EbliResource.EBLI.getString("Diff\xE9rentiel fichiers"); + + public Map<String, String> infosCreation_ = new HashMap<String, String>(); + protected BuMenu contextTools_; protected BuLabel mode_; @@ -340,6 +340,7 @@ /** * Construction des calques par defaut. + * * @param _gcInit le calque de base * @param _controller * @param _addSouth Ajout ou non des services d'info en bas de fenetre (position, mode, etc.). @@ -354,22 +355,21 @@ gc.setName("cqRACINE"); gc.setTitle(EbliResource.EBLI.getString("Calque racine")); gc.setDestructible(false); - + gcDonnees_ = new BGroupeCalque() { - + // B.M. Pour eviter le plantage, une boite est retourn\xE9e si rien n'est affich\xE9 ou boite non conforme. public GrBoite getDomaine() { - GrBoite bt=super.getDomaine(); - - if (bt==null) { - bt=new GrBoite(new GrPoint(0,0,0),new GrPoint(100,100,0)); + GrBoite bt = super.getDomaine(); + + if (bt == null) { + bt = new GrBoite(new GrPoint(0, 0, 0), new GrPoint(100, 100, 0)); + } else if (bt.getDeltaX() == 0 || bt.getDeltaY() == 0) { + bt.o_.x_ -= 10; + bt.o_.y_ -= 10; + bt.e_.x_ += 10; + bt.e_.y_ += 10; } - else if (bt.getDeltaX()==0 || bt.getDeltaY()==0) { - bt.o_.x_-=10; - bt.o_.y_-=10; - bt.e_.x_+=10; - bt.e_.y_+=10; - } return bt; } }; @@ -425,8 +425,8 @@ if (_controller == null) { throw new IllegalArgumentException(); } controller_ = _controller; controller_.setView(this); - - scene_=new ZScene(gcDonnees_,controller_.getCqSelectionI()); + + scene_ = new ZScene(gcDonnees_, controller_.getCqSelectionI()); scene_.setRestrictedToCalqueActif(true); scene_.addSelectionListener(this); modelArbre_.addTreeModelListener(scene_); @@ -482,16 +482,16 @@ public final void inverseSelection() { getScene().inverseSelection(); -// if (getCalqueActif() instanceof ZCalqueAffichageDonneesInterface) { -// ((ZCalqueAffichageDonneesInterface) getCalqueActif()).inverseSelection(); -// } + // if (getCalqueActif() instanceof ZCalqueAffichageDonneesInterface) { + // ((ZCalqueAffichageDonneesInterface) getCalqueActif()).inverseSelection(); + // } } public final void clearSelection() { getScene().clearSelection(); -// if (getCalqueActif() instanceof ZCalqueAffichageDonneesInterface) { -// ((ZCalqueAffichageDonneesInterface) getCalqueActif()).clearSelection(); -// } + // if (getCalqueActif() instanceof ZCalqueAffichageDonneesInterface) { + // ((ZCalqueAffichageDonneesInterface) getCalqueActif()).clearSelection(); + // } } public final ZEbliCalquePanelController getController() { @@ -526,15 +526,11 @@ final String act = _e.getActionCommand(); if ("SELECTFROMPOLY".equals(act)) { findPolys(); - } /*else if ("CLEARSELECTION".equals(act)) { - clearSelection(); - } else if ("INVERSESELECTION".equals(act)) { - inverseSelection(); - } else if ("TOUTSELECTIONNER".equals(act)) { - select(); - } else if ("RECHERCHER".equals(act)) { - find(); - }*/ + } /* + * else if ("CLEARSELECTION".equals(act)) { clearSelection(); } else if ("INVERSESELECTION".equals(act)) { + * inverseSelection(); } else if ("TOUTSELECTIONNER".equals(act)) { select(); } else if ("RECHERCHER".equals(act)) + * { find(); } + */ } @@ -593,11 +589,12 @@ public BCalque getCalqueActif() { return controller_.getCalqueActif(); } - + /** * Revoie la scene. */ - private ZScene scene_=null; + private ZScene scene_ = null; + public ZScene getScene() { return scene_; } @@ -829,9 +826,9 @@ public void select() { getScene().selectAll(); -// if (getCalqueActif() instanceof ZCalqueAffichageDonneesInterface) { -// ((ZCalqueAffichageDonneesInterface) getCalqueActif()).selectAll(); -// } + // if (getCalqueActif() instanceof ZCalqueAffichageDonneesInterface) { + // ((ZCalqueAffichageDonneesInterface) getCalqueActif()).selectAll(); + // } } public ListCellRenderer getComboRender() { @@ -921,10 +918,9 @@ } /** - * Ajoute les calques d'informations. - * Les calques contenus dans ce groupe de calques ne sont pas visibles dans l'arbre des calques. - * Les objets de ces calques ne sont pas s\xE9lectionnables, mais visibles dans la fenetre de vue - * des calques. + * Ajoute les calques d'informations. Les calques contenus dans ce groupe de calques ne sont pas visibles dans l'arbre + * des calques. Les objets de ces calques ne sont pas s\xE9lectionnables, mais visibles dans la fenetre de vue des + * calques. * * @param _g le maillage associe */ @@ -1001,14 +997,13 @@ .getMenuIcon("draw-polygon"), this); return selection; } - - /* + + /* * @see org.fudaa.ebli.calque.ZSelectionListener#selectionChanged(org.fudaa.ebli.calque.ZSelectionEvent) */ public void selectionChanged(ZSelectionEvent _evt) { modelArbre_.fireObservableChanged(); } - public ZEbliCalquesPanel duplicate(Map options) { /* @@ -1024,34 +1019,31 @@ return null; } - /** - * Cree un tableau qui r\xE9capitule le contenu des infos de cr\xE9ation de la vue 2d. - * Retourne un panel vide si aucune infos n'est disponible. + * Cree un tableau qui r\xE9capitule le contenu des infos de cr\xE9ation de la vue 2d. Retourne un panel vide si aucune + * infos n'est disponible. + * * @return */ - public BuPanel buildInfosCreationComposant(){ - - - if(infosCreation_==null || infosCreation_.keySet()==null ||infosCreation_.keySet().size()==0) - return new BuPanel(); - List<String> liste=new ArrayList<String>(infosCreation_.keySet()); - Collections.sort(liste); - List<String> col=new ArrayList<String>(); - col.add(EbliResource.EBLI.getString("Nom")); - col.add(EbliResource.EBLI.getString("Valeur")); - - EbliModelInfos modelInfos=new EbliModelInfos(liste,infosCreation_,col); - BuTable table=new BuTable(modelInfos); - - table.getColumnModel().getColumn(0).setPreferredWidth(20); - BuPanel conteneur=new BuPanel(new BorderLayout()); - conteneur.add(new JScrollPane(table),BorderLayout.CENTER); - - conteneur.add(new JLabel("<html><body><b>"+EbliResource.EBLI.getString("Infos cr\xE9ations")+"</b></body></html>",JLabel.CENTER),BorderLayout.NORTH); - return conteneur; + public BuPanel buildInfosCreationComposant() { + + if (infosCreation_ == null || infosCreation_.keySet() == null || infosCreation_.keySet().size() == 0) return new BuPanel(); + List<String> liste = new ArrayList<String>(infosCreation_.keySet()); + Collections.sort(liste); + List<String> col = new ArrayList<String>(); + col.add(EbliResource.EBLI.getString("Nom")); + col.add(EbliResource.EBLI.getString("Valeur")); + + EbliModelInfos modelInfos = new EbliModelInfos(liste, infosCreation_, col); + BuTable table = new BuTable(modelInfos); + + table.getColumnModel().getColumn(0).setPreferredWidth(20); + BuPanel conteneur = new BuPanel(new BorderLayout()); + conteneur.add(new JScrollPane(table), BorderLayout.CENTER); + + conteneur.add(new JLabel("<html><body><b>" + EbliResource.EBLI.getString("Infos cr\xE9ations") + "</b></body></html>", + JLabel.CENTER), BorderLayout.NORTH); + return conteneur; } - - } \ 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 2009-01-29 18:53:28 UTC (rev 4425) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliScene.java 2009-01-29 22:44:57 UTC (rev 4426) @@ -13,6 +13,8 @@ import java.util.Map; import java.util.Set; +import javax.swing.JComponent; + import org.fudaa.ctulu.CtuluCommandManager; import org.fudaa.ctulu.CtuluLibGenerator; import org.fudaa.ctulu.CtuluUI; @@ -60,7 +62,7 @@ Set<?> objects2 = getSelectedObjects(); if (objects2 != null) { for (Iterator iterator = objects2.iterator(); iterator.hasNext();) { - Object object = (Object) iterator.next(); + Object object = iterator.next(); stopEditing(findWidget(object)); } 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 2009-01-29 18:53:28 UTC (rev 4425) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliSceneController.java 2009-01-29 22:44:57 UTC (rev 4426) @@ -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,15 +57,13 @@ // scene_.getInteractionLayer(), ActionFactory // .createDefaultAlignWithMoveDecorator(), false); - alignWithResizeAction = EbliWidgetActionFactory.createAlignWithProportionnalResizeAction(scene_ - .getVisu(), scene_ - .getInteractionLayer(), - ActionFactory.createDefaultAlignWithMoveDecorator(), false); - + alignWithResizeAction = EbliWidgetActionFactory.createAlignWithProportionnalResizeAction(scene_.getVisu(), scene_ + .getInteractionLayer(), ActionFactory.createDefaultAlignWithMoveDecorator(), false); + rectangularSelection_ = ActionFactory.createRectangularSelectAction(scene_, scene_.getInteractionLayer()); // -- ajoute l'action du zoom ( ctrl + clic) - //suppression pour eviter les bugs sioux -// 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 @@ -73,9 +71,9 @@ } -// public WidgetAction getAlignWithResizeActionProportionnal() { -// return alignWithResizeActionProportionnal; -// } + // public WidgetAction getAlignWithResizeActionProportionnal() { + // return alignWithResizeActionProportionnal; + // } public boolean isEditable() { return false; @@ -85,15 +83,15 @@ listeners_.add(_l); } - public void fireEditStart(final Widget w) { + public void fireEditStart(final Widget _w, JComponent _editor) { for (final EbliWidgetEditModeListener l : listeners_) { - l.editStart(w); + l.editStart(_w, _editor); } } - public void fireEditStop(final Widget w) { + public void fireEditStop(final Widget w, JComponent editor) { for (final EbliWidgetEditModeListener l : listeners_) { - l.editStop(w); + l.editStop(w, editor); } } @@ -171,10 +169,10 @@ 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/EbliWidget.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidget.java 2009-01-29 18:53:28 UTC (rev 4425) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidget.java 2009-01-29 22:44:57 UTC (rev 4426) @@ -9,6 +9,8 @@ import java.util.List; import java.util.Map; +import javax.swing.JComponent; + import org.fudaa.ctulu.CtuluCommand; import org.fudaa.ctulu.CtuluCommandContainer; import org.fudaa.ctulu.CtuluLibString; @@ -35,9 +37,8 @@ */ public class EbliWidget extends Widget implements BSelecteurTargetInterface, EbliWidgetInterface<EbliWidgetController> { - - public final static boolean AMELIO_LOT_VISIBLE=true; - + public final static boolean AMELIO_LOT_VISIBLE = true; + public final static String COLORCONTOUR = "ColorContour"; public final static String COLORFOND = "colorFond"; @@ -52,7 +53,7 @@ public final static String ROTATION = "rotation"; public final static String TRANSPARENCE = "Transpa"; - + protected EbliWidgetController controller_; /** * L'identifiant unique du widget @@ -97,10 +98,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); - + + // -- ajout de la trnaparence a false --// + propGraphique.put(EbliWidget.TRANSPARENCE, false); + } /** @@ -121,18 +122,15 @@ } - - - public boolean getTransparent() { - return (Boolean) propGraphique.get(TRANSPARENCE); -} + return (Boolean) propGraphique.get(TRANSPARENCE); + } -public void setTransparent(boolean transparent) { - propGraphique.put(TRANSPARENCE, new Boolean(transparent)); -} + public void setTransparent(boolean transparent) { + propGraphique.put(TRANSPARENCE, new Boolean(transparent)); + } -public boolean canColorBackground() { + public boolean canColorBackground() { return true && !getTransparent(); } @@ -209,15 +207,15 @@ return mapDupliquee; } - protected void editingStart() { + protected void editingStart(JComponent _editor) { isInEditMode_ = true; - getEbliScene().getController().fireEditStart(this); + getEbliScene().getController().fireEditStart(this, _editor); } - protected void editingStop() { + protected void editingStop(JComponent _editor) { isInEditMode_ = false; - getEbliScene().getController().fireEditStop(this); + getEbliScene().getController().fireEditStop(this, _editor); } /** @@ -445,8 +443,8 @@ if (parent != null) { // System.err.println("parent not null"+ toString()); setBorder(lookFeel.getBorderInGroup(_newState)); - parent.setBorder(lookFeel.getBorder(_newState, parent.getController().canResize_, - parent.getController().isProportional())); + parent.setBorder(lookFeel.getBorder(_newState, parent.getController().canResize_, parent.getController() + .isProportional())); } else { setBorder(lookFeel.getBorder(_newState, getController().canResize_, getController().isProportional())); } 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-29 18:53:28 UTC (rev 4425) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetArrowEditor.java 2009-01-29 22:44:57 UTC (rev 4426) @@ -99,12 +99,12 @@ Widget widget, EbliEditorArrow editor, boolean commit) { imageFleche = null; repaint(); - editingStop(); + editingStop(editor); } public void notifyOpened(org.netbeans.api.visual.action.InplaceEditorProvider.EditorController controller, Widget widget, EbliEditorArrow editor) { - editingStart(); + editingStart(editor); } } Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetEditModeListener.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetEditModeListener.java 2009-01-29 18:53:28 UTC (rev 4425) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetEditModeListener.java 2009-01-29 22:44:57 UTC (rev 4426) @@ -4,6 +4,8 @@ */ package org.fudaa.ebli.visuallibrary; +import javax.swing.JComponent; + import org.netbeans.api.visual.widget.Widget; /** @@ -13,8 +15,8 @@ */ public interface EbliWidgetEditModeListener { - void editStart(Widget w); + void editStart(Widget w, JComponent _editor); - void editStop(Widget w); + void editStop(Widget w, JComponent _editor); } 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 2009-01-29 18:53:28 UTC (rev 4425) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetTextEditor.java 2009-01-29 22:44:57 UTC (rev 4426) @@ -50,16 +50,16 @@ final EbliWidgetControllerTextEditor controller = new EbliWidgetControllerTextEditor(this); controller.setEditable(true); setController(controller); - + } -// @Override -//public boolean canColorBackground() { -// // TODO Auto-generated method stub -// return false; -//} + // @Override + // public boolean canColorBackground() { + // // TODO Auto-generated method stub + // return false; + // } -public boolean canRotate() { + public boolean canRotate() { return false; } @@ -183,7 +183,7 @@ // intern_.revalidate(); this.repaint(); getEbliScene().refresh(); - editingStop(); + editingStop(_editor); } @@ -194,7 +194,7 @@ // editorPane_.setDocumentText(contenuHTML_.getText()); // -- on masque l affichage du widgetcomponent --// setHtml(CtuluLibString.EMPTY_STRING); - editingStart(); + editingStart(_editor); } 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-29 18:53:28 UTC (rev 4425) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetCalqueLegende.java 2009-01-29 22:44:57 UTC (rev 4426) @@ -45,11 +45,11 @@ // Font oldFont_; boolean mustUpdateFont_ = false; - + public EbliWidgetCalqueLegende(final EbliScene _scene, final boolean _controller/* , BArbreCalqueModel model */, final BCalqueLegendePanel _legendePanel) { super(_scene, _controller); - + setCheckClipping(true); // oldFont_ = getFormeFont(); // -- la legende est un listener des modifs de son calque --// @@ -127,16 +127,14 @@ return null; } - - public void notifyClosing(final EditorController _controller, final Widget _widget, final JComponent _editor, final boolean _commit) { - editingStop(); + editingStop(_editor); } public void notifyOpened(final EditorController _controller, final Widget _widget, final JComponent _editor) { - editingStart(); + editingStart(_editor); } 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-29 18:53:28 UTC (rev 4425) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetVueCalque.java 2009-01-29 22:44:57 UTC (rev 4426) @@ -3,7 +3,6 @@ import java.awt.Color; import java.awt.Dimension; import java.awt.Graphics2D; -import java.awt.Insets; import java.awt.Rectangle; import java.awt.Window; import java.awt.image.BufferedImage; @@ -102,10 +101,10 @@ */ public void notifyClosing(final org.netbeans.api.visual.action.InplaceEditorProvider.EditorController controller, final Widget widget, final BuPanel editor, final boolean commit) { - editingStop(); + editingStop(editor); setZoom(calquePanel_.getVueCalque().getViewBoite()); - //le zoom n'a pas chang\xE9. -// zoomChanged_=false; + // le zoom n'a pas chang\xE9. + // zoomChanged_=false; getEbliScene().refresh(); } @@ -144,7 +143,6 @@ } boolean zoomChanged_ = true; - @Override protected void paintWidget() { @@ -208,7 +206,7 @@ public void notifyOpened(final org.netbeans.api.visual.action.InplaceEditorProvider.EditorController controller, final Widget widget, final BuPanel editor) { - editingStart(); + editingStart(editor); // calquePanel_.setBorder(BorderFactory.createLineBorder(Color.GRAY, 1)); } @@ -298,8 +296,8 @@ if (CtuluLib.isEquals(_zoom, zoom_)) return; clearCacheImage(); this.zoom_ = _zoom; - zoomChanged_=true; -// repaint(); + zoomChanged_ = true; + // repaint(); } 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 2009-01-29 18:53:28 UTC (rev 4425) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/graphe/EbliWidgetGraphe.java 2009-01-29 22:44:57 UTC (rev 4426) @@ -187,7 +187,7 @@ public void notifyClosing(final org.netbeans.api.visual.action.InplaceEditorProvider.EditorController controller, final Widget widget, final BuPanel editor, final boolean commit) { - editingStop(); + editingStop(editor); } @@ -253,7 +253,7 @@ public void notifyOpened(final org.netbeans.api.visual.action.InplaceEditorProvider.EditorController controller, final Widget widget, final BuPanel editor) { - editingStart(); + editingStart(editor); } public void axeAspectChanged(final EGAxe _c) { Modified: branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/commun/impl/Fudaa.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/commun/impl/Fudaa.java 2009-01-29 18:53:28 UTC (rev 4425) +++ branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/commun/impl/Fudaa.java 2009-01-29 22:44:57 UTC (rev 4426) @@ -33,7 +33,7 @@ private final FudaaCommandLineParser flags_ = new FudaaCommandLineParser(); private FudaaSplashScreen splash_; private File toOpen_; - private boolean splashTextVisible_=true; + private boolean splashTextVisible_ = true; public boolean isDoNotUseFudaaTee() { return doNotUseFudaaTee_; @@ -47,9 +47,10 @@ return applyLanguage_; } - public void setSplashTextVisible(boolean b){ - splashTextVisible_=b; + public void setSplashTextVisible(boolean b) { + splashTextVisible_ = b; } + public void setApplyLanguage(final boolean _applyLanguage) { applyLanguage_ = _applyLanguage; } @@ -154,7 +155,7 @@ // il est inutile de charger des classes. Cela encombre la memoire pour rien if (!flags_.noSplash_ && FudaaStartupExitPreferencesPanel.isSplashActivated()) { splash_ = new FudaaSplashScreen(_soft, 2000, new String[0][0]); - splash_.setVisible(splashTextVisible_); + splash_.setVisible(splashTextVisible_); splash_.start(); } } Modified: branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/commun/impl/FudaaSplashScreen.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/commun/impl/FudaaSplashScreen.java 2009-01-29 18:53:28 UTC (rev 4425) +++ branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/commun/impl/FudaaSplashScreen.java 2009-01-29 22:44:57 UTC (rev 4426) @@ -7,54 +7,51 @@ * @mail de...@fu... */ package org.fudaa.fudaa.commun.impl; -import java.awt.Color; + import java.awt.Component; -import java.awt.Container; import javax.swing.JLabel; +import javax.swing.JPanel; import javax.swing.SwingConstants; +import org.fudaa.fudaa.ressource.FudaaResource; + import com.memoire.bu.BuInformationsSoftware; -import com.memoire.bu.BuLabel; -import com.memoire.bu.BuPanel; import com.memoire.bu.BuPicture; import com.memoire.bu.BuSplashScreen; -import org.fudaa.fudaa.ressource.FudaaResource; /** - * @version $Revision: 1.2 $ $Date: 2008-02-29 16:47:10 $ by $Author: opasteur $ - * @author Guillaume Desnoix + * @version $Revision: 1.2 $ $Date: 2008-02-29 16:47:10 $ by $Author: opasteur $ + * @author Guillaume Desnoix */ +@SuppressWarnings("serial") public class FudaaSplashScreen extends BuSplashScreen { - boolean visibleText_ = true; - public FudaaSplashScreen( - final BuInformationsSoftware _info, - final long _delai, - final String[][] _classes) { + + public FudaaSplashScreen(final BuInformationsSoftware _info, final long _delai, final String[][] _classes) { super(_info, _delai, _classes); } + public final void build() { super.build(); name_.setVerticalAlignment(SwingConstants.BOTTOM); - //setForeground(Color.WHITE); + // setForeground(Color.WHITE); name_.setText("Fudaa-" + name_.getText()); - if(!visibleText_) setLabelVisibleFalse(panel_); left_.add(new BuPicture(FudaaResource.FUDAA.getIcon("fudaa-logo"))); } - - public void setVisibleText(boolean b){ - visibleText_ = b; + + public void setTextUnvisible(boolean b) { + setLabelVisibleFalse(panel_); } - - private void setLabelVisibleFalse(BuPanel panel){ - Component[] comps = panel.getComponents(); - for (int i = 0; i < comps.length; i++) { - if (comps[i] instanceof JLabel) ((JLabel)comps[i]).setText(" "); - else if (comps[i] instanceof BuPanel){ - setLabelVisibleFalse((BuPanel)comps[i]); - } - } + + private void setLabelVisibleFalse(JPanel panel) { + Component[] comps = panel.getComponents(); + for (int i = 0; i < comps.length; i++) { + if (comps[i] instanceof JLabel) ((JLabel) comps[i]).setText(" "); + else if (comps[i] instanceof JPanel) { + setLabelVisibleFalse((JPanel) comps[i]); + } + } } - + } Modified: branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/TrLauncherDefault.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/TrLauncherDefault.java 2009-01-29 18:53:28 UTC (rev 4425) +++ branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/TrLauncherDefault.java 2009-01-29 22:44:57 UTC (rev 4426) @@ -131,8 +131,8 @@ infoSoft = new BuInformationsSoftware(); infoSoft.name = "prepro"; - infoSoft.version = "0.92-MAQUETTE-V7"; - infoSoft.date = "2008-12-13"; + infoSoft.version = "0.92-MAQUETTE-V8"; + infoSoft.date = "2009-01-29"; infoSoft.rights = TrResource.getS("Tous droits r\xE9serv\xE9s") + ". CETMEF (c)2003-2007"; infoSoft.contact = "fre...@fu..."; infoSoft.license = "GPL2"; @@ -148,7 +148,7 @@ } else { infoSoft.man = manUrl.toString() + '/'; } - infoSoft.authors = new String[] { "Nicolas Clavreul", "Fr\xE9d\xE9ric Deniger" }; + infoSoft.authors = new String[] { "Nicolas Clavreul", "Fr\xE9d\xE9ric Deniger", "Adrien Hadoux" }; infoSoft.contributors = new String[] { "Equipes Dodico, Ebli et Fudaa" }; infoSoft.documentors = new String[] { "" }; infoSoft.testers = new String[] { "Fr\xE9d\xE9ric Deniger, Patrick Gomi, Vanessya Laborie", "Andr\xE9 Paquier", Modified: branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostFlecheContentDefaultSaver.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostFlecheContentDefaultSaver.java 2009-01-29 18:53:28 UTC (rev 4425) +++ branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostFlecheContentDefaultSaver.java 2009-01-29 22:44:57 UTC (rev 4426) @@ -28,8 +28,8 @@ vy_ = _defaut.getVy().getShortName(); } - public TrPostDataCreated restore(TrPostSource _src, CtuluUI _ui, Map _shortName) { - H2dVariableType var = (H2dVariableType) _shortName.get(name_); + public TrPostDataCreated restore(H2dVariableType _newVar, TrPostSource _src, CtuluUI _ui, Map _shortName) { + H2dVariableType var = _newVar; H2dVariableType varX = (H2dVariableType) _shortName.get(vx_); H2dVariableType varY = (H2dVariableType) _shortName.get(vy_); if (var != null && varX != null && varY != null) { return new TrPostFlecheContentDefaut(_src, var, varX, varY); } 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-29 18:53:28 UTC (rev 4425) +++ branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostLayoutFille.java 2009-01-29 22:44:57 UTC (rev 4426) @@ -22,6 +22,7 @@ import javax.swing.JToolBar; import org.fudaa.ctulu.CtuluCommandManager; +import org.fudaa.ctulu.CtuluSelectionInterface; import org.fudaa.ctulu.CtuluUndoRedoInterface; import org.fudaa.ctulu.gui.CtuluFilleWithComponent; import org.fudaa.ctulu.image.CtuluImageProducer; @@ -76,7 +77,8 @@ * @author Adrien Hadoux */ public class TrPostLayoutFille extends BuInternalFrame implements CtuluFilleWithComponent, CtuluUndoRedoInterface, - BuUndoRedoInterface, BuCutCopyPasteInterface, EbliWidgetEditModeListener, CtuluImageProducer, EbliPageable { + BuUndoRedoInterface, BuCutCopyPasteInterface, CtuluSelectionInterface, EbliWidgetEditModeListener, + CtuluImageProducer, EbliPageable { /** * @@ -89,7 +91,7 @@ // final private EbliScene scene_; public TrPostLayoutPanelController controller_; - final JComponent defaultSouth_ = new JLabel("Details:"); + final JComponent defaultSouth_ = new JLabel(TrResource.getS("Details:")); private EbliPageableDelegate delegueImpression_; @@ -164,45 +166,43 @@ panelSouthSuiviSouris_ = new JLabel(); this.add(panelSouthSuiviSouris_, BorderLayout.SOUTH); - // 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_); - // // - // // //-- stockage de la taille comme ancienne size --// - // // oldSize_=size; - // // } - // } - // - // @Override - // public void componentShown(ComponentEvent e) { - // // TODO Auto-generated method stub - // - // } - // - // }); + } + public void find() { + if (editorEnCours_ instanceof CtuluSelectionInterface) { + ((CtuluSelectionInterface) editorEnCours_).find(); + } + } + public void replace() { + if (editorEnCours_ instanceof CtuluSelectionInterface) { + ((CtuluSelectionInterface) editorEnCours_).replace(); + } + + } + + public void select() { + if (editorEnCours_ instanceof CtuluSelectionInterface) { + ((CtuluSelectionInterface) editorEnCours_).select(); + } + + } + + public void inverseSelection() { + if (editorEnCours_ instanceof CtuluSelectionInterface) { + ((CtuluSelectionInterface) editorEnCours_).inverseSelection(); + } + + } + + public void clearSelection() { + if (editorEnCours_ instanceof CtuluSelectionInterface) { + ((CtuluSelectionInterface) editorEnCours_).clearSelection(); + } + + } + /** * @param _title * @param _preferredLocation @@ -328,19 +328,20 @@ // 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())); - - //-- 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 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 --// @@ -473,9 +474,12 @@ throw new IllegalAccessError("not supported"); } - public void editStart(final Widget _w) { + JComponent editorEnCours_; + + public void editStart(final Widget _w, JComponent _editor) { + editorEnCours_ = _editor; final EbliNode node = (EbliNode) controller_.getSceneCourante().findObject(_w); - if (node == null || !node.hasWidget() || node.getWidget().getController() == null) editStop(null); + if (node == null || !node.hasWidget() || node.getWidget().getController() == null) editStop(null, null); if (node.getCreator() instanceof EbliWidgetCreatorVueCalque) { // -- etape 1: ajout du tree dans fudaaImplementation --// @@ -505,19 +509,18 @@ setTitle(previousTitleFrame); } - //-- cas des fleches + // -- cas des fleches else if (node.getCreator() instanceof EbliWidgetCreatorArrowEditor) { - FuLog.debug("arrow editor"); - - // -- 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); + FuLog.debug("arrow editor"); - } - - + // -- 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()); @@ -528,7 +531,8 @@ } - public void editStop(final Widget _w) { + public void editStop(final Widget _w, JComponent _editor) { + editorEnCours_ = null; changeTree(getScene()); changeToolbarScene(); setTitle(previousTitleFrame); Modified: 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/TrPostUserVariableSaver.java 2009-01-29 18:53:28 UTC (rev 4425) +++ branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostUserVariableSaver.java 2009-01-29 22:44:57 UTC (rev 4426) @@ -103,7 +103,7 @@ final Map shortName = getShortNameVariable(_src); final TrPostDataCreated[] newData = new TrPostDataCreated[saver_.length]; for (int i = 0; i < saver_.length; i++) { - newData[i] = saver_[i].restore(_src, _ui, shortName); + newData[i] = saver_[i].restore(varCreatedSimple_[i], _src, _ui, shortName); } _src.addUserVar(varCreatedSimple_, newData, null); } @@ -198,7 +198,7 @@ final TrPostDataCreated created = (TrPostDataCreated) e.getValue(); final H2dVariableType var = (H2dVariableTypeCreated) e.getKey(); // pas de sauvegarde possible ou non basee sur une expression - if (created!=null && !created.isExpr() && created.createSaver() == null) { + if (created != null && !created.isExpr() && created.createSaver() == null) { varToRemove.add(var); varToRemove.addAll(TrPostDataCreatedExpr.getAllVarDependingOn(var, _src)); } @@ -212,12 +212,10 @@ for (final Iterator it = map.entrySet().iterator(); it.hasNext();) { final Map.Entry e = (Map.Entry) it.next(); final TrPostDataCreated data = ((TrPostDataCreated) e.getValue()); - if (data!=null &&data.isExpr()) { - if (data!=null) - exprVar.put(e.getKey(), data); + if (data != null && data.isExpr()) { + if (data != null) exprVar.put(e.getKey(), data); } else { - if (data!=null) - otherVar.put(e.getKey(), data); + if (data != null) otherVar.put(e.getKey(), data); } } @@ -231,7 +229,7 @@ } save.varCreatedSimple_ = new H2dVariableTypeCreated[otherVar.size()]; save.saver_ = new TrPostDataCreatedSaver[otherVar.size()]; - idx = 0; + idx = 0; for (final Iterator it = otherVar.entrySet().iterator(); it.hasNext();) { final Map.Entry e = (Map.Entry) it.next(); save.varCreatedSimple_[idx] = (H2dVariableTypeCreated) e.getKey(); Modified: 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/TrPostDataCreatedCstTime.java 2009-01-29 18:53:28 UTC (rev 4425) +++ branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/data/TrPostDataCreatedCstTime.java 2009-01-29 22:44:57 UTC (rev 4426) @@ -27,8 +27,8 @@ private final int timeIdx_; - public static TrPostDataCreatedCstTime createFrom(final TrPostSource _src, - final TrPostDataCreatedCstTimeSaver _saver, final Map _shortName) { + public static TrPostDataCreatedCstTime createFrom(H2dVariableType _newVar, + final TrPostSource _src, final TrPostDataCreatedCstTimeSaver _saver, final Map _shortName) { if (_src == null || _saver == null || _shortName == null) { return null; } final H2dVariableType var = (H2dVariableType) _shortName.get(_saver.shortName_); if (var == null) { return null; } Modified: 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/TrPostDataCreatedCstTimeSaver.java 2009-01-29 18:53:28 UTC (rev 4425) +++ branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/data/TrPostDataCreatedCstTimeSaver.java 2009-01-29 22:44:57 UTC (rev 4426) @@ -10,6 +10,7 @@ import java.util.Map; import org.fudaa.ctulu.CtuluUI; +import org.fudaa.dodico.h2d.type.H2dVariableType; import org.fudaa.fudaa.tr.post.TrPostSource; /** @@ -31,8 +32,8 @@ tidx_ = _data.getTimeIdx(); } - public TrPostDataCreated restore(final TrPostSource _src, final CtuluUI _ui, final Map _shortName) { - return TrPostDataCreatedCstTime.createFrom(_src, this, _shortName); + public TrPostDataCreated restore(H2dVariableType _newVar, final TrPostSource _src, final CtuluUI _ui, final Map _shortName) { + return TrPostDataCreatedCstTime.createFrom(_newVar, _src, this, _shortName); } } Modified: 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/TrPostDataCreatedSaver.java 2009-01-29 18:53:28 UTC (rev 4425) +++ branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/data/TrPostDataCreatedSaver.java 2009-01-29 22:44:57 UTC (rev 4426) @@ -10,6 +10,7 @@ import java.util.Map; import org.fudaa.ctulu.CtuluUI; +import org.fudaa.dodico.h2d.type.H2dVariableType; import org.fudaa.fudaa.tr.post.TrPostSource; /** @@ -18,6 +19,6 @@ */ public interface TrPostDataCreatedSaver { - TrPostDataCreated restore(TrPostSource _src, CtuluUI _ui, Map _shortName); + TrPostDataCreated restore(H2dVariableType _newVar, TrPostSource _src, CtuluUI _ui, Map _shortName); } Modified: 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/TrPostDataCreatedStatisticSaver.java 2009-01-29 18:53:28 UTC (rev 4425) +++ branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/data/TrPostDataCreatedStatisticSaver.java 2009-01-29 22:44:57 UTC (rev 4426) @@ -11,6 +11,7 @@ import org.fudaa.ctulu.CtuluRange; import org.fudaa.ctulu.CtuluUI; +import org.fudaa.dodico.h2d.type.H2dVariableType; import org.fudaa.fudaa.tr.post.TrPostSource; /** @@ -19,7 +20,7 @@ */ public class TrPostDataCreatedStatisticSaver implements TrPostDataCreatedSaver { - public TrPostDataCreated restore(final TrPostSource _src, final CtuluUI _ui, final Map _shortName) { + public TrPostDataCreated restore(H2dVariableType _newVar, final TrPostSource _src, final CtuluUI _ui, final Map _shortName) { return TrPostDataCreatedStatistic.createFrom(this, _src, _shortName, _ui); } 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 2009-01-29 18:53:28 UTC (rev 4425) +++ branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/persist/TrPostPersistenceManager.java 2009-01-29 22:44:57 UTC (rev 4426) @@ -3,7 +3,6 @@ import java.awt.Dimension; import java.awt.Point; import java.io.File; -import java.io.FileFilter; import java.io.FileNotFoundException; import java.io.FileReader; import java.io.FileWriter; @@ -43,12 +42,10 @@ import org.fudaa.fudaa.tr.common.TrResource; import org.fudaa.fudaa.tr.post.TrPostCommonImplementation; import org.fudaa.fudaa.tr.post.TrPostLayoutFille; -import org.fudaa.fudaa.tr.post.TrPostMultiSourceActivator; import org.fudaa.fudaa.tr.post.TrPostMultiSourceActivator2; import org.fudaa.fudaa.tr.post.TrPostProjet; import org.fudaa.fudaa.tr.post.TrPostSource; import org.fudaa.fudaa.tr.post.TrPostSourceAbstract; -import org.fudaa.fudaa.tr.post.TrPostSourceAbstractFromIdx; import org.fudaa.fudaa.tr.post.TrPostSourceFromReader; import org.fudaa.fudaa.tr.post.TrPostSourcePersistComposite; import org.fudaa.fudaa.tr.post.TrPostTimeModelSaver; @@ -161,30 +158,38 @@ final CtuluFileChooser fileChooser = new CtuluFileChooser(true); fileChooser.setDialogTitle(EbliResource.EBLI.getString("S\xE9lectionnez l'emplacement de votre projet")); fileChooser.setAcceptAllFileFilterUsed(false); - fileChooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY); +// fileChooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY); fileChooser.addChoosableFileFilter(new TrPostFileFilter.DirectoryPOSTFilter()); // -- par defaut on choisis le nom du fichier resultat + .POST --// - File fileDefaut = null; - boolean constrcutFileDefaut = false; + + // boolean constrcutFileDefaut = false; if (trprojet_.listeSrc_ != null && trprojet_.listeSrc_.size() >= 1) { String indice = ""; - int i = 1; - do { - // TODO Adrien complique - // String path = fileChooser.getCurrentDirectory().getAbsolutePath() + File.separator - // + ; - // fileDefaut = new File(path); - fileDefaut = new File(fileChooser.getCurrentDirectory(), trprojet_.getSource(0).getFiles().iterator().next() - .getName() - + indice + EXTENSION); - indice = "_" + (i++); - } while (fileDefaut.exists()); + File fileDefaut = new File(fileChooser.getCurrentDirectory(), trprojet_.getSource(0).getFiles().iterator() + .next().getName() + + EXTENSION); + if (fileDefaut.exists()) { + int i = 1; + do { + // TODO Adrien complique + // String path = fileChooser.getCurrentDirectory().getAbsolutePath() + File.separator + // + ; + // fileDefaut = new File(path); + fileDefaut = new File(fileChooser.getCurrentDirectory(), trprojet_.getSource(0).getFiles().iterator() + .next().getName() + + indice + EXTENSION); + indice = "_" + (i++); + } while (fileDefaut.exists() && i < 20);// Garde fou + } + // FRED faux cree le repertoire alors que l'utilisateur ne l'a pas choisit !!!!! + // if (!fileDefaut.exists()) { + // constrcutFileDefaut = fileDefaut.mkdir(); + // } if (!fileDefaut.exists()) { - constrcutFileDefaut = fileDefaut.mkdir(); + fileChooser.setSelectedFile(fileDefaut); } - fileChooser.setSelectedFile(fileDefaut); } if (projet_ != null) { // initialiser le saveas dans le meme rep @@ -196,18 +201,19 @@ // -- si le fichier choisit en d\xE9finitif est diff\xE9rent du fichier d\xE9faut et qu'il a \xE9t\xE9t cr\xE9r pour rien, on le // supprime --// - if (constrcutFileDefaut && fileDefaut != null - && !fileDefaut.getAbsolutePath().equals(conteneurProjet.getAbsolutePath())) { - fileDefaut.delete(); + // FRED ben pourquoi l'avoir cree alors !!!!! + // if (constrcutFileDefaut && fileDefaut != null + // && !fileDefaut.getAbsolutePath().equals(conteneurProjet.getAbsolutePath())) { + // fileDefaut.delete(); + // } + + // -- test si le fichier choisit par l'utilisateur existe djea, si oui. demander confirmation d'ecrasement --// + if (conteneurProjet.exists()) { + //Fred il faut traduire + boolean resp = trprojet_.impl_.question("Fichier " + conteneurProjet.getName() + " existant", "Le fichier " + + conteneurProjet.getName() + " existe d\xE9j\xE0.\n Voulez-vous l'\xE9craser ?"); + if (!resp) return false; } - - //-- test si le fichier choisit par l'utilisateur existe djea, si oui. demander confirmation d'ecrasement --// - if(conteneurProjet.exists()){ - boolean resp=trprojet_.impl_.question("Fichier "+conteneurProjet.getName()+" existant", "Le fichier "+conteneurProjet.getName()+" existe d\xE9j\xE0.\n Voulez-vous l'\xE9craser ?"); - if(!resp) - return false; - } - if (projet_ == null || !projet_.equals(conteneurProjet)) projet_ = new File(GetExtensionName(conteneurProjet .getAbsolutePath())); @@ -226,9 +232,9 @@ } else { // -- on supprime le fichier defaut construit pour rien si il a \xE9t\xE9 construit --// - if (constrcutFileDefaut) { - fileDefaut.delete(); - } + // if (constrcutFileDefaut) { + // fileDefaut.delete(); + // } return false; } @@ -599,10 +605,10 @@ trprojet_.deliverSourceId(src); listeCouplesIdSources.add(new TrPostSourcePersist(src, projet_)); // -- sauveagrde de la variable correspondante --// - - final TrPostUserVariableSaver var = TrPostUserVariableSaver.saveIn((TrPostSourceAbstract) src, null); - listeVar.add(var); - + + final TrPostUserVariableSaver var = TrPostUserVariableSaver.saveIn((TrPostSourceAbstract) src, null); + listeVar.add(var); + listePdt.add(new TrPostTimeModelSaver(src)); } ... [truncated message content] |