From: <bma...@us...> - 2011-10-27 12:49:05
|
Revision: 6585 http://fudaa.svn.sourceforge.net/fudaa/?rev=6585&view=rev Author: bmarchan Date: 2011-10-27 12:48:58 +0000 (Thu, 27 Oct 2011) Log Message: ----------- Fix : Pb de restauration d'une palette discrete dont les propri?\195?\169t?\195?\169s EbliUIProperties sont sauvegard?\195?\169es. Modified Paths: -------------- trunk/framework/ebli-2d/src/main/java/org/fudaa/ebli/calque/BCalqueAffichage.java trunk/framework/ebli-2d/src/main/java/org/fudaa/ebli/calque/BCalqueLegende.java trunk/framework/ebli-2d/src/main/java/org/fudaa/ebli/calque/ZCalqueAffichageDonneesAbstract.java trunk/framework/ebli-common/src/main/java/org/fudaa/ebli/palette/BPalettePlageDiscret.java trunk/framework/ebli-common/src/main/java/org/fudaa/ebli/palette/BPalettePlageTarget.java Modified: trunk/framework/ebli-2d/src/main/java/org/fudaa/ebli/calque/BCalqueAffichage.java =================================================================== --- trunk/framework/ebli-2d/src/main/java/org/fudaa/ebli/calque/BCalqueAffichage.java 2011-10-27 12:41:08 UTC (rev 6584) +++ trunk/framework/ebli-2d/src/main/java/org/fudaa/ebli/calque/BCalqueAffichage.java 2011-10-27 12:48:58 UTC (rev 6585) @@ -178,7 +178,7 @@ } /** - * @return true si la palette du calque peut etre modifiable + * @return true si la palette du calque est modifiable par l'utilisateur */ public boolean isPaletteModifiable() { return true; Modified: trunk/framework/ebli-2d/src/main/java/org/fudaa/ebli/calque/BCalqueLegende.java =================================================================== --- trunk/framework/ebli-2d/src/main/java/org/fudaa/ebli/calque/BCalqueLegende.java 2011-10-27 12:41:08 UTC (rev 6584) +++ trunk/framework/ebli-2d/src/main/java/org/fudaa/ebli/calque/BCalqueLegende.java 2011-10-27 12:48:58 UTC (rev 6585) @@ -10,8 +10,6 @@ import java.awt.*; import java.awt.event.ContainerListener; import java.util.HashMap; -import java.util.Hashtable; -import java.util.Iterator; import java.util.Map; import javax.swing.Icon; @@ -48,11 +46,13 @@ } private int ancre_; - protected Map cqAffPanels_; + /** Contient les calques dont la l\xE9gende est affich\xE9e dans le calque l\xE9gende */ + protected Map<BCalqueAffichage,BCalqueLegendePanel> cqAffPanels_; /** * Bloque le rafraichissement en modification d'attribut. */ private boolean lockRefresh_; + /** Le composant contenant la totalit\xE9 des l\xE9gendes, d\xE9placable suivant l'ancre. */ private final JComponent pnLegendes_; GridBagConstraints c_; final CtuluHorizontalLayout hLa_; @@ -188,7 +188,7 @@ if (cq == null) { cq = this; } - JPanel pnLeg = (JPanel) cqAffPanels_.get(cq); + JPanel pnLeg = cqAffPanels_.get(cq); if (pnLeg == null) { pnLeg = (_title == null ? ajoutePanel(cq) : ajoutePanel(cq, _title)); } @@ -226,7 +226,7 @@ cq = this; } - JPanel pnLeg = (JPanel) cqAffPanels_.get(cq); + JPanel pnLeg = cqAffPanels_.get(cq); if (pnLeg == null) { pnLeg = ajoutePanel(cq); } @@ -258,7 +258,7 @@ * @param _title le titre */ public void ajoute(final BCalqueAffichage _cq, final JPanel _pn, final String _title) { - JPanel pnLeg = (JPanel) cqAffPanels_.get(_cq); + JPanel pnLeg = cqAffPanels_.get(_cq); if (pnLeg == null) { pnLeg = (_title == null ? ajoutePanel(_cq) : ajoutePanel(_cq, _title)); } @@ -301,7 +301,7 @@ * @param _cq Le calque pour lequel on veut supprimer la l\xE9gende. */ public void enleve(final BCalqueAffichage _cq) { - final JPanel p = (JPanel) cqAffPanels_.get(_cq); + final JPanel p = cqAffPanels_.get(_cq); if (p == null) { return; } @@ -327,7 +327,7 @@ * @return Le composant l\xE9gende sous forme de JPanel. */ public JPanel getLegende(final BCalqueAffichage _cq) { - return (JPanel) cqAffPanels_.get(_cq); + return cqAffPanels_.get(_cq); } public BCalqueLegendePanel getLegendePanel(final int _i) { @@ -390,7 +390,7 @@ * @return true si reellement affiche */ public boolean getVisible(final BCalqueAffichage _cq) { - final JPanel panel = (JPanel) cqAffPanels_.get(_cq); + final JPanel panel = cqAffPanels_.get(_cq); if (panel == null) { return false; } @@ -484,12 +484,14 @@ } /** - * Enleve tous les composants. + * Enleve toutes les l\xE9gendes du calque. Les calques sont dissoci\xE9s de ce calque. */ - public void reinitialise() { - cqAffPanels_ = new Hashtable(); + public void enleveTousCalques() { + for (BCalqueAffichage cq : cqAffPanels_.keySet()) { + cq.setLegende(null); + } + cqAffPanels_.clear(); pnLegendes_.removeAll(); - removeAll(); } public EbliUIProperties saveUIProperties() { @@ -535,7 +537,7 @@ * @param _c la nouvelle couleur d'arriere-plan */ public void setBackground(final BCalqueAffichage _cq, final Color _c) { - JPanel panel = (JPanel) cqAffPanels_.get(_cq); + JPanel panel = cqAffPanels_.get(_cq); if (panel == null) { panel = ajoutePanel(_cq); } @@ -550,8 +552,8 @@ return; } if ((cqAffPanels_ != null) && (cqAffPanels_.size() > 0)) { - for (final Iterator it = cqAffPanels_.values().iterator(); it.hasNext();) { - ((JComponent) it.next()).setFont(_f); + for (JPanel pn : cqAffPanels_.values()) { + pn.setFont(_f); } } super.setFont(_f); @@ -566,7 +568,7 @@ * @param _c la nouvelle couleur d'avant-plan pour le calque cq. */ public void setForeground(final BCalqueAffichage _cq, final Color _c) { - JPanel panel = (JPanel) cqAffPanels_.get(_cq); + JPanel panel = cqAffPanels_.get(_cq); if (panel == null) { panel = ajoutePanel(_cq); } @@ -579,8 +581,8 @@ public void setForeground(final Color _c) { super.setForeground(_c); if ((cqAffPanels_ != null) && (cqAffPanels_.size() > 0)) { - for (final Iterator it = cqAffPanels_.values().iterator(); it.hasNext();) { - ((JComponent) it.next()).setForeground(_c); + for (JPanel pn : cqAffPanels_.values()) { + pn.setForeground(_c); } } } @@ -607,7 +609,7 @@ * @param _v le nouvel etat pour la legende */ public void setVisible(final BCalqueAffichage _cq, final boolean _v) { - JPanel panel = (JPanel) cqAffPanels_.get(_cq); + JPanel panel = cqAffPanels_.get(_cq); if (panel == null) { panel = ajoutePanel(_cq); } @@ -636,7 +638,7 @@ } protected BCalqueLegendePanel getLegendePanelFor(final BCalqueAffichage _cq) { - return (BCalqueLegendePanel) cqAffPanels_.get(_cq); + return cqAffPanels_.get(_cq); } public void setBordEpaisseur(int _ep) { Modified: trunk/framework/ebli-2d/src/main/java/org/fudaa/ebli/calque/ZCalqueAffichageDonneesAbstract.java =================================================================== --- trunk/framework/ebli-2d/src/main/java/org/fudaa/ebli/calque/ZCalqueAffichageDonneesAbstract.java 2011-10-27 12:41:08 UTC (rev 6584) +++ trunk/framework/ebli-2d/src/main/java/org/fudaa/ebli/calque/ZCalqueAffichageDonneesAbstract.java 2011-10-27 12:48:58 UTC (rev 6585) @@ -17,7 +17,6 @@ import org.fudaa.ctulu.CtuluListSelectionInterface; import org.fudaa.ctulu.CtuluRange; -import org.fudaa.ebli.calque.edition.ZModeleEditable; import org.fudaa.ebli.commun.EbliLib; import org.fudaa.ebli.commun.EbliListeSelectionMultiInterface; import org.fudaa.ebli.commun.EbliTableInfoPanel; @@ -25,7 +24,6 @@ import org.fudaa.ebli.controle.BConfigurableComposite; import org.fudaa.ebli.controle.BConfigurableInterface; import org.fudaa.ebli.controle.BSelecteurAlpha; -import org.fudaa.ebli.controle.BSelecteurCheckBox; import org.fudaa.ebli.controle.BSelecteurIconModel; import org.fudaa.ebli.controle.BSelecteurLineModel; import org.fudaa.ebli.controle.BSelecteurSurfaceModel; @@ -232,10 +230,15 @@ ajusteZoomOnSelected(_r, modeleDonnees()); } + @Override public BPalettePlageInterface createPaletteCouleur() { - return new BPalettePlage(); + if (isDiscrete()) + return new BPalettePlageDiscret(null); + else + return new BPalettePlage(); } + @Override public BuTable createValuesTable() { final BuTable table = modeleDonnees().createValuesTable(this); if (table != null && EbliTableInfoPanel.containsTitle(table) == null) { Modified: trunk/framework/ebli-common/src/main/java/org/fudaa/ebli/palette/BPalettePlageDiscret.java =================================================================== --- trunk/framework/ebli-common/src/main/java/org/fudaa/ebli/palette/BPalettePlageDiscret.java 2011-10-27 12:41:08 UTC (rev 6584) +++ trunk/framework/ebli-common/src/main/java/org/fudaa/ebli/palette/BPalettePlageDiscret.java 2011-10-27 12:48:58 UTC (rev 6585) @@ -17,6 +17,9 @@ import org.fudaa.ebli.trace.BPlageInterface; /** + * Une palette de valeurs discretes. Cette palette manipule des plages discretes + * uniquement. + * * @author Fred Deniger * @version $Id: BPalettePlageDiscret.java,v 1.8 2006-09-19 14:55:51 deniger Exp $ */ @@ -50,13 +53,15 @@ return new BPlageDiscret(_src); } /** - * @param _o les objets a prendre en compte + * @param _o les objets a prendre en compte (peut \xEAtre <tt>null</tt>) */ public BPalettePlageDiscret(final Object[] _o) { this(_o, Color.BLUE, Color.RED); } /** + * Important : M\xEAme si la m\xE9thode supporte des plages abstraites en argument, elle + * ne sait traiter que des plages discretes. * @param _p les nouvelles plages qui seront copiees. */ public final void setPlages(final BPlageInterface[] _p){ Modified: trunk/framework/ebli-common/src/main/java/org/fudaa/ebli/palette/BPalettePlageTarget.java =================================================================== --- trunk/framework/ebli-common/src/main/java/org/fudaa/ebli/palette/BPalettePlageTarget.java 2011-10-27 12:41:08 UTC (rev 6584) +++ trunk/framework/ebli-common/src/main/java/org/fudaa/ebli/palette/BPalettePlageTarget.java 2011-10-27 12:48:58 UTC (rev 6585) @@ -49,7 +49,9 @@ boolean getTimeRange(CtuluRange _b); /** - * @return null si discret. Permet de cr\xE9er un plage. + * Permet de cr\xE9er une palette de couleurs. Si {@link #isDiscrete()}, la + * palette cr\xE9\xE9e est discrete, sinon elle est suivant des niveaux. + * @return La palette cr\xE9ee. */ BPalettePlageInterface createPaletteCouleur(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bma...@us...> - 2011-12-18 18:27:10
|
Revision: 6853 http://fudaa.svn.sourceforge.net/fudaa/?rev=6853&view=rev Author: bmarchan Date: 2011-12-18 18:27:04 +0000 (Sun, 18 Dec 2011) Log Message: ----------- Mod : Composants de pr?\195?\169f?\195?\169rences Modified Paths: -------------- trunk/framework/ctulu-bu/src/main/java/com/memoire/bu/BuAbstractPreferencesComponent.java trunk/framework/ctulu-bu/src/main/java/com/memoire/bu/BuLanguagePreferencesPanel.java trunk/framework/ctulu-ui/src/main/java/org/fudaa/ctulu/gui/CtuluTablePreferencesComponent.java trunk/framework/ebli-2d/src/main/java/org/fudaa/ebli/calque/EbliGISPreferencesComponent.java Modified: trunk/framework/ctulu-bu/src/main/java/com/memoire/bu/BuAbstractPreferencesComponent.java =================================================================== --- trunk/framework/ctulu-bu/src/main/java/com/memoire/bu/BuAbstractPreferencesComponent.java 2011-12-18 18:22:31 UTC (rev 6852) +++ trunk/framework/ctulu-bu/src/main/java/com/memoire/bu/BuAbstractPreferencesComponent.java 2011-12-18 18:27:04 UTC (rev 6853) @@ -15,6 +15,13 @@ boolean isSavabled_=true; boolean dirty_; + + /** + * Force la d\xE9finition du container de pr\xE9f\xE9rences (Bu, Fu, etc.). + */ + public BuAbstractPreferencesComponent(FuPreferences _options) { + options_=_options; + } void setContainer(BuContainerPreferencesPanel _container) { container_=_container; Modified: trunk/framework/ctulu-bu/src/main/java/com/memoire/bu/BuLanguagePreferencesPanel.java =================================================================== --- trunk/framework/ctulu-bu/src/main/java/com/memoire/bu/BuLanguagePreferencesPanel.java 2011-12-18 18:22:31 UTC (rev 6852) +++ trunk/framework/ctulu-bu/src/main/java/com/memoire/bu/BuLanguagePreferencesPanel.java 2011-12-18 18:27:04 UTC (rev 6853) @@ -11,6 +11,7 @@ package com.memoire.bu; +import java.awt.Font; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.util.Locale; Modified: trunk/framework/ctulu-ui/src/main/java/org/fudaa/ctulu/gui/CtuluTablePreferencesComponent.java =================================================================== --- trunk/framework/ctulu-ui/src/main/java/org/fudaa/ctulu/gui/CtuluTablePreferencesComponent.java 2011-12-18 18:22:31 UTC (rev 6852) +++ trunk/framework/ctulu-ui/src/main/java/org/fudaa/ctulu/gui/CtuluTablePreferencesComponent.java 2011-12-18 18:27:04 UTC (rev 6853) @@ -23,7 +23,7 @@ private int exportNbDec; public CtuluTablePreferencesComponent() { - options_=BuPreferences.BU; + super(BuPreferences.BU); tfExport_=BuTextField.createIntegerField(); tfExport_.setPreferredSize(new Dimension(50,tfExport_.getPreferredSize().height)); Modified: trunk/framework/ebli-2d/src/main/java/org/fudaa/ebli/calque/EbliGISPreferencesComponent.java =================================================================== --- trunk/framework/ebli-2d/src/main/java/org/fudaa/ebli/calque/EbliGISPreferencesComponent.java 2011-12-18 18:22:31 UTC (rev 6852) +++ trunk/framework/ebli-2d/src/main/java/org/fudaa/ebli/calque/EbliGISPreferencesComponent.java 2011-12-18 18:27:04 UTC (rev 6853) @@ -20,7 +20,7 @@ private int visuNbDec; public EbliGISPreferencesComponent() { - options_=EbliPreferences.EBLI; + super(EbliPreferences.EBLI); tfCoords_=BuTextField.createIntegerField(); tfCoords_.setPreferredSize(new Dimension(80,tfCoords_.getPreferredSize().height)); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <de...@us...> - 2012-01-06 02:03:59
|
Revision: 6914 http://fudaa.svn.sourceforge.net/fudaa/?rev=6914&view=rev Author: deniger Date: 2012-01-06 02:03:53 +0000 (Fri, 06 Jan 2012) Log Message: ----------- Modified Paths: -------------- trunk/framework/ctulu-common/src/main/java/org/fudaa/ctulu/CtuluDefaultLogFormatter.java trunk/framework/ctulu-common/src/main/resources/org/fudaa/ctulu/ctulu_en.fr_txt trunk/framework/ctulu-ui/src/main/java/org/fudaa/ctulu/gui/CtuluAnalyzeGUI.java trunk/framework/ctulu-ui/src/main/java/org/fudaa/ctulu/gui/CtuluValuesCommonEditorPanel.java Modified: trunk/framework/ctulu-common/src/main/java/org/fudaa/ctulu/CtuluDefaultLogFormatter.java =================================================================== --- trunk/framework/ctulu-common/src/main/java/org/fudaa/ctulu/CtuluDefaultLogFormatter.java 2012-01-06 02:01:49 UTC (rev 6913) +++ trunk/framework/ctulu-common/src/main/java/org/fudaa/ctulu/CtuluDefaultLogFormatter.java 2012-01-06 02:03:53 UTC (rev 6914) @@ -34,8 +34,8 @@ res.append(log.getResource()); res.append(CtuluLibString.LINE_SEP); } - String desc=log.getDesci18n(); - if(desc!=null){ + String desc = log.getDesci18n(); + if (desc != null) { res.append(desc); res.append(CtuluLibString.LINE_SEP); } @@ -43,10 +43,10 @@ if (res.length() > 0) { res.append(CtuluLibString.LINE_SEP); } - if(log.getDefaultResourceBundle()==null){ - res.append(DEFAULT.format(logRecord,log.getDefaultResourceBundle())); + if (log.getDefaultResourceBundle() == null) { + res.append(DEFAULT.format(logRecord, log.getDefaultResourceBundle())); } - res.append(DEFAULT.format(logRecord,log.getDefaultResourceBundle())); + res.append(DEFAULT.format(logRecord, log.getDefaultResourceBundle())); } return res.toString(); } @@ -92,13 +92,13 @@ * @param logs l'analyse a formater * @return la string contenant le tout */ - public static String formatLogs(final Collection<CtuluLogRecord> logs,ResourceBundle resourceBundle) { + public static String formatLogs(final Collection<CtuluLogRecord> logs, ResourceBundle resourceBundle) { if (logs == null) { return CtuluLibString.EMPTY_STRING; } final StringBuilder res = new StringBuilder(10 + logs.size() * 40); for (final CtuluLogRecord logRecord : logs) { - res.append('\n').append(DEFAULT.format(logRecord,resourceBundle)); + res.append('\n').append(DEFAULT.format(logRecord, resourceBundle)); } return res.toString(); } @@ -107,10 +107,11 @@ public synchronized String format(final LogRecord record) { final StringBuilder sb = new StringBuilder(256); if (printLevel) { - if(record.getLevel()==CtuluAnalyze.FATAL){ + if (record.getLevel() == CtuluAnalyze.FATAL) { sb.append(CtuluResource.CTULU.getString("Erreur bloquante")); + } else { + sb.append(record.getLevel().getLocalizedName()); } - sb.append(record.getLevel().getLocalizedName()); sb.append(": "); } sb.append(formatMessage(record)); @@ -123,7 +124,7 @@ sb.append(record.getLevel()); sb.append(": "); } - sb.append(formatMessage(record,resourceBundle)); + sb.append(formatMessage(record, resourceBundle)); return sb.toString(); } @@ -131,7 +132,7 @@ public synchronized String formatMessage(final LogRecord record) { String format = record.getMessage(); final java.util.ResourceBundle catalog = record.getResourceBundle(); - if(catalog==null){ + if (catalog == null) { return format; } if (catalog != null) { Modified: trunk/framework/ctulu-common/src/main/resources/org/fudaa/ctulu/ctulu_en.fr_txt =================================================================== --- trunk/framework/ctulu-common/src/main/resources/org/fudaa/ctulu/ctulu_en.fr_txt 2012-01-06 02:01:49 UTC (rev 6913) +++ trunk/framework/ctulu-common/src/main/resources/org/fudaa/ctulu/ctulu_en.fr_txt 2012-01-06 02:03:53 UTC (rev 6914) @@ -75,6 +75,7 @@ Erreur lors de la lecture du fichier= Error while reading the file Erreur \xE0 l'ex\xE9cution=Execution error Erreur=Error +Information=Information Erreurs rencontr\xE9es=Errors occurred Erreurs=Errors Etape {0}=Step {0} Modified: trunk/framework/ctulu-ui/src/main/java/org/fudaa/ctulu/gui/CtuluAnalyzeGUI.java =================================================================== --- trunk/framework/ctulu-ui/src/main/java/org/fudaa/ctulu/gui/CtuluAnalyzeGUI.java 2012-01-06 02:01:49 UTC (rev 6913) +++ trunk/framework/ctulu-ui/src/main/java/org/fudaa/ctulu/gui/CtuluAnalyzeGUI.java 2012-01-06 02:03:53 UTC (rev 6914) @@ -30,6 +30,7 @@ import org.fudaa.ctulu.CtuluAnalyze; import org.fudaa.ctulu.CtuluAnalyzeGroup; import org.fudaa.ctulu.CtuluDefaultLogFormatter; +import org.fudaa.ctulu.CtuluLib; import org.fudaa.ctulu.CtuluLibImage; import org.fudaa.ctulu.CtuluLibString; import org.fudaa.ctulu.CtuluResource; @@ -282,12 +283,12 @@ return replacer; } if (level == Level.SEVERE) { - return "Erreur"; + return CtuluLib.getS("Erreur"); } if (level == Level.WARNING) { - return "Avertissement"; + return CtuluLib.getS("Avertissement"); } - return "Info"; + return CtuluLib.getS("Information"); } @Override Modified: trunk/framework/ctulu-ui/src/main/java/org/fudaa/ctulu/gui/CtuluValuesCommonEditorPanel.java =================================================================== --- trunk/framework/ctulu-ui/src/main/java/org/fudaa/ctulu/gui/CtuluValuesCommonEditorPanel.java 2012-01-06 02:01:49 UTC (rev 6913) +++ trunk/framework/ctulu-ui/src/main/java/org/fudaa/ctulu/gui/CtuluValuesCommonEditorPanel.java 2012-01-06 02:03:53 UTC (rev 6914) @@ -163,7 +163,7 @@ pnAttrs.add(lbs_[i]); pnAttrs.add(comps_[i]); } - setLayout(new BorderLayout()); + setLayout(new BorderLayout(5,5)); add(pnAttrs); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <de...@us...> - 2012-03-06 16:23:28
|
Revision: 6965 http://fudaa.svn.sourceforge.net/fudaa/?rev=6965&view=rev Author: deniger Date: 2012-03-06 16:23:16 +0000 (Tue, 06 Mar 2012) Log Message: ----------- Modified Paths: -------------- trunk/framework/ebli-common/src/main/java/org/fudaa/ebli/impression/EbliPageFormat.java trunk/framework/ebli-visuallibrary/src/main/java/org/fudaa/ebli/visuallibrary/EbliScene.java trunk/framework/ebli-visuallibrary/src/main/java/org/fudaa/ebli/visuallibrary/EbliWidgetShape.java Added Paths: ----------- trunk/framework/ebli-visuallibrary/src/main/java/org/fudaa/ebli/visuallibrary/EbliPrintOverviewLayer.java Modified: trunk/framework/ebli-common/src/main/java/org/fudaa/ebli/impression/EbliPageFormat.java =================================================================== --- trunk/framework/ebli-common/src/main/java/org/fudaa/ebli/impression/EbliPageFormat.java 2012-03-06 15:23:16 UTC (rev 6964) +++ trunk/framework/ebli-common/src/main/java/org/fudaa/ebli/impression/EbliPageFormat.java 2012-03-06 16:23:16 UTC (rev 6965) @@ -1,9 +1,13 @@ /* - * @creation 2001-09-27 + * @creation 2001-09-27 + * * @modification $Date: 2006-09-19 14:55:54 $ - * @license GNU General Public License 2 - * @copyright (c)1998-2001 CETMEF 2 bd Gambetta F-60231 Compiegne - * @mail de...@fu... + * + * @license GNU General Public License 2 + * + * @copyright (c)1998-2001 CETMEF 2 bd Gambetta F-60231 Compiegne + * + * @mail de...@fu... */ package org.fudaa.ebli.impression; @@ -26,8 +30,10 @@ import com.memoire.bu.BuInformationsSoftware; import org.fudaa.ebli.ressource.EbliResource; + /** * Une extension du <code>PageFormat</code> qui gere les entetes et pieds de pages. + * * @version $Id: EbliPageFormat.java,v 1.14 2006-09-19 14:55:54 deniger Exp $ * @author Fred Deniger */ @@ -38,32 +44,26 @@ */ private static final Font FONTBASE = new Font("SansSerif", Font.PLAIN, 10); - private static String getNth(){ + private static String getNth() { return "nothing"; } + /** - * Les differents types d'entetes. La premiere colonne correspond aux cles des entetes et la - * deuxieme aux valeurs affichees. + * Les differents types d'entetes. La premiere colonne correspond aux cles des entetes et la deuxieme aux valeurs + * affichees. */ - static final String[][] TYPE_ENTETE = new String[][] { - { getNth(), EbliResource.EBLI.getString("aucun")}, - { "page", EbliResource.EBLI.getString("page")}, - { "date", EbliResource.EBLI.getString("date")}, - { "title", EbliResource.EBLI.getString("titre du document")}, - { "author", EbliResource.EBLI.getString("auteur")}, - { "organization", EbliResource.EBLI.getString("organisation")}, - { "department", EbliResource.EBLI.getString("departement")}, - { "contact", EbliResource.EBLI.getString("email")}, - { "application", EbliResource.EBLI.getString("application")}, - { "location", EbliResource.EBLI.getString("localisation du fichier")}, - { "comment", EbliResource.EBLI.getString("commentaires")}}; + static final String[][] TYPE_ENTETE = new String[][] { { getNth(), EbliResource.EBLI.getString("aucun") }, + { "page", EbliResource.EBLI.getString("page") }, { "date", EbliResource.EBLI.getString("date") }, + { "title", EbliResource.EBLI.getString("titre du document") }, { "author", EbliResource.EBLI.getString("auteur") }, + { "organization", EbliResource.EBLI.getString("organisation") }, { "department", EbliResource.EBLI.getString("departement") }, + { "contact", EbliResource.EBLI.getString("email") }, { "application", EbliResource.EBLI.getString("application") }, + { "location", EbliResource.EBLI.getString("localisation du fichier") }, { "comment", EbliResource.EBLI.getString("commentaires") } }; /** * le format de page utilise. */ private PageFormat pageFormat_; /** - * Correspond au type d'entete utilise (la ligne du tableau <code>TYPE_ENTETE</code>. utilise - * en interne uniquement. + * Correspond au type d'entete utilise (la ligne du tableau <code>TYPE_ENTETE</code>. utilise en interne uniquement. */ private int enteteGauche_; private int enteteMilieu_; @@ -81,16 +81,15 @@ private boolean piedVisible_; /** - * appelle le constructeur <code>EbliPageFormat(PageFormat)</code> avec comme parametre - * <code>null</code>. + * appelle le constructeur <code>EbliPageFormat(PageFormat)</code> avec comme parametre <code>null</code>. */ public EbliPageFormat() { this(null); } /** - * Initialise le format avec <code>_format</code> si non null ( un format A4 par defaut est - * choisi sinon ). L'entete et le pied sont par defaut vide et invisible. + * Initialise le format avec <code>_format</code> si non null ( un format A4 par defaut est choisi sinon ). L'entete + * et le pied sont par defaut vide et invisible. */ public EbliPageFormat(final PageFormat _format) { if (_format == null) { @@ -112,25 +111,29 @@ /** * Construit un format de page correspondant a une feuille A4 Portrait avec des marges de 1cm. */ - public static final PageFormat construireFormatA4Portrait(){ - PrintRequestAttributeSet set=new HashPrintRequestAttributeSet(MediaSizeName.ISO_A4); + public static final PageFormat construireFormatA4Portrait() { + MediaSizeName isoA4 = MediaSizeName.ISO_A4; + return getPageFormat(isoA4,true); + } + + public static PageFormat getPageFormat(MediaSizeName isoA4, boolean withMarge) { + PrintRequestAttributeSet set = new HashPrintRequestAttributeSet(isoA4); PageFormat validatePage = PrinterJob.getPrinterJob().validatePage(PrinterJob.getPrinterJob().getPageFormat(set)); - double marge=cmVersPixel(1.5); + double marge = withMarge ? cmVersPixel(1.5) : 0; Paper paper = validatePage.getPaper(); - double x=paper.getImageableX()+marge; - double y=paper.getImageableY()+marge; - double w=validatePage.getImageableWidth()-2*marge; - double h=validatePage.getImageableHeight()-2*marge; + double x = paper.getImageableX() + marge; + double y = paper.getImageableY() + marge; + double w = validatePage.getImageableWidth() - 2 * marge; + double h = validatePage.getImageableHeight() - 2 * marge; paper.setImageableArea(x, y, w, h); validatePage.setPaper(paper); return validatePage; } /** - * renvoie l'index de <code>TYPE_ELEMENT</code> correspondant a la cle <code>_cle</code>( - * premiere colonne ). + * renvoie l'index de <code>TYPE_ELEMENT</code> correspondant a la cle <code>_cle</code>( premiere colonne ). */ - private static int getIndexDepuisCle(final String _cle){ + private static int getIndexDepuisCle(final String _cle) { if (_cle == null) { return 0; } @@ -143,10 +146,9 @@ } /** - * renvoie l'index de <code>TYPE_ELEMENT</code> correspondant a la valeur <code>_valeur</code>( - * deuxieme colonne ). + * renvoie l'index de <code>TYPE_ELEMENT</code> correspondant a la valeur <code>_valeur</code>( deuxieme colonne ). */ - private static int getIndexDepuisValeur(final String _valeur){ + private static int getIndexDepuisValeur(final String _valeur) { if (_valeur == null) { return 0; } @@ -159,10 +161,9 @@ } /** - * renvoie la cle de <code>TYPE_ELEMENT</code> correspondant a l'index <code>_index</code>( - * premiere colonne ). + * renvoie la cle de <code>TYPE_ELEMENT</code> correspondant a l'index <code>_index</code>( premiere colonne ). */ - private static String getCleDepuisIndex(final int _index){ + private static String getCleDepuisIndex(final int _index) { if ((_index > -1) && (_index < TYPE_ENTETE.length)) { return TYPE_ENTETE[_index][0]; } @@ -170,10 +171,9 @@ } /** - * renvoie la valeur de <code>TYPE_ELEMENT</code> correspondant a l'index <code>_index</code>( - * deuxieme colonne ). + * renvoie la valeur de <code>TYPE_ELEMENT</code> correspondant a l'index <code>_index</code>( deuxieme colonne ). */ - private static String getValeurDepuisIndex(final int _index){ + private static String getValeurDepuisIndex(final int _index) { if ((_index > -1) && (_index < TYPE_ENTETE.length)) { return TYPE_ENTETE[_index][1]; } @@ -181,57 +181,56 @@ } /** - * retourne <code>true</code>, si la cle correspondant a l'index <code>_test</code> est - * <code>"nothing"</code>. + * retourne <code>true</code>, si la cle correspondant a l'index <code>_test</code> est <code>"nothing"</code>. */ - private static boolean isVide(final int _test){ + private static boolean isVide(final int _test) { return getNth().equals(getCleDepuisIndex(_test)); } /** - * retourne <code>true</code>, si les cles correspondant aux index passes en parametres sont - * toutes egales a <code>"nothing"</code>. + * retourne <code>true</code>, si les cles correspondant aux index passes en parametres sont toutes egales a + * <code>"nothing"</code>. */ - private static boolean isVide(final int _gauche,final int _milieu,final int _droit){ + private static boolean isVide(final int _gauche, final int _milieu, final int _droit) { return (isVide(_gauche) && isVide(_milieu) && isVide(_droit)); } /** * En fonction de <code>_g</code>, renvoie la hauteur de la Font <code>FONTBASE</code>. */ - private static int getHauteurFONTBASE(final Graphics _g){ + private static int getHauteurFONTBASE(final Graphics _g) { _g.setFont(FONTBASE); final FontMetrics metric = _g.getFontMetrics(); return metric.getMaxAscent() + metric.getMaxDescent() + metric.getLeading(); } /** - * Renvoie <code>true</code>, si les rectangles de dimensions (<code>_hBase</code>, - * <code>_wBase</code>) et (<code>_hComp</code>,<code>_wComp</code>) sont equivalents. + * Renvoie <code>true</code>, si les rectangles de dimensions (<code>_hBase</code>, <code>_wBase</code>) et ( + * <code>_hComp</code>,<code>_wComp</code>) sont equivalents. */ - private static boolean isRectanglesEquivalents(final int _hBase,final int _wBase,final int _hComp,final int _wComp){ + private static boolean isRectanglesEquivalents(final int _hBase, final int _wBase, final int _hComp, final int _wComp) { return (((_hBase == _hComp) && (_wBase == _wComp)) || ((_hBase == _wComp) && (_wBase == _hComp))); } /** - * Renvoie la cle du type d'entete correpondante a la valeur <code>_valeur</code>. La cle - * d'entete est utilise en interne pour l'identification et la valeur est l'equivalent affiche. + * Renvoie la cle du type d'entete correpondante a la valeur <code>_valeur</code>. La cle d'entete est utilise en + * interne pour l'identification et la valeur est l'equivalent affiche. */ - public static String getCleTypeEnteteDepuisValeur(final String _valeur){ + public static String getCleTypeEnteteDepuisValeur(final String _valeur) { return getCleDepuisIndex(getIndexDepuisValeur(_valeur)); } /** * Renvoie la valeur du type d'entete correpondante a la cle <code>_cle</code>. */ - public static String getValeurTypeEnteteDepuisCle(final String _cle){ + public static String getValeurTypeEnteteDepuisCle(final String _cle) { return getValeurDepuisIndex(getIndexDepuisCle(_cle)); } /** * Les differents types d'entetes possibles. */ - public static String[] getValeursTypeEntete(){ + public static String[] getValeursTypeEntete() { final int taille = TYPE_ENTETE.length; final String[] r = new String[taille]; for (int i = 0; i < taille; i++) { @@ -241,15 +240,15 @@ } /** - * A partir des informations donnees par <code>_pageable</code> et <code>_pageImprimee</code>, - * renvoie la chaine correspondante a la cle <code>_cle</code> du tableau - * <code>TYPE_ENTETE</code>. + * A partir des informations donnees par <code>_pageable</code> et <code>_pageImprimee</code>, renvoie la chaine + * correspondante a la cle <code>_cle</code> du tableau <code>TYPE_ENTETE</code>. + * * @param _cle cle du tableau <code>TYPE_ENTETE</code>. * @param _pageable contient les informations du document. * @param _pageImprimee le numero de la page a imprimer. * @see #TYPE_ENTETE */ - public static String getEquivalent(final String _cle,final EbliPageable _pageable,final int _pageImprimee){ + public static String getEquivalent(final String _cle, final EbliPageable _pageable, final int _pageImprimee) { if (getNth().equals(_cle)) { return ""; } @@ -257,8 +256,7 @@ return ""; } if ("page".equals(_cle)) { - return EbliResource.EBLI.getString("page ") + (_pageImprimee + 1) + "/" - + _pageable.getNumberOfPages(); + return EbliResource.EBLI.getString("page ") + (_pageImprimee + 1) + "/" + _pageable.getNumberOfPages(); } String r = ""; BuInformationsDocument id = _pageable.getInformationsDocument(); @@ -301,21 +299,21 @@ /** * Transforme des centimetres en pixels: un pixel represente 1/72 de inch et un inch=2,54 cm. */ - public static double cmVersPixel(final double _cm){ + public static double cmVersPixel(final double _cm) { return (72D * _cm / 2.54); } /** * pixels en cm. */ - public static double pixelVersCm(final double _pix){ + public static double pixelVersCm(final double _pix) { return (2.54 * _pix / 72D); } /** * Renvoie l'intitule correspondant au format <code>_type</code>. */ - public static String getPageFormatType(final PageFormat _type){ + public static String getPageFormatType(final PageFormat _type) { //h et w en mm final int h = (int) Math.round(pixelVersCm(_type.getHeight()) * 10); final int w = (int) Math.round(pixelVersCm(_type.getWidth()) * 10); @@ -336,7 +334,7 @@ /** * Dessine si necessaire l'entete et le pied de page en fonction des parametres. */ - public static void dessinePage(final Graphics _g,final EbliPageable _target,final int _page){ + public static void dessinePage(final Graphics _g, final EbliPageable _target, final int _page) { final Graphics2D g2d = (Graphics2D) _g; //si l'entete et le pied de page sont vides ou invisibles: arret final EbliPageFormat ebliPage = _target.getDefaultEbliPageFormat(); @@ -364,7 +362,7 @@ final String[] entete = ebliPage.getEnteteEquivalent(_target, _page); //recupere les coordonnees du point en haut a gauche. final double x = format.getImageableX(); - final double y = format.getImageableY(); + final double y = format.getImageableY(); // la hauteur de l'entete avec 2 de plus par securite. final int hauteurEntete = ebliPage.getHauteurEntete(g2d) + 2; //On se place au coin haut gauche. @@ -395,10 +393,9 @@ } /** - * Permet de dessiner les trois chaines <code>_chaines</code> - * dans la largeur precisee. + * Permet de dessiner les trois chaines <code>_chaines</code> dans la largeur precisee. */ - private static void dessineChaine(final Graphics _g2d,final String[] _chaines,final int _largeur){ + private static void dessineChaine(final Graphics _g2d, final String[] _chaines, final int _largeur) { final FontMetrics metric = _g2d.getFontMetrics(); int styloX = 0; final int styloY = metric.getMaxAscent(); @@ -423,14 +420,14 @@ /** * renvoie la hauteur en pixel necessaire a l'affichage de l'entete. */ - private int getHauteurEntete(final Graphics _g){ + private int getHauteurEntete(final Graphics _g) { if ((isEnteteVide()) || (!isEnteteVisible())) { return 0; } return getHauteurFONTBASE(_g); } - private int getHauteurPied(final Graphics _g){ + private int getHauteurPied(final Graphics _g) { if ((isPiedVide()) || (!isPiedVisible())) { return 0; } @@ -440,25 +437,25 @@ /** * Renvoie <code>true</code> si les 3 parties de l'entetes correspondent a "nothing". */ - private boolean isEnteteVide(){ + private boolean isEnteteVide() { return isVide(enteteGauche_, enteteMilieu_, enteteDroit_); } - private boolean isPiedVide(){ + private boolean isPiedVide() { return isVide(piedGauche_, piedMilieu_, piedDroit_); } /** * Renvoie le format de page utilise. */ - public PageFormat getPageFormat(){ + public PageFormat getPageFormat() { return pageFormat_; } /** * Modifie le format de page utilise apres validation. */ - public void setPageFormat(final PageFormat _format){ + public void setPageFormat(final PageFormat _format) { if (_format == null) { return; } @@ -466,10 +463,10 @@ } /** - * Renvoie le format en prenant en compte de la taille de l'entete et du pied de page. Les marges - * "haut" et "bas" sont augmentees en fonction de la taille de l'entete et du pied de page. + * Renvoie le format en prenant en compte de la taille de l'entete et du pied de page. Les marges "haut" et "bas" sont + * augmentees en fonction de la taille de l'entete et du pied de page. */ - public PageFormat getDocumentPageFormat(final Graphics _g){ + public PageFormat getDocumentPageFormat(final Graphics _g) { final PageFormat r = (PageFormat) pageFormat_.clone(); final int he = getHauteurEntete(_g); final int hp = getHauteurPied(_g); @@ -490,90 +487,90 @@ /** * Renvoie <code>true</code>, si l'entete est visible. */ - public boolean isEnteteVisible(){ + public boolean isEnteteVisible() { return enteteVisible_; } - public boolean isPiedVisible(){ + public boolean isPiedVisible() { return piedVisible_; } /** * Modifie la visibilite de l'entete. */ - public void setEnteteVisible(final boolean _new){ + public void setEnteteVisible(final boolean _new) { enteteVisible_ = _new; } - public void setPiedVisible(final boolean _new){ + public void setPiedVisible(final boolean _new) { piedVisible_ = _new; } /** * Renvoie la cle correspondante a la partie gauche de l'entete. */ - public String getEnteteGauche(){ + public String getEnteteGauche() { return getCleDepuisIndex(enteteGauche_); } - public String getEnteteMilieu(){ + public String getEnteteMilieu() { return getCleDepuisIndex(enteteMilieu_); } - public String getEnteteDroit(){ + public String getEnteteDroit() { return getCleDepuisIndex(enteteDroit_); } - public String getPiedGauche(){ + public String getPiedGauche() { return getCleDepuisIndex(piedGauche_); } - public String getPiedMilieu(){ + public String getPiedMilieu() { return getCleDepuisIndex(piedMilieu_); } - public String getPiedDroit(){ + public String getPiedDroit() { return getCleDepuisIndex(piedDroit_); } /** - * modifie la cle correspondante a la partie gauche de l'entete. Si <code>_new</code> ne - * correspond pas a une entete, la cle "nothing" est utilisee. + * modifie la cle correspondante a la partie gauche de l'entete. Si <code>_new</code> ne correspond pas a une entete, + * la cle "nothing" est utilisee. */ - public void setEnteteGauche(final String _new){ + public void setEnteteGauche(final String _new) { enteteGauche_ = getIndexDepuisCle(_new); } - public void setEnteteMilieu(final String _new){ + public void setEnteteMilieu(final String _new) { enteteMilieu_ = getIndexDepuisCle(_new); } - public void setEnteteDroit(final String _new){ + public void setEnteteDroit(final String _new) { enteteDroit_ = getIndexDepuisCle(_new); } - public void setPiedGauche(final String _new){ + public void setPiedGauche(final String _new) { piedGauche_ = getIndexDepuisCle(_new); } - public void setPiedMilieu(final String _new){ + public void setPiedMilieu(final String _new) { piedMilieu_ = getIndexDepuisCle(_new); } - public void setPiedDroit(final String _new){ + public void setPiedDroit(final String _new) { piedDroit_ = getIndexDepuisCle(_new); } /** * Modifie les trois parties de l'entete en meme temps. */ - public void setEntete(final String _gauche,final String _milieu,final String _droit){ + public void setEntete(final String _gauche, final String _milieu, final String _droit) { setEnteteGauche(_gauche); setEnteteMilieu(_milieu); setEnteteDroit(_droit); } - public void setPied(final String _gauche,final String _milieu,final String _droit){ + public void setPied(final String _gauche, final String _milieu, final String _droit) { setPiedGauche(_gauche); setPiedMilieu(_milieu); setPiedDroit(_droit); @@ -581,9 +578,10 @@ /** * Renvoie les trois partie de l'entete. + * * @return un tableau a 3 lignes. */ - public String[] getEntete(){ + public String[] getEntete() { final String[] r = new String[3]; r[0] = getEnteteGauche(); r[1] = getEnteteMilieu(); @@ -591,7 +589,7 @@ return r; } - public String[] getPied(){ + public String[] getPied() { final String[] r = new String[3]; r[0] = getPiedGauche(); r[1] = getPiedMilieu(); @@ -600,10 +598,9 @@ } /** - * renvoie les valeurs reelles des 3 parties de l'entete en fonctin de <code>_page</code> et de - * <code>_numPage</code>. + * renvoie les valeurs reelles des 3 parties de l'entete en fonctin de <code>_page</code> et de <code>_numPage</code>. */ - public String[] getEnteteEquivalent(final EbliPageable _page,final int _numPage){ + public String[] getEnteteEquivalent(final EbliPageable _page, final int _numPage) { final String[] r = new String[3]; r[0] = getEquivalent(getEnteteGauche(), _page, _numPage); r[1] = getEquivalent(getEnteteMilieu(), _page, _numPage); @@ -611,7 +608,7 @@ return r; } - public String[] getPiedEquivalent(final EbliPageable _page,final int _numPage){ + public String[] getPiedEquivalent(final EbliPageable _page, final int _numPage) { final String[] r = new String[3]; r[0] = getEquivalent(getPiedGauche(), _page, _numPage); r[1] = getEquivalent(getPiedMilieu(), _page, _numPage); Added: trunk/framework/ebli-visuallibrary/src/main/java/org/fudaa/ebli/visuallibrary/EbliPrintOverviewLayer.java =================================================================== --- trunk/framework/ebli-visuallibrary/src/main/java/org/fudaa/ebli/visuallibrary/EbliPrintOverviewLayer.java (rev 0) +++ trunk/framework/ebli-visuallibrary/src/main/java/org/fudaa/ebli/visuallibrary/EbliPrintOverviewLayer.java 2012-03-06 16:23:16 UTC (rev 6965) @@ -0,0 +1,40 @@ +package org.fudaa.ebli.visuallibrary; + +import java.awt.Color; +import java.awt.Graphics2D; +import java.awt.print.PageFormat; + +import javax.print.attribute.standard.MediaSizeName; + +import org.fudaa.ebli.impression.EbliPageFormat; +import org.fudaa.ebli.trace.TraceLigne; +import org.netbeans.api.visual.widget.LayerWidget; +import org.netbeans.api.visual.widget.Scene; + +public final class EbliPrintOverviewLayer extends LayerWidget { + + private TraceLigne traceLigne; + + EbliPrintOverviewLayer(Scene scene) { + super(scene); + traceLigne = new TraceLigne(); + traceLigne.setEpaisseur(2f); + traceLigne.setCouleur(Color.RED); + setVisible(false); + } + + protected void paintWidget() { + if(!isVisible()){ + return; + } + final Graphics2D g = getGraphics(); + + PageFormat pg = EbliPageFormat.getPageFormat(MediaSizeName.ISO_A4,false); + int h = (int) pg.getImageableHeight(); + int w = (int) pg.getImageableWidth(); + traceLigne.dessineRectangle(g, 0, 0, w, h); + traceLigne.dessineTrait(g, 0, 0, w, h); + traceLigne.dessineTrait(g, w, 0, 0, h); + + } +} \ No newline at end of file Modified: trunk/framework/ebli-visuallibrary/src/main/java/org/fudaa/ebli/visuallibrary/EbliScene.java =================================================================== --- trunk/framework/ebli-visuallibrary/src/main/java/org/fudaa/ebli/visuallibrary/EbliScene.java 2012-03-06 15:23:16 UTC (rev 6964) +++ trunk/framework/ebli-visuallibrary/src/main/java/org/fudaa/ebli/visuallibrary/EbliScene.java 2012-03-06 16:23:16 UTC (rev 6965) @@ -44,8 +44,7 @@ * * @author Adrien Hadoux */ -public class EbliScene extends GraphScene<EbliNode, EbliEdge> implements CtuluImageProducer, - EbliWidgetInterface<EbliSceneController> { +public class EbliScene extends GraphScene<EbliNode, EbliEdge> implements CtuluImageProducer, EbliWidgetInterface<EbliSceneController> { int idx_ = 0; @@ -64,8 +63,8 @@ public final void setCtuluUi(final CtuluUI _ctuluUi) { ctuluUi_ = _ctuluUi; } - - private static class DelegateMouseListener implements MouseListener{ + + private static class DelegateMouseListener implements MouseListener { private final MouseListener delegate; /** @@ -116,17 +115,16 @@ } } - - + @Override public JComponent createView() { - JComponent res=super.createView(); + JComponent res = super.createView(); //to avoid add bugs with visual library: scrolling while the user exits the mouse from the scene MouseListener mouseListener = (MouseListener) res; res.removeMouseListener(mouseListener); res.addMouseListener(new DelegateMouseListener(mouseListener)); return res; - + } public void clearSelection() { @@ -135,7 +133,9 @@ public final Set<EbliNode> getSelectedNodes() { final Set init = getSelectedObjects(); - if (init == null) { return null; } + if (init == null) { + return null; + } final Set<EbliNode> res = new HashSet<EbliNode>(init.size()); for (final Iterator it = init.iterator(); it.hasNext();) { res.add((EbliNode) it.next()); @@ -155,11 +155,12 @@ } protected void stopEditing(final Widget w) { - if (w == null) { return; } + if (w == null) { + return; + } final Chain actions = w.getActions(); for (final WidgetAction widgetAction : actions.getActions()) { - if (widgetAction instanceof InplaceEditorProvider.EditorController - && ((InplaceEditorProvider.EditorController) widgetAction).isEditorVisible()) { + if (widgetAction instanceof InplaceEditorProvider.EditorController && ((InplaceEditorProvider.EditorController) widgetAction).isEditorVisible()) { ((InplaceEditorProvider.EditorController) widgetAction).closeEditor(true); } } @@ -177,7 +178,9 @@ final Set obj = getObjects(); for (final Iterator it = obj.iterator(); it.hasNext();) { final EbliWidget w = (EbliWidget) findWidget(it.next()); - if (w.getIntern().getId().equals(_id)) { return w; } + if (w.getIntern().getId().equals(_id)) { + return w; + } } return null; @@ -187,7 +190,9 @@ final Set obj = getObjects(); for (final Iterator it = obj.iterator(); it.hasNext();) { final EbliNode w = (EbliNode) it.next(); - if (w.getWidget() != null && w.getWidget().getIntern().getId().equals(_id)) { return w; } + if (w.getWidget() != null && w.getWidget().getIntern().getId().equals(_id)) { + return w; + } } return null; } @@ -237,8 +242,7 @@ } - public void firePropertyChange(final Object _nodeOrEdge, final String propertyName, final Object oldValue, - final Object newValue) { + public void firePropertyChange(final Object _nodeOrEdge, final String propertyName, final Object oldValue, final Object newValue) { PropertyChangeEvent event = new PropertyChangeEvent(this, propertyName, oldValue, newValue); event.setPropagationId(_nodeOrEdge); propertyChangeSupport_.firePropertyChange(event); @@ -275,6 +279,12 @@ private final LayerWidget interactionLayer_; + private final LayerWidget printOverviewLayer; + + public LayerWidget getPrintOverviewLayer() { + return printOverviewLayer; + } + /** * la visu du graphscene */ @@ -283,13 +293,14 @@ /** * la liste des listener associes a la scene */ - // Collection<EbliNodeListener> listenerList; public EbliScene() { super(); setLookFeel(new EbliLookFeel()); // creation du layer de mise en page interactionLayer_ = new LayerWidget(this); + printOverviewLayer = new EbliPrintOverviewLayer(this); addChild(interactionLayer_); + addChild(printOverviewLayer); visu_ = new LayerWidget(this); addChild(visu_); @@ -318,6 +329,12 @@ public void produceImage(Graphics2D g, final int _w, final int _h, final Map _params) { isProducingImage = true; + boolean printOverviewVisible = printOverviewLayer.isVisible(); + if (printOverviewVisible) { + printOverviewLayer.setVisible(false); + refreshScene(this); + } + repaint(); final Dimension d = getDefaultImageDimension(); CtuluLibImage.setBestQuality(g); AffineTransform old = g.getTransform(); @@ -346,11 +363,18 @@ isProducingImage = false; setSelectedObjects(selectedObjects); g.setTransform(old); + printOverviewLayer.setVisible(printOverviewVisible); + refreshScene(this); } public BufferedImage produceImage(final int _w, final int _h, final Map _params) { isProducingImage = true; + boolean printOverviewVisible = printOverviewLayer.isVisible(); + if (printOverviewVisible) { + printOverviewLayer.setVisible(false); + refreshScene(this); + } final Dimension d = getDefaultImageDimension(); final BufferedImage i = CtuluLibImage.createImage(_w, _h, _params); final Graphics2D g = i.createGraphics(); @@ -381,6 +405,8 @@ setSelectedObjects(selectedObjects); g.dispose(); i.flush(); + printOverviewLayer.setVisible(printOverviewVisible); + refreshScene(this); return i; } @@ -414,7 +440,9 @@ // -- on ne cree la widget que si necessaire node.getCreator().create(this); widget = node.getWidget(); - if (widget == null) { return null; } + if (widget == null) { + return null; + } if (node.getCreator().getInitPreferredLocation() != null) { widget.setPreferredLocation(node.getCreator().getInitPreferredLocation()); } @@ -425,7 +453,9 @@ widget = node.getCreator().getWidget(); } - if (widget == null) { return null; } + if (widget == null) { + return null; + } widget.getController().setNode(node); node.getCreator().widgetAttached(); // -- ajout dans la vue layer --// @@ -512,7 +542,9 @@ */ public void resizeInnerWidget(final Dimension newSize, final Dimension oldSize) { // this.getVisu().setPreferredSize(newSize); - if (getNodes().size() == 0) { return; } + if (getNodes().size() == 0) { + return; + } for (final Iterator<EbliNode> it2 = getNodes().iterator(); it2.hasNext();) { final EbliNode currentNode = it2.next(); @@ -538,20 +570,20 @@ public void moveWidgetTo(final EbliWidget widget, final int position) { - // -- ne marche pas.......................... --// + // -- 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(); + // + // 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(); } @@ -626,7 +658,9 @@ final List<Widget> children = layer.getChildren(); final int i = children.indexOf(parent); - if (i < 0 || i == children.size() - 1) { return; } + if (i < 0 || i == children.size() - 1) { + return; + } layer.removeChild(parent); layer.addChild(i + 1, parent); widget.revalidate(); @@ -667,7 +701,9 @@ final List<Widget> children = layer.getChildren(); final int i = children.indexOf(parent); - if (i <= 0) { return; } + if (i <= 0) { + return; + } layer.removeChild(parent); layer.addChild(i - 1, parent); widget.revalidate(); Modified: trunk/framework/ebli-visuallibrary/src/main/java/org/fudaa/ebli/visuallibrary/EbliWidgetShape.java =================================================================== --- trunk/framework/ebli-visuallibrary/src/main/java/org/fudaa/ebli/visuallibrary/EbliWidgetShape.java 2012-03-06 15:23:16 UTC (rev 6964) +++ trunk/framework/ebli-visuallibrary/src/main/java/org/fudaa/ebli/visuallibrary/EbliWidgetShape.java 2012-03-06 16:23:16 UTC (rev 6965) @@ -27,35 +27,11 @@ // double rotation_; - public ShapeCreator getShaper_() { + public ShapeCreator getShaper() { return shaper_; } - // public TraceLigneModel tl_ = new TraceLigneModel(TraceLigne.LISSE, 5, - // couleurContour);//pour l'exempls - /** - * @return the rotation_ - */ - // public double getRotation() { - // return rotation_; - // } - // - // /** - // * @param rotation_ the rotation_ to set - // */ - // public void setRotation(double rotation_) { - // this.rotation_ = rotation_; - // // Dimension dim = getPreferredSize(); - // // if (dim != null) { - // // Shape rec = new Rectangle(0, 0, dim.width, dim.height); - // // AffineTransform tr = AffineTransform.getRotateInstance(dim.width / 2, - // dim.height / 2, rotation_); - // // Rectangle bounds2 = tr.createTransformedShape(rec).getBounds(); - // // dim.height = bounds2.height; - // // dim.width = bounds2.width; - // // setPreferredSize(dim); - // // } - // } + public EbliWidgetShape(final EbliScene scene, final ShapeCreator _shaper, final Map _options) { super(scene, true); super.setCheckClipping(true); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <de...@us...> - 2012-03-24 00:36:29
|
Revision: 6977 http://fudaa.svn.sourceforge.net/fudaa/?rev=6977&view=rev Author: deniger Date: 2012-03-24 00:36:22 +0000 (Sat, 24 Mar 2012) Log Message: ----------- Modified Paths: -------------- trunk/framework/ctulu-common/pom.xml trunk/framework/ctulu-common/src/main/java/org/fudaa/ctulu/CtuluExpr.java trunk/framework/ctulu-common/src/main/java/org/fudaa/ctulu/CtuluLibArray.java trunk/framework/ctulu-common/src/main/java/org/fudaa/ctulu/CtuluParser.java trunk/framework/ctulu-common/src/main/java/org/fudaa/ctulu/CtuluProgressionBarAdapter.java trunk/framework/fudaa-dico/ui/src/main/java/org/fudaa/fudaa/fdico/FDicoProjectPanel.java trunk/framework/pom.xml Modified: trunk/framework/ctulu-common/pom.xml =================================================================== --- trunk/framework/ctulu-common/pom.xml 2012-03-16 00:11:07 UTC (rev 6976) +++ trunk/framework/ctulu-common/pom.xml 2012-03-24 00:36:22 UTC (rev 6977) @@ -16,7 +16,7 @@ </dependency> <dependency> <groupId>jep</groupId> - <artifactId>jep</artifactId> + <artifactId>jep-fudaa</artifactId> </dependency> <dependency> <groupId>trove</groupId> Modified: trunk/framework/ctulu-common/src/main/java/org/fudaa/ctulu/CtuluExpr.java =================================================================== --- trunk/framework/ctulu-common/src/main/java/org/fudaa/ctulu/CtuluExpr.java 2012-03-16 00:11:07 UTC (rev 6976) +++ trunk/framework/ctulu-common/src/main/java/org/fudaa/ctulu/CtuluExpr.java 2012-03-24 00:36:22 UTC (rev 6977) @@ -7,9 +7,9 @@ */ package org.fudaa.ctulu; +import java.util.ArrayDeque; import java.util.HashMap; import java.util.Map; -import java.util.Stack; import org.nfunk.jep.Node; import org.nfunk.jep.ParseException; @@ -102,7 +102,7 @@ return (getNumberOfParameters()==_arg0); } - public void run(final Stack _stack) throws ParseException { + public void run(final ArrayDeque _stack) throws ParseException { if (null == _stack) { throw new ParseException("Stack argument null"); } Modified: trunk/framework/ctulu-common/src/main/java/org/fudaa/ctulu/CtuluLibArray.java =================================================================== --- trunk/framework/ctulu-common/src/main/java/org/fudaa/ctulu/CtuluLibArray.java 2012-03-16 00:11:07 UTC (rev 6976) +++ trunk/framework/ctulu-common/src/main/java/org/fudaa/ctulu/CtuluLibArray.java 2012-03-24 00:36:22 UTC (rev 6977) @@ -604,6 +604,7 @@ System.arraycopy(_init, 0, r, 0, _init.length); return r; } + public static Boolean[] copy(final Boolean[] _init) { if (_init == null) { return null; } Modified: trunk/framework/ctulu-common/src/main/java/org/fudaa/ctulu/CtuluParser.java =================================================================== --- trunk/framework/ctulu-common/src/main/java/org/fudaa/ctulu/CtuluParser.java 2012-03-16 00:11:07 UTC (rev 6976) +++ trunk/framework/ctulu-common/src/main/java/org/fudaa/ctulu/CtuluParser.java 2012-03-24 00:36:22 UTC (rev 6977) @@ -1,9 +1,13 @@ /* - * @creation 27 mai 2005 - * @modification $Date: 2006-09-19 14:36:54 $ - * @license GNU General Public License 2 - * @copyright (c)1998-2001 CETMEF 2 bd Gambetta F-60231 Compiegne - * @mail fud...@li... + * @creation 27 mai 2005 + * + * @modification $Date: 2006-09-19 14:36:54 $ + * + * @license GNU General Public License 2 + * + * @copyright (c)1998-2001 CETMEF 2 bd Gambetta F-60231 Compiegne + * + * @mail fud...@li... */ package org.fudaa.ctulu; @@ -20,49 +24,47 @@ * @version $Id: CtuluParser.java,v 1.6 2006-09-19 14:36:54 deniger Exp $ */ public class CtuluParser extends JEP { - + /** - * L'operateur "+" est red\xE9fini pour que Add(String,Object) -> String. - * L'operateur par d\xE9faut d\xE9clenche une exception. + * L'operateur "+" est red\xE9fini pour que Add(String,Object) -> String. L'operateur par d\xE9faut d\xE9clenche une exception. */ private class CtuluOperationAdd extends Add { @Override public Object add(Object param1, Object param2) throws ParseException { if ((param1 instanceof String) || (param2 instanceof String)) { - return add(param1.toString(),param2.toString()); - } - else { + return add(param1.toString(), param2.toString()); + } else { return super.add(param1, param2); } } - + /** * Ajout de 2 string. + * * @param _param1 La premiere string * @param _param2 La deuxieme string. * @return La chaine r\xE9sultante. */ public String add(String _param1, String _param2) { - return _param1+_param2; + return _param1 + _param2; } } - + /** * Le set des op\xE9rations est surcharg\xE9 pour int\xE9grer la nouvelle m\xE9thode Add(). */ private class CtuluOperatorSet extends OperatorSet { public CtuluOperatorSet() { - OP_ADD = new Operator("+",new CtuluOperationAdd()); + OP_ADD = new Operator("+", new CtuluOperationAdd()); } } - public static Variable addOldVar(final CtuluExpr _expr){ - return _expr.addVar(CtuluParser.getOldVariable(), CtuluLib - .getS("L'ancienne valeur de la variable")); + public static Variable addOldVar(final CtuluExpr _expr) { + return _expr.addVar(CtuluParser.getOldVariable(), CtuluLib.getS("L'ancienne valeur de la variable")); } - public static String getOldVariable(){ + public static String getOldVariable() { return "old"; } @@ -70,14 +72,13 @@ * @param _v le visiteur * @param _n le noeud a parcourir entierement. */ - public static void visitAll(final ParserVisitor _v,final Node _n){ + public static void visitAll(final ParserVisitor _v, final Node _n) { if (_n == null) { return; } try { _n.jjtAccept(_v, null); - } - catch (final ParseException e) { + } catch (final ParseException e) { e.printStackTrace(); } final int nb = _n.jjtGetNumChildren(); @@ -90,7 +91,7 @@ public CtuluParser() { super(); - opSet=new CtuluOperatorSet(); + opSet = new CtuluOperatorSet(); } /** @@ -99,14 +100,13 @@ * @param _implicitMulIn * @param _numberFactoryIn */ - public CtuluParser(final boolean _traverseIn, final boolean _allowUndeclaredIn, final boolean _implicitMulIn, - final NumberFactory _numberFactoryIn) { + public CtuluParser(final boolean _traverseIn, final boolean _allowUndeclaredIn, final boolean _implicitMulIn, final NumberFactory _numberFactoryIn) { super(); setTraverse(_traverseIn); setAllowUndeclared(_allowUndeclaredIn); setImplicitMul(_implicitMulIn); super.numberFactory = _numberFactoryIn; - opSet=new CtuluOperatorSet(); + opSet = new CtuluOperatorSet(); } /** @@ -136,7 +136,7 @@ } } - public void clearUnusedVar(){ + public void clearUnusedVar() { final Variable[] vs = findUsedVarAndConstant(); if (vs != null) { final String[] names = new String[vs.length]; @@ -155,12 +155,11 @@ } /** - * Retourne le tableau des variables utilis\xE9es dans la derniere - * expression pars\xE9e. + * Retourne le tableau des variables utilis\xE9es dans la derniere expression pars\xE9e. * * @return Le tableau, de longueur 0 si aucune variable dans l'expression. */ - public Variable[] findUsedVar(){ + public Variable[] findUsedVar() { final CtuluExprVarCollector coll = new CtuluExprVarCollector(); coll.findOnlyVar(true); visitAll(coll, getTopNode()); @@ -168,22 +167,21 @@ } /** - * Retourne le tableau des variables et constantes utilis\xE9es dans la derniere - * expression pars\xE9e. + * Retourne le tableau des variables et constantes utilis\xE9es dans la derniere expression pars\xE9e. * * @return Le tableau, de longueur 0 si aucune variable/constante dans l'expression. */ - public Variable[] findUsedVarAndConstant(){ + public Variable[] findUsedVarAndConstant() { final CtuluExprVarCollector coll = new CtuluExprVarCollector(); visitAll(coll, getTopNode()); return coll.getFoundVar(); } - public String getError(final int _i){ + public String getError(final int _i) { return (String) errorList.get(_i); } - public String getHtmlError(){ + public String getHtmlError() { final StringBuffer buf = new StringBuffer(); buf.append("<html><body>"); final int nb = getNbError(); @@ -199,23 +197,24 @@ /** * @return La derni\xE8re expression pars\xE9e ou null si aucun parsing effectu\xE9. */ - public final String getLastExpr(){ + public final String getLastExpr() { return lastExpr_; } - public int getNbError(){ + public int getNbError() { return hasError() ? super.errorList.size() : 0; } /** * Surcharge pour conserver la derni\xE8re expression. + * * @param _expression L'expression \xE0 evaluer. */ @Override - public void parseExpression(final String _expression){ + public Node parseExpression(final String _expression) { lastExpr_ = _expression; - super.parseExpression(_expression); + return super.parseExpression(_expression); } } Modified: trunk/framework/ctulu-common/src/main/java/org/fudaa/ctulu/CtuluProgressionBarAdapter.java =================================================================== --- trunk/framework/ctulu-common/src/main/java/org/fudaa/ctulu/CtuluProgressionBarAdapter.java 2012-03-16 00:11:07 UTC (rev 6976) +++ trunk/framework/ctulu-common/src/main/java/org/fudaa/ctulu/CtuluProgressionBarAdapter.java 2012-03-24 00:36:22 UTC (rev 6977) @@ -1,25 +1,31 @@ /* - * @creation 2 avr. 2004 - * @modification $Date: 2007-02-02 11:20:09 $ - * @license GNU General Public License 2 - * @copyright (c)1998-2001 CETMEF 2 bd Gambetta F-60231 Compiegne - * @mail fud...@li... + * @creation 2 avr. 2004 + * + * @modification $Date: 2007-02-02 11:20:09 $ + * + * @license GNU General Public License 2 + * + * @copyright (c)1998-2001 CETMEF 2 bd Gambetta F-60231 Compiegne + * + * @mail fud...@li... */ package org.fudaa.ctulu; -import com.memoire.bu.BuProgressBar; +import java.awt.EventQueue; +import javax.swing.JProgressBar; + /** * @author Fred Deniger * @version $Id: CtuluProgressionBarAdapter.java,v 1.2 2007-02-02 11:20:09 deniger Exp $ */ public class CtuluProgressionBarAdapter implements ProgressionInterface { - BuProgressBar bar_; + JProgressBar bar_; String desc_; - public CtuluProgressionBarAdapter(final BuProgressBar _bar) { + public CtuluProgressionBarAdapter(final JProgressBar _bar) { bar_ = _bar; bar_.setStringPainted(true); } @@ -36,6 +42,16 @@ } public void setProgression(final int _v) { + if (!EventQueue.isDispatchThread()) { + EventQueue.invokeLater(new Runnable() { + + @Override + public void run() { + setProgression(_v); + } + }); + return; + } bar_.setValue(_v); if (desc_ == null) { bar_.setString(Integer.toString(_v) + " %"); Modified: trunk/framework/fudaa-dico/ui/src/main/java/org/fudaa/fudaa/fdico/FDicoProjectPanel.java =================================================================== --- trunk/framework/fudaa-dico/ui/src/main/java/org/fudaa/fudaa/fdico/FDicoProjectPanel.java 2012-03-16 00:11:07 UTC (rev 6976) +++ trunk/framework/fudaa-dico/ui/src/main/java/org/fudaa/fudaa/fdico/FDicoProjectPanel.java 2012-03-24 00:36:22 UTC (rev 6977) @@ -1,7 +1,10 @@ /* * @creation 5 juin 2003 + * * @modification $Date: 2007-05-04 13:59:04 $ + * * @license GNU General Public License 2 + * * @copyright (c)1998-2001 CETMEF 2 bd Gambetta F-60231 Compiegne */ package org.fudaa.fudaa.fdico; @@ -45,8 +48,8 @@ * @author deniger * @version $Id: FDicoProjectPanel.java,v 1.26 2007-05-04 13:59:04 deniger Exp $ */ -public class FDicoProjectPanel extends BuPanel implements ActionListener, MouseListener, DicoParamsListener, - CtuluUndoRedoInterface, ListSelectionListener { +public class FDicoProjectPanel extends BuPanel implements ActionListener, MouseListener, DicoParamsListener, CtuluUndoRedoInterface, + ListSelectionListener { BuTable table_; FDicoEntiteFileTableModelInterface model_; @@ -120,8 +123,7 @@ pn.add(lbErreur_); add(pn, BuBorderLayout.NORTH); updateErreur(); - final FudaaProjectStateSupportLabelListener listener = new FudaaProjectStateSupportLabelListener(lbModifie_, - lbDate_) { + final FudaaProjectStateSupportLabelListener listener = new FudaaProjectStateSupportLabelListener(lbModifie_, lbDate_) { public void finishUpdate(final FudaaProjetStateInterface _projState) { dicoParamsProjectModifyStateChanged(); } @@ -161,7 +163,8 @@ } else { lbErreur_.setForeground(Color.red); if (proj_.isSpaceInParentDir()) { - lbErreur_.setText(FDicoLib.getS("<html>Le chemin du fichier cas ne doit pas contenir d'espace.<br>Enregistrer votre projet dans un autre r\xE9pertoire</html>")); + lbErreur_.setText(FDicoLib + .getS("<html>Le chemin du fichier cas ne doit pas contenir d'espace.<br>Enregistrer votre projet dans un autre r\xE9pertoire</html>")); } else { lbErreur_.setText(FDicoLib.getS("Le projet contient des erreurs")); } @@ -205,8 +208,8 @@ setPreferredSize(new Dimension(16, 16)); } - public Component getTableCellRendererComponent(final JTable _table, final Object _value, final boolean _isSelected, - final boolean _hasFocus, final int _row, final int _column) { + public Component getTableCellRendererComponent(final JTable _table, final Object _value, final boolean _isSelected, final boolean _hasFocus, + final int _row, final int _column) { final DicoEntite e = model_.getEntite(_row); if (!proj_.getDicoParams().isValueValideFor(e)) { setToolTipText(FDicoLib.getS("Mot-cl\xE9 invalide")); @@ -234,8 +237,8 @@ init_ = table_.getFont(); } - public Component getTableCellRendererComponent(final JTable _table, final Object _value, final boolean _isSelected, - final boolean _hasFocus, final int _row, final int _column) { + public Component getTableCellRendererComponent(final JTable _table, final Object _value, final boolean _isSelected, final boolean _hasFocus, + final int _row, final int _column) { super.getTableCellRendererComponent(_table, _value, _isSelected, _hasFocus, _row, _column); final DicoEntite e = model_.getEntite(_row); if (proj_.getDicoParams().isValueValideFor(e)) { @@ -264,7 +267,8 @@ } protected void setValue(final Object _value) { - setText(((DicoEntite) _value).getNom()); + if (_value != null) + setText(((DicoEntite) _value).getNom()); } } @@ -274,8 +278,8 @@ super(); } - public Component getTableCellRendererComponent(final JTable _table, final Object _value, final boolean _isSelected, - final boolean _hasFocus, final int _row, final int _column) { + public Component getTableCellRendererComponent(final JTable _table, final Object _value, final boolean _isSelected, final boolean _hasFocus, + final int _row, final int _column) { super.getTableCellRendererComponent(_table, _value, _isSelected, _hasFocus, _row, _column); setToolTipText(model_.getAbsolutePath(model_.getEntite(_row))); return this; @@ -286,11 +290,14 @@ } } - public void mouseDown(final MouseEvent _evt) {} + public void mouseDown(final MouseEvent _evt) { + } - public void mouseEntered(final MouseEvent _evt) {} + public void mouseEntered(final MouseEvent _evt) { + } - public void mouseExited(final MouseEvent _evt) {} + public void mouseExited(final MouseEvent _evt) { + } public void mousePressed(final MouseEvent _evt) { if (_evt.getSource() == txtName_) { @@ -325,7 +332,8 @@ } } - public void mouseUp(final MouseEvent _evt) {} + public void mouseUp(final MouseEvent _evt) { + } public void mouseClicked(final MouseEvent _evt) { if ((_evt.getSource() == txtName_)) { @@ -418,6 +426,7 @@ } } - public void dicoParamsVersionChanged(final DicoParams _cas) {} + public void dicoParamsVersionChanged(final DicoParams _cas) { + } } \ No newline at end of file Modified: trunk/framework/pom.xml =================================================================== --- trunk/framework/pom.xml 2012-03-16 00:11:07 UTC (rev 6976) +++ trunk/framework/pom.xml 2012-03-24 00:36:22 UTC (rev 6977) @@ -319,8 +319,8 @@ </dependency> <dependency> <groupId>jep</groupId> - <artifactId>jep</artifactId> - <version>2.4.0</version> + <artifactId>jep-fudaa</artifactId> + <version>2.4.1</version> </dependency> <dependency> <groupId>javax.measure</groupId> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <de...@us...> - 2012-03-24 01:01:37
|
Revision: 6985 http://fudaa.svn.sourceforge.net/fudaa/?rev=6985&view=rev Author: deniger Date: 2012-03-24 01:01:26 +0000 (Sat, 24 Mar 2012) Log Message: ----------- [maven-release-plugin] prepare for next development iteration Modified Paths: -------------- trunk/framework/ctulu-bu/pom.xml trunk/framework/ctulu-common/pom.xml trunk/framework/ctulu-fu/pom.xml trunk/framework/ctulu-gis/pom.xml trunk/framework/ctulu-ui/pom.xml trunk/framework/ctulu-video/pom.xml trunk/framework/dodico-common/pom.xml trunk/framework/ebli-1d/pom.xml trunk/framework/ebli-2d/pom.xml trunk/framework/ebli-3d/pom.xml trunk/framework/ebli-common/pom.xml trunk/framework/ebli-graphe/pom.xml trunk/framework/ebli-visuallibrary/pom.xml trunk/framework/fudaa-common/pom.xml trunk/framework/fudaa-common-courbe/pom.xml trunk/framework/fudaa-common-save/pom.xml trunk/framework/fudaa-dico/pom.xml trunk/framework/fudaa-dico/server/pom.xml trunk/framework/fudaa-dico/ui/pom.xml trunk/framework/pom.xml Modified: trunk/framework/ctulu-bu/pom.xml =================================================================== --- trunk/framework/ctulu-bu/pom.xml 2012-03-24 01:01:00 UTC (rev 6984) +++ trunk/framework/ctulu-bu/pom.xml 2012-03-24 01:01:26 UTC (rev 6985) @@ -4,7 +4,7 @@ <parent> <groupId>org.fudaa.framework</groupId> <artifactId>fudaa-framework</artifactId> - <version>1.2</version> + <version>1.3-SNAPSHOT</version> </parent> <groupId>org.fudaa.framework.ctulu</groupId> <artifactId>ctulu-bu</artifactId> Modified: trunk/framework/ctulu-common/pom.xml =================================================================== --- trunk/framework/ctulu-common/pom.xml 2012-03-24 01:01:00 UTC (rev 6984) +++ trunk/framework/ctulu-common/pom.xml 2012-03-24 01:01:26 UTC (rev 6985) @@ -4,7 +4,7 @@ <parent> <groupId>org.fudaa.framework</groupId> <artifactId>fudaa-framework</artifactId> - <version>1.2</version> + <version>1.3-SNAPSHOT</version> </parent> <groupId>org.fudaa.framework.ctulu</groupId> <artifactId>ctulu-common</artifactId> Modified: trunk/framework/ctulu-fu/pom.xml =================================================================== --- trunk/framework/ctulu-fu/pom.xml 2012-03-24 01:01:00 UTC (rev 6984) +++ trunk/framework/ctulu-fu/pom.xml 2012-03-24 01:01:26 UTC (rev 6985) @@ -3,7 +3,7 @@ <parent> <groupId>org.fudaa.framework</groupId> <artifactId>fudaa-framework</artifactId> - <version>1.2</version> + <version>1.3-SNAPSHOT</version> </parent> <groupId>org.fudaa.framework.ctulu</groupId> <artifactId>ctulu-fu</artifactId> Modified: trunk/framework/ctulu-gis/pom.xml =================================================================== --- trunk/framework/ctulu-gis/pom.xml 2012-03-24 01:01:00 UTC (rev 6984) +++ trunk/framework/ctulu-gis/pom.xml 2012-03-24 01:01:26 UTC (rev 6985) @@ -4,7 +4,7 @@ <parent> <groupId>org.fudaa.framework</groupId> <artifactId>fudaa-framework</artifactId> - <version>1.2</version> + <version>1.3-SNAPSHOT</version> </parent> <groupId>org.fudaa.framework.ctulu</groupId> <artifactId>ctulu-gis</artifactId> Modified: trunk/framework/ctulu-ui/pom.xml =================================================================== --- trunk/framework/ctulu-ui/pom.xml 2012-03-24 01:01:00 UTC (rev 6984) +++ trunk/framework/ctulu-ui/pom.xml 2012-03-24 01:01:26 UTC (rev 6985) @@ -4,7 +4,7 @@ <parent> <groupId>org.fudaa.framework</groupId> <artifactId>fudaa-framework</artifactId> - <version>1.2</version> + <version>1.3-SNAPSHOT</version> </parent> <groupId>org.fudaa.framework.ctulu</groupId> <artifactId>ctulu-ui</artifactId> Modified: trunk/framework/ctulu-video/pom.xml =================================================================== --- trunk/framework/ctulu-video/pom.xml 2012-03-24 01:01:00 UTC (rev 6984) +++ trunk/framework/ctulu-video/pom.xml 2012-03-24 01:01:26 UTC (rev 6985) @@ -4,7 +4,7 @@ <parent> <groupId>org.fudaa.framework</groupId> <artifactId>fudaa-framework</artifactId> - <version>1.2</version> + <version>1.3-SNAPSHOT</version> </parent> <groupId>org.fudaa.framework.ctulu</groupId> <artifactId>ctulu-video</artifactId> Modified: trunk/framework/dodico-common/pom.xml =================================================================== --- trunk/framework/dodico-common/pom.xml 2012-03-24 01:01:00 UTC (rev 6984) +++ trunk/framework/dodico-common/pom.xml 2012-03-24 01:01:26 UTC (rev 6985) @@ -4,7 +4,7 @@ <parent> <groupId>org.fudaa.framework</groupId> <artifactId>fudaa-framework</artifactId> - <version>1.2</version> + <version>1.3-SNAPSHOT</version> </parent> <groupId>org.fudaa.framework.dodico</groupId> <artifactId>dodico-common</artifactId> Modified: trunk/framework/ebli-1d/pom.xml =================================================================== --- trunk/framework/ebli-1d/pom.xml 2012-03-24 01:01:00 UTC (rev 6984) +++ trunk/framework/ebli-1d/pom.xml 2012-03-24 01:01:26 UTC (rev 6985) @@ -4,7 +4,7 @@ <parent> <groupId>org.fudaa.framework</groupId> <artifactId>fudaa-framework</artifactId> - <version>1.2</version> + <version>1.3-SNAPSHOT</version> </parent> <groupId>org.fudaa.framework.ebli</groupId> <artifactId>ebli-1d</artifactId> Modified: trunk/framework/ebli-2d/pom.xml =================================================================== --- trunk/framework/ebli-2d/pom.xml 2012-03-24 01:01:00 UTC (rev 6984) +++ trunk/framework/ebli-2d/pom.xml 2012-03-24 01:01:26 UTC (rev 6985) @@ -4,7 +4,7 @@ <parent> <groupId>org.fudaa.framework</groupId> <artifactId>fudaa-framework</artifactId> - <version>1.2</version> + <version>1.3-SNAPSHOT</version> </parent> <groupId>org.fudaa.framework.ebli</groupId> <artifactId>ebli-2d</artifactId> Modified: trunk/framework/ebli-3d/pom.xml =================================================================== --- trunk/framework/ebli-3d/pom.xml 2012-03-24 01:01:00 UTC (rev 6984) +++ trunk/framework/ebli-3d/pom.xml 2012-03-24 01:01:26 UTC (rev 6985) @@ -4,7 +4,7 @@ <parent> <groupId>org.fudaa.framework</groupId> <artifactId>fudaa-framework</artifactId> - <version>1.2</version> + <version>1.3-SNAPSHOT</version> </parent> <groupId>org.fudaa.framework.ebli</groupId> <artifactId>ebli-3d</artifactId> Modified: trunk/framework/ebli-common/pom.xml =================================================================== --- trunk/framework/ebli-common/pom.xml 2012-03-24 01:01:00 UTC (rev 6984) +++ trunk/framework/ebli-common/pom.xml 2012-03-24 01:01:26 UTC (rev 6985) @@ -4,7 +4,7 @@ <parent> <groupId>org.fudaa.framework</groupId> <artifactId>fudaa-framework</artifactId> - <version>1.2</version> + <version>1.3-SNAPSHOT</version> </parent> <groupId>org.fudaa.framework.ebli</groupId> <artifactId>ebli-common</artifactId> Modified: trunk/framework/ebli-graphe/pom.xml =================================================================== --- trunk/framework/ebli-graphe/pom.xml 2012-03-24 01:01:00 UTC (rev 6984) +++ trunk/framework/ebli-graphe/pom.xml 2012-03-24 01:01:26 UTC (rev 6985) @@ -4,7 +4,7 @@ <parent> <groupId>org.fudaa.framework</groupId> <artifactId>fudaa-framework</artifactId> - <version>1.2</version> + <version>1.3-SNAPSHOT</version> </parent> <groupId>org.fudaa.framework.ebli</groupId> <artifactId>ebli-graphe</artifactId> Modified: trunk/framework/ebli-visuallibrary/pom.xml =================================================================== --- trunk/framework/ebli-visuallibrary/pom.xml 2012-03-24 01:01:00 UTC (rev 6984) +++ trunk/framework/ebli-visuallibrary/pom.xml 2012-03-24 01:01:26 UTC (rev 6985) @@ -4,7 +4,7 @@ <parent> <groupId>org.fudaa.framework</groupId> <artifactId>fudaa-framework</artifactId> - <version>1.2</version> + <version>1.3-SNAPSHOT</version> </parent> <groupId>org.fudaa.framework.ebli</groupId> <artifactId>ebli-visuallibrary</artifactId> Modified: trunk/framework/fudaa-common/pom.xml =================================================================== --- trunk/framework/fudaa-common/pom.xml 2012-03-24 01:01:00 UTC (rev 6984) +++ trunk/framework/fudaa-common/pom.xml 2012-03-24 01:01:26 UTC (rev 6985) @@ -4,7 +4,7 @@ <parent> <groupId>org.fudaa.framework</groupId> <artifactId>fudaa-framework</artifactId> - <version>1.2</version> + <version>1.3-SNAPSHOT</version> </parent> <groupId>org.fudaa.framework.fudaa</groupId> <artifactId>fudaa-common</artifactId> Modified: trunk/framework/fudaa-common-courbe/pom.xml =================================================================== --- trunk/framework/fudaa-common-courbe/pom.xml 2012-03-24 01:01:00 UTC (rev 6984) +++ trunk/framework/fudaa-common-courbe/pom.xml 2012-03-24 01:01:26 UTC (rev 6985) @@ -4,7 +4,7 @@ <parent> <groupId>org.fudaa.framework</groupId> <artifactId>fudaa-framework</artifactId> - <version>1.2</version> + <version>1.3-SNAPSHOT</version> </parent> <groupId>org.fudaa.framework.fudaa</groupId> <artifactId>fudaa-common-courbe</artifactId> Modified: trunk/framework/fudaa-common-save/pom.xml =================================================================== --- trunk/framework/fudaa-common-save/pom.xml 2012-03-24 01:01:00 UTC (rev 6984) +++ trunk/framework/fudaa-common-save/pom.xml 2012-03-24 01:01:26 UTC (rev 6985) @@ -4,7 +4,7 @@ <parent> <groupId>org.fudaa.framework</groupId> <artifactId>fudaa-framework</artifactId> - <version>1.2</version> + <version>1.3-SNAPSHOT</version> </parent> <groupId>org.fudaa.framework.fudaa</groupId> <artifactId>fudaa-common-save</artifactId> Modified: trunk/framework/fudaa-dico/pom.xml =================================================================== --- trunk/framework/fudaa-dico/pom.xml 2012-03-24 01:01:00 UTC (rev 6984) +++ trunk/framework/fudaa-dico/pom.xml 2012-03-24 01:01:26 UTC (rev 6985) @@ -9,7 +9,7 @@ <parent> <groupId>org.fudaa.framework</groupId> <artifactId>fudaa-framework</artifactId> - <version>1.2</version> + <version>1.3-SNAPSHOT</version> </parent> <groupId>org.fudaa.framework.fudaa.fudaa-dico</groupId> <artifactId>fudaa-dico</artifactId> Modified: trunk/framework/fudaa-dico/server/pom.xml =================================================================== --- trunk/framework/fudaa-dico/server/pom.xml 2012-03-24 01:01:00 UTC (rev 6984) +++ trunk/framework/fudaa-dico/server/pom.xml 2012-03-24 01:01:26 UTC (rev 6985) @@ -4,7 +4,7 @@ <parent> <groupId>org.fudaa.framework.fudaa.fudaa-dico</groupId> <artifactId>fudaa-dico</artifactId> - <version>1.2</version> + <version>1.3-SNAPSHOT</version> </parent> <groupId>org.fudaa.framework.fudaa.fudaa-dico</groupId> <artifactId>dico-server</artifactId> Modified: trunk/framework/fudaa-dico/ui/pom.xml =================================================================== --- trunk/framework/fudaa-dico/ui/pom.xml 2012-03-24 01:01:00 UTC (rev 6984) +++ trunk/framework/fudaa-dico/ui/pom.xml 2012-03-24 01:01:26 UTC (rev 6985) @@ -4,7 +4,7 @@ <parent> <groupId>org.fudaa.framework.fudaa.fudaa-dico</groupId> <artifactId>fudaa-dico</artifactId> - <version>1.2</version> + <version>1.3-SNAPSHOT</version> </parent> <artifactId>dico-ui</artifactId> <name>Dico UI</name> Modified: trunk/framework/pom.xml =================================================================== --- trunk/framework/pom.xml 2012-03-24 01:01:00 UTC (rev 6984) +++ trunk/framework/pom.xml 2012-03-24 01:01:26 UTC (rev 6985) @@ -8,7 +8,7 @@ </parent> <groupId>org.fudaa.framework</groupId> <artifactId>fudaa-framework</artifactId> - <version>1.2</version> + <version>1.3-SNAPSHOT</version> <url>http://www.fudaa.fr/sites/devel/fudaa-framework/</url> <properties> <projetEncoding>ISO-8859-15</projetEncoding> @@ -26,11 +26,11 @@ <name>Fudaa Framework</name> <description>La partie commune du framework fudaa</description> <scm> - <connection>scm:svn:http://fudaa.svn.sourceforge.net/svnroot/fudaa/tags/framework/fudaa-framework-1.2 + <connection>scm:svn:http://fudaa.svn.sourceforge.net/svnroot/fudaa/trunk/framework </connection> - <developerConnection>scm:svn:https://fudaa.svn.sourceforge.net/svnroot/fudaa/tags/framework/fudaa-framework-1.2 + <developerConnection>scm:svn:https://fudaa.svn.sourceforge.net/svnroot/fudaa/trunk/framework </developerConnection> - <url>http://fudaa.svn.sourceforge.net/viewvc/fudaa/svnroot/fudaa/tags/framework/fudaa-framework-1.2 + <url>http://fudaa.svn.sourceforge.net/viewvc/fudaa/svnroot/fudaa/trunk/framework </url> </scm> <modules> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <de...@us...> - 2012-03-24 01:30:46
|
Revision: 6993 http://fudaa.svn.sourceforge.net/fudaa/?rev=6993&view=rev Author: deniger Date: 2012-03-24 01:30:36 +0000 (Sat, 24 Mar 2012) Log Message: ----------- [maven-release-plugin] prepare for next development iteration Modified Paths: -------------- trunk/framework/ctulu-bu/pom.xml trunk/framework/ctulu-common/pom.xml trunk/framework/ctulu-fu/pom.xml trunk/framework/ctulu-gis/pom.xml trunk/framework/ctulu-ui/pom.xml trunk/framework/ctulu-video/pom.xml trunk/framework/dodico-common/pom.xml trunk/framework/ebli-1d/pom.xml trunk/framework/ebli-2d/pom.xml trunk/framework/ebli-3d/pom.xml trunk/framework/ebli-common/pom.xml trunk/framework/ebli-graphe/pom.xml trunk/framework/ebli-visuallibrary/pom.xml trunk/framework/fudaa-common/pom.xml trunk/framework/fudaa-common-courbe/pom.xml trunk/framework/fudaa-common-save/pom.xml trunk/framework/fudaa-dico/pom.xml trunk/framework/fudaa-dico/server/pom.xml trunk/framework/fudaa-dico/ui/pom.xml trunk/framework/pom.xml Modified: trunk/framework/ctulu-bu/pom.xml =================================================================== --- trunk/framework/ctulu-bu/pom.xml 2012-03-24 01:30:07 UTC (rev 6992) +++ trunk/framework/ctulu-bu/pom.xml 2012-03-24 01:30:36 UTC (rev 6993) @@ -4,7 +4,7 @@ <parent> <groupId>org.fudaa.framework</groupId> <artifactId>fudaa-framework</artifactId> - <version>1.2</version> + <version>1.3-SNAPSHOT</version> </parent> <groupId>org.fudaa.framework.ctulu</groupId> <artifactId>ctulu-bu</artifactId> Modified: trunk/framework/ctulu-common/pom.xml =================================================================== --- trunk/framework/ctulu-common/pom.xml 2012-03-24 01:30:07 UTC (rev 6992) +++ trunk/framework/ctulu-common/pom.xml 2012-03-24 01:30:36 UTC (rev 6993) @@ -4,7 +4,7 @@ <parent> <groupId>org.fudaa.framework</groupId> <artifactId>fudaa-framework</artifactId> - <version>1.2</version> + <version>1.3-SNAPSHOT</version> </parent> <groupId>org.fudaa.framework.ctulu</groupId> <artifactId>ctulu-common</artifactId> Modified: trunk/framework/ctulu-fu/pom.xml =================================================================== --- trunk/framework/ctulu-fu/pom.xml 2012-03-24 01:30:07 UTC (rev 6992) +++ trunk/framework/ctulu-fu/pom.xml 2012-03-24 01:30:36 UTC (rev 6993) @@ -3,7 +3,7 @@ <parent> <groupId>org.fudaa.framework</groupId> <artifactId>fudaa-framework</artifactId> - <version>1.2</version> + <version>1.3-SNAPSHOT</version> </parent> <groupId>org.fudaa.framework.ctulu</groupId> <artifactId>ctulu-fu</artifactId> Modified: trunk/framework/ctulu-gis/pom.xml =================================================================== --- trunk/framework/ctulu-gis/pom.xml 2012-03-24 01:30:07 UTC (rev 6992) +++ trunk/framework/ctulu-gis/pom.xml 2012-03-24 01:30:36 UTC (rev 6993) @@ -4,7 +4,7 @@ <parent> <groupId>org.fudaa.framework</groupId> <artifactId>fudaa-framework</artifactId> - <version>1.2</version> + <version>1.3-SNAPSHOT</version> </parent> <groupId>org.fudaa.framework.ctulu</groupId> <artifactId>ctulu-gis</artifactId> Modified: trunk/framework/ctulu-ui/pom.xml =================================================================== --- trunk/framework/ctulu-ui/pom.xml 2012-03-24 01:30:07 UTC (rev 6992) +++ trunk/framework/ctulu-ui/pom.xml 2012-03-24 01:30:36 UTC (rev 6993) @@ -4,7 +4,7 @@ <parent> <groupId>org.fudaa.framework</groupId> <artifactId>fudaa-framework</artifactId> - <version>1.2</version> + <version>1.3-SNAPSHOT</version> </parent> <groupId>org.fudaa.framework.ctulu</groupId> <artifactId>ctulu-ui</artifactId> Modified: trunk/framework/ctulu-video/pom.xml =================================================================== --- trunk/framework/ctulu-video/pom.xml 2012-03-24 01:30:07 UTC (rev 6992) +++ trunk/framework/ctulu-video/pom.xml 2012-03-24 01:30:36 UTC (rev 6993) @@ -4,7 +4,7 @@ <parent> <groupId>org.fudaa.framework</groupId> <artifactId>fudaa-framework</artifactId> - <version>1.2</version> + <version>1.3-SNAPSHOT</version> </parent> <groupId>org.fudaa.framework.ctulu</groupId> <artifactId>ctulu-video</artifactId> Modified: trunk/framework/dodico-common/pom.xml =================================================================== --- trunk/framework/dodico-common/pom.xml 2012-03-24 01:30:07 UTC (rev 6992) +++ trunk/framework/dodico-common/pom.xml 2012-03-24 01:30:36 UTC (rev 6993) @@ -4,7 +4,7 @@ <parent> <groupId>org.fudaa.framework</groupId> <artifactId>fudaa-framework</artifactId> - <version>1.2</version> + <version>1.3-SNAPSHOT</version> </parent> <groupId>org.fudaa.framework.dodico</groupId> <artifactId>dodico-common</artifactId> Modified: trunk/framework/ebli-1d/pom.xml =================================================================== --- trunk/framework/ebli-1d/pom.xml 2012-03-24 01:30:07 UTC (rev 6992) +++ trunk/framework/ebli-1d/pom.xml 2012-03-24 01:30:36 UTC (rev 6993) @@ -4,7 +4,7 @@ <parent> <groupId>org.fudaa.framework</groupId> <artifactId>fudaa-framework</artifactId> - <version>1.2</version> + <version>1.3-SNAPSHOT</version> </parent> <groupId>org.fudaa.framework.ebli</groupId> <artifactId>ebli-1d</artifactId> Modified: trunk/framework/ebli-2d/pom.xml =================================================================== --- trunk/framework/ebli-2d/pom.xml 2012-03-24 01:30:07 UTC (rev 6992) +++ trunk/framework/ebli-2d/pom.xml 2012-03-24 01:30:36 UTC (rev 6993) @@ -4,7 +4,7 @@ <parent> <groupId>org.fudaa.framework</groupId> <artifactId>fudaa-framework</artifactId> - <version>1.2</version> + <version>1.3-SNAPSHOT</version> </parent> <groupId>org.fudaa.framework.ebli</groupId> <artifactId>ebli-2d</artifactId> Modified: trunk/framework/ebli-3d/pom.xml =================================================================== --- trunk/framework/ebli-3d/pom.xml 2012-03-24 01:30:07 UTC (rev 6992) +++ trunk/framework/ebli-3d/pom.xml 2012-03-24 01:30:36 UTC (rev 6993) @@ -4,7 +4,7 @@ <parent> <groupId>org.fudaa.framework</groupId> <artifactId>fudaa-framework</artifactId> - <version>1.2</version> + <version>1.3-SNAPSHOT</version> </parent> <groupId>org.fudaa.framework.ebli</groupId> <artifactId>ebli-3d</artifactId> Modified: trunk/framework/ebli-common/pom.xml =================================================================== --- trunk/framework/ebli-common/pom.xml 2012-03-24 01:30:07 UTC (rev 6992) +++ trunk/framework/ebli-common/pom.xml 2012-03-24 01:30:36 UTC (rev 6993) @@ -4,7 +4,7 @@ <parent> <groupId>org.fudaa.framework</groupId> <artifactId>fudaa-framework</artifactId> - <version>1.2</version> + <version>1.3-SNAPSHOT</version> </parent> <groupId>org.fudaa.framework.ebli</groupId> <artifactId>ebli-common</artifactId> Modified: trunk/framework/ebli-graphe/pom.xml =================================================================== --- trunk/framework/ebli-graphe/pom.xml 2012-03-24 01:30:07 UTC (rev 6992) +++ trunk/framework/ebli-graphe/pom.xml 2012-03-24 01:30:36 UTC (rev 6993) @@ -4,7 +4,7 @@ <parent> <groupId>org.fudaa.framework</groupId> <artifactId>fudaa-framework</artifactId> - <version>1.2</version> + <version>1.3-SNAPSHOT</version> </parent> <groupId>org.fudaa.framework.ebli</groupId> <artifactId>ebli-graphe</artifactId> Modified: trunk/framework/ebli-visuallibrary/pom.xml =================================================================== --- trunk/framework/ebli-visuallibrary/pom.xml 2012-03-24 01:30:07 UTC (rev 6992) +++ trunk/framework/ebli-visuallibrary/pom.xml 2012-03-24 01:30:36 UTC (rev 6993) @@ -4,7 +4,7 @@ <parent> <groupId>org.fudaa.framework</groupId> <artifactId>fudaa-framework</artifactId> - <version>1.2</version> + <version>1.3-SNAPSHOT</version> </parent> <groupId>org.fudaa.framework.ebli</groupId> <artifactId>ebli-visuallibrary</artifactId> Modified: trunk/framework/fudaa-common/pom.xml =================================================================== --- trunk/framework/fudaa-common/pom.xml 2012-03-24 01:30:07 UTC (rev 6992) +++ trunk/framework/fudaa-common/pom.xml 2012-03-24 01:30:36 UTC (rev 6993) @@ -4,7 +4,7 @@ <parent> <groupId>org.fudaa.framework</groupId> <artifactId>fudaa-framework</artifactId> - <version>1.2</version> + <version>1.3-SNAPSHOT</version> </parent> <groupId>org.fudaa.framework.fudaa</groupId> <artifactId>fudaa-common</artifactId> Modified: trunk/framework/fudaa-common-courbe/pom.xml =================================================================== --- trunk/framework/fudaa-common-courbe/pom.xml 2012-03-24 01:30:07 UTC (rev 6992) +++ trunk/framework/fudaa-common-courbe/pom.xml 2012-03-24 01:30:36 UTC (rev 6993) @@ -4,7 +4,7 @@ <parent> <groupId>org.fudaa.framework</groupId> <artifactId>fudaa-framework</artifactId> - <version>1.2</version> + <version>1.3-SNAPSHOT</version> </parent> <groupId>org.fudaa.framework.fudaa</groupId> <artifactId>fudaa-common-courbe</artifactId> Modified: trunk/framework/fudaa-common-save/pom.xml =================================================================== --- trunk/framework/fudaa-common-save/pom.xml 2012-03-24 01:30:07 UTC (rev 6992) +++ trunk/framework/fudaa-common-save/pom.xml 2012-03-24 01:30:36 UTC (rev 6993) @@ -4,7 +4,7 @@ <parent> <groupId>org.fudaa.framework</groupId> <artifactId>fudaa-framework</artifactId> - <version>1.2</version> + <version>1.3-SNAPSHOT</version> </parent> <groupId>org.fudaa.framework.fudaa</groupId> <artifactId>fudaa-common-save</artifactId> Modified: trunk/framework/fudaa-dico/pom.xml =================================================================== --- trunk/framework/fudaa-dico/pom.xml 2012-03-24 01:30:07 UTC (rev 6992) +++ trunk/framework/fudaa-dico/pom.xml 2012-03-24 01:30:36 UTC (rev 6993) @@ -9,7 +9,7 @@ <parent> <groupId>org.fudaa.framework</groupId> <artifactId>fudaa-framework</artifactId> - <version>1.2</version> + <version>1.3-SNAPSHOT</version> </parent> <groupId>org.fudaa.framework.fudaa.fudaa-dico</groupId> <artifactId>fudaa-dico</artifactId> Modified: trunk/framework/fudaa-dico/server/pom.xml =================================================================== --- trunk/framework/fudaa-dico/server/pom.xml 2012-03-24 01:30:07 UTC (rev 6992) +++ trunk/framework/fudaa-dico/server/pom.xml 2012-03-24 01:30:36 UTC (rev 6993) @@ -4,7 +4,7 @@ <parent> <groupId>org.fudaa.framework.fudaa.fudaa-dico</groupId> <artifactId>fudaa-dico</artifactId> - <version>1.2</version> + <version>1.3-SNAPSHOT</version> </parent> <groupId>org.fudaa.framework.fudaa.fudaa-dico</groupId> <artifactId>dico-server</artifactId> Modified: trunk/framework/fudaa-dico/ui/pom.xml =================================================================== --- trunk/framework/fudaa-dico/ui/pom.xml 2012-03-24 01:30:07 UTC (rev 6992) +++ trunk/framework/fudaa-dico/ui/pom.xml 2012-03-24 01:30:36 UTC (rev 6993) @@ -4,7 +4,7 @@ <parent> <groupId>org.fudaa.framework.fudaa.fudaa-dico</groupId> <artifactId>fudaa-dico</artifactId> - <version>1.2</version> + <version>1.3-SNAPSHOT</version> </parent> <artifactId>dico-ui</artifactId> <name>Dico UI</name> Modified: trunk/framework/pom.xml =================================================================== --- trunk/framework/pom.xml 2012-03-24 01:30:07 UTC (rev 6992) +++ trunk/framework/pom.xml 2012-03-24 01:30:36 UTC (rev 6993) @@ -8,7 +8,7 @@ </parent> <groupId>org.fudaa.framework</groupId> <artifactId>fudaa-framework</artifactId> - <version>1.2</version> + <version>1.3-SNAPSHOT</version> <url>http://www.fudaa.fr/sites/devel/fudaa-framework/</url> <properties> <projetEncoding>ISO-8859-15</projetEncoding> @@ -26,11 +26,11 @@ <name>Fudaa Framework</name> <description>La partie commune du framework fudaa</description> <scm> - <connection>scm:svn:http://fudaa.svn.sourceforge.net/svnroot/fudaa/tags/framework/fudaa-framework-1.2 + <connection>scm:svn:http://fudaa.svn.sourceforge.net/svnroot/fudaa/trunk/framework </connection> - <developerConnection>scm:svn:https://fudaa.svn.sourceforge.net/svnroot/fudaa/tags/framework/fudaa-framework-1.2 + <developerConnection>scm:svn:https://fudaa.svn.sourceforge.net/svnroot/fudaa/trunk/framework </developerConnection> - <url>http://fudaa.svn.sourceforge.net/viewvc/fudaa/svnroot/fudaa/tags/framework/fudaa-framework-1.2 + <url>http://fudaa.svn.sourceforge.net/viewvc/fudaa/svnroot/fudaa/trunk/framework </url> </scm> <modules> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <de...@us...> - 2012-03-25 20:06:25
|
Revision: 7034 http://fudaa.svn.sourceforge.net/fudaa/?rev=7034&view=rev Author: deniger Date: 2012-03-25 20:06:19 +0000 (Sun, 25 Mar 2012) Log Message: ----------- Modified Paths: -------------- trunk/framework/ctulu-bu/pom.xml trunk/framework/ctulu-common/pom.xml trunk/framework/ctulu-fu/pom.xml trunk/framework/ctulu-gis/pom.xml trunk/framework/ctulu-ui/pom.xml trunk/framework/ctulu-video/pom.xml trunk/framework/dodico-common/pom.xml trunk/framework/ebli-1d/pom.xml trunk/framework/ebli-2d/pom.xml trunk/framework/ebli-3d/pom.xml trunk/framework/ebli-common/pom.xml trunk/framework/ebli-graphe/pom.xml trunk/framework/ebli-visuallibrary/pom.xml trunk/framework/fudaa-common/pom.xml trunk/framework/fudaa-common-courbe/pom.xml trunk/framework/fudaa-common-save/pom.xml trunk/framework/fudaa-dico/pom.xml trunk/framework/fudaa-dico/server/pom.xml trunk/framework/fudaa-dico/ui/pom.xml trunk/framework/pom.xml Modified: trunk/framework/ctulu-bu/pom.xml =================================================================== --- trunk/framework/ctulu-bu/pom.xml 2012-03-25 19:53:06 UTC (rev 7033) +++ trunk/framework/ctulu-bu/pom.xml 2012-03-25 20:06:19 UTC (rev 7034) @@ -4,7 +4,7 @@ <parent> <groupId>org.fudaa.framework</groupId> <artifactId>fudaa-framework</artifactId> - <version>1.2</version> + <version>1.3-SNAPSHOT</version> </parent> <groupId>org.fudaa.framework.ctulu</groupId> <artifactId>ctulu-bu</artifactId> Modified: trunk/framework/ctulu-common/pom.xml =================================================================== --- trunk/framework/ctulu-common/pom.xml 2012-03-25 19:53:06 UTC (rev 7033) +++ trunk/framework/ctulu-common/pom.xml 2012-03-25 20:06:19 UTC (rev 7034) @@ -4,7 +4,7 @@ <parent> <groupId>org.fudaa.framework</groupId> <artifactId>fudaa-framework</artifactId> - <version>1.2</version> + <version>1.3-SNAPSHOT</version> </parent> <groupId>org.fudaa.framework.ctulu</groupId> <artifactId>ctulu-common</artifactId> Modified: trunk/framework/ctulu-fu/pom.xml =================================================================== --- trunk/framework/ctulu-fu/pom.xml 2012-03-25 19:53:06 UTC (rev 7033) +++ trunk/framework/ctulu-fu/pom.xml 2012-03-25 20:06:19 UTC (rev 7034) @@ -3,7 +3,7 @@ <parent> <groupId>org.fudaa.framework</groupId> <artifactId>fudaa-framework</artifactId> - <version>1.2</version> + <version>1.3-SNAPSHOT</version> </parent> <groupId>org.fudaa.framework.ctulu</groupId> <artifactId>ctulu-fu</artifactId> Modified: trunk/framework/ctulu-gis/pom.xml =================================================================== --- trunk/framework/ctulu-gis/pom.xml 2012-03-25 19:53:06 UTC (rev 7033) +++ trunk/framework/ctulu-gis/pom.xml 2012-03-25 20:06:19 UTC (rev 7034) @@ -4,7 +4,7 @@ <parent> <groupId>org.fudaa.framework</groupId> <artifactId>fudaa-framework</artifactId> - <version>1.2</version> + <version>1.3-SNAPSHOT</version> </parent> <groupId>org.fudaa.framework.ctulu</groupId> <artifactId>ctulu-gis</artifactId> Modified: trunk/framework/ctulu-ui/pom.xml =================================================================== --- trunk/framework/ctulu-ui/pom.xml 2012-03-25 19:53:06 UTC (rev 7033) +++ trunk/framework/ctulu-ui/pom.xml 2012-03-25 20:06:19 UTC (rev 7034) @@ -4,7 +4,7 @@ <parent> <groupId>org.fudaa.framework</groupId> <artifactId>fudaa-framework</artifactId> - <version>1.2</version> + <version>1.3-SNAPSHOT</version> </parent> <groupId>org.fudaa.framework.ctulu</groupId> <artifactId>ctulu-ui</artifactId> Modified: trunk/framework/ctulu-video/pom.xml =================================================================== --- trunk/framework/ctulu-video/pom.xml 2012-03-25 19:53:06 UTC (rev 7033) +++ trunk/framework/ctulu-video/pom.xml 2012-03-25 20:06:19 UTC (rev 7034) @@ -4,7 +4,7 @@ <parent> <groupId>org.fudaa.framework</groupId> <artifactId>fudaa-framework</artifactId> - <version>1.2</version> + <version>1.3-SNAPSHOT</version> </parent> <groupId>org.fudaa.framework.ctulu</groupId> <artifactId>ctulu-video</artifactId> Modified: trunk/framework/dodico-common/pom.xml =================================================================== --- trunk/framework/dodico-common/pom.xml 2012-03-25 19:53:06 UTC (rev 7033) +++ trunk/framework/dodico-common/pom.xml 2012-03-25 20:06:19 UTC (rev 7034) @@ -4,7 +4,7 @@ <parent> <groupId>org.fudaa.framework</groupId> <artifactId>fudaa-framework</artifactId> - <version>1.2</version> + <version>1.3-SNAPSHOT</version> </parent> <groupId>org.fudaa.framework.dodico</groupId> <artifactId>dodico-common</artifactId> Modified: trunk/framework/ebli-1d/pom.xml =================================================================== --- trunk/framework/ebli-1d/pom.xml 2012-03-25 19:53:06 UTC (rev 7033) +++ trunk/framework/ebli-1d/pom.xml 2012-03-25 20:06:19 UTC (rev 7034) @@ -4,7 +4,7 @@ <parent> <groupId>org.fudaa.framework</groupId> <artifactId>fudaa-framework</artifactId> - <version>1.2</version> + <version>1.3-SNAPSHOT</version> </parent> <groupId>org.fudaa.framework.ebli</groupId> <artifactId>ebli-1d</artifactId> Modified: trunk/framework/ebli-2d/pom.xml =================================================================== --- trunk/framework/ebli-2d/pom.xml 2012-03-25 19:53:06 UTC (rev 7033) +++ trunk/framework/ebli-2d/pom.xml 2012-03-25 20:06:19 UTC (rev 7034) @@ -4,7 +4,7 @@ <parent> <groupId>org.fudaa.framework</groupId> <artifactId>fudaa-framework</artifactId> - <version>1.2</version> + <version>1.3-SNAPSHOT</version> </parent> <groupId>org.fudaa.framework.ebli</groupId> <artifactId>ebli-2d</artifactId> Modified: trunk/framework/ebli-3d/pom.xml =================================================================== --- trunk/framework/ebli-3d/pom.xml 2012-03-25 19:53:06 UTC (rev 7033) +++ trunk/framework/ebli-3d/pom.xml 2012-03-25 20:06:19 UTC (rev 7034) @@ -4,7 +4,7 @@ <parent> <groupId>org.fudaa.framework</groupId> <artifactId>fudaa-framework</artifactId> - <version>1.2</version> + <version>1.3-SNAPSHOT</version> </parent> <groupId>org.fudaa.framework.ebli</groupId> <artifactId>ebli-3d</artifactId> Modified: trunk/framework/ebli-common/pom.xml =================================================================== --- trunk/framework/ebli-common/pom.xml 2012-03-25 19:53:06 UTC (rev 7033) +++ trunk/framework/ebli-common/pom.xml 2012-03-25 20:06:19 UTC (rev 7034) @@ -4,7 +4,7 @@ <parent> <groupId>org.fudaa.framework</groupId> <artifactId>fudaa-framework</artifactId> - <version>1.2</version> + <version>1.3-SNAPSHOT</version> </parent> <groupId>org.fudaa.framework.ebli</groupId> <artifactId>ebli-common</artifactId> Modified: trunk/framework/ebli-graphe/pom.xml =================================================================== --- trunk/framework/ebli-graphe/pom.xml 2012-03-25 19:53:06 UTC (rev 7033) +++ trunk/framework/ebli-graphe/pom.xml 2012-03-25 20:06:19 UTC (rev 7034) @@ -4,7 +4,7 @@ <parent> <groupId>org.fudaa.framework</groupId> <artifactId>fudaa-framework</artifactId> - <version>1.2</version> + <version>1.3-SNAPSHOT</version> </parent> <groupId>org.fudaa.framework.ebli</groupId> <artifactId>ebli-graphe</artifactId> Modified: trunk/framework/ebli-visuallibrary/pom.xml =================================================================== --- trunk/framework/ebli-visuallibrary/pom.xml 2012-03-25 19:53:06 UTC (rev 7033) +++ trunk/framework/ebli-visuallibrary/pom.xml 2012-03-25 20:06:19 UTC (rev 7034) @@ -4,7 +4,7 @@ <parent> <groupId>org.fudaa.framework</groupId> <artifactId>fudaa-framework</artifactId> - <version>1.2</version> + <version>1.3-SNAPSHOT</version> </parent> <groupId>org.fudaa.framework.ebli</groupId> <artifactId>ebli-visuallibrary</artifactId> Modified: trunk/framework/fudaa-common/pom.xml =================================================================== --- trunk/framework/fudaa-common/pom.xml 2012-03-25 19:53:06 UTC (rev 7033) +++ trunk/framework/fudaa-common/pom.xml 2012-03-25 20:06:19 UTC (rev 7034) @@ -4,7 +4,7 @@ <parent> <groupId>org.fudaa.framework</groupId> <artifactId>fudaa-framework</artifactId> - <version>1.2</version> + <version>1.3-SNAPSHOT</version> </parent> <groupId>org.fudaa.framework.fudaa</groupId> <artifactId>fudaa-common</artifactId> Modified: trunk/framework/fudaa-common-courbe/pom.xml =================================================================== --- trunk/framework/fudaa-common-courbe/pom.xml 2012-03-25 19:53:06 UTC (rev 7033) +++ trunk/framework/fudaa-common-courbe/pom.xml 2012-03-25 20:06:19 UTC (rev 7034) @@ -4,7 +4,7 @@ <parent> <groupId>org.fudaa.framework</groupId> <artifactId>fudaa-framework</artifactId> - <version>1.2</version> + <version>1.3-SNAPSHOT</version> </parent> <groupId>org.fudaa.framework.fudaa</groupId> <artifactId>fudaa-common-courbe</artifactId> Modified: trunk/framework/fudaa-common-save/pom.xml =================================================================== --- trunk/framework/fudaa-common-save/pom.xml 2012-03-25 19:53:06 UTC (rev 7033) +++ trunk/framework/fudaa-common-save/pom.xml 2012-03-25 20:06:19 UTC (rev 7034) @@ -4,7 +4,7 @@ <parent> <groupId>org.fudaa.framework</groupId> <artifactId>fudaa-framework</artifactId> - <version>1.2</version> + <version>1.3-SNAPSHOT</version> </parent> <groupId>org.fudaa.framework.fudaa</groupId> <artifactId>fudaa-common-save</artifactId> Modified: trunk/framework/fudaa-dico/pom.xml =================================================================== --- trunk/framework/fudaa-dico/pom.xml 2012-03-25 19:53:06 UTC (rev 7033) +++ trunk/framework/fudaa-dico/pom.xml 2012-03-25 20:06:19 UTC (rev 7034) @@ -9,7 +9,7 @@ <parent> <groupId>org.fudaa.framework</groupId> <artifactId>fudaa-framework</artifactId> - <version>1.2</version> + <version>1.3-SNAPSHOT</version> </parent> <groupId>org.fudaa.framework.fudaa.fudaa-dico</groupId> <artifactId>fudaa-dico</artifactId> Modified: trunk/framework/fudaa-dico/server/pom.xml =================================================================== --- trunk/framework/fudaa-dico/server/pom.xml 2012-03-25 19:53:06 UTC (rev 7033) +++ trunk/framework/fudaa-dico/server/pom.xml 2012-03-25 20:06:19 UTC (rev 7034) @@ -4,7 +4,7 @@ <parent> <groupId>org.fudaa.framework.fudaa.fudaa-dico</groupId> <artifactId>fudaa-dico</artifactId> - <version>1.2</version> + <version>1.3-SNAPSHOT</version> </parent> <groupId>org.fudaa.framework.fudaa.fudaa-dico</groupId> <artifactId>dico-server</artifactId> Modified: trunk/framework/fudaa-dico/ui/pom.xml =================================================================== --- trunk/framework/fudaa-dico/ui/pom.xml 2012-03-25 19:53:06 UTC (rev 7033) +++ trunk/framework/fudaa-dico/ui/pom.xml 2012-03-25 20:06:19 UTC (rev 7034) @@ -4,7 +4,7 @@ <parent> <groupId>org.fudaa.framework.fudaa.fudaa-dico</groupId> <artifactId>fudaa-dico</artifactId> - <version>1.2</version> + <version>1.3-SNAPSHOT</version> </parent> <artifactId>dico-ui</artifactId> <name>Dico UI</name> Modified: trunk/framework/pom.xml =================================================================== --- trunk/framework/pom.xml 2012-03-25 19:53:06 UTC (rev 7033) +++ trunk/framework/pom.xml 2012-03-25 20:06:19 UTC (rev 7034) @@ -8,7 +8,7 @@ </parent> <groupId>org.fudaa.framework</groupId> <artifactId>fudaa-framework</artifactId> - <version>1.2</version> + <version>1.3-SNAPSHOT</version> <url>http://www.fudaa.fr/sites/devel/fudaa-framework/</url> <properties> <projetEncoding>ISO-8859-15</projetEncoding> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <de...@us...> - 2012-04-06 17:25:52
|
Revision: 7061 http://fudaa.svn.sourceforge.net/fudaa/?rev=7061&view=rev Author: deniger Date: 2012-04-06 17:25:45 +0000 (Fri, 06 Apr 2012) Log Message: ----------- Modified Paths: -------------- trunk/framework/ctulu-common/src/main/java/org/fudaa/ctulu/CtuluIOOperationSynthese.java trunk/framework/ctulu-common/src/main/java/org/fudaa/ctulu/CtuluListSelection.java trunk/framework/ebli-2d/src/main/java/org/fudaa/ebli/calque/ZCalqueSondeInteraction.java trunk/framework/ebli-2d/src/main/java/org/fudaa/ebli/calque/ZModeleFleche.java trunk/framework/ebli-2d/src/main/java/org/fudaa/ebli/calque/ZModeleFlecheForDensite.java trunk/framework/ebli-2d/src/main/java/org/fudaa/ebli/calque/ZModeleFlecheForGrille.java trunk/framework/ebli-2d/src/main/java/org/fudaa/ebli/calque/ZModeleSegment.java trunk/framework/ebli-common/src/main/resources/org/fudaa/ebli/ressource/ebli_en.fr_txt trunk/framework/fudaa-common/src/main/java/org/fudaa/fudaa/commun/FudaaHelpPDFViewer.java trunk/framework/fudaa-common-save/src/main/java/org/fudaa/fudaa/commun/save/FudaaSaveZipLoader.java Modified: trunk/framework/ctulu-common/src/main/java/org/fudaa/ctulu/CtuluIOOperationSynthese.java =================================================================== --- trunk/framework/ctulu-common/src/main/java/org/fudaa/ctulu/CtuluIOOperationSynthese.java 2012-04-06 17:12:47 UTC (rev 7060) +++ trunk/framework/ctulu-common/src/main/java/org/fudaa/ctulu/CtuluIOOperationSynthese.java 2012-04-06 17:25:45 UTC (rev 7061) @@ -34,6 +34,12 @@ public boolean containsFatalError() { return (analyze_ != null) && (analyze_.containsFatalError()); } + /** + * @return true si une erreur fatale est survenue + */ + public boolean containsError() { + return (analyze_ != null) && (analyze_.containsErrors()); + } /** * @return true si message Modified: trunk/framework/ctulu-common/src/main/java/org/fudaa/ctulu/CtuluListSelection.java =================================================================== --- trunk/framework/ctulu-common/src/main/java/org/fudaa/ctulu/CtuluListSelection.java 2012-04-06 17:12:47 UTC (rev 7060) +++ trunk/framework/ctulu-common/src/main/java/org/fudaa/ctulu/CtuluListSelection.java 2012-04-06 17:25:45 UTC (rev 7061) @@ -18,8 +18,8 @@ import javax.swing.ListSelectionModel; /** - * Liste de selection encapsulant un BitSet. Des methodes sont rajoutees pour gerer les operations avec d'autres listes - * d'index ou des inversions de selection dans un intervalle donne. + * Liste de selection encapsulant un BitSet. Des methodes sont rajoutees pour gerer les operations avec d'autres listes d'index ou + * des inversions de selection dans un intervalle donne. * * @see java.util.BitSet utilisation de BitSet * @version $Id: CtuluListSelection.java,v 1.8.4.1 2008-05-13 12:10:48 bmarchan Exp $ @@ -62,13 +62,14 @@ } return rtab; } - - /** liste stockant les indexs. */ + /** + * liste stockant les indexs. + */ private final BitSet index_; - - /** les listeners de cette liste de selection. */ + /** + * les listeners de cette liste de selection. + */ private Set listeners_; - CtuluListSelectionEvent evt_; /** @@ -79,7 +80,9 @@ } /** - * initialise la liste avec <code>_b</code>. Envoie une exception si <code>_b</code> est nul. + * initialise la liste avec + * <code>_b</code>. Envoie une exception si + * <code>_b</code> est nul. * * @param _b la liste des indexs */ @@ -91,25 +94,34 @@ } /** - * initialise la liste avec <code>_b</code>. Envoie une exception si <code>_b</code> est nul. + * initialise la liste avec + * <code>_b</code>. Envoie une exception si + * <code>_b</code> est nul. * * @param _b la liste des indexs */ public CtuluListSelection(final int[] _b) { if (_b != null && _b.length > 0) { - Arrays.sort(_b); - index_ = new BitSet(_b[_b.length - 1]); - for (int i = _b.length - 1; i >= 0; i--) { - if (_b[i] >= 0) { - index_.set(_b[i]); - } - } + index_ = createForSelectedIdx(_b); } else { index_ = new BitSet(50); } } + public static BitSet createForSelectedIdx(final int[] _b) { + if (_b == null|| _b.length==0) { + return null; + } + BitSet res = new BitSet(_b[_b.length - 1]); + for (int i = _b.length - 1; i >= 0; i--) { + if (_b[i] >= 0) { + res.set(_b[i]); + } + } + return res; + } + /** * Attention: le listener n'est pas copie. * @@ -126,12 +138,13 @@ } /** - * Initialise la liste de selection avec la taille <code>_taille</code>. + * Initialise la liste de selection avec la taille + * <code>_taille</code>. * * @param _taille la taille de la liste de selection. Si la taille est < 0, la taille par defaut est 0. */ public CtuluListSelection(final int _taille) { - this(new BitSet(Math.max(0,_taille))); + this(new BitSet(Math.max(0, _taille))); } private boolean add(final int _i, final boolean _event) { @@ -156,7 +169,7 @@ return r; } - private boolean clear(final boolean _event) { + private boolean clear(final boolean _event) { if (isEmpty()) { return false; } @@ -167,7 +180,7 @@ return true; } - private void fireSelectionEvent() { + private void fireSelectionEvent() { if (listeners_ != null) { if (evt_ == null) { evt_ = new CtuluListSelectionEvent(this); @@ -212,7 +225,8 @@ } /** - * Operation or avec la liste <code>_l</code>. + * Operation or avec la liste + * <code>_l</code>. * * @param _l l'argument de l'operation */ @@ -266,8 +280,8 @@ } /** - * Operation add ( soit une operation or ) avec la liste <code>_l</code>. Envoie un evt seulement si des - * changements sont effectues. + * Operation add ( soit une operation or ) avec la liste + * <code>_l</code>. Envoie un evt seulement si des changements sont effectues. * * @param _l l'argument de l'operation */ @@ -276,7 +290,8 @@ } /** - * Ajoute l'index <code>_i </code> a la selection. + * Ajoute l'index + * <code>_i </code> a la selection. * * @param _i */ @@ -294,7 +309,7 @@ return addInterval(_deb, _fin, listeners_ != null); } - public void addListeSelectionListener(final CtuluListSelectionListener _l) { + public void addListeSelectionListener(final CtuluListSelectionListener _l) { if (listeners_ == null) { listeners_ = new HashSet(5); } @@ -302,7 +317,8 @@ } /** - * Operation and avec la liste <code>_l</code>. + * Operation and avec la liste + * <code>_l</code>. * * @param _l l'argument de l'operation */ @@ -330,7 +346,7 @@ clear(true); } - public void clearListeSelectionListener() { + public void clearListeSelectionListener() { if (listeners_ != null) { listeners_.clear(); } @@ -472,7 +488,7 @@ int max = getMaxIndex(); max = max > _maxIndex ? _maxIndex : max; // Tableau temporaire stockant les indices selectionnes - TIntArrayList list=new TIntArrayList(max); + TIntArrayList list = new TIntArrayList(max); // on parcourt tous les indexs et les indexs selectionnes sont // rajoutes. for (int i = 0; i <= max; i++) { @@ -489,7 +505,8 @@ } /** - * Operation intersection ( soit une operation and) avec la liste <code>_l</code>. + * Operation intersection ( soit une operation and) avec la liste + * <code>_l</code>. * * @param _l l'argument de l'operation */ @@ -498,7 +515,8 @@ } /** - * Renvoie true si l'intersection avec <code>_l</code> non vide. + * Renvoie true si l'intersection avec + * <code>_l</code> non vide. * * @return si intersection non vide. */ @@ -539,7 +557,7 @@ * @return Empty */ public final boolean isEmpty() { - return index_.length() == 0; + return index_.length() == 0; } public boolean isOnlyOnIndexSelected() { @@ -551,7 +569,7 @@ * @return Selected */ public boolean isSelected(final int _i) { - if (_i<0||_i > getMaxIndex()) { + if (_i < 0 || _i > getMaxIndex()) { return false; } return index_.get(_i); @@ -565,7 +583,8 @@ } /** - * Operation or avec la liste <code>_l</code>. + * Operation or avec la liste + * <code>_l</code>. * * @param _l l'argument de l'operation */ @@ -574,7 +593,8 @@ } /** - * Enleve tous les indexs selectionnes de <code>_l</code>. + * Enleve tous les indexs selectionnes de + * <code>_l</code>. * * @param _l la liste des indexs a enlever. * @return true si modif @@ -598,7 +618,8 @@ } /** - * Enleve l'index <code>_i</code> a la selection. + * Enleve l'index + * <code>_i</code> a la selection. * * @param _i */ @@ -610,7 +631,7 @@ return removeInterval(_deb, _fin, listeners_ != null); } - public void removeListeSelectionListener(final CtuluListSelectionListener _l) { + public void removeListeSelectionListener(final CtuluListSelectionListener _l) { if (listeners_ != null) { listeners_.remove(_l); } @@ -671,7 +692,8 @@ } /** - * Operation xor avec la liste <code>_l</code>. + * Operation xor avec la liste + * <code>_l</code>. * * @param _l l'argument de l'operation */ Modified: trunk/framework/ebli-2d/src/main/java/org/fudaa/ebli/calque/ZCalqueSondeInteraction.java =================================================================== --- trunk/framework/ebli-2d/src/main/java/org/fudaa/ebli/calque/ZCalqueSondeInteraction.java 2012-04-06 17:12:47 UTC (rev 7060) +++ trunk/framework/ebli-2d/src/main/java/org/fudaa/ebli/calque/ZCalqueSondeInteraction.java 2012-04-06 17:25:45 UTC (rev 7061) @@ -1,9 +1,6 @@ /** - * @creation 21 janv. 2005 - * @modification $Date: 2006-09-19 14:55:45 $ - * @license GNU General Public License 2 - * @copyright (c)1998-2001 CETMEF 2 bd Gambetta F-60231 Compiegne - * @mail de...@fu... + * @creation 21 janv. 2005 @modification $Date: 2006-09-19 14:55:45 $ @license GNU General Public License 2 @copyright + * (c)1998-2001 CETMEF 2 bd Gambetta F-60231 Compiegne @mail de...@fu... */ package org.fudaa.ebli.calque; @@ -13,17 +10,15 @@ import org.fudaa.ebli.geometrie.GrPoint; - /** * @author Fred Deniger * @version $Id: ZCalqueSondeInteraction.java,v 1.8 2006-09-19 14:55:45 deniger Exp $ */ @SuppressWarnings("serial") public class ZCalqueSondeInteraction extends ZCalqueClickInteraction { - + private ZCalqueSondeInterface target_; private final ZScene zScene; - /** * liste des listener sur le calquesondeInteraction */ @@ -32,73 +27,74 @@ protected ZCalqueSondeInteraction(ZScene zScene) { super(); super.setGele(true); - this.zScene=zScene; + this.zScene = zScene; } - - public final ZCalqueSondeInterface getTarget(){ + + public final ZCalqueSondeInterface getTarget() { return target_; } - public void addZCalqueSondeListener(ZCalqueSondeListener _l) { listeners_.add(_l); } - + public void removeZCalqueSondeListener(ZCalqueSondeListener _l) { - if (listeners_.contains(_l)) + if (listeners_.contains(_l)) { listeners_.remove(_l); + } } public void notifySondeListener(final GrPoint ptReel) { - for (ZCalqueSondeListener l : listeners_){ + for (ZCalqueSondeListener l : listeners_) { l.notifySondeMoved(this, ptReel); } zScene.sondeChanged(ptReel); } - - public void mouseClicked(final MouseEvent _e){ - if(_e.isPopupTrigger()) { + public void mouseClicked(final MouseEvent _e) { + if (_e.isPopupTrigger()) { return; } mouseDragged(_e); } /** - * Ralise l'action de clic d une sonde. - * PRePRO 7 + * Ralise l'action de clic d une sonde. PRePRO 7 + * * @param pt * @param add */ - public void moveEvent(GrPoint pt,boolean add,boolean autoAppliqueTranslation){ - if(autoAppliqueTranslation) - pt.autoApplique(((BCalque)target_).getVersReel()); - target_.changeSonde(pt,add); - notifySondeListener(pt); + public void moveEvent(GrPoint pt, boolean add, boolean autoAppliqueTranslation) { + if (autoAppliqueTranslation) { + pt.autoApplique(((BCalque) target_).getVersReel()); + } + target_.changeSonde(pt, add); + notifySondeListener(pt); } - public void mouseDragged(final MouseEvent _e){ - if (target_ != null && !isGele()){ - final GrPoint pt=new GrPoint(_e.getX(),_e.getY(),0); - moveEvent(pt, _e.isShiftDown(),true); + public void mouseDragged(final MouseEvent _e) { + if (target_ != null && !isGele()) { + final GrPoint pt = new GrPoint(_e.getX(), _e.getY(), 0); + moveEvent(pt, _e.isShiftDown(), true); } } - - public void setGele(final boolean _gele){ + + public void setGele(final boolean _gele) { //to avoid loose the current sondes we do nothing here: if (target_ != null && !_gele) { target_.setSondeEnable(!_gele); } super.setGele(_gele); } - - public final void setTarget(final ZCalqueSondeInterface _target){ - if(target_==_target) { + + public final void setTarget(final ZCalqueSondeInterface _target) { + if (target_ == _target) { return; } - if(target_!=null) { + if (target_ != null) { target_.setSondeEnable(false); } target_ = _target; + target_.setSondeEnable(!isGele()); } -} \ No newline at end of file +} Modified: trunk/framework/ebli-2d/src/main/java/org/fudaa/ebli/calque/ZModeleFleche.java =================================================================== --- trunk/framework/ebli-2d/src/main/java/org/fudaa/ebli/calque/ZModeleFleche.java 2012-04-06 17:12:47 UTC (rev 7060) +++ trunk/framework/ebli-2d/src/main/java/org/fudaa/ebli/calque/ZModeleFleche.java 2012-04-06 17:25:45 UTC (rev 7061) @@ -16,5 +16,7 @@ public interface ZModeleFleche extends ZModeleSegment { boolean interpolate(final GrSegment _seg, final double _x, final double _y); + + } Modified: trunk/framework/ebli-2d/src/main/java/org/fudaa/ebli/calque/ZModeleFlecheForDensite.java =================================================================== --- trunk/framework/ebli-2d/src/main/java/org/fudaa/ebli/calque/ZModeleFlecheForDensite.java 2012-04-06 17:12:47 UTC (rev 7060) +++ trunk/framework/ebli-2d/src/main/java/org/fudaa/ebli/calque/ZModeleFlecheForDensite.java 2012-04-06 17:25:45 UTC (rev 7061) @@ -27,7 +27,7 @@ /** * Une classe permettant de cr\xE9er un modele de fleches d'apr\xE8s la grille utilis\xE9 sur une autre modele. - * + * * @author fred deniger * @version $Id: ZModeleFlecheForGrille.java 6187 2011-03-30 10:06:54Z bmarchan $ */ @@ -36,7 +36,6 @@ final FlecheGrilleData grille_; private int increment; private int nbPoint; - private final ZModeleFleche support_; public ZModeleFlecheForDensite(final ZModeleFleche _support, final FlecheGrilleData _grille) { @@ -47,6 +46,11 @@ nbPoint = support_.getNombre(); } + @Override + public void prepare() { + support_.prepare(); + } + public BuTable createValuesTable(ZCalqueAffichageDonneesInterface _layer) { return new CtuluTable(new ZCalqueFleche.ValueTableModel(this)); } @@ -190,5 +194,4 @@ public void updatePourcentage() { setIncrement(grille_.getDensiteIncrement()); } - } Modified: trunk/framework/ebli-2d/src/main/java/org/fudaa/ebli/calque/ZModeleFlecheForGrille.java =================================================================== --- trunk/framework/ebli-2d/src/main/java/org/fudaa/ebli/calque/ZModeleFlecheForGrille.java 2012-04-06 17:12:47 UTC (rev 7060) +++ trunk/framework/ebli-2d/src/main/java/org/fudaa/ebli/calque/ZModeleFlecheForGrille.java 2012-04-06 17:25:45 UTC (rev 7061) @@ -18,7 +18,7 @@ /** * Une classe permettant de cr\xE9er un modele de fleches d'apr\xE8s la grille utilis\xE9 sur une autre modele. - * + * * @author fred deniger * @version $Id$ */ @@ -26,9 +26,8 @@ final FlecheGrilleData grille_; int lastInterpolIdx_ = -1; - final GrBoite realVueBoite_ = new GrBoite(new GrPoint(-1,-1,-1), new GrPoint()); + final GrBoite realVueBoite_ = new GrBoite(new GrPoint(-1, -1, -1), new GrPoint()); final GrSegment seg_ = new GrSegment(new GrPoint(), new GrPoint()); - final ZModeleFleche support_; public ZModeleFlecheForGrille(final ZModeleFleche _support, final FlecheGrilleData _grille) { @@ -37,6 +36,13 @@ grille_ = _grille; } + @Override + public void prepare() { + if (support_ != null) { + support_. prepare(); + } + } + protected void updateBoite(ZCalqueFleche _support) { _support.getBoiteForGrille(realVueBoite_); clearCache(); @@ -103,7 +109,9 @@ } public double getX(int _i) { - if (realVueBoite_.getDeltaX() == 0) return 0D; + if (realVueBoite_.getDeltaX() == 0) { + return 0D; + } return grille_.getX(realVueBoite_, getCol(_i)); } @@ -116,7 +124,9 @@ } public double getY(int _i) { - if (realVueBoite_.getDeltaY() == 0) return 0D; + if (realVueBoite_.getDeltaY() == 0) { + return 0D; + } return grille_.getY(realVueBoite_, getRow(_i)); } @@ -151,5 +161,4 @@ public GrPoint getVertexForObject(int _ind, int vertex) { return null; } - } Modified: trunk/framework/ebli-2d/src/main/java/org/fudaa/ebli/calque/ZModeleSegment.java =================================================================== --- trunk/framework/ebli-2d/src/main/java/org/fudaa/ebli/calque/ZModeleSegment.java 2012-04-06 17:12:47 UTC (rev 7060) +++ trunk/framework/ebli-2d/src/main/java/org/fudaa/ebli/calque/ZModeleSegment.java 2012-04-06 17:25:45 UTC (rev 7061) @@ -71,4 +71,9 @@ * @return le z du point de destination */ double getZ2(int _i); + + /** + * called just before paint to restore some data. + */ + void prepare(); } Modified: trunk/framework/ebli-common/src/main/resources/org/fudaa/ebli/ressource/ebli_en.fr_txt =================================================================== --- trunk/framework/ebli-common/src/main/resources/org/fudaa/ebli/ressource/ebli_en.fr_txt 2012-04-06 17:12:47 UTC (rev 7060) +++ trunk/framework/ebli-common/src/main/resources/org/fudaa/ebli/ressource/ebli_en.fr_txt 2012-04-06 17:25:45 UTC (rev 7061) @@ -1,4 +1,6 @@ Arri\xE8re plan=Background +Rejouer=Recompute +Aucune courbe s\xE9lectionn\xE9e=No selected curves Afficher le titre=Display the title Afficher=Show Echelle logarithmique=Log scale Modified: trunk/framework/fudaa-common/src/main/java/org/fudaa/fudaa/commun/FudaaHelpPDFViewer.java =================================================================== --- trunk/framework/fudaa-common/src/main/java/org/fudaa/fudaa/commun/FudaaHelpPDFViewer.java 2012-04-06 17:12:47 UTC (rev 7060) +++ trunk/framework/fudaa-common/src/main/java/org/fudaa/fudaa/commun/FudaaHelpPDFViewer.java 2012-04-06 17:25:45 UTC (rev 7061) @@ -316,22 +316,7 @@ pdfViewer.getMenuBar().getMenu(2).add(action.buildMenuItem(EbliComponentFactory.INSTANCE),0); -// action =new EbliActionSimple(FudaaResource.FUDAA.getString("ZOOM"),FudaaResource.FUDAA.getToolIcon("zoom"),"RAFRAICHIRPDF"){ -// public void actionPerformed(ActionEvent _e) { -// java.awt.Dimension sizepdf=pdfViewer.getSize(); -// sizepdf.width+=200; -// sizepdf.height+=200; -// -// pdfViewer.getPage().setPreferredSize(new Dimension(2000,2000)); -// pdfViewer.getPage().revalidate(); -// -//// pdfViewer.repaint(); -//// pdfViewer.revalidate(); -// rafraichir(); -// } -// }; -// pdfViewer.getToolBar().add(action.buildToolButton(EbliComponentFactory.INSTANCE)); -// + action =new EbliActionSimple(FudaaLib.getS("D\xE9tacher la fen\xEAtre"),BuResource.BU.getToolIcon("pleinecran"),"PLEINEECRAN"){ public void actionPerformed(ActionEvent _e) { @@ -362,7 +347,7 @@ //-- initialiser le pdfviewer interne avec le premier pdf feuille de la liste --// if(useJarAide){ //useCtuluPdfViewer_.setSelected(true); - if(mapEntryPdfJar_!=null){ + if(mapEntryPdfJar_!=null && !mapEntryPdfJar_.isEmpty()){ openPdfJar(mapEntryPdfJar_.get(mapEntryPdfJar_.keySet().iterator().next())); } Modified: trunk/framework/fudaa-common-save/src/main/java/org/fudaa/fudaa/commun/save/FudaaSaveZipLoader.java =================================================================== --- trunk/framework/fudaa-common-save/src/main/java/org/fudaa/fudaa/commun/save/FudaaSaveZipLoader.java 2012-04-06 17:12:47 UTC (rev 7060) +++ trunk/framework/fudaa-common-save/src/main/java/org/fudaa/fudaa/commun/save/FudaaSaveZipLoader.java 2012-04-06 17:25:45 UTC (rev 7061) @@ -30,6 +30,7 @@ import com.db4o.ObjectContainer; import com.memoire.fu.FuEmptyArrays; import com.memoire.fu.FuLog; +import java.io.BufferedOutputStream; /** * @author fred deniger @@ -83,7 +84,7 @@ try { dbFile_ = File.createTempFile("fudaaTmp", ".db"); if (dbFile_ != null) { - CtuluLibFile.copyStream(file_.getInputStream(db), new FileOutputStream(dbFile_), false, true); + CtuluLibFile.copyStream(file_.getInputStream(db), new BufferedOutputStream(new FileOutputStream(dbFile_)), false, true); cont_ = Db4o.openFile(dbFile_.getAbsolutePath()); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <de...@us...> - 2012-04-17 13:48:00
|
Revision: 7073 http://fudaa.svn.sourceforge.net/fudaa/?rev=7073&view=rev Author: deniger Date: 2012-04-17 13:47:53 +0000 (Tue, 17 Apr 2012) Log Message: ----------- Modified Paths: -------------- trunk/framework/ctulu-common/src/main/resources/org/fudaa/ctulu/ctulu_en.fr_txt trunk/framework/ebli-2d/src/main/java/org/fudaa/ebli/calque/ZCalqueSondeInteraction.java trunk/framework/ebli-common/src/main/java/org/fudaa/ebli/palette/BPalettePlage.java trunk/framework/ebli-common/src/main/java/org/fudaa/ebli/palette/BPalettePlageAbstract.java trunk/framework/ebli-common/src/main/java/org/fudaa/ebli/palette/BPalettePlageDefault.java trunk/framework/ebli-common/src/main/java/org/fudaa/ebli/palette/BPalettePlageLegende.java trunk/framework/ebli-common/src/main/java/org/fudaa/ebli/palette/BPalettePlageProperties.java trunk/framework/ebli-common/src/main/java/org/fudaa/ebli/palette/PaletteSelecteurCouleurPlage.java trunk/framework/ebli-common/src/main/resources/org/fudaa/ebli/ressource/ebli_en.fr_txt trunk/framework/ebli-visuallibrary/src/main/java/org/fudaa/ebli/visuallibrary/calque/EbliWidgetCalqueLegende.java trunk/framework/pom.xml Modified: trunk/framework/ctulu-common/src/main/resources/org/fudaa/ctulu/ctulu_en.fr_txt =================================================================== --- trunk/framework/ctulu-common/src/main/resources/org/fudaa/ctulu/ctulu_en.fr_txt 2012-04-17 07:58:23 UTC (rev 7072) +++ trunk/framework/ctulu-common/src/main/resources/org/fudaa/ctulu/ctulu_en.fr_txt 2012-04-17 13:47:53 UTC (rev 7073) @@ -262,6 +262,7 @@ S\xE9lectionner au moins un dossier=Please, select a folder S\xE9lectionner au moins un fichier=Please, select a file S\xE9lectionner la variable \xE0 afficher=Select the variable to display +S\xE9lectionner les variables =Select the variables S\xE9lectionner les variables et les pas de temps=Select the variables and the time steps S\xE9lectionner les variables \xE0 ajouter=Select the variables to add S\xE9lectionner les variables \xE0 enlever=Select the variables to remove Modified: trunk/framework/ebli-2d/src/main/java/org/fudaa/ebli/calque/ZCalqueSondeInteraction.java =================================================================== --- trunk/framework/ebli-2d/src/main/java/org/fudaa/ebli/calque/ZCalqueSondeInteraction.java 2012-04-17 07:58:23 UTC (rev 7072) +++ trunk/framework/ebli-2d/src/main/java/org/fudaa/ebli/calque/ZCalqueSondeInteraction.java 2012-04-17 13:47:53 UTC (rev 7073) @@ -91,10 +91,9 @@ if (target_ == _target) { return; } + target_ = _target; if (target_ != null) { - target_.setSondeEnable(false); + target_.setSondeEnable(!isGele()); } - target_ = _target; - target_.setSondeEnable(!isGele()); } } Modified: trunk/framework/ebli-common/src/main/java/org/fudaa/ebli/palette/BPalettePlage.java =================================================================== --- trunk/framework/ebli-common/src/main/java/org/fudaa/ebli/palette/BPalettePlage.java 2012-04-17 07:58:23 UTC (rev 7072) +++ trunk/framework/ebli-common/src/main/java/org/fudaa/ebli/palette/BPalettePlage.java 2012-04-17 13:47:53 UTC (rev 7073) @@ -410,6 +410,7 @@ return false; } reduit_ = _b; + fireAllPaletteModified(); return true; } Modified: trunk/framework/ebli-common/src/main/java/org/fudaa/ebli/palette/BPalettePlageAbstract.java =================================================================== --- trunk/framework/ebli-common/src/main/java/org/fudaa/ebli/palette/BPalettePlageAbstract.java 2012-04-17 07:58:23 UTC (rev 7072) +++ trunk/framework/ebli-common/src/main/java/org/fudaa/ebli/palette/BPalettePlageAbstract.java 2012-04-17 13:47:53 UTC (rev 7073) @@ -32,9 +32,7 @@ public abstract class BPalettePlageAbstract implements BPalettePlageInterface { private static float[] tdl(final Color _c) { - if (_c == null) { - return FuEmptyArrays.FLOAT0; - } + if (_c == null) { return FuEmptyArrays.FLOAT0; } return Color.RGBtoHSB(_c.getRed(), _c.getGreen(), _c.getBlue(), null); } @@ -66,9 +64,7 @@ if (z < 0.) { z = 0.; } - if (z >= 1.) { - return _couleurMax; - } + if (z >= 1.) { return _couleurMax; } z -= Math.floor(z); float t, d, l; int n, a, amin, amax; @@ -185,9 +181,7 @@ } public void initFrom(final BPalettePlageInterface _a) { - if (_a == null) { - return; - } + if (_a == null) { return; } setTitre(_a.getTitre()); setSousTitre(_a.getSousTitre()); setSubTitleVisible(_a.isSubTitleVisible()); @@ -195,6 +189,9 @@ setSep(_a.getSep()); setFormatter(_a.getFormatter()); setLogScale(_a.isLogScale()); + if (isReduitEnable()) { + setReduit(_a.isReduit()); + } } public final void setFormatter(final CtuluNumberFormatI _formatter) { @@ -229,9 +226,7 @@ * @param _ssTitre Le sous titre. */ public void setSousTitre(final String _ssTitre) { - if (_ssTitre == null) { - return; - } + if (_ssTitre == null) { return; } if (!_ssTitre.equals(ssTitre_)) { ssTitre_ = _ssTitre; fireTitlePaletteModified(); @@ -239,7 +234,7 @@ } private String subTitleLabel; - private boolean subTitleVisible=true; + private boolean subTitleVisible = true; public boolean isSubTitleVisible() { return subTitleVisible; @@ -266,9 +261,7 @@ * @param _titre Le titre. */ public void setTitre(final String _titre) { - if (_titre == null) { - return; - } + if (_titre == null) { return; } if (!_titre.equals(titre_)) { titre_ = _titre; fireTitlePaletteModified(); @@ -282,7 +275,8 @@ updatePlageLegendes(this, getFormatter(), sep_); } - public static void updatePlageLegendes(final TraceIsoPlageInterface plages, final CtuluNumberFormatI fmt, final String sep) { + public static void updatePlageLegendes(final TraceIsoPlageInterface plages, final CtuluNumberFormatI fmt, + final String sep) { for (int i = plages.getNbPlages() - 1; i >= 0; i--) { plages.getPlageInterface(i).ajusteLegendes(fmt, sep); } Modified: trunk/framework/ebli-common/src/main/java/org/fudaa/ebli/palette/BPalettePlageDefault.java =================================================================== --- trunk/framework/ebli-common/src/main/java/org/fudaa/ebli/palette/BPalettePlageDefault.java 2012-04-17 07:58:23 UTC (rev 7072) +++ trunk/framework/ebli-common/src/main/java/org/fudaa/ebli/palette/BPalettePlageDefault.java 2012-04-17 13:47:53 UTC (rev 7073) @@ -58,13 +58,15 @@ public BPalettePlageDefault() { } + + boolean reduit; public JComponent createReduit() { return null; } public boolean isReduit() { - return false; + return reduit; } public boolean isLogScale() { @@ -77,11 +79,12 @@ } public boolean isReduitEnable() { - return false; + return true; } public boolean setReduit(final boolean _b) { - return false; + reduit=_b; + return true; } public void load(final BPalettePlageProperties _prop) { Modified: trunk/framework/ebli-common/src/main/java/org/fudaa/ebli/palette/BPalettePlageLegende.java =================================================================== --- trunk/framework/ebli-common/src/main/java/org/fudaa/ebli/palette/BPalettePlageLegende.java 2012-04-17 07:58:23 UTC (rev 7072) +++ trunk/framework/ebli-common/src/main/java/org/fudaa/ebli/palette/BPalettePlageLegende.java 2012-04-17 13:47:53 UTC (rev 7073) @@ -395,10 +395,8 @@ } } - public boolean isUseReduit() { - return model_ != null && model_.isReduit(); - } + public void setUseReduit(final boolean _useReduit) { if (reduit_ != null) { pnMainPanel.remove(reduit_); Modified: trunk/framework/ebli-common/src/main/java/org/fudaa/ebli/palette/BPalettePlageProperties.java =================================================================== --- trunk/framework/ebli-common/src/main/java/org/fudaa/ebli/palette/BPalettePlageProperties.java 2012-04-17 07:58:23 UTC (rev 7072) +++ trunk/framework/ebli-common/src/main/java/org/fudaa/ebli/palette/BPalettePlageProperties.java 2012-04-17 13:47:53 UTC (rev 7073) @@ -24,7 +24,6 @@ private boolean ssTitreVisible=true; private String titre_; private String formatterPattern_; - // private CtuluNumberFormatI fmt_; private String sep_; private BPlageInterface[] plages_; private boolean isReduit_; Modified: trunk/framework/ebli-common/src/main/java/org/fudaa/ebli/palette/PaletteSelecteurCouleurPlage.java =================================================================== --- trunk/framework/ebli-common/src/main/java/org/fudaa/ebli/palette/PaletteSelecteurCouleurPlage.java 2012-04-17 07:58:23 UTC (rev 7072) +++ trunk/framework/ebli-common/src/main/java/org/fudaa/ebli/palette/PaletteSelecteurCouleurPlage.java 2012-04-17 13:47:53 UTC (rev 7073) @@ -60,8 +60,8 @@ * @author Fred Deniger * @version $Id: PaletteSelecteurCouleurPlage.java,v 1.10 2007-06-05 08:58:38 deniger Exp $ */ -public class PaletteSelecteurCouleurPlage extends JPanel implements PropertyChangeListener, ListSelectionListener, ActionListener, MouseListener, - BPalettePanelInterface, BuBorders { +public class PaletteSelecteurCouleurPlage extends JPanel implements PropertyChangeListener, ListSelectionListener, + ActionListener, MouseListener, BPalettePanelInterface, BuBorders { class PlageTableModel extends AbstractListModel implements TraceIsoPlageInterface { @@ -219,6 +219,7 @@ JLabel lbPalTitle_; JCheckBox subTitleVisible; + JCheckBox cbReduit; JList list_; @@ -254,23 +255,25 @@ public PaletteSelecteurCouleurPlage() { super(); - final BuBorderLayout lay = new BuBorderLayout(2, 2); - setLayout(lay); - final BuPanel top = new BuPanel(lay); + setLayout(new BuBorderLayout(2, 2)); + final BuPanel top = new BuPanel(new BuVerticalLayout(2)); lbPalTitle_ = new BuLabel(); lbPalTitle_.setHorizontalTextPosition(SwingConstants.CENTER); lbPalTitle_.setHorizontalAlignment(SwingConstants.CENTER); lbPalTitle_.setFont(BuLib.deriveFont(lbPalTitle_.getFont(), Font.BOLD, 0)); subTitleVisible = new JCheckBox(); subTitleVisible.setVisible(false); - top.add(lbPalTitle_, BuBorderLayout.NORTH); - top.add(subTitleVisible, BuBorderLayout.CENTER); + cbReduit = new JCheckBox(); + cbReduit.setText(EbliLib.getS("L\xE9gende r\xE9duite")); + tfTitlePalette_ = new BuTextField(10); final BuPanel pnTitle = new BuPanel(new BuGridLayout(2)); - // pnTitle.setBorder(BorderFactory.createTitledBorder(EbliResource.getS("G\xE9n\xE9ral"))); pnTitle.add(new BuLabel(EbliLib.getS("Titre:"))); pnTitle.add(tfTitlePalette_); - top.add(pnTitle, BuBorderLayout.SOUTH); + top.add(lbPalTitle_); + top.add(pnTitle); + top.add(subTitleVisible); + top.add(cbReduit); top.setBorder(EMPTY3333); add(top, BuBorderLayout.NORTH); list_ = new BuEmptyList(); @@ -285,7 +288,7 @@ sp_.setPreferredWidth(70); add(sp_, BuBorderLayout.CENTER); final BuPanel east = new BuPanel(); - east.setLayout(lay); + east.setLayout(new BuBorderLayout(2, 2)); final BuPanel pnColor = new BuPanel(); pnColor.setLayout(new BuButtonLayout(1, SwingConstants.LEFT)); btAssombrir_ = new BuToolButton(); @@ -353,6 +356,9 @@ if (subTitleVisible.isVisible()) { default_.setSubTitleVisible(subTitleVisible.isSelected()); } + if(cbReduit.isEnabled()){ + default_.setReduit(cbReduit.isSelected()); + } target_.setPaletteCouleurPlages(default_); } } @@ -426,19 +432,15 @@ } private void actionSplit() { - if (plageEnCours_ == null) { - return; - } + if (plageEnCours_ == null) { return; } JSpinner spinner = new JSpinner(new SpinnerNumberModel(2, 2, 100, 1)); CtuluDialogPanel pn = new CtuluDialogPanel(); pn.setLayout(new BuHorizontalLayout()); pn.addLabel(EbliLib.getS("Nombre de plages \xE0 cr\xE9er")); pn.add(spinner); - if (!pn.afficheModaleOk(this)) - return; + if (!pn.afficheModaleOk(this)) return; int nb = ((Number) spinner.getValue()).intValue(); - if (nb < 2) - return; + if (nb < 2) return; final double min = plageEnCours_.getMin(); final double max = plageEnCours_.getMax(); final int lengthMin = plageEnCours_.getMinString().length(); @@ -461,13 +463,12 @@ final BPlage nplage = new BPlage(plageEnCours_); double mini = min + i * step; double maxi = min + (i + 1) * step; - if (i == nb - 1) - maxi = max; - nplage.setMinMax(Double.parseDouble(default_.formatter_.format(mini)), Double.parseDouble(default_.formatter_.format(maxi))); + if (i == nb - 1) maxi = max; + nplage.setMinMax(Double.parseDouble(default_.formatter_.format(mini)), + Double.parseDouble(default_.formatter_.format(maxi))); nplage.ajusteLegendes(default_.formatter_, default_.sep_); nplage.setCouleur(BPalettePlageAbstract.getCouleur(minColor, sup, (double) i / nb)); - if (isLast) - plages_.add(nplage); + if (isLast) plages_.add(nplage); else plages_.add(idx + i, nplage); } model_.fireAdd(idx + 1, idx + nb - 1); @@ -494,9 +495,13 @@ btColor_.setEnabled(_pal != null); if (target_ == null) { setTitre(CtuluLibString.EMPTY_STRING); + cbReduit.setSelected(false); + cbReduit.setEnabled(false); } else { final String dataDesc = target_.getDataDescription(); setTitre(dataDesc == null ? CtuluLibString.EMPTY_STRING : dataDesc); + cbReduit.setSelected(target_.getPaletteCouleur()!=null && target_.getPaletteCouleur().isReduit()); + cbReduit.setEnabled(target_.getPaletteCouleur()!=null && target_.getPaletteCouleur().isReduitEnable()); } } @@ -543,8 +548,7 @@ } else if (tfPlageLeg_ != null) { tfPlageLeg_.setText(CtuluLibString.EMPTY_STRING); } - if (tfPlageLeg_ != null) - tfPlageLeg_.setEnabled(cbChangedLeg_.isSelected()); + if (tfPlageLeg_ != null) tfPlageLeg_.setEnabled(cbChangedLeg_.isSelected()); } }); @@ -566,17 +570,13 @@ } BPlageAbstract getMaxPlage() { - if (list_.getModel().getSize() == 0) { - return null; - } + if (list_.getModel().getSize() == 0) { return null; } return (BPlageAbstract) list_.getModel().getElementAt(0); } double[] getMinMax() { final double[] r = new double[2]; - if ((plages_ == null) || (plages_.size() == 0)) { - return null; - } + if ((plages_ == null) || (plages_.size() == 0)) { return null; } BPlage p = (BPlage) plages_.get(0); r[0] = p.getMin(); r[1] = p.getMax(); @@ -595,9 +595,7 @@ } BPlageAbstract getMinPlage() { - if (list_.getModel().getSize() == 0) { - return null; - } + if (list_.getModel().getSize() == 0) { return null; } return (BPlageAbstract) list_.getModel().getElementAt(list_.getModel().getSize() - 1); } @@ -652,14 +650,14 @@ protected void ajusteAllLegendes(boolean fireEvent) { BPalettePlageAbstract.updatePlageLegendes(model_, default_.formatter_, default_.sep_); - if (fireEvent) - model_.fireAllModified(); + if (fireEvent) model_.fireAllModified(); } protected final boolean ajusteSelectedPlageLegende(final boolean _fireEvent) { if (!isDiscreteTarget_ && plageEnCours_ != null) { final BPlage p = (BPlage) plageEnCours_; - if (p != null && (valueEditor_.isValueValidFromComponent(txtMin_)) && (valueEditor_.isValueValidFromComponent(txtMax_))) { + if (p != null && (valueEditor_.isValueValidFromComponent(txtMin_)) + && (valueEditor_.isValueValidFromComponent(txtMax_))) { double nmin = Double.parseDouble(valueEditor_.getStringValue(txtMin_)); double nmax = Double.parseDouble(valueEditor_.getStringValue(txtMax_)); @@ -755,24 +753,19 @@ } } - public void doAfterDisplay() { - } + public void doAfterDisplay() {} public JComponent getComponent() { return this; } - public void mouseClicked(final MouseEvent _e) { - } + public void mouseClicked(final MouseEvent _e) {} - public void mouseEntered(final MouseEvent _e) { - } + public void mouseEntered(final MouseEvent _e) {} - public void mouseExited(final MouseEvent _e) { - } + public void mouseExited(final MouseEvent _e) {} - public void mousePressed(final MouseEvent _e) { - } + public void mousePressed(final MouseEvent _e) {} public void mouseReleased(final MouseEvent _e) { if (!isDiscreteTarget_ && EbliLib.isPopupMouseEvent(_e)) { @@ -791,8 +784,7 @@ } } - public void paletteDeactivated() { - } + public void paletteDeactivated() {} public void propertyChange(final PropertyChangeEvent _evt) { setTargetPalette(target_, true); @@ -800,9 +792,7 @@ public boolean setPalettePanelTarget(final Object _target) { - if (_target instanceof BPalettePlageTarget) { - return setTargetPalette((BPalettePlageTarget) _target); - } + if (_target instanceof BPalettePlageTarget) { return setTargetPalette((BPalettePlageTarget) _target); } return setTargetPalette(null); } @@ -826,6 +816,8 @@ if (target_ == null) { setPlages(null); setTitre(CtuluLibString.EMPTY_STRING); + cbReduit.setSelected(false); + cbReduit.setEnabled(false); tfTitlePalette_.setText(CtuluLibString.EMPTY_STRING); btFormat_.setEnabled(false); } else if (_m != null) { @@ -848,6 +840,8 @@ setPlages(_m.getPaletteCouleur()); final String dataDesc = _m.getDataDescription(); setTitre(_m.getTitle() + dataDesc == null ? CtuluLibString.EMPTY_STRING : (CtuluLibString.ESPACE + dataDesc)); + cbReduit.setSelected(_m.getPaletteCouleur() != null && _m.getPaletteCouleur().isReduit()); + cbReduit.setEnabled(_m.getPaletteCouleur() != null && _m.getPaletteCouleur().isReduitEnable()); String subTitleLabel = _m.getPaletteCouleur().getSubTitleLabel(); if (subTitleLabel != null) { subTitleVisible.setVisible(true); Modified: trunk/framework/ebli-common/src/main/resources/org/fudaa/ebli/ressource/ebli_en.fr_txt =================================================================== --- trunk/framework/ebli-common/src/main/resources/org/fudaa/ebli/ressource/ebli_en.fr_txt 2012-04-17 07:58:23 UTC (rev 7072) +++ trunk/framework/ebli-common/src/main/resources/org/fudaa/ebli/ressource/ebli_en.fr_txt 2012-04-17 13:47:53 UTC (rev 7073) @@ -410,6 +410,7 @@ Lumi\xE8re=Light Lumi\xE8res=Lights L\xE9gende=Legend +L\xE9gende r\xE9duite=Compact legend L\xE9gende\: utiliser une norme fixe=Legend\: Use a fixed norm Maintenez le bouton gauche de la souris pour d\xE9placer la vue=Pressed the left button and move the mouse to fly through the view Manuel\: Nombre de graduations=Manual\: Number of graduations Modified: trunk/framework/ebli-visuallibrary/src/main/java/org/fudaa/ebli/visuallibrary/calque/EbliWidgetCalqueLegende.java =================================================================== --- trunk/framework/ebli-visuallibrary/src/main/java/org/fudaa/ebli/visuallibrary/calque/EbliWidgetCalqueLegende.java 2012-04-17 07:58:23 UTC (rev 7072) +++ trunk/framework/ebli-visuallibrary/src/main/java/org/fudaa/ebli/visuallibrary/calque/EbliWidgetCalqueLegende.java 2012-04-17 13:47:53 UTC (rev 7073) @@ -2,7 +2,6 @@ import java.awt.BorderLayout; import java.awt.Component; -import java.awt.Dimension; import java.awt.Font; import java.awt.Rectangle; import java.awt.event.ActionEvent; @@ -10,7 +9,6 @@ import java.beans.PropertyChangeEvent; import java.beans.PropertyChangeListener; import java.util.ArrayList; -import java.util.EnumSet; import java.util.Iterator; import java.util.List; @@ -21,8 +19,13 @@ import javax.swing.JPanel; import javax.swing.SwingConstants; +import com.memoire.bu.BuButton; +import com.memoire.bu.BuLib; +import com.memoire.bu.BuPanel; +import com.memoire.bu.BuResource; +import com.memoire.fu.FuLog; + import org.fudaa.ctulu.CtuluCommandContainer; -import org.fudaa.ctulu.CtuluLibString; import org.fudaa.ctulu.gui.CtuluLibSwing; import org.fudaa.ebli.calque.BCalqueAffichage; import org.fudaa.ebli.calque.BCalqueLegendePanel; @@ -43,20 +46,13 @@ import org.netbeans.api.visual.border.BorderFactory; import org.netbeans.api.visual.layout.LayoutFactory.SerialAlignment; import org.netbeans.api.visual.model.ObjectState; +import org.netbeans.api.visual.widget.ComponentWidget; import org.netbeans.api.visual.widget.LabelWidget; import org.netbeans.api.visual.widget.LabelWidget.Alignment; import org.netbeans.api.visual.widget.LabelWidget.VerticalAlignment; import org.netbeans.api.visual.widget.Widget; -import org.netbeans.modules.visual.action.InplaceEditorAction; import org.netbeans.modules.visual.layout.FlowLayout; -import com.memoire.bu.BuButton; -import com.memoire.bu.BuIcon; -import com.memoire.bu.BuLib; -import com.memoire.bu.BuPanel; -import com.memoire.bu.BuResource; -import com.memoire.fu.FuLog; - /** * Creation de la classe widget specifique au calque. Permet de gerer le resize via le changement de font */ @@ -75,7 +71,8 @@ List<EbliWidgetPlage> plagesWithSingleParts; @SuppressWarnings("unchecked") - public EbliWidgetCalqueLegende(final EbliScene _scene, final boolean _controller, final BCalqueLegendePanel _legendePanel) { + public EbliWidgetCalqueLegende(final EbliScene _scene, final boolean _controller, + final BCalqueLegendePanel _legendePanel) { super(_scene, _controller); setCheckClipping(true); @@ -181,14 +178,9 @@ return palette; } - /** - * @return the plages - */ - public List<EbliWidgetPlage> getPlagesWithTreeParts() { - return plagesWithTreeParts; - } - public void notifyClosing(final EditorController _controller, final Widget _widget, final JComponent _editor, final boolean _commit) { + public void notifyClosing(final EditorController _controller, final Widget _widget, final JComponent _editor, + final boolean _commit) { editingStop(_editor); } @@ -409,26 +401,34 @@ final Widget ws = new Widget(_scene); ws.setLayout(new FlowLayout(true, SerialAlignment.LEFT_TOP, 2)); int nbPlages = listeplages.getNbPlages(); + if (nbPlages != 0) { - // pour l'alignement des labels plagesWithTreeParts = new ArrayList<EbliWidgetPlage>(nbPlages); plagesWithSingleParts = new ArrayList<EbliWidgetPlage>(nbPlages); - for (int j = nbPlages - 1; j >= 0; j--) { + if (listeplages.isReduit()) { + JComponent createReduit = listeplages.createReduit(); + ws.addChild(new ComponentWidget(_scene, createReduit)); - final BPlageInterface plage = listeplages.getPlageInterface(j); + } else { + // pour l'alignement des labels + + for (int j = nbPlages - 1; j >= 0; j--) { - // -- ajout d'une widget plage --// - final EbliWidgetPlage lw = new EbliWidgetPlage(_scene, plage); - lw.updateFont(pal.getFont()); + final BPlageInterface plage = listeplages.getPlageInterface(j); - lw.setUseBorder(false); - lw.setEnabled(true); - if (lw.isThreePart()) { - plagesWithTreeParts.add(lw); - } else { - plagesWithSingleParts.add(lw); + // -- ajout d'une widget plage --// + final EbliWidgetPlage lw = new EbliWidgetPlage(_scene, plage); + lw.updateFont(pal.getFont()); + + lw.setUseBorder(false); + lw.setEnabled(true); + if (lw.isThreePart()) { + plagesWithTreeParts.add(lw); + } else { + plagesWithSingleParts.add(lw); + } + ws.addChild(lw); } - ws.addChild(lw); } } else if (!isFleche) { @@ -499,9 +499,7 @@ } public void setSubTitleVisible(boolean visible) { - if (subTitleWidget == null || visible == isSubTitleVisible()) { - return; - } + if (subTitleWidget == null || visible == isSubTitleVisible()) { return; } if (PaletteSelecteurCouleurPlage.isTargetValid(legendePanel_.getCalque())) { BPalettePlageTarget target = (BPalettePlageTarget) legendePanel_.getCalque(); target.getPaletteCouleur().setSubTitleVisible(visible); Modified: trunk/framework/pom.xml =================================================================== --- trunk/framework/pom.xml 2012-04-17 07:58:23 UTC (rev 7072) +++ trunk/framework/pom.xml 2012-04-17 13:47:53 UTC (rev 7073) @@ -298,11 +298,13 @@ <groupId>java3d</groupId> <artifactId>j3d-core</artifactId> <version>1.3.1</version> + <scope>provided</scope> </dependency> <dependency> <groupId>java3d</groupId> <artifactId>j3d-core-utils</artifactId> <version>1.3.1</version> + <scope>provided</scope> </dependency> <dependency> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <de...@us...> - 2012-05-10 21:16:35
|
Revision: 7184 http://fudaa.svn.sourceforge.net/fudaa/?rev=7184&view=rev Author: deniger Date: 2012-05-10 21:16:29 +0000 (Thu, 10 May 2012) Log Message: ----------- maj Modified Paths: -------------- trunk/framework/ctulu-common/src/main/java/org/fudaa/ctulu/CtuluAnalyze.java trunk/framework/ctulu-common/src/main/java/org/fudaa/ctulu/CtuluIOOperationSynthese.java trunk/framework/fudaa-dico/ui/src/main/java/org/fudaa/fudaa/fdico/FDicoParams.java Modified: trunk/framework/ctulu-common/src/main/java/org/fudaa/ctulu/CtuluAnalyze.java =================================================================== --- trunk/framework/ctulu-common/src/main/java/org/fudaa/ctulu/CtuluAnalyze.java 2012-05-10 21:16:04 UTC (rev 7183) +++ trunk/framework/ctulu-common/src/main/java/org/fudaa/ctulu/CtuluAnalyze.java 2012-05-10 21:16:29 UTC (rev 7184) @@ -23,16 +23,15 @@ import java.util.logging.LogRecord; /** - * Cette classe sert a transmettre les informations d'une operation de lecture ou d'ecriture. Les informations et les - * erreurs de l'operation sont stockees avec eventuellement leur numero de ligne. - * + * Cette classe sert a transmettre les informations d'une operation de lecture ou d'ecriture. Les informations et les erreurs de + * l'operation sont stockees avec eventuellement leur numero de ligne. + * * @author deniger * @version $Id: CtuluAnalyze.java,v 1.12 2007-05-21 10:28:29 deniger Exp $ */ public class CtuluAnalyze { public static final Level ERROR = Level.SEVERE; - public static Level FATAL = Level.ALL; /** @@ -44,20 +43,16 @@ /** * Constructeur pr\xE9cisant le resourceBundle \xE0 utiliser - * + * * @param defaultResourceBundle */ public CtuluAnalyze(final ResourceBundle defaultResourceBundle) { super(); this.defaultResourceBundle = defaultResourceBundle; } - ResourceBundle defaultResourceBundle; - private String desc = "Analyzing"; - protected final List<LogRecord> logs = new ArrayList<LogRecord>(); - private String ressource; /** @@ -142,7 +137,7 @@ /** * Initialise le champ "erreur fatale". Si une erreur fatale a deja ete initialisee, ne fait rien. - * + * * @param _m le message * @param _index le num de ligne */ @@ -160,7 +155,7 @@ /** * Initialise le champ "erreur fatale". Si une erreur fatale a deja ete initialisee, ne fait rien. - * + * * @param _m le message * @param _in pour recuperer le num de ligne */ @@ -216,7 +211,6 @@ // public LogRecord addRecord(final Level level, final String msg) { // return addRecord(level, msg, null); // } - /** * @param level le level * @param msg le message @@ -310,7 +304,9 @@ */ public boolean containsLevel(final Level l) { for (final LogRecord log : logs) { - if (l.equals(log.getLevel())) { return true; } + if (l.equals(log.getLevel())) { + return true; + } } return false; } @@ -356,19 +352,21 @@ public String getResume() { return getDesc() + "\n" + CtuluDefaultLogFormatter.format(logs); } - + public String getFatalError() { LogRecord log = getFirstOfLevel(FATAL); return log == null ? null : CtuluDefaultLogFormatter.DEFAULT.format(log); } - + /** * @param l le level a tester * @return true si au moins un message et de niveau l. */ private LogRecord getFirstOfLevel(final Level l) { for (final LogRecord log : logs) { - if (l.equals(log.getLevel())) { return log; } + if (l.equals(log.getLevel())) { + return log; + } } return null; } @@ -396,13 +394,13 @@ * @param msg le message */ public void manageException(final Exception _e, final String msg) { - addRecord(Level.SEVERE, msg).setThrown(_e); + addRecord(FATAL, msg).setThrown(_e); _e.printStackTrace(); } /** * Ajoute un message d'erreur. - * + * * @param _e l'exception a loguer */ public void manageException(final FileNotFoundException _e) { @@ -418,7 +416,7 @@ /** * Ajoute un message d'erreur. - * + * * @param _e l'exception a loguer */ public void manageException(final IOException _e) { @@ -441,16 +439,17 @@ public void manageExceptionFromFile(final Exception _e, final String msg, final int line) { addRecord(Level.SEVERE, msg, line).setThrown(_e); } - public String getDesci18n() { - if (defaultResourceBundle == null) return desc; + if (defaultResourceBundle == null) { + return desc; + } return defaultResourceBundle.getString(desc); } /** * Ajoute tous les canaux de l'analyse passee en parametres. Les pointeurs sont copiees. - * + * * @param _analyze l'analyse a ajouter a celle-ci */ public void merge(final CtuluAnalyze _analyze) { Modified: trunk/framework/ctulu-common/src/main/java/org/fudaa/ctulu/CtuluIOOperationSynthese.java =================================================================== --- trunk/framework/ctulu-common/src/main/java/org/fudaa/ctulu/CtuluIOOperationSynthese.java 2012-05-10 21:16:04 UTC (rev 7183) +++ trunk/framework/ctulu-common/src/main/java/org/fudaa/ctulu/CtuluIOOperationSynthese.java 2012-05-10 21:16:29 UTC (rev 7184) @@ -31,7 +31,7 @@ /** * @return true si une erreur fatale est survenue */ - public boolean containsFatalError() { + public boolean containsSevereError() { return (analyze_ != null) && (analyze_.containsFatalError()); } /** Modified: trunk/framework/fudaa-dico/ui/src/main/java/org/fudaa/fudaa/fdico/FDicoParams.java =================================================================== --- trunk/framework/fudaa-dico/ui/src/main/java/org/fudaa/fudaa/fdico/FDicoParams.java 2012-05-10 21:16:04 UTC (rev 7183) +++ trunk/framework/fudaa-dico/ui/src/main/java/org/fudaa/fudaa/fdico/FDicoParams.java 2012-05-10 21:16:29 UTC (rev 7184) @@ -565,7 +565,7 @@ } final CtuluIOOperationSynthese syn = getFileFormatVersion().read(_n, _progress); final DicoCasInterface inter = (DicoCasInterface) syn.getSource(); - if (syn.containsFatalError()) { + if (syn.containsSevereError()) { ui_.error(FudaaLib.getS("lecture") + CtuluLibString.ESPACE + _n.getName(), syn.getAnalyze().getFatalError(), false); return null; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <de...@us...> - 2012-05-25 17:08:23
|
Revision: 7235 http://fudaa.svn.sourceforge.net/fudaa/?rev=7235&view=rev Author: deniger Date: 2012-05-25 17:08:16 +0000 (Fri, 25 May 2012) Log Message: ----------- Modified Paths: -------------- trunk/framework/ebli-2d/src/main/java/org/fudaa/ebli/calque/ZCalqueGeometry.java trunk/framework/ebli-2d/src/main/java/org/fudaa/ebli/calque/ZCalqueLigneBrisee.java trunk/framework/ebli-2d/src/main/java/org/fudaa/ebli/calque/ZCalquePoint.java trunk/framework/ebli-common/src/main/java/org/fudaa/ebli/trace/TraceIcon.java trunk/framework/ebli-common/src/main/java/org/fudaa/ebli/trace/TraceIconModel.java Modified: trunk/framework/ebli-2d/src/main/java/org/fudaa/ebli/calque/ZCalqueGeometry.java =================================================================== --- trunk/framework/ebli-2d/src/main/java/org/fudaa/ebli/calque/ZCalqueGeometry.java 2012-05-25 16:28:29 UTC (rev 7234) +++ trunk/framework/ebli-2d/src/main/java/org/fudaa/ebli/calque/ZCalqueGeometry.java 2012-05-25 17:08:16 UTC (rev 7235) @@ -114,6 +114,7 @@ protected EbliListeSelectionMulti creeSelectionMulti() { return new EbliListeSelectionMulti(modeleDonnees().getNombre() / 2); } + protected void initTrace(final TraceIconModel _icon, final int _idxPoly) { _icon.updateData(getIconModel(0)); Modified: trunk/framework/ebli-2d/src/main/java/org/fudaa/ebli/calque/ZCalqueLigneBrisee.java =================================================================== --- trunk/framework/ebli-2d/src/main/java/org/fudaa/ebli/calque/ZCalqueLigneBrisee.java 2012-05-25 16:28:29 UTC (rev 7234) +++ trunk/framework/ebli-2d/src/main/java/org/fudaa/ebli/calque/ZCalqueLigneBrisee.java 2012-05-25 17:08:16 UTC (rev 7235) @@ -175,8 +175,6 @@ tl= ligneModel_.buildCopy(); final TraceLigneModel ligneModel = tl.getModel(); - final TraceIconModel iconeModel = iconModel_ == null ? null : new TraceIconModel(iconModel_); - final TraceIcon icone = iconeModel == null ? null : new TraceIcon(iconeModel); final GrBoite bPoly = new GrBoite(); bPoly.o_ = new GrPoint(); bPoly.e_ = new GrPoint(); Modified: trunk/framework/ebli-2d/src/main/java/org/fudaa/ebli/calque/ZCalquePoint.java =================================================================== --- trunk/framework/ebli-2d/src/main/java/org/fudaa/ebli/calque/ZCalquePoint.java 2012-05-25 16:28:29 UTC (rev 7234) +++ trunk/framework/ebli-2d/src/main/java/org/fudaa/ebli/calque/ZCalquePoint.java 2012-05-25 17:08:16 UTC (rev 7235) @@ -125,7 +125,8 @@ protected ZModelePoint modele_; /** - * */ + * + */ public ZCalquePoint() { this(null); } @@ -276,13 +277,7 @@ } final double z = p_.z_; p_.autoApplique(_versEcran); - if (!rapide && isPaletteCouleurUsed_ && (paletteCouleur_ != null)) { - Color c = ((BPalettePlage) paletteCouleur_).getColorFor(z); - if (attenue) { - c = attenueCouleur(c); - } - icone.setCouleur(c); - } + initTrace(icone.getModel(), i, p_.z_); icone.paintIconCentre(this, _g, (int) p_.x_, (int) p_.y_); paintLabels(_g, i, p_); } @@ -297,6 +292,22 @@ return icone; } + /** + * Called for each point. By default use to color palette to set the color + * @param model + * @param i + * @param z + */ + protected void initTrace(TraceIconModel model, int i, double z) { + if (!isRapide() && isPaletteCouleurUsed_ && (paletteCouleur_ != null)) { + Color c = ((BPalettePlage) paletteCouleur_).getColorFor(z); + if (isAttenue()) { + c = attenueCouleur(c); + } + model.setCouleur(c); + } + } + public LineString getSelectedLine() { if (getNbSelected() != 2) { return null; Modified: trunk/framework/ebli-common/src/main/java/org/fudaa/ebli/trace/TraceIcon.java =================================================================== --- trunk/framework/ebli-common/src/main/java/org/fudaa/ebli/trace/TraceIcon.java 2012-05-25 16:28:29 UTC (rev 7234) +++ trunk/framework/ebli-common/src/main/java/org/fudaa/ebli/trace/TraceIcon.java 2012-05-25 17:08:16 UTC (rev 7235) @@ -37,16 +37,7 @@ public final static int PLUS_DOUBLE = 13; public final static int CARRE_ARRONDI = 14; private TraceIconModel model_; - private TraceLigne traceLigne; - public void setTraceLigne(TraceLigne traceLigne) { - this.traceLigne = traceLigne; - } - - public TraceLigne getTraceLigne() { - return traceLigne; - } - public final TraceIconModel getModel() { return model_; } @@ -105,20 +96,7 @@ public Color getCouleur() { return model_.couleur_; } - private Color filledColor; - /** - * used for shape that are not filled ( circle, ...) If not null, the shape will be fill with this color. - * @return - */ - public Color getFilledColor() { - return filledColor; - } - - public void setFilledColor(Color filledColor) { - this.filledColor = filledColor; - } - public void paintIcon(final Component _c, final Graphics _g, final int _x, final int _y) { Color old = null; if (model_.couleur_ != null) { @@ -127,8 +105,10 @@ } final Graphics2D g2d = (Graphics2D) _g; Stroke oldStroke = (g2d).getStroke(); - if (traceLigne != null) { - traceLigne.initialisationGraphics(g2d); + + if (model_.typeLigne_ > 0 && model_.epaisseurLigne_ > 0) { + TraceLigneModel ligneModel = new TraceLigneModel(model_.typeLigne_, model_.epaisseurLigne_, g2d.getColor()); + new TraceLigne(ligneModel).initialisationGraphics(g2d); } final int x = _x; final int y = _y; @@ -176,22 +156,23 @@ _g.drawLine(x, y + taille - 1, x + taille - 1, y); break; case CARRE: - if (filledColor != null) { + if (model_.backgroundColor != null) { Color current = _g.getColor(); - _g.setColor(filledColor); + _g.setColor(model_.backgroundColor); _g.fillRect(x, y, taille - 1, taille - 1); _g.setColor(current); } _g.drawRect(x, y, taille - 1, taille - 1); break; case CARRE_ARRONDI: - if (filledColor != null) { + int arc = Math.max(1, (int) (taille * 0.2)); + if (model_.backgroundColor != null) { Color current = _g.getColor(); - _g.setColor(filledColor); - _g.fillRoundRect(x, y, taille - 1, taille - 1, 1, 1); + _g.setColor(model_.backgroundColor); + _g.fillRoundRect(x, y, taille - 1, taille - 1, arc, arc); _g.setColor(current); } - _g.drawRoundRect(x, y, taille - 1, taille - 1, 1, 1); + _g.drawRoundRect(x, y, taille - 1, taille - 1, arc, arc); break; case CARRE_SELECTION: _g.drawRect(x, y, taille - 1, taille - 1); @@ -229,9 +210,9 @@ y + taille - 1}, 4); break; case CERCLE: - if (filledColor != null) { + if (model_.backgroundColor != null) { Color current = _g.getColor(); - _g.setColor(filledColor); + _g.setColor(model_.backgroundColor); _g.fillArc(x, y, taille - 1, taille - 1, 0, 360); _g.setColor(current); } Modified: trunk/framework/ebli-common/src/main/java/org/fudaa/ebli/trace/TraceIconModel.java =================================================================== --- trunk/framework/ebli-common/src/main/java/org/fudaa/ebli/trace/TraceIconModel.java 2012-05-25 16:28:29 UTC (rev 7234) +++ trunk/framework/ebli-common/src/main/java/org/fudaa/ebli/trace/TraceIconModel.java 2012-05-25 17:08:16 UTC (rev 7235) @@ -18,9 +18,11 @@ public class TraceIconModel { Color couleur_; + Color backgroundColor; int taille_; - int type_; + float epaisseurLigne_ = 1f; + int typeLigne_ = TraceLigne.LISSE; public TraceIconModel() { setDefaults(); @@ -34,7 +36,9 @@ } public boolean equals(Object _obj) { - if (_obj == this) return true; + if (_obj == this) { + return true; + } if (_obj instanceof TraceIconModel) { TraceIconModel other = (TraceIconModel) _obj; return taille_ == other.taille_ && type_ == other.type_ && CtuluLib.isEquals(couleur_, other.couleur_); @@ -107,10 +111,22 @@ return taille_ < 0; } + public boolean isEpaisseurIgnored() { + return epaisseurLigne_ < 0; + } + public boolean isTypeIgnored() { return type_ < 0; } + public boolean isTypeLigneIgnored() { + return typeLigne_ < 0; + } + + public boolean isBackgroundColorIgnored() { + return backgroundColor == null; + } + public boolean keepCommonValues(final TraceIconModel _d) { if (type_ != _d.type_) { type_ = -1; @@ -121,7 +137,16 @@ if (couleur_ != null && !couleur_.equals(_d.couleur_)) { couleur_ = null; } - return type_ >= 0 || taille_ >= 0 && couleur_ != null; + if (typeLigne_ != _d.typeLigne_) { + typeLigne_ = -1; + } + if (epaisseurLigne_ != _d.epaisseurLigne_) { + epaisseurLigne_ = -1; + } + if (backgroundColor != null && !backgroundColor.equals(_d.backgroundColor)) { + backgroundColor = null; + } + return type_ >= 0 || taille_ >= 0 && couleur_ != null && typeLigne_ > 0 && epaisseurLigne_ > 0; } @@ -130,7 +155,9 @@ } public boolean setCouleur(final Color _couleur) { - if (_couleur == couleur_) return false; + if (_couleur == couleur_) { + return false; + } couleur_ = _couleur; return true; } @@ -161,7 +188,9 @@ */ public boolean updateData(final TraceIconModel _model) { - if (_model == null) return false; + if (_model == null) { + return false; + } boolean r = false; if (!_model.isColorIgnored() && (!_model.getCouleur().equals(getCouleur()))) { setCouleur(_model.getCouleur()); @@ -175,7 +204,14 @@ setTaille(_model.getTaille()); r = true; } + if (!_model.isEpaisseurIgnored() && _model.epaisseurLigne_ != epaisseurLigne_) { + epaisseurLigne_ = _model.epaisseurLigne_; + r = true; + } + if (!_model.isTypeLigneIgnored() && _model.typeLigne_ != typeLigne_) { + typeLigne_ = _model.typeLigne_; + r = true; + } return r; } - } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <de...@us...> - 2012-05-30 21:42:08
|
Revision: 7253 http://fudaa.svn.sourceforge.net/fudaa/?rev=7253&view=rev Author: deniger Date: 2012-05-30 21:42:01 +0000 (Wed, 30 May 2012) Log Message: ----------- Modified Paths: -------------- trunk/framework/ctulu-gis/src/main/java/org/fudaa/ctulu/gis/GisAbscCurviligneToCoordinate.java trunk/framework/ebli-2d/src/main/java/org/fudaa/ebli/calque/BArbreCalqueModel.java trunk/framework/ebli-2d/src/main/java/org/fudaa/ebli/calque/BCalque.java trunk/framework/ebli-2d/src/main/java/org/fudaa/ebli/calque/ZEbliCalquePanelController.java trunk/framework/ebli-common/src/main/java/org/fudaa/ebli/commun/EbliCoordinateDefinition.java Modified: trunk/framework/ctulu-gis/src/main/java/org/fudaa/ctulu/gis/GisAbscCurviligneToCoordinate.java =================================================================== --- trunk/framework/ctulu-gis/src/main/java/org/fudaa/ctulu/gis/GisAbscCurviligneToCoordinate.java 2012-05-30 21:41:33 UTC (rev 7252) +++ trunk/framework/ctulu-gis/src/main/java/org/fudaa/ctulu/gis/GisAbscCurviligneToCoordinate.java 2012-05-30 21:42:01 UTC (rev 7253) @@ -80,19 +80,23 @@ Coordinate c2 = coordinateSequence.getCoordinate(i); final double segmentLength = c2.distance(c1); end = begin + segmentLength; - if (targetLength >= begin && targetLength <= end) { - if (res.coordinate == null) { - res.coordinate = new Coordinate(); + if (segmentLength > 0) { + if (targetLength >= begin && targetLength <= end) { + if (res.coordinate == null) { + res.coordinate = new Coordinate(); + } + double ratio = (targetLength - begin) / segmentLength; + res.coordinate.x = c1.x + ratio * (c2.x - c1.x); + res.coordinate.y = c1.y + ratio * (c2.y - c1.y); + + return; } - double ratio = (targetLength - begin) / segmentLength; - res.coordinate.x = c1.x + ratio * (c2.x - c1.x); - res.coordinate.y = c1.y + ratio * (c2.y - c1.y); - - return; } //we move to next segment begin = end; res.segmentidx++; } + //non trouve: + res.segmentidx = -1; } } Modified: trunk/framework/ebli-2d/src/main/java/org/fudaa/ebli/calque/BArbreCalqueModel.java =================================================================== --- trunk/framework/ebli-2d/src/main/java/org/fudaa/ebli/calque/BArbreCalqueModel.java 2012-05-30 21:41:33 UTC (rev 7252) +++ trunk/framework/ebli-2d/src/main/java/org/fudaa/ebli/calque/BArbreCalqueModel.java 2012-05-30 21:42:01 UTC (rev 7253) @@ -1,9 +1,6 @@ /** - * @creation 15 sept. 2003 - * @modification $Date$ - * @license GNU General Public License 2 - * @copyright (c)1998-2001 CETMEF 2 bd Gambetta F-60231 Compiegne - * @mail de...@fu... + * @creation 15 sept. 2003 @modification $Date$ @license GNU General Public + * License 2 @copyright (c)1998-2001 CETMEF 2 bd Gambetta F-60231 Compiegne @mail de...@fu... */ package org.fudaa.ebli.calque; @@ -55,8 +52,9 @@ */ public class BArbreCalqueModel implements TreeModel, PropertyChangeListener, ActionListener, ContainerListener { - private static final Object[] PROP_TO_LISTEN = CtuluLibArray.sort(new String[] { "foreground", "visible", "attenue", - "rapide", "ajustement", "paletteCouleur", "iconeChanged", "title", "nodeEdit", "alpha", "model" }); + private static final Object[] PROP_TO_LISTEN = CtuluLibArray.sort( + new String[]{"foreground", "visible", "attenue", + "rapide", "ajustement", "paletteCouleur", "iconeChanged", "title", "nodeEdit", "alpha", "model"}); private static String getActLast() { return "DERNIER"; @@ -77,12 +75,9 @@ private static String getActCenter() { return "CENTER"; } - BCalque calque_; - List listeners_; - EbliActionInterface actDelete_=new TreeDeleteCalqueAction(this); - + EbliActionInterface actDelete_ = new TreeDeleteCalqueAction(this); final boolean mustListen_; TreeSelectionModel selection_; @@ -92,7 +87,7 @@ /** * Constructeur. - * + * * @param _calque calque racine de l'arbre (GroupeCalque de la VueCalque) */ public BArbreCalqueModel(final BGroupeCalque _calque, final boolean _listener) { @@ -202,9 +197,9 @@ } else if (action.equals(getActLast())) { actLast(c); } else if (action.equals("SET_SELECTABLE")) { - actSetSelectable(c,true); + actSetSelectable(c, true); } else if (action.equals("UNSET_SELECTABLE")) { - actSetSelectable(c,false); + actSetSelectable(c, false); } else { int i = action.indexOf('_'); if (i >= 0) { @@ -270,8 +265,10 @@ private void actSetSelectable(final BCalque[] _c, boolean _b) { for (int i = 0; i < _c.length; i++) { if (_c[i] instanceof ZCalqueAffichageDonneesAbstract) { - ZCalqueAffichageDonneesAbstract cq=(ZCalqueAffichageDonneesAbstract)_c[i]; - if (cq.canSetSelectable()) cq.setSelectable(_b); + ZCalqueAffichageDonneesAbstract cq = (ZCalqueAffichageDonneesAbstract) _c[i]; + if (cq.canSetSelectable()) { + cq.setSelectable(_b); + } } } } @@ -293,7 +290,7 @@ } public void setActionDelete(EbliActionInterface _actionDelete) { - actDelete_=_actionDelete; + actDelete_ = _actionDelete; } private void actionCenter(final BCalque[] _c) { @@ -314,7 +311,7 @@ } public static void actionCenter(final BCalque _c, final ZEbliCalquesPanel _vue) { - actionCenter(new BCalque[] { _c }, _vue.getVueCalque(), _vue.getDonneesCalque(), _vue); + actionCenter(new BCalque[]{_c}, _vue.getVueCalque(), _vue.getDonneesCalque(), _vue); } public void addTreeModelListener(final TreeModelListener _l) { @@ -342,8 +339,8 @@ final BCalque parent = (BCalque) c.getParent(); final int directCalqueIdx = parent.getDirectCalqueIdx(c); Object[] path = getPath(parent); - fireTreeModelEventAdded(new TreeModelEvent(this, new TreePath(path), new int[] { directCalqueIdx }, - new Object[] { c })); + fireTreeModelEventAdded(new TreeModelEvent(this, new TreePath(path), new int[]{directCalqueIdx}, + new Object[]{c})); } setSelectionCalque(c); fireObservableChanged("added"); @@ -352,7 +349,7 @@ Object[] getPath(final BCalque _cq) { final List l = new ArrayList(5); if (_cq == getRootCalque()) { - return new Object[] { _cq }; + return new Object[]{_cq}; } l.add(_cq); BCalque parent = _cq; @@ -376,26 +373,27 @@ } final BCalque parent = (BCalque) _e.getContainer(); if (parent != null) { -/* final Integer integer = ((Integer) c.getClientProperty("oldIndice")); - if (integer == null) { -*/ refresh(); -/* } else { - fireTreeModelEventRemoved(new TreeModelEvent(this, new TreePath(getPath(parent)), new int[] { integer - .intValue() }, new Object[] { c })); - } -*/ setSelectionCalque(parent); + /* + * final Integer integer = ((Integer) c.getClientProperty("oldIndice")); if (integer == null) { + */ refresh(); + /* + * } else { fireTreeModelEventRemoved(new TreeModelEvent(this, new TreePath(getPath(parent)), new int[] { integer + * .intValue() }, new Object[] { c })); } + */ setSelectionCalque(parent); } fireObservableChanged("removed"); } public void fillMenu(final BuMenu _m) { - _m.addMenuItem(EbliResource.EBLI.getString("Centrer la vue"), getActCenter(), EbliResource.EBLI - .getToolIcon("zoom-layer"), true, 0, this); + _m.addMenuItem(EbliResource.EBLI.getString("Centrer la vue"), getActCenter(), EbliResource.EBLI.getToolIcon("zoom-layer"), + true, 0, this); _m.addMenuItem(EbliResource.EBLI.getString("Visible"), "VISIBLE_OUI", null, true, 0, this); _m.addMenuItem(EbliResource.EBLI.getString("Cach\xE9"), "VISIBLE_NON", BuResource.BU.getIcon("cacher"), true, 0, this); _m.addSeparator(); - _m.addMenuItem(EbliResource.EBLI.getString("S\xE9lectionnable"), "SET_SELECTABLE", EbliResource.EBLI.getIcon("fleche"), true, 0, this); - _m.addMenuItem(EbliResource.EBLI.getString("Non s\xE9lectionnable"), "UNSET_SELECTABLE", EbliResource.EBLI.getIcon("non-selectionnable"), true, 0, this); + _m.addMenuItem(EbliResource.EBLI.getString("S\xE9lectionnable"), "SET_SELECTABLE", EbliResource.EBLI.getIcon("fleche"), true, 0, + this); + _m.addMenuItem(EbliResource.EBLI.getString("Non s\xE9lectionnable"), "UNSET_SELECTABLE", EbliResource.EBLI.getIcon( + "non-selectionnable"), true, 0, this); _m.addSeparator(); _m.addMenuItem(EbliResource.EBLI.getString("Att\xE9nu\xE9"), "ATTENUE_OUI", null, true, 0, this); _m.addMenuItem(EbliResource.EBLI.getString(getActNormal()), "ATTENUE_NON", null, true, 0, this); @@ -407,11 +405,11 @@ _m.addMenuItem(EbliResource.EBLI.getString("Actif"), "GELE_NON", null, true, 0, this); _m.addSeparator(); _m.addMenuItem(EbliResource.EBLI.getString("En premier"), getActPrem(), EbliResource.EBLI.getIcon("enpremier"), - true, 0, this); + true, 0, this); _m.addMenuItem(CtuluLib.getS("Monter"), getActUp(), CtuluResource.CTULU.getIcon("monter"), true, 0, this); _m.addMenuItem(CtuluLib.getS("Descendre"), getActDown(), CtuluResource.CTULU.getIcon("descendre"), true, 0, this); _m.addMenuItem(EbliResource.EBLI.getString("En dernier"), getActLast(), EbliResource.EBLI.getIcon("endernier"), - true, 0, this); + true, 0, this); _m.addSeparator(); _m.add(new JMenuItem(actDelete_)); } @@ -421,14 +419,16 @@ } public void fillMenu(final CtuluPopupMenu _m) { - _m.addMenuItem(EbliResource.EBLI.getString("Centrer la vue"), getActCenter(), EbliResource.EBLI - .getToolIcon("zoom-layer"), true, this); + _m.addMenuItem(EbliResource.EBLI.getString("Centrer la vue"), getActCenter(), EbliResource.EBLI.getToolIcon("zoom-layer"), + true, this); _m.addMenuItem(EbliResource.EBLI.getString("Visible"), "VISIBLE_OUI", null, true, this); final JMenuItem it = _m.addMenuItem(EbliResource.EBLI.getString("Cach\xE9"), "VISIBLE_NON", null, true, this); it.setIcon(BuResource.BU.getIcon("cacher")); _m.addSeparator(); - _m.addMenuItem(EbliResource.EBLI.getString("S\xE9lectionnable"), "SET_SELECTABLE", EbliResource.EBLI.getIcon("fleche"), true, this); - _m.addMenuItem(EbliResource.EBLI.getString("Non s\xE9lectionnable"), "UNSET_SELECTABLE", EbliResource.EBLI.getIcon("non-selectionnable"), true, this); + _m.addMenuItem(EbliResource.EBLI.getString("S\xE9lectionnable"), "SET_SELECTABLE", EbliResource.EBLI.getIcon("fleche"), true, + this); + _m.addMenuItem(EbliResource.EBLI.getString("Non s\xE9lectionnable"), "UNSET_SELECTABLE", EbliResource.EBLI.getIcon( + "non-selectionnable"), true, this); _m.addSeparator(); _m.addMenuItem(EbliResource.EBLI.getString("Att\xE9nu\xE9"), "ATTENUE_OUI", null, true, this); _m.addMenuItem(EbliResource.EBLI.getString(getActNormal()), "ATTENUE_NON", null, true, this); @@ -440,11 +440,11 @@ _m.addMenuItem(EbliResource.EBLI.getString("Actif"), "GELE_NON", null, true, this); _m.addSeparator(); _m.addMenuItem(EbliResource.EBLI.getString("En premier"), getActPrem(), EbliResource.EBLI.getIcon("enpremier"), - true, this); + true, this); _m.addMenuItem(CtuluLib.getS("Monter"), getActUp(), CtuluResource.CTULU.getIcon("monter"), true, this); _m.addMenuItem(CtuluLib.getS("Descendre"), getActDown(), CtuluResource.CTULU.getIcon("descendre"), true, this); _m.addMenuItem(EbliResource.EBLI.getString("En dernier"), getActLast(), EbliResource.EBLI.getIcon("endernier"), - true, this); + true, this); _m.addSeparator(); _m.add(new JMenuItem(actDelete_)); } @@ -458,11 +458,11 @@ } private void fillPopupMenu(final CtuluPopupMenu _m, final BCalque _c) { - if ((_c == null) ) { + if ((_c == null)) { return; } - _m.addMenuItem(EbliResource.EBLI.getString("Centrer la vue"), getActCenter(), EbliResource.EBLI - .getToolIcon("zoom-layer"), true, this); + _m.addMenuItem(EbliResource.EBLI.getString("Centrer la vue"), getActCenter(), EbliResource.EBLI.getToolIcon("zoom-layer"), + true, this); /* * if (_c instanceof BCalqueAffichage) { final BCalqueAffichage ca = (BCalqueAffichage) _c; * _m.addCheckBox(EbliResource.EBLI.getString("Att\xE9nu\xE9"), "ATTENUE", true, ca.isAttenue(), _arbre); @@ -474,24 +474,26 @@ } _m.addCheckBox(EbliResource.EBLI.getString("Visible"), "VISIBLE", true, _c.isVisible(), this); if (_c instanceof ZCalqueAffichageDonneesAbstract) { - ZCalqueAffichageDonneesAbstract cq=(ZCalqueAffichageDonneesAbstract)_c; + ZCalqueAffichageDonneesAbstract cq = (ZCalqueAffichageDonneesAbstract) _c; if (cq.canSetSelectable()) { - BuCheckBoxMenuItem mi= - _m.addCheckBox(EbliResource.EBLI.getString("S\xE9lectionnable"), "SELECTABLE", EbliResource.EBLI.getIcon("fleche"), true, cq.isSelectable()); + BuCheckBoxMenuItem mi = + _m.addCheckBox(EbliResource.EBLI.getString("S\xE9lectionnable"), "SELECTABLE", EbliResource.EBLI.getIcon( + "fleche"), true, cq.isSelectable()); mi.addActionListener(this); } } - _m.addSeparator(); - _m.addMenuItem(EbliResource.EBLI.getString("En premier"), getActPrem(), EbliResource.EBLI.getIcon("enpremier"), - true, this); - _m.addMenuItem(CtuluLib.getS("Monter"), getActUp(), CtuluResource.CTULU.getIcon("monter"), true, this); - _m.addMenuItem(CtuluLib.getS("Descendre"), getActDown(), CtuluResource.CTULU.getIcon("descendre"), true, this); - _m.addMenuItem(EbliResource.EBLI.getString("En dernier"), getActLast(), EbliResource.EBLI.getIcon("endernier"), - true, this); + if (_c.isMovable()) { + _m.addSeparator(); + _m.addMenuItem(EbliResource.EBLI.getString("En premier"), getActPrem(), EbliResource.EBLI.getIcon("enpremier"), + true, this); + _m.addMenuItem(CtuluLib.getS("Monter"), getActUp(), CtuluResource.CTULU.getIcon("monter"), true, this); + _m.addMenuItem(CtuluLib.getS("Descendre"), getActDown(), CtuluResource.CTULU.getIcon("descendre"), true, this); + _m.addMenuItem(EbliResource.EBLI.getString("En dernier"), getActLast(), EbliResource.EBLI.getIcon("endernier"), + true, this); + } if (_c.isTitleModifiable()) { - _m - .addMenuItem(EbliResource.EBLI.getString("Renommer"), "RENAME", BuResource.BU.getIcon("renommer"), true, - this); + _m.addMenuItem(EbliResource.EBLI.getString("Renommer"), "RENAME", BuResource.BU.getIcon("renommer"), true, + this); } if (_c.isDestructible()) { _m.addSeparator(); @@ -612,7 +614,6 @@ public final boolean isMustListen() { return mustListen_; } - Observable observable_; static class SpecialObservable extends Observable { @@ -647,7 +648,7 @@ public void propertyChange(final PropertyChangeEvent _evt) { final String propertyName = _evt.getPropertyName(); if (Arrays.binarySearch(PROP_TO_LISTEN, propertyName) >= 0) { - fireTreeModelEvent(new TreeModelEvent(this, new Object[] { _evt.getSource() })); + fireTreeModelEvent(new TreeModelEvent(this, new Object[]{_evt.getSource()})); } else if (_evt.getSource() == calque_ && _evt.getPropertyName().equals("versEcran")) { fireObservableChanged(propertyName); @@ -665,7 +666,7 @@ public final void refresh() { final BCalque p = getSelectedCalque(); - final TreeModelEvent ev = new TreeModelEvent(this, new Object[] { calque_ }); + final TreeModelEvent ev = new TreeModelEvent(this, new Object[]{calque_}); fireTreeModelStructureEvent(ev); setSelectionCalque(p); } @@ -709,23 +710,24 @@ } selection_.addSelectionPaths(ps); } - + /** * Autorise la selection multicalques. * @param _b true La selection est multicalques, false sinon. */ public void setSelectionMultiCalques(boolean _b) { - if (_b) + if (_b) { selection_.setSelectionMode(TreeSelectionModel.DISCONTIGUOUS_TREE_SELECTION); - else + } else { selection_.setSelectionMode(TreeSelectionModel.SINGLE_TREE_SELECTION); - + } + } - + public boolean isSelectionMultiCalques() { - return selection_.getSelectionMode()!=TreeSelectionModel.SINGLE_TREE_SELECTION; + return selection_.getSelectionMode() != TreeSelectionModel.SINGLE_TREE_SELECTION; } - public void valueForPathChanged(final TreePath _path, final Object _newValue) {} - + public void valueForPathChanged(final TreePath _path, final Object _newValue) { + } } \ No newline at end of file Modified: trunk/framework/ebli-2d/src/main/java/org/fudaa/ebli/calque/BCalque.java =================================================================== --- trunk/framework/ebli-2d/src/main/java/org/fudaa/ebli/calque/BCalque.java 2012-05-30 21:41:33 UTC (rev 7252) +++ trunk/framework/ebli-2d/src/main/java/org/fudaa/ebli/calque/BCalque.java 2012-05-30 21:42:01 UTC (rev 7253) @@ -88,6 +88,14 @@ return null; } + + /** + * + * @return true if the layer can be move up or down. + */ + public boolean isMovable(){ + return true; + } public static int findCalqueIdxByName(final BCalque[] _cq, final String _name) { if (_cq != null && _name != null) { Modified: trunk/framework/ebli-2d/src/main/java/org/fudaa/ebli/calque/ZEbliCalquePanelController.java =================================================================== --- trunk/framework/ebli-2d/src/main/java/org/fudaa/ebli/calque/ZEbliCalquePanelController.java 2012-05-30 21:41:33 UTC (rev 7252) +++ trunk/framework/ebli-2d/src/main/java/org/fudaa/ebli/calque/ZEbliCalquePanelController.java 2012-05-30 21:42:01 UTC (rev 7253) @@ -354,8 +354,10 @@ action.putValue(Action.ACCELERATOR_KEY, KeyStroke.getKeyStroke('m')); navigationActionGroup_[i++] = action; // REFERENCE - - navigationActionGroup_[i++] = createRepereAction(); + final EbliActionInterface createRepereAction = createRepereAction(); + if (createRepereAction != null) { + navigationActionGroup_[i++] = createRepereAction; + } // NAVIGATION final EbliActionPaletteAbstract plAction = new EbliActionPaletteAbstract(EbliLib.getS("Navigation"), EbliResource.EBLI.getIcon("navigation"), "NAVIGATE") { Modified: trunk/framework/ebli-common/src/main/java/org/fudaa/ebli/commun/EbliCoordinateDefinition.java =================================================================== --- trunk/framework/ebli-common/src/main/java/org/fudaa/ebli/commun/EbliCoordinateDefinition.java 2012-05-30 21:41:33 UTC (rev 7252) +++ trunk/framework/ebli-common/src/main/java/org/fudaa/ebli/commun/EbliCoordinateDefinition.java 2012-05-30 21:42:01 UTC (rev 7253) @@ -1,7 +1,5 @@ package org.fudaa.ebli.commun; -import org.fudaa.ebli.commun.EbliFormatterInterface; - /** * Une definition pour une coordonn\xE9e, c'est \xE0 dire son unit\xE9, son type (entier * ou double), son nom. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <de...@us...> - 2012-06-01 17:14:48
|
Revision: 7262 http://fudaa.svn.sourceforge.net/fudaa/?rev=7262&view=rev Author: deniger Date: 2012-06-01 17:14:41 +0000 (Fri, 01 Jun 2012) Log Message: ----------- prise en compte caractere editable Modified Paths: -------------- trunk/framework/ctulu-gis/src/main/java/org/fudaa/ctulu/gis/GISZoneCollection.java trunk/framework/ctulu-gis/src/main/java/org/fudaa/ctulu/gis/gml/GISGMLZoneExporter.java trunk/framework/ebli-2d/src/main/java/org/fudaa/ebli/calque/ZCalqueGeometry.java trunk/framework/ebli-2d/src/main/java/org/fudaa/ebli/calque/ZModeleStatiqueImageRaster.java trunk/framework/ebli-2d/src/main/java/org/fudaa/ebli/calque/action/CalqueGISEditionAction.java Modified: trunk/framework/ctulu-gis/src/main/java/org/fudaa/ctulu/gis/GISZoneCollection.java =================================================================== --- trunk/framework/ctulu-gis/src/main/java/org/fudaa/ctulu/gis/GISZoneCollection.java 2012-06-01 17:14:14 UTC (rev 7261) +++ trunk/framework/ctulu-gis/src/main/java/org/fudaa/ctulu/gis/GISZoneCollection.java 2012-06-01 17:14:41 UTC (rev 7262) @@ -331,6 +331,9 @@ public abstract int addGeometry(Geometry _geom, Object[] _datas, CtuluCommandContainer _cmd); public void removeGeometries(final int[] _idx, final CtuluCommandContainer _cmd) { + if (!isGeomModifiable_) { + return; + } super.geometry_.remove(_idx, _cmd); } Modified: trunk/framework/ctulu-gis/src/main/java/org/fudaa/ctulu/gis/gml/GISGMLZoneExporter.java =================================================================== --- trunk/framework/ctulu-gis/src/main/java/org/fudaa/ctulu/gis/gml/GISGMLZoneExporter.java 2012-06-01 17:14:14 UTC (rev 7261) +++ trunk/framework/ctulu-gis/src/main/java/org/fudaa/ctulu/gis/gml/GISGMLZoneExporter.java 2012-06-01 17:14:41 UTC (rev 7262) @@ -11,6 +11,7 @@ */ package org.fudaa.ctulu.gis.gml; +import com.memoire.fu.FuLib; import gnu.trove.TIntArrayList; import gnu.trove.TObjectIntHashMap; @@ -58,19 +59,19 @@ public GISGMLZoneExporter() { super(); } - private boolean useIdAsName_; /** - * Cr\xE9ation de tous les attributes types a partir des attributs de la zone. L'attribut pris pour Z n'est pas cr\xE9\xE9, car - * transf\xE9r\xE9 dans le Z. - * + * Cr\xE9ation de tous les attributes types a partir des attributs de la zone. L'attribut pris pour Z n'est pas cr\xE9\xE9, car transf\xE9r\xE9 + * dans le Z. + * * @param _zone La zone. * @param _attIsZ L'attribut pris pour Z * @param _attrIdx Argument de sortie. Une table associant l'indice des attributs de la zone a un attribut cr\xE9\xE9. * @return Les attributs cr\xE9es. */ - public AttributeType[] createAttributes(final GISDataModel _zone, final GISAttributeDouble _attIsZ, final TObjectIntHashMap _attrIdx) { + public AttributeType[] createAttributes(final GISDataModel _zone, final GISAttributeDouble _attIsZ, + final TObjectIntHashMap _attrIdx) { final int attributeNb = _zone.getNbAttributes(); final TIntArrayList attribute = new TIntArrayList(attributeNb); @@ -101,7 +102,6 @@ atts[atts.length - 1] = AttributeTypeFactory.newAttributeType(attInd.getID(), attInd.getDataClass()); return atts; } - DataStore store_; OutputStream out_; @@ -121,8 +121,9 @@ * @throws SchemaException * @throws IllegalAttributeException */ - public void process(final ProgressionInterface _prog, final GISDataModel _zone, final GISAttributeDouble _attIsZ, final DataStore _dest) - throws IOException, SchemaException, IllegalAttributeException { + public void process(final ProgressionInterface _prog, final GISDataModel _zone, final GISAttributeDouble _attIsZ, + final DataStore _dest) + throws IOException, SchemaException, IllegalAttributeException { out_ = null; store_ = _dest; process(_prog, _zone, _attIsZ); @@ -130,7 +131,7 @@ /** * Attention: l'outputstream n'est pas ferme. - * + * * @param _prog * @param _zone * @param _dest @@ -139,29 +140,34 @@ * @throws IllegalAttributeException */ public void processGML(final ProgressionInterface _prog, final GISZoneCollection _zone, final OutputStream _dest) throws IOException, - SchemaException, IllegalAttributeException { + SchemaException, IllegalAttributeException { out_ = _dest; store_ = null; _zone.prepareExport(); process(_prog, _zone, _zone.getAttributeIsZ()); } + public void processGML(final ProgressionInterface _prog, final GISDataModel _zone, final OutputStream _dest) throws IOException, + SchemaException, IllegalAttributeException { + out_ = _dest; + store_ = null; + process(_prog, _zone, null); + } + /** - * Enregistre la zone sous un format GML. - * <p> - * Les attributs globaux sont enregistr\xE9s comme attributs globaux de chaque g\xE9om\xE9trie, l'attribut pris pour Z est - * enregistr\xE9 dans les coordonn\xE9es Z des g\xE9om\xE9tries.<br> - * Les attributs atomiques sont enregistr\xE9s sous forme de tableau de String, s\xE9par\xE9s par une virgule. - * + * Enregistre la zone sous un format GML. <p> Les attributs globaux sont enregistr\xE9s comme attributs globaux de chaque + * g\xE9om\xE9trie, l'attribut pris pour Z est enregistr\xE9 dans les coordonn\xE9es Z des g\xE9om\xE9tries.<br> Les attributs atomiques sont + * enregistr\xE9s sous forme de tableau de String, s\xE9par\xE9s par une virgule. + * * @param _prog Progression de la tache. * @param _zone La zone a enregistrer * @param _attIsZ L'attrribut pris pour Z (atomique ou non). */ private void process(final ProgressionInterface _prog, final GISDataModel _zone, GISAttributeDouble _attIsZ) throws IOException, SchemaException, - IllegalAttributeException { + IllegalAttributeException { /* - * Pour que les z atomiques soient export\xE9s correctement, il faut que - * prepareExport() ait \xE9t\xE9 appel\xE9 en amont de cette m\xE9thode. + * Pour que les z atomiques soient export\xE9s correctement, il faut que prepareExport() ait \xE9t\xE9 appel\xE9 en amont de cette + * m\xE9thode. */ stop_ = false; final TObjectIntHashMap attIdx = new TObjectIntHashMap(_zone.getNbAttributes()); @@ -196,8 +202,9 @@ GISAttributeModel md = (GISAttributeModel) value; sb.append("{").append(md.getObjectValueAt(0).toString().replaceAll(",", "‚")); - for (int k = 1; k < md.getSize(); k++) + for (int k = 1; k < md.getSize(); k++) { sb.append(",").append(md.getObjectValueAt(k).toString().replaceAll(",", "‚")); + } sb.append("}"); } else if (value != null) { sb.append("{").append(value.toString().replaceAll(",", "‚")); @@ -205,10 +212,10 @@ } feature.setAttribute(j, sb); + } /// Atributs standards. + else { + feature.setAttribute(j, _zone.getValue(attIdx.get(atts[j]), i)); } - - /// Atributs standards. - else feature.setAttribute(j, _zone.getValue(attIdx.get(atts[j]), i)); } // Enregistrement de l'index de la g\xE9om\xE9trie dans le fichier @@ -217,6 +224,8 @@ up.majAvancement(); } + } catch (Exception ex) { + ex.printStackTrace(); } finally { if (writer != null) { if (out_ == null) { @@ -229,19 +238,17 @@ } public FeatureType createFeatureType(final GISDataModel _zone, final AttributeType[] _atts) throws SchemaException { - /* Changement de GISZoneCollection en GISDataModel, suppression des lignes dessous - String name = _zone.getTitle(); - if (name == null) { - name = "zone"; - }*/ + /* + * Changement de GISZoneCollection en GISDataModel, suppression des lignes dessous String name = _zone.getTitle(); if (name == + * null) { name = "zone"; } + */ final FeatureType featureType = FeatureTypes.newFeatureType(_atts, "zone"); return featureType; } /** - * A utiliser pour des donn\xE9es sensibles lorsque l'on veut que certains attributs soient retrouv\xE9 dans toutes les - * langues. - * + * A utiliser pour des donn\xE9es sensibles lorsque l'on veut que certains attributs soient retrouv\xE9 dans toutes les langues. + * * @return true si on utilise l'ID de la variable pour construire l'attribut \xE0 inclure dans le fichier de sortie. */ protected boolean isUseIdAsName() { Modified: trunk/framework/ebli-2d/src/main/java/org/fudaa/ebli/calque/ZCalqueGeometry.java =================================================================== --- trunk/framework/ebli-2d/src/main/java/org/fudaa/ebli/calque/ZCalqueGeometry.java 2012-06-01 17:14:14 UTC (rev 7261) +++ trunk/framework/ebli-2d/src/main/java/org/fudaa/ebli/calque/ZCalqueGeometry.java 2012-06-01 17:14:41 UTC (rev 7262) @@ -605,7 +605,7 @@ TIntArrayList y = new TIntArrayList(50); for (int i = nombre - 1; i >= 0; i--) { - if (!modele_.isGeometryReliee(i) || !modele_.isGeometryFermee(i)) { + if (!modele_.isGeometryReliee(i) || !modele_.isGeometryFermee(i)||!isPainted(i, _versEcran)) { continue; } Modified: trunk/framework/ebli-2d/src/main/java/org/fudaa/ebli/calque/ZModeleStatiqueImageRaster.java =================================================================== --- trunk/framework/ebli-2d/src/main/java/org/fudaa/ebli/calque/ZModeleStatiqueImageRaster.java 2012-06-01 17:14:14 UTC (rev 7261) +++ trunk/framework/ebli-2d/src/main/java/org/fudaa/ebli/calque/ZModeleStatiqueImageRaster.java 2012-06-01 17:14:41 UTC (rev 7262) @@ -39,6 +39,7 @@ import com.memoire.bu.BuTable; import com.memoire.fu.Fu; import com.memoire.fu.FuLog; +import com.memoire.re.RESyntax; import com.vividsolutions.jts.geom.Envelope; import org.fudaa.ctulu.CtuluImageContainer; import org.fudaa.ctulu.CtuluLibImage; Modified: trunk/framework/ebli-2d/src/main/java/org/fudaa/ebli/calque/action/CalqueGISEditionAction.java =================================================================== --- trunk/framework/ebli-2d/src/main/java/org/fudaa/ebli/calque/action/CalqueGISEditionAction.java 2012-06-01 17:14:14 UTC (rev 7261) +++ trunk/framework/ebli-2d/src/main/java/org/fudaa/ebli/calque/action/CalqueGISEditionAction.java 2012-06-01 17:14:41 UTC (rev 7262) @@ -34,7 +34,7 @@ */ public class CalqueGISEditionAction extends EbliActionPaletteTreeModel implements PropertyChangeListener, ZSelectionListener { - private ZEditorDefault editor_; + protected ZEditorDefault editor_; private ZScene scene_; private boolean hide_; // Vrai si le panel d'\xE9dition est ferm\xE9. // Calques utilis\xE9 dans cette action @@ -88,7 +88,7 @@ } } - private void unactivePaletteCreation() { + protected void unactivePaletteCreation() { if (calqueEdition_ != null) { calqueEdition_.cancelEdition(); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <de...@us...> - 2012-06-12 22:05:34
|
Revision: 7316 http://fudaa.svn.sourceforge.net/fudaa/?rev=7316&view=rev Author: deniger Date: 2012-06-12 22:05:27 +0000 (Tue, 12 Jun 2012) Log Message: ----------- [maven-release-plugin] prepare for next development iteration Modified Paths: -------------- trunk/framework/ctulu-bu/pom.xml trunk/framework/ctulu-common/pom.xml trunk/framework/ctulu-fu/pom.xml trunk/framework/ctulu-gis/pom.xml trunk/framework/ctulu-ui/pom.xml trunk/framework/ctulu-video/pom.xml trunk/framework/dodico-common/pom.xml trunk/framework/ebli-1d/pom.xml trunk/framework/ebli-2d/pom.xml trunk/framework/ebli-3d/pom.xml trunk/framework/ebli-common/pom.xml trunk/framework/ebli-graphe/pom.xml trunk/framework/ebli-visuallibrary/pom.xml trunk/framework/fudaa-common/pom.xml trunk/framework/fudaa-common-courbe/pom.xml trunk/framework/fudaa-common-save/pom.xml trunk/framework/fudaa-dico/pom.xml trunk/framework/fudaa-dico/server/pom.xml trunk/framework/fudaa-dico/ui/pom.xml trunk/framework/pom.xml Modified: trunk/framework/ctulu-bu/pom.xml =================================================================== --- trunk/framework/ctulu-bu/pom.xml 2012-06-12 22:04:56 UTC (rev 7315) +++ trunk/framework/ctulu-bu/pom.xml 2012-06-12 22:05:27 UTC (rev 7316) @@ -4,7 +4,7 @@ <parent> <groupId>org.fudaa.framework</groupId> <artifactId>fudaa-framework</artifactId> - <version>1.3</version> + <version>1.4-SNAPSHOT</version> </parent> <groupId>org.fudaa.framework.ctulu</groupId> <artifactId>ctulu-bu</artifactId> Modified: trunk/framework/ctulu-common/pom.xml =================================================================== --- trunk/framework/ctulu-common/pom.xml 2012-06-12 22:04:56 UTC (rev 7315) +++ trunk/framework/ctulu-common/pom.xml 2012-06-12 22:05:27 UTC (rev 7316) @@ -4,7 +4,7 @@ <parent> <groupId>org.fudaa.framework</groupId> <artifactId>fudaa-framework</artifactId> - <version>1.3</version> + <version>1.4-SNAPSHOT</version> </parent> <groupId>org.fudaa.framework.ctulu</groupId> <artifactId>ctulu-common</artifactId> Modified: trunk/framework/ctulu-fu/pom.xml =================================================================== --- trunk/framework/ctulu-fu/pom.xml 2012-06-12 22:04:56 UTC (rev 7315) +++ trunk/framework/ctulu-fu/pom.xml 2012-06-12 22:05:27 UTC (rev 7316) @@ -3,7 +3,7 @@ <parent> <groupId>org.fudaa.framework</groupId> <artifactId>fudaa-framework</artifactId> - <version>1.3</version> + <version>1.4-SNAPSHOT</version> </parent> <groupId>org.fudaa.framework.ctulu</groupId> <artifactId>ctulu-fu</artifactId> Modified: trunk/framework/ctulu-gis/pom.xml =================================================================== --- trunk/framework/ctulu-gis/pom.xml 2012-06-12 22:04:56 UTC (rev 7315) +++ trunk/framework/ctulu-gis/pom.xml 2012-06-12 22:05:27 UTC (rev 7316) @@ -4,7 +4,7 @@ <parent> <groupId>org.fudaa.framework</groupId> <artifactId>fudaa-framework</artifactId> - <version>1.3</version> + <version>1.4-SNAPSHOT</version> </parent> <groupId>org.fudaa.framework.ctulu</groupId> <artifactId>ctulu-gis</artifactId> Modified: trunk/framework/ctulu-ui/pom.xml =================================================================== --- trunk/framework/ctulu-ui/pom.xml 2012-06-12 22:04:56 UTC (rev 7315) +++ trunk/framework/ctulu-ui/pom.xml 2012-06-12 22:05:27 UTC (rev 7316) @@ -4,7 +4,7 @@ <parent> <groupId>org.fudaa.framework</groupId> <artifactId>fudaa-framework</artifactId> - <version>1.3</version> + <version>1.4-SNAPSHOT</version> </parent> <groupId>org.fudaa.framework.ctulu</groupId> <artifactId>ctulu-ui</artifactId> Modified: trunk/framework/ctulu-video/pom.xml =================================================================== --- trunk/framework/ctulu-video/pom.xml 2012-06-12 22:04:56 UTC (rev 7315) +++ trunk/framework/ctulu-video/pom.xml 2012-06-12 22:05:27 UTC (rev 7316) @@ -4,7 +4,7 @@ <parent> <groupId>org.fudaa.framework</groupId> <artifactId>fudaa-framework</artifactId> - <version>1.3</version> + <version>1.4-SNAPSHOT</version> </parent> <groupId>org.fudaa.framework.ctulu</groupId> <artifactId>ctulu-video</artifactId> Modified: trunk/framework/dodico-common/pom.xml =================================================================== --- trunk/framework/dodico-common/pom.xml 2012-06-12 22:04:56 UTC (rev 7315) +++ trunk/framework/dodico-common/pom.xml 2012-06-12 22:05:27 UTC (rev 7316) @@ -4,7 +4,7 @@ <parent> <groupId>org.fudaa.framework</groupId> <artifactId>fudaa-framework</artifactId> - <version>1.3</version> + <version>1.4-SNAPSHOT</version> </parent> <groupId>org.fudaa.framework.dodico</groupId> <artifactId>dodico-common</artifactId> Modified: trunk/framework/ebli-1d/pom.xml =================================================================== --- trunk/framework/ebli-1d/pom.xml 2012-06-12 22:04:56 UTC (rev 7315) +++ trunk/framework/ebli-1d/pom.xml 2012-06-12 22:05:27 UTC (rev 7316) @@ -4,7 +4,7 @@ <parent> <groupId>org.fudaa.framework</groupId> <artifactId>fudaa-framework</artifactId> - <version>1.3</version> + <version>1.4-SNAPSHOT</version> </parent> <groupId>org.fudaa.framework.ebli</groupId> <artifactId>ebli-1d</artifactId> Modified: trunk/framework/ebli-2d/pom.xml =================================================================== --- trunk/framework/ebli-2d/pom.xml 2012-06-12 22:04:56 UTC (rev 7315) +++ trunk/framework/ebli-2d/pom.xml 2012-06-12 22:05:27 UTC (rev 7316) @@ -4,7 +4,7 @@ <parent> <groupId>org.fudaa.framework</groupId> <artifactId>fudaa-framework</artifactId> - <version>1.3</version> + <version>1.4-SNAPSHOT</version> </parent> <groupId>org.fudaa.framework.ebli</groupId> <artifactId>ebli-2d</artifactId> Modified: trunk/framework/ebli-3d/pom.xml =================================================================== --- trunk/framework/ebli-3d/pom.xml 2012-06-12 22:04:56 UTC (rev 7315) +++ trunk/framework/ebli-3d/pom.xml 2012-06-12 22:05:27 UTC (rev 7316) @@ -4,7 +4,7 @@ <parent> <groupId>org.fudaa.framework</groupId> <artifactId>fudaa-framework</artifactId> - <version>1.3</version> + <version>1.4-SNAPSHOT</version> </parent> <groupId>org.fudaa.framework.ebli</groupId> <artifactId>ebli-3d</artifactId> Modified: trunk/framework/ebli-common/pom.xml =================================================================== --- trunk/framework/ebli-common/pom.xml 2012-06-12 22:04:56 UTC (rev 7315) +++ trunk/framework/ebli-common/pom.xml 2012-06-12 22:05:27 UTC (rev 7316) @@ -4,7 +4,7 @@ <parent> <groupId>org.fudaa.framework</groupId> <artifactId>fudaa-framework</artifactId> - <version>1.3</version> + <version>1.4-SNAPSHOT</version> </parent> <groupId>org.fudaa.framework.ebli</groupId> <artifactId>ebli-common</artifactId> Modified: trunk/framework/ebli-graphe/pom.xml =================================================================== --- trunk/framework/ebli-graphe/pom.xml 2012-06-12 22:04:56 UTC (rev 7315) +++ trunk/framework/ebli-graphe/pom.xml 2012-06-12 22:05:27 UTC (rev 7316) @@ -4,7 +4,7 @@ <parent> <groupId>org.fudaa.framework</groupId> <artifactId>fudaa-framework</artifactId> - <version>1.3</version> + <version>1.4-SNAPSHOT</version> </parent> <groupId>org.fudaa.framework.ebli</groupId> <artifactId>ebli-graphe</artifactId> Modified: trunk/framework/ebli-visuallibrary/pom.xml =================================================================== --- trunk/framework/ebli-visuallibrary/pom.xml 2012-06-12 22:04:56 UTC (rev 7315) +++ trunk/framework/ebli-visuallibrary/pom.xml 2012-06-12 22:05:27 UTC (rev 7316) @@ -4,7 +4,7 @@ <parent> <groupId>org.fudaa.framework</groupId> <artifactId>fudaa-framework</artifactId> - <version>1.3</version> + <version>1.4-SNAPSHOT</version> </parent> <groupId>org.fudaa.framework.ebli</groupId> <artifactId>ebli-visuallibrary</artifactId> Modified: trunk/framework/fudaa-common/pom.xml =================================================================== --- trunk/framework/fudaa-common/pom.xml 2012-06-12 22:04:56 UTC (rev 7315) +++ trunk/framework/fudaa-common/pom.xml 2012-06-12 22:05:27 UTC (rev 7316) @@ -4,7 +4,7 @@ <parent> <groupId>org.fudaa.framework</groupId> <artifactId>fudaa-framework</artifactId> - <version>1.3</version> + <version>1.4-SNAPSHOT</version> </parent> <groupId>org.fudaa.framework.fudaa</groupId> <artifactId>fudaa-common</artifactId> Modified: trunk/framework/fudaa-common-courbe/pom.xml =================================================================== --- trunk/framework/fudaa-common-courbe/pom.xml 2012-06-12 22:04:56 UTC (rev 7315) +++ trunk/framework/fudaa-common-courbe/pom.xml 2012-06-12 22:05:27 UTC (rev 7316) @@ -4,7 +4,7 @@ <parent> <groupId>org.fudaa.framework</groupId> <artifactId>fudaa-framework</artifactId> - <version>1.3</version> + <version>1.4-SNAPSHOT</version> </parent> <groupId>org.fudaa.framework.fudaa</groupId> <artifactId>fudaa-common-courbe</artifactId> Modified: trunk/framework/fudaa-common-save/pom.xml =================================================================== --- trunk/framework/fudaa-common-save/pom.xml 2012-06-12 22:04:56 UTC (rev 7315) +++ trunk/framework/fudaa-common-save/pom.xml 2012-06-12 22:05:27 UTC (rev 7316) @@ -4,7 +4,7 @@ <parent> <groupId>org.fudaa.framework</groupId> <artifactId>fudaa-framework</artifactId> - <version>1.3</version> + <version>1.4-SNAPSHOT</version> </parent> <groupId>org.fudaa.framework.fudaa</groupId> <artifactId>fudaa-common-save</artifactId> Modified: trunk/framework/fudaa-dico/pom.xml =================================================================== --- trunk/framework/fudaa-dico/pom.xml 2012-06-12 22:04:56 UTC (rev 7315) +++ trunk/framework/fudaa-dico/pom.xml 2012-06-12 22:05:27 UTC (rev 7316) @@ -9,7 +9,7 @@ <parent> <groupId>org.fudaa.framework</groupId> <artifactId>fudaa-framework</artifactId> - <version>1.3</version> + <version>1.4-SNAPSHOT</version> </parent> <groupId>org.fudaa.framework.fudaa.fudaa-dico</groupId> <artifactId>fudaa-dico</artifactId> Modified: trunk/framework/fudaa-dico/server/pom.xml =================================================================== --- trunk/framework/fudaa-dico/server/pom.xml 2012-06-12 22:04:56 UTC (rev 7315) +++ trunk/framework/fudaa-dico/server/pom.xml 2012-06-12 22:05:27 UTC (rev 7316) @@ -4,7 +4,7 @@ <parent> <groupId>org.fudaa.framework.fudaa.fudaa-dico</groupId> <artifactId>fudaa-dico</artifactId> - <version>1.3</version> + <version>1.4-SNAPSHOT</version> </parent> <groupId>org.fudaa.framework.fudaa.fudaa-dico</groupId> <artifactId>dico-server</artifactId> Modified: trunk/framework/fudaa-dico/ui/pom.xml =================================================================== --- trunk/framework/fudaa-dico/ui/pom.xml 2012-06-12 22:04:56 UTC (rev 7315) +++ trunk/framework/fudaa-dico/ui/pom.xml 2012-06-12 22:05:27 UTC (rev 7316) @@ -4,7 +4,7 @@ <parent> <groupId>org.fudaa.framework.fudaa.fudaa-dico</groupId> <artifactId>fudaa-dico</artifactId> - <version>1.3</version> + <version>1.4-SNAPSHOT</version> </parent> <artifactId>dico-ui</artifactId> <name>Dico UI</name> Modified: trunk/framework/pom.xml =================================================================== --- trunk/framework/pom.xml 2012-06-12 22:04:56 UTC (rev 7315) +++ trunk/framework/pom.xml 2012-06-12 22:05:27 UTC (rev 7316) @@ -8,7 +8,7 @@ </parent> <groupId>org.fudaa.framework</groupId> <artifactId>fudaa-framework</artifactId> - <version>1.3</version> + <version>1.4-SNAPSHOT</version> <url>http://www.fudaa.fr/sites/devel/fudaa-framework/</url> <properties> <projetEncoding>ISO-8859-15</projetEncoding> @@ -19,10 +19,10 @@ <name>Fudaa Framework</name> <description>La partie commune du framework fudaa</description> <scm> - <connection>scm:svn:http://fudaa.svn.sourceforge.net/svnroot/fudaa/tags/framework/fudaa-framework-1.3</connection> - <developerConnection>scm:svn:https://fudaa.svn.sourceforge.net/svnroot/fudaa/tags/framework/fudaa-framework-1.3 + <connection>scm:svn:http://fudaa.svn.sourceforge.net/svnroot/fudaa/trunk/framework</connection> + <developerConnection>scm:svn:https://fudaa.svn.sourceforge.net/svnroot/fudaa/trunk/framework </developerConnection> - <url>http://fudaa.svn.sourceforge.net/viewvc/fudaa/svnroot/fudaa/tags/framework/fudaa-framework-1.3</url> + <url>http://fudaa.svn.sourceforge.net/viewvc/fudaa/svnroot/fudaa/trunk/framework</url> </scm> <modules> <module>ctulu-fu</module> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <de...@us...> - 2012-06-21 21:15:00
|
Revision: 7376 http://fudaa.svn.sourceforge.net/fudaa/?rev=7376&view=rev Author: deniger Date: 2012-06-21 21:14:53 +0000 (Thu, 21 Jun 2012) Log Message: ----------- Modified Paths: -------------- trunk/framework/ebli-common/src/main/java/org/fudaa/ebli/trace/TraceLigne.java Added Paths: ----------- trunk/framework/ebli-2d/src/test/java/org/fudaa/ebli/calque/edition/ Modified: trunk/framework/ebli-common/src/main/java/org/fudaa/ebli/trace/TraceLigne.java =================================================================== --- trunk/framework/ebli-common/src/main/java/org/fudaa/ebli/trace/TraceLigne.java 2012-06-21 20:36:45 UTC (rev 7375) +++ trunk/framework/ebli-common/src/main/java/org/fudaa/ebli/trace/TraceLigne.java 2012-06-21 21:14:53 UTC (rev 7376) @@ -20,45 +20,62 @@ /** * Une classe de trace de lignes. - * + * * @version $Id: TraceLigne.java,v 1.20 2007-03-15 17:00:29 deniger Exp $ * @author Axel von Arnim */ public class TraceLigne { - private final static float[] POINTILLE_DASH = { 2.0f, 2.0f }; - /** */ - private final static float[] TIRETE_DASH = { 6.0f, 3.0f }; - /** */ - /** */ - private final static float[] MIXTE_DASH = { 6.0f, 3.0f, 3.0f, 3.0f }; + private final static float[] POINTILLE_DASH = {2.0f, 2.0f}; + /** + * */ + private final static float[] TIRETE_DASH = {6.0f, 3.0f}; + /** + * */ + /** + * */ + private final static float[] MIXTE_DASH = {6.0f, 3.0f, 3.0f, 3.0f}; private final static BasicStroke DEFAULT_MIXTE_STROKE = new BasicStroke(1f, BasicStroke.CAP_BUTT, - BasicStroke.JOIN_MITER, 10.0f, MIXTE_DASH, 0.0f); - /** */ + BasicStroke.JOIN_MITER, 10.0f, MIXTE_DASH, 0.0f); + /** + * */ private final static BasicStroke DEFAULT_POINTILLE_STROKE = new BasicStroke(1f, BasicStroke.CAP_BUTT, - BasicStroke.JOIN_MITER, 10.0f, POINTILLE_DASH, 0.0f); - /** */ + BasicStroke.JOIN_MITER, 10.0f, POINTILLE_DASH, 0.0f); + /** + * */ private final static BasicStroke DEFAULT_STROKE = new BasicStroke(1f); - /** */ + /** + * */ private final static BasicStroke DEFAULT_TIRETE_STROKE = new BasicStroke(1f, BasicStroke.CAP_BUTT, - BasicStroke.JOIN_MITER, 10.0f, TIRETE_DASH, 0.0f); - + BasicStroke.JOIN_MITER, 10.0f, TIRETE_DASH, 0.0f); final static double C_MAGIC = Math.PI / 4.; - /** */ + /** + * */ public final static Font FONTBASE = new Font("SansSerif", Font.PLAIN, 20); - /** Ligne non dessinee. */ + /** + * Ligne non dessinee. + */ public final static int INVISIBLE = 0; - /** Ligne lisse. */ + /** + * Ligne lisse. + */ public final static int LISSE = 1; - /** ligne mixte. */ + /** + * ligne mixte. + */ public final static int MIXTE = 5; - /** les points remarquables sont mis en valeur. */ + /** + * les points remarquables sont mis en valeur. + */ public final static int POINT_MARQUE = 2; - /** ligne pointillee. */ + /** + * ligne pointillee. + */ public final static int POINTILLE = 3; - /** ligne tiretee. */ + /** + * ligne tiretee. + */ public final static int TIRETE = 4; - private TraceLigneModel model_; public final TraceLigneModel getModel() { @@ -103,7 +120,7 @@ * @return le polygone correspondant */ private Polygon arc2polygon(final int _x1, final int _y1, final int _x2, final int _y2, final int _vx1, - final int _vy1, final int _vx2, final int _vy2) { + final int _vy1, final int _vx2, final int _vy2) { final int nb = (Math.abs(_x2 - _x1) + Math.abs(_y2 - _y1)) / 2; Point pf; final int[] x = new int[nb + 1]; @@ -123,20 +140,20 @@ */ private float[] getDashArray() { switch (model_.typeTrait_) { - case POINTILLE: - return POINTILLE_DASH; - case TIRETE: - return TIRETE_DASH; - case MIXTE: - return MIXTE_DASH; - default: - return FuEmptyArrays.FLOAT0; + case POINTILLE: + return POINTILLE_DASH; + case TIRETE: + return TIRETE_DASH; + case MIXTE: + return MIXTE_DASH; + default: + return FuEmptyArrays.FLOAT0; } } /** * Initialise le graphics2D g_. - * + * * @return true si l'initialisation de g_ a ete effectuee false si le type de trait est invisible */ protected boolean initialisationGraphics(final Graphics2D _g) { @@ -151,17 +168,17 @@ } public Polygon creeArc(final double _x1, final double _y1, final double _x2, final double _y2, final double _vx1, - final double _vy1, final double _vx2, final double _vy2) { + final double _vy1, final double _vx2, final double _vy2) { return creeArc((int) _x1, (int) _y1, (int) _x2, (int) _y2, (int) _vx1, (int) _vy1, (int) _vx2, (int) _vy2); } /** * Cree un arc sous forme d'un polygone. Voir <i>dessineArc </i> pour les parametres. - * + * * @return l'arc */ public Polygon creeArc(final int _x1, final int _y1, final int _x2, final int _y2, final int _vx1, final int _vy1, - final int _vx2, final int _vy2) { + final int _vx2, final int _vy2) { final int nb = (Math.abs(_x2 - _x1) + Math.abs(_y2 - _y1)) / 2; Point pf; final int[] x = new int[nb + 2]; @@ -182,7 +199,7 @@ } public void dessineArc(final Graphics2D _g, final double _x1, final double _y1, final double _x2, final double _y2, - final double _vx1, final double _vy1, final double _vx2, final double _vy2) { + final double _vx1, final double _vy1, final double _vx2, final double _vy2) { final Color oldColor = _g.getColor(); final Stroke oldStroke = _g.getStroke(); if (!initialisationGraphics(_g)) { @@ -202,11 +219,11 @@ /** * Trace un arc. Il est trace avec le type de trait definit par <i>typeTrait </i>. - * + * * @see #setTypeTrait(int) */ public void dessineArc(final Graphics2D _g, final int _x1, final int _y1, final int _x2, final int _y2, - final int _vx1, final int _vy1, final int _vx2, final int _vy2) { + final int _vx1, final int _vy1, final int _vx2, final int _vy2) { final Color oldColor = _g.getColor(); final Stroke oldStroke = _g.getStroke(); if (!initialisationGraphics(_g)) { @@ -226,7 +243,7 @@ /** * Meme fonctionnement que dessineArc. La courbure est plus sensible. - * + * * @param _x1 * @param y1 * @param x2 @@ -237,7 +254,7 @@ * @param vy2 */ public void dessineArc2D(final Graphics2D _g, final double _x1, final double _y1, final double _x2, final double _y2, - final double _vx1, final double _vy1, final double _vx2, final double _vy2) { + final double _vx1, final double _vy1, final double _vx2, final double _vy2) { final Color oldColor = _g.getColor(); final Stroke oldStroke = _g.getStroke(); if (!initialisationGraphics(_g)) { @@ -252,20 +269,20 @@ * Dessine une ellipse passant par les points x1,x2,x3 et x4. */ public void dessineEllipse(final Graphics2D _g, final int _x1, final int _y1, final int _x2, final int _y2, - final int _x3, final int _y3, final int _x4, final int _y4) { + final int _x3, final int _y3, final int _x4, final int _y4) { int i; final Polygon arc1 = arc2polygon((_x1 + _x2) / 2, (_y1 + _y2) / 2, (_x2 + _x3) / 2, (_y2 + _y3) / 2, - (int) ((_x2 - _x1) * C_MAGIC), (int) ((_y2 - _y1) * C_MAGIC), (int) ((_x3 - _x2) * C_MAGIC), - (int) ((_y3 - _y2) * C_MAGIC)); + (int) ((_x2 - _x1) * C_MAGIC), (int) ((_y2 - _y1) * C_MAGIC), (int) ((_x3 - _x2) * C_MAGIC), + (int) ((_y3 - _y2) * C_MAGIC)); final Polygon arc2 = arc2polygon((_x2 + _x3) / 2, (_y2 + _y3) / 2, (_x3 + _x4) / 2, (_y3 + _y4) / 2, - (int) ((_x3 - _x2) * C_MAGIC), (int) ((_y3 - _y2) * C_MAGIC), (int) ((_x4 - _x3) * C_MAGIC), - (int) ((_y4 - _y3) * C_MAGIC)); + (int) ((_x3 - _x2) * C_MAGIC), (int) ((_y3 - _y2) * C_MAGIC), (int) ((_x4 - _x3) * C_MAGIC), + (int) ((_y4 - _y3) * C_MAGIC)); final Polygon arc3 = arc2polygon((_x3 + _x4) / 2, (_y3 + _y4) / 2, (_x4 + _x1) / 2, (_y4 + _y1) / 2, - (int) ((_x4 - _x3) * C_MAGIC), (int) ((_y4 - _y3) * C_MAGIC), (int) ((_x1 - _x4) * C_MAGIC), - (int) ((_y1 - _y4) * C_MAGIC)); + (int) ((_x4 - _x3) * C_MAGIC), (int) ((_y4 - _y3) * C_MAGIC), (int) ((_x1 - _x4) * C_MAGIC), + (int) ((_y1 - _y4) * C_MAGIC)); final Polygon arc4 = arc2polygon((_x4 + _x1) / 2, (_y4 + _y1) / 2, (_x1 + _x2) / 2, (_y1 + _y2) / 2, - (int) ((_x1 - _x4) * C_MAGIC), (int) ((_y1 - _y4) * C_MAGIC), (int) ((_x2 - _x1) * C_MAGIC), - (int) ((_y2 - _y1) * C_MAGIC)); + (int) ((_x1 - _x4) * C_MAGIC), (int) ((_y1 - _y4) * C_MAGIC), (int) ((_x2 - _x1) * C_MAGIC), + (int) ((_y2 - _y1) * C_MAGIC)); final int[] ellx = new int[arc1.npoints + arc2.npoints + arc3.npoints + arc4.npoints]; final int[] elly = new int[arc1.npoints + arc2.npoints + arc3.npoints + arc4.npoints]; for (i = 0; i < arc1.npoints; i++) { @@ -289,7 +306,7 @@ /** * Dessine une eclipse dans le rectangle dont le coin a gauche est (_x,_y), la largeur _w et la hauteur _h. - * + * * @param _x abscisse point en haut a gauche * @param _y abscisse point en haut a gauche * @param _w largeur @@ -319,8 +336,9 @@ } /** - * Trace une fleche. La fleche est tracee avec le type definit par <i>typeTrait </i>. \ | \ ecart \ | ------------ / / /<-->retour - * + * Trace une fleche. La fleche est tracee avec le type definit par <i>typeTrait </i>. \ | \ ecart \ | ------------ / / + * /<-->retour + * * @param _x1 premier point x * @param _y1 premier point y * @param _x2 deuxieme point x @@ -330,7 +348,7 @@ * @see #setTypeTrait(int) */ public void dessineFleche(final Graphics2D _g, final int _x1, final int _y1, final int _x2, final int _y2, - final int _retour, final int _ecart) { + final int _retour, final int _ecart) { final Color oldColor = _g.getColor(); final Stroke oldStroke = _g.getStroke(); if (!initialisationGraphics(_g)) { @@ -339,13 +357,13 @@ _g.drawLine(_x1, _y1, _x2, _y2); _g.setColor(oldColor); _g.setStroke(oldStroke); - + dessinePointe(_g, _x1, _y1, _x2, _y2, _retour, _ecart); } - + /** - * Trac\xE9 d'une pointe de fleche uniquement, centr\xE9e sur (xpointe,ypointe). - * La direction est donn\xE9e par le deuxieme point (xorig,yorig). + * Trac\xE9 d'une pointe de fleche uniquement, centr\xE9e sur (xpointe,ypointe). La direction est donn\xE9e par le deuxieme point + * (xorig,yorig). * @param _g Le contexte graphique * @param _xorig Le x du point d'origine, donnant la direction. * @param _yorig Le y du point d'origine, donnant la direction. @@ -355,7 +373,7 @@ * @param _retour la longueur du retour de la fleche */ public void dessinePointe(final Graphics2D _g, final int _xorig, final int _yorig, final int _xpointe, final int _ypointe, - final int _retour, final int _ecart) { + final int _retour, final int _ecart) { final Color oldColor = _g.getColor(); final Stroke oldStroke = _g.getStroke(); if (!initialisationGraphics(_g)) { @@ -391,12 +409,10 @@ _g.setColor(oldColor); _g.setStroke(oldStroke); } - - - + /** * Trace un polygone. Il est trace avec le type definit par <i>typeTrait </i>. - * + * * @param _x polygone x * @param _y polygone y * @see #setTypeTrait(int) @@ -423,7 +439,7 @@ /** * Trace une polyligne. Elle est tracee avec le type defini par <i>typeTrait </i>. - * + * * @param _x polyligne x * @param _y polyligne y * @see #setTypeTrait(int) @@ -455,13 +471,13 @@ } public void dessineRectangle(final Graphics2D _g2d, final double _x, final double _y, final double _largeur, - final double _hauteur) { + final double _hauteur) { dessineRectangle(_g2d, (int) _x, (int) _y, (int) _largeur, (int) _hauteur); } /** * Trace un rectangle. Il est trace avec le type de trait <i>typetrait </i>. - * + * * @param _x position x * @param _y position y * @param _largeur largeur @@ -473,7 +489,7 @@ } public void dessineRoundRectangle(final Graphics2D _g, final int _x, final int _y, final int _largeur, - final int _hauteur, final int _rayon) { + final int _hauteur, final int _rayon) { final Color oldColor = _g.getColor(); final Stroke oldStroke = _g.getStroke(); if (!initialisationGraphics(_g)) { @@ -489,9 +505,11 @@ r.setRect(_x - 1d, _y + _hauteur - 1d, 2d, 2d); _g.draw(r); } - if (_rayon > 0) _g.drawRoundRect(_x, _y, _largeur - 1, _hauteur - 1, _rayon, _rayon); - else + if (_rayon > 0) { + _g.drawRoundRect(_x, _y, _largeur - 1, _hauteur - 1, _rayon, _rayon); + } else { _g.drawRect(_x, _y, _largeur - 1, _hauteur - 1); + } _g.setColor(oldColor); _g.setStroke(oldStroke); } @@ -512,7 +530,7 @@ /** * Trace un texte. - * + * * @param _t le texte * @param _x position x * @param _y position y @@ -537,7 +555,7 @@ /** * Trace un trait. Le trait est trace avec le type definit par <i>typeTrait </i>. - * + * * @param _x1 premier point x * @param _y1 premier point y * @param _x2 deuxieme point x @@ -558,7 +576,12 @@ _g.drawRect(_x1 - 1, _y1 - 1, 2, 2); _g.drawRect(_x2 - 1, _y2 - 1, 2, 2); } else { - _g.drawLine(_x1, _y1, _x2, _y2); + try { + _g.drawLine(_x1, _y1, _x2, _y2); + } catch (Throwable e) { + Stroke stroke = _g.getStroke(); + e.printStackTrace(); + } } _g.setColor(oldColor); _g.setStroke(oldStroke); @@ -584,13 +607,13 @@ return DEFAULT_STROKE; } switch (model_.typeTrait_) { - case POINTILLE: - return DEFAULT_POINTILLE_STROKE; - case TIRETE: - return DEFAULT_TIRETE_STROKE; - case MIXTE: - return DEFAULT_MIXTE_STROKE; - default: + case POINTILLE: + return DEFAULT_POINTILLE_STROKE; + case TIRETE: + return DEFAULT_TIRETE_STROKE; + case MIXTE: + return DEFAULT_MIXTE_STROKE; + default: } } if (model_.typeTrait_ == LISSE || (model_.typeTrait_ == POINT_MARQUE)) { @@ -614,5 +637,4 @@ public boolean setTypeTrait(final int _type) { return model_.setTypeTrait(_type); } - } \ 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...> - 2012-07-18 15:37:18
|
Revision: 7509 http://fudaa.svn.sourceforge.net/fudaa/?rev=7509&view=rev Author: deniger Date: 2012-07-18 15:37:07 +0000 (Wed, 18 Jul 2012) Log Message: ----------- ajout m?\195?\169thode utilitaires Modified Paths: -------------- trunk/framework/ctulu-bu/src/main/java/com/memoire/bu/BuTable.java trunk/framework/ctulu-ui/src/main/java/org/fudaa/ctulu/gui/ActionTransferSource.java trunk/framework/ebli-1d/src/main/java/org/fudaa/ebli/courbe/EGTableGraphePanel.java Modified: trunk/framework/ctulu-bu/src/main/java/com/memoire/bu/BuTable.java =================================================================== --- trunk/framework/ctulu-bu/src/main/java/com/memoire/bu/BuTable.java 2012-07-18 15:21:48 UTC (rev 7508) +++ trunk/framework/ctulu-bu/src/main/java/com/memoire/bu/BuTable.java 2012-07-18 15:37:07 UTC (rev 7509) @@ -1,14 +1,10 @@ /** - * @modification $Date: 2006-09-19 14:35:10 $ - * @statut unstable - * @file BuTable.java - * @version 0.43 - * @author Guillaume Desnoix - * @email gui...@de... - * @license GNU General Public License 2 (GPL2) - * @copyright 1998-2005 Guillaume Desnoix + * @modification $Date: 2006-09-19 14:35:10 $ @statut unstable @file BuTable.java + * + * @version 0.43 + * @author Guillaume Desnoix @email gui...@de... @license GNU General Public License 2 (GPL2) @copyright + * 1998-2005 Guillaume Desnoix */ - package com.memoire.bu; import java.awt.Graphics; @@ -28,166 +24,148 @@ /** * Similar to JTable but add copy/select operations and row headers. + * * @see javax.swing.JTable */ public class BuTable - extends JTable - implements ClipboardOwner -{ - public BuTable() - { + extends JTable + implements ClipboardOwner { + + public BuTable() { this(null); } - public BuTable(TableModel _model) - { + public BuTable(TableModel _model) { super(_model); // if(FuLib.jdk()>=1.4) // { - setFocusCycleRoot(false); + setFocusCycleRoot(false); // } } - public BuTable(Object[][] _values, Object[] _names) - { - this(new BuTableStaticModel(_values,_names)); + public BuTable(Object[][] _values, Object[] _names) { + this(new BuTableStaticModel(_values, _names)); } - public boolean isFocusCycleRoot() - { + public boolean isFocusCycleRoot() { return false; } // Columns - - public void hideColumn(int _indexInModel) - { - Object o=getTableHeader(); - if(o instanceof BuTableColumnHeader) - ((BuTableColumnHeader)o).hideColumn - (getColumnModel().getColumn(_indexInModel)); + public void hideColumn(int _indexInModel) { + Object o = getTableHeader(); + if (o instanceof BuTableColumnHeader) { + ((BuTableColumnHeader) o).hideColumn(getColumnModel().getColumn(_indexInModel)); + } } - public void showColumn(int _indexInModel) - { - Object o=getTableHeader(); - if(o instanceof BuTableColumnHeader) - ((BuTableColumnHeader)o).showColumn - (getColumnModel().getColumn(_indexInModel)); + public void showColumn(int _indexInModel) { + Object o = getTableHeader(); + if (o instanceof BuTableColumnHeader) { + ((BuTableColumnHeader) o).showColumn(getColumnModel().getColumn(_indexInModel)); + } } - public void adjustColumnWidth(int _indexInModel) - { - Object o=getTableHeader(); - if(o instanceof BuTableColumnHeader) - ((BuTableColumnHeader)o).adjustWidth - (getColumnModel().getColumn(_indexInModel)); + public void adjustColumnWidth(int _indexInModel) { + Object o = getTableHeader(); + if (o instanceof BuTableColumnHeader) { + ((BuTableColumnHeader) o).adjustWidth(getColumnModel().getColumn(_indexInModel)); + } } - public void adjustVisibleColumns() - { - Object o=getTableHeader(); - if(o instanceof BuTableColumnHeader) - { - TableColumnModel m=getColumnModel(); - for(int i=m.getColumnCount()-1;i>=0;i--) - ((BuTableColumnHeader)o).adjustWidth(m.getColumn(i)); + public void adjustVisibleColumns() { + Object o = getTableHeader(); + if (o instanceof BuTableColumnHeader) { + TableColumnModel m = getColumnModel(); + for (int i = m.getColumnCount() - 1; i >= 0; i--) { + ((BuTableColumnHeader) o).adjustWidth(m.getColumn(i)); + } } } // Anti-aliasing - - public void paint(Graphics _g) - { - BuLib.setAntialiasing(this,_g); + public void paint(Graphics _g) { + BuLib.setAntialiasing(this, _g); super.paint(_g); } /* - public void setTableData(Object[][] _values, Object[] _names) - { - setModel(new BuTableStaticModel(_values,_names)); - } - */ + * public void setTableData(Object[][] _values, Object[] _names) { setModel(new BuTableStaticModel(_values,_names)); } + */ + private static final TableCellRenderer tcr_ = new BuTableCellRenderer(); - private static final TableCellRenderer tcr_=new BuTableCellRenderer(); - - public TableCellRenderer getDefaultRenderer(Class _columnClass) - { + public TableCellRenderer getDefaultRenderer(Class _columnClass) { return tcr_; } - public Object[][] getAllValues() - { - int nr =getRowCount(); - int nc =getColumnCount(); + public Object[][] getAllValues() { + int nr = getRowCount(); + int nc = getColumnCount(); - Object[][] r=new Object[nr][nc]; + Object[][] r = new Object[nr][nc]; - int i,j; - for(i=0;i<nr;i++) - for(j=0;j<nc;j++) - r[i][j]=getValueAt(i,j); + int i, j; + for (i = 0; i < nr; i++) { + for (j = 0; j < nc; j++) { + r[i][j] = getValueAt(i, j); + } + } return r; } - public Object[][] getSelectedValues() - { - int[] sr =getSelectedRows(); - int[] sc =getColumnModel().getSelectedColumns(); - boolean rsa=getRowSelectionAllowed(); - boolean csa=getColumnSelectionAllowed(); + public Object[][] getSelectedValues() { + int[] sr = getSelectedRows(); + int[] sc = getColumnModel().getSelectedColumns(); + boolean rsa = getRowSelectionAllowed(); + boolean csa = getColumnSelectionAllowed(); - Object[][] r=new Object[rsa ? sr.length : getRowCount()] - [csa ? sc.length : getColumnCount()]; + Object[][] r = new Object[rsa ? sr.length : getRowCount()][csa ? sc.length : getColumnCount()]; - int i,j; - for(i=0;i<r.length;i++) - for(j=0;j<r[i].length;j++) - r[i][j]=getValueAt(rsa ? sr[i] : i, csa ? sc[j] : j); + int i, j; + for (i = 0; i < r.length; i++) { + for (j = 0; j < r[i].length; j++) { + r[i][j] = getValueAt(rsa ? sr[i] : i, csa ? sc[j] : j); + } + } return r; } - public String[] getSelectedColumnNames() - { - int[] sc=getColumnModel().getSelectedColumns(); + public String[] getSelectedColumnNames() { + int[] sc = getColumnModel().getSelectedColumns(); - String[] r=new String[sc.length]; - for(int i=0;i<sc.length;i++) - r[i]=getColumnName(sc[i]); + String[] r = new String[sc.length]; + for (int i = 0; i < sc.length; i++) { + r[i] = getColumnName(sc[i]); + } return r; } - public void lostOwnership(Clipboard clipboard, Transferable contents) - { + public void lostOwnership(Clipboard clipboard, Transferable contents) { } - public String convertAllValues(String _separator) - { - return convert0(getAllValues(),_separator); + public String convertAllValues(String _separator) { + return convert0(getAllValues(), _separator); } - public String convertSelectedValues(String _separator) - { - return convert0(getSelectedValues(),_separator); + public String convertSelectedValues(String _separator) { + return convert0(getSelectedValues(), _separator); } - private String convert0(Object[][] _values,String _separator) - { - int l=_values.length; - StringBuffer r=new StringBuffer(l*40); + private String convert0(Object[][] _values, String _separator) { + int l = _values.length; + StringBuffer r = new StringBuffer(l * 40); - for(int i=0;i<l;i++) - { - for(int j=0;j<_values[i].length;j++) - { - if(j!=0) - r.append(_separator); - if(_values[i][j]!=null) - r.append(_values[i][j].toString()); + for (int i = 0; i < l; i++) { + for (int j = 0; j < _values[i].length; j++) { + if (j != 0) { + r.append(_separator); + } + if (_values[i][j] != null) { + r.append(_values[i][j].toString()); + } } r.append('\n'); } @@ -195,176 +173,104 @@ return r.toString(); } - public void copy() - { - Object[][] values=getSelectedValues(); - if((values==null)||(values.length==0)) - values=getAllValues(); + public Transferable createTransferable() { + Object[][] values = getSelectedValues(); + if ((values == null) || (values.length == 0)) { + values = getAllValues(); + } - String r=convert0(values,"\t"); + String r = convert0(values, "\t"); - if(!r.equals("")) - { - Clipboard clipboard=getToolkit().getSystemClipboard(); - StringSelection contents=new StringSelection(r); - clipboard.setContents(contents,this); + if (!r.equals("")) { + return new StringSelection(r); } + return null; } - public void select() - { - if(getColumnSelectionAllowed()&&getRowCount()>0) - setColumnSelectionInterval(0,getColumnCount()-1); - if(getRowSelectionAllowed()&&(getRowCount()>0)) - setRowSelectionInterval(0,getRowCount()-1); + public void copy() { + Transferable contents = createTransferable(); + if (contents != null) { + Clipboard clipboard = getToolkit().getSystemClipboard(); + clipboard.setContents(contents, this); + } } - public JList buildRowHeaders(boolean _letters) - { + public void select() { + if (getColumnSelectionAllowed() && getRowCount() > 0) { + setColumnSelectionInterval(0, getColumnCount() - 1); + } + if (getRowSelectionAllowed() && (getRowCount() > 0)) { + setRowSelectionInterval(0, getRowCount() - 1); + } + } + + public JList buildRowHeaders(boolean _letters) { /* - JList r=new JList - (new AbstractListModel() - { - public int getSize() { return getModel().getRowCount(); } - public Object getElementAt(int index) { return null; } - }); - r.setFixedCellWidth(40); - r.setFixedCellHeight(getRowHeight()+ - getIntercellSpacing().height); - r.setCellRenderer(new BuTableRowHeaderRenderer(this,_letters)); - r.setRequestFocusEnabled(false); - return r; - */ - return new BuTableRowHeader(this,_letters); + * JList r=new JList (new AbstractListModel() { public int getSize() { return getModel().getRowCount(); } public + * Object getElementAt(int index) { return null; } }); r.setFixedCellWidth(40); r.setFixedCellHeight(getRowHeight()+ + * getIntercellSpacing().height); r.setCellRenderer(new BuTableRowHeaderRenderer(this,_letters)); + * r.setRequestFocusEnabled(false); return r; + */ + return new BuTableRowHeader(this, _letters); } - public void addRowHeaders(JScrollPane _pane, boolean _letters) - { + public void addRowHeaders(JScrollPane _pane, boolean _letters) { _pane.setRowHeaderView(buildRowHeaders(_letters)); } - protected JTableHeader createDefaultTableHeader() - { + protected JTableHeader createDefaultTableHeader() { return new BuTableColumnHeader(columnModel); } - public void addColumn(TableColumn _column) - { + public void addColumn(TableColumn _column) { _column.setMinWidth(0); super.addColumn(_column); } /* - return new JTableHeader(columnModel) - { - public void paintComponent(Graphics _g) - { - BuLib.setAntialiasing(this,_g); - super.paintComponent(_g); + * return new JTableHeader(columnModel) { public void paintComponent(Graphics _g) { BuLib.setAntialiasing(this,_g); + * super.paintComponent(_g); + * + * JTable t=getTable(); if((t!=null)&&(t.getModel() instanceof BuTableSortModel)) { BuTableSortModel + * m=(BuTableSortModel)t.getModel(); Color old=_g.getColor(); int[] scs=m.getSortingColumns(); if(scs.length>0) { + * for(int j=0;j<scs.length;j++) { int c=scs[j]; if(c>=0) { String n=m.getColumnName(c); if(n!=null) { c=-1; for(int + * i=t.getColumnCount()-1;i>=0;i--) if(n.equals(t.getColumnName(i))) c=i; if(c>=0) { Rectangle r=getHeaderRect(c); + * _g.translate(r.x+r.width-10,r.y+r.height/2-3); BuLib.setColor(_g,Color.white); if(m.isAscending(c)) + * _g.fillPolygon(vbax,vbay,3); else _g.fillPolygon(vtax,vtay,3); BuLib.setColor(_g,(j==0) ? Color.black : + * Color.gray); if(m.isAscending(c)) _g.drawPolygon(vbax,vbay,3); else _g.drawPolygon(vtax,vtay,3); + * _g.translate(-(r.x+r.width-10),-(r.y+r.height/2-3)); } } } _g.setColor(old); } } } } }; } + */ - JTable t=getTable(); - if((t!=null)&&(t.getModel() instanceof BuTableSortModel)) - { - BuTableSortModel m=(BuTableSortModel)t.getModel(); - Color old=_g.getColor(); - int[] scs=m.getSortingColumns(); - if(scs.length>0) - { - for(int j=0;j<scs.length;j++) - { - int c=scs[j]; - if(c>=0) - { - String n=m.getColumnName(c); - if(n!=null) - { - c=-1; - for(int i=t.getColumnCount()-1;i>=0;i--) - if(n.equals(t.getColumnName(i))) c=i; - if(c>=0) - { - Rectangle r=getHeaderRect(c); - _g.translate(r.x+r.width-10,r.y+r.height/2-3); - BuLib.setColor(_g,Color.white); - if(m.isAscending(c)) _g.fillPolygon(vbax,vbay,3); - else _g.fillPolygon(vtax,vtay,3); - BuLib.setColor(_g,(j==0) ? Color.black : Color.gray); - if(m.isAscending(c)) _g.drawPolygon(vbax,vbay,3); - else _g.drawPolygon(vtax,vtay,3); - _g.translate(-(r.x+r.width-10),-(r.y+r.height/2-3)); - } - } - } - _g.setColor(old); - } - } - } - } - }; - } - */ - /* - public static void main(String[] _args) - { - JFrame frame=new JFrame("Test BuTable"); - - TableModel tm=new AbstractTableModel() - { - public int getRowCount() { return 101; } - //public String getColumnName(int col) { return ""+col; } - public int getColumnCount() { return 4; } - public Object getValueAt(int row, int col) - { - switch(col) - { - case 0: return FuFactoryInteger.get(row*(row%2==0 ? -row : row)); - case 1: return new String("["+row+"]"); - case 2: return FuFactoryBoolean.get(row%3==0); - case 3: return new java.util.Date(1000000*row); - } - return null; - } - }; - - - BuTableSortModel sorter=new BuTableSortModel(tm); - final BuTable tb=new BuTable(sorter); - sorter.addMouseListenerToHeaderInTable(tb); - - tb.setAutoResizeMode(tb.AUTO_RESIZE_OFF); - - tb.setColumnSelectionAllowed(true); - tb.setRowSelectionAllowed(true); - - //tb.getColumnModel().getSelectionModel(). - //setSelectionMode(ListSelectionModel.SINGLE_SELECTION); - //tb.getSelectionModel(). - //setSelectionMode(ListSelectionModel.SINGLE_SELECTION); - - TableCellRenderer tcr=new BuTableCellRenderer(); - for(int i=0;i<tb.getColumnCount();i++) - { - TableColumn c=tb.getColumn(tb.getColumnName(i)); - c.setCellRenderer(tcr); - } - - tb.hideColumn(2); - tb.adjustVisibleColumns(); - - JScrollPane sp=new JScrollPane(tb); - tb.addRowHeaders(sp,false); - frame.getContentPane().add(sp); - - frame.addWindowListener( new WindowAdapter() { - public void windowClosing( WindowEvent e ) { - System.err.println(tb.convertSelectedValues(",")); - System.exit(0); - } - }); - - frame.setSize(300,200); - frame.setVisible(true); - } - */ + * public static void main(String[] _args) { JFrame frame=new JFrame("Test BuTable"); + * + * TableModel tm=new AbstractTableModel() { public int getRowCount() { return 101; } //public String getColumnName(int + * col) { return ""+col; } public int getColumnCount() { return 4; } public Object getValueAt(int row, int col) { + * switch(col) { case 0: return FuFactoryInteger.get(row*(row%2==0 ? -row : row)); case 1: return new + * String("["+row+"]"); case 2: return FuFactoryBoolean.get(row%3==0); case 3: return new java.util.Date(1000000*row); + * } return null; } }; + * + * + * BuTableSortModel sorter=new BuTableSortModel(tm); final BuTable tb=new BuTable(sorter); + * sorter.addMouseListenerToHeaderInTable(tb); + * + * tb.setAutoResizeMode(tb.AUTO_RESIZE_OFF); + * + * tb.setColumnSelectionAllowed(true); tb.setRowSelectionAllowed(true); + * + * //tb.getColumnModel().getSelectionModel(). //setSelectionMode(ListSelectionModel.SINGLE_SELECTION); + * //tb.getSelectionModel(). //setSelectionMode(ListSelectionModel.SINGLE_SELECTION); + * + * TableCellRenderer tcr=new BuTableCellRenderer(); for(int i=0;i<tb.getColumnCount();i++) { TableColumn + * c=tb.getColumn(tb.getColumnName(i)); c.setCellRenderer(tcr); } + * + * tb.hideColumn(2); tb.adjustVisibleColumns(); + * + * JScrollPane sp=new JScrollPane(tb); tb.addRowHeaders(sp,false); frame.getContentPane().add(sp); + * + * frame.addWindowListener( new WindowAdapter() { public void windowClosing( WindowEvent e ) { + * System.err.println(tb.convertSelectedValues(",")); System.exit(0); } }); + * + * frame.setSize(300,200); frame.setVisible(true); } + */ } Modified: trunk/framework/ctulu-ui/src/main/java/org/fudaa/ctulu/gui/ActionTransferSource.java =================================================================== --- trunk/framework/ctulu-ui/src/main/java/org/fudaa/ctulu/gui/ActionTransferSource.java 2012-07-18 15:21:48 UTC (rev 7508) +++ trunk/framework/ctulu-ui/src/main/java/org/fudaa/ctulu/gui/ActionTransferSource.java 2012-07-18 15:37:07 UTC (rev 7509) @@ -14,6 +14,7 @@ import javax.swing.text.JTextComponent; import com.memoire.bu.BuResource; +import javax.swing.*; import org.fudaa.ctulu.CtuluLibString; @@ -26,17 +27,16 @@ final JComponent source; final Action destAction; - /** * @param name * @param icon */ - public ActionTransferSource(final JComponent source, final String destAction,final String name,Icon icon) { + public ActionTransferSource(final JComponent source, final String destAction, final String name, Icon icon) { super(name, icon); this.source = source; this.destAction = source.getActionMap().get(destAction); super.putValue(ACTION_COMMAND_KEY, destAction); - super.putValue(SHORT_DESCRIPTION , name); + super.putValue(SHORT_DESCRIPTION, name); } protected boolean isStateEnable() { @@ -54,9 +54,15 @@ } public static boolean isSomethingToCopy(JComponent jc) { - if (jc instanceof JTextComponent) { return !CtuluLibString.isEmpty(((JTextComponent) jc).getSelectedText()); } - if (jc instanceof JTable) { return !((JTable) jc).getSelectionModel().isSelectionEmpty(); } - if (jc instanceof JTree) { return !((JTree) jc).getSelectionModel().isSelectionEmpty(); } + if (jc instanceof JTextComponent) { + return !CtuluLibString.isEmpty(((JTextComponent) jc).getSelectedText()); + } + if (jc instanceof JTable) { + return !((JTable) jc).getSelectionModel().isSelectionEmpty(); + } + if (jc instanceof JTree) { + return !((JTree) jc).getSelectionModel().isSelectionEmpty(); + } return false; } @@ -67,19 +73,30 @@ * @param destAction */ public CopyAction(JComponent source) { - super(source, "copy",BuResource.BU.getString("Copier"),BuResource.BU.getIcon("crystal_copier")); + super(source, getActionName(), BuResource.BU.getString("Copier"), BuResource.BU.getIcon("crystal_copier")); + final KeyStroke keyStroke = getKeyStroke(); + putValue(ACCELERATOR_KEY, keyStroke); + source.getInputMap().put(getKeyStroke(), "newCopy"); + source.getActionMap().put("newCopy", this); } + public static String getActionName() { + return "copy"; + } + + public static KeyStroke getKeyStroke() { + return KeyStroke.getKeyStroke("control C"); + } + @Override public boolean isStateEnable() { return isSomethingToCopy(source); } - } /** * Paste from the system clipboard. - * + * * @author deniger */ public static class PasteAction extends ActionTransferSource { @@ -89,17 +106,30 @@ * @param destAction */ public PasteAction(JComponent source) { - super(source, "paste",BuResource.BU.getString("Coller"),BuResource.BU.getIcon("crystal_coller")); + super(source, getActionName(), BuResource.BU.getString("Coller"), BuResource.BU.getIcon("crystal_coller")); + final KeyStroke keyStroke = getKeyStroke(); + putValue(ACCELERATOR_KEY, keyStroke); + source.getInputMap().put(getKeyStroke(), "newPaste"); + source.getActionMap().put("newPaste", this); } + public static String getActionName() { + return "paste"; + } + + public static KeyStroke getKeyStroke() { + return KeyStroke.getKeyStroke("control V"); + } + @Override public boolean isStateEnable() { TransferHandler transferHandler = source.getTransferHandler(); - if (transferHandler == null) return false; + if (transferHandler == null) { + return false; + } Transferable contents = source.getToolkit().getSystemClipboard().getContents(null); return transferHandler.canImport(new TransferSupport(source, contents)); } - } public static class CutAction extends ActionTransferSource { @@ -109,16 +139,29 @@ * @param destAction */ public CutAction(JComponent source) { - super(source, "paste",BuResource.BU.getString("Couper"),BuResource.BU.getIcon("crystal_couper")); + super(source, "cut", BuResource.BU.getString("Couper"), BuResource.BU.getIcon("crystal_couper")); + final KeyStroke keyStroke = getKeyStroke(); + putValue(ACCELERATOR_KEY, keyStroke); + source.getInputMap().put(getKeyStroke(), "newCut"); + source.getActionMap().put("newCut", this); } + public static String getActionName() { + return "paste"; + } + + public static KeyStroke getKeyStroke() { + return KeyStroke.getKeyStroke("control X"); + } + @Override public boolean isStateEnable() { TransferHandler transferHandler = source.getTransferHandler(); int mode = transferHandler.getSourceActions(source); - if(mode!=TransferHandler.COPY_OR_MOVE&& mode!=TransferHandler.MOVE) return false; + if (mode != TransferHandler.COPY_OR_MOVE && mode != TransferHandler.MOVE) { + return false; + } return isSomethingToCopy(source); } } - } Modified: trunk/framework/ebli-1d/src/main/java/org/fudaa/ebli/courbe/EGTableGraphePanel.java =================================================================== --- trunk/framework/ebli-1d/src/main/java/org/fudaa/ebli/courbe/EGTableGraphePanel.java 2012-07-18 15:21:48 UTC (rev 7508) +++ trunk/framework/ebli-1d/src/main/java/org/fudaa/ebli/courbe/EGTableGraphePanel.java 2012-07-18 15:37:07 UTC (rev 7509) @@ -258,6 +258,7 @@ /** * @param _tab ArrayList */ + @Override protected void insertTableInTable(final ArrayList _tab) { final EGTableModel model = getEGTableModel(); if (!model.isModelModifiable()) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <de...@us...> - 2012-09-03 22:02:23
|
Revision: 7602 http://fudaa.svn.sourceforge.net/fudaa/?rev=7602&view=rev Author: deniger Date: 2012-09-03 22:02:17 +0000 (Mon, 03 Sep 2012) Log Message: ----------- Modified Paths: -------------- trunk/framework/ebli-1d/src/main/java/org/fudaa/ebli/courbe/EGGraphe.java trunk/framework/ebli-common/src/main/java/org/fudaa/ebli/controle/BSelecteurColorChooserBt.java trunk/framework/ebli-common/src/main/java/org/fudaa/ebli/controle/BSelecteurFont.java Added Paths: ----------- trunk/framework/ebli-1d/nbactions.xml Added: trunk/framework/ebli-1d/nbactions.xml =================================================================== --- trunk/framework/ebli-1d/nbactions.xml (rev 0) +++ trunk/framework/ebli-1d/nbactions.xml 2012-09-03 22:02:17 UTC (rev 7602) @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="UTF-8"?> +<actions> + <action> + <actionName>CUSTOM-deploy</actionName> + <displayName>deploy</displayName> + <goals> + <goal>deploy</goal> + </goals> + </action> + </actions> Modified: trunk/framework/ebli-1d/src/main/java/org/fudaa/ebli/courbe/EGGraphe.java =================================================================== --- trunk/framework/ebli-1d/src/main/java/org/fudaa/ebli/courbe/EGGraphe.java 2012-09-03 12:44:21 UTC (rev 7601) +++ trunk/framework/ebli-1d/src/main/java/org/fudaa/ebli/courbe/EGGraphe.java 2012-09-03 22:02:17 UTC (rev 7602) @@ -64,8 +64,7 @@ public static final Font DEFAULT_FONT = new Font("SansSerif", Font.PLAIN, 10); /** - * Liste qui contient les parametres d'origines des titres, doit etre relanc\xE9 dans le cas ou l'on ajoute de nouveau - * une legende. + * 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>(); @@ -728,11 +727,17 @@ public void structureChanged() { structureChanged(false); } + boolean restoring; public void structureChanged(final boolean _restore) { setXRangeIsModified(); if (autoRestore_ || _restore) { + if (restoring) { + return; + } + restoring = true; restore(); + restoring = false; } else { fullRepaint(); } @@ -932,7 +937,7 @@ final int height = (int) (transformer_.getHSansMarges() * factor / 2); /* * int width = (int) (factor getWidth() / 2); int height = (int) (factor getHeight() / 2); - */ setZoomOn(new Point(x + width, y + height), new Point(x - width, y - height)); + */ setZoomOn(new Point(x + width, y + height), new Point(x - width, y - height)); } Modified: trunk/framework/ebli-common/src/main/java/org/fudaa/ebli/controle/BSelecteurColorChooserBt.java =================================================================== --- trunk/framework/ebli-common/src/main/java/org/fudaa/ebli/controle/BSelecteurColorChooserBt.java 2012-09-03 12:44:21 UTC (rev 7601) +++ trunk/framework/ebli-common/src/main/java/org/fudaa/ebli/controle/BSelecteurColorChooserBt.java 2012-09-03 22:02:17 UTC (rev 7602) @@ -35,7 +35,6 @@ public class BSelecteurColorChooserBt extends BSelecteurAbstract implements ActionListener { TraceIconButton bt_; - boolean useInvisible_; protected class PopupButton extends CtuluButtonForPopup { @@ -62,9 +61,7 @@ public BSelecteurColorChooserBt(final boolean _invisible) { this(_invisible, BSelecteurColorChooser.DEFAULT_PROPERTY); } - BuPanel pn_; - private PopupButton popupButton; public BSelecteurColorChooserBt(final String _prop) { @@ -82,7 +79,6 @@ popupButton = new PopupButton(); pn_.add(popupButton); pn_.addPropertyChangeListener("enabled", new PropertyChangeListener() { - public void propertyChange(PropertyChangeEvent evt) { bt_.setEnabled(pn_.isEnabled()); popupButton.setEnabled(pn_.isEnabled()); @@ -109,6 +105,10 @@ CtuluLibSwing.setEnable(pn_, _b); } + public BuPanel getPanel() { + return pn_; + } + public JComponent[] getComponents() { return createComponents(pn_); } @@ -121,5 +121,4 @@ public BuPanel getPn() { return pn_; } - } Modified: trunk/framework/ebli-common/src/main/java/org/fudaa/ebli/controle/BSelecteurFont.java =================================================================== --- trunk/framework/ebli-common/src/main/java/org/fudaa/ebli/controle/BSelecteurFont.java 2012-09-03 12:44:21 UTC (rev 7601) +++ trunk/framework/ebli-common/src/main/java/org/fudaa/ebli/controle/BSelecteurFont.java 2012-09-03 22:02:17 UTC (rev 7602) @@ -44,7 +44,6 @@ d.setVisible(true); } - public BuButton bt_ = new BuButton(); public BSelecteurFont(final String _property) { @@ -63,11 +62,13 @@ if (f != null) { bt_.setFont(f); } + } + public BuButton getButton() { + return bt_; } public JComponent[] getComponents() { return super.createComponents(bt_); } - } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <de...@us...> - 2012-09-04 21:10:24
|
Revision: 7606 http://fudaa.svn.sourceforge.net/fudaa/?rev=7606&view=rev Author: deniger Date: 2012-09-04 21:10:18 +0000 (Tue, 04 Sep 2012) Log Message: ----------- Modified Paths: -------------- trunk/framework/ebli-1d/src/main/java/org/fudaa/ebli/courbe/EGConfigureActionPalette.java trunk/framework/ebli-1d/src/main/java/org/fudaa/ebli/courbe/EGFillePanel.java trunk/framework/ebli-1d/src/main/java/org/fudaa/ebli/courbe/EGTreeCellRenderer.java Added Paths: ----------- trunk/framework/ctulu-ui/nbactions.xml Added: trunk/framework/ctulu-ui/nbactions.xml =================================================================== --- trunk/framework/ctulu-ui/nbactions.xml (rev 0) +++ trunk/framework/ctulu-ui/nbactions.xml 2012-09-04 21:10:18 UTC (rev 7606) @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="UTF-8"?> +<actions> + <action> + <actionName>CUSTOM-deploy</actionName> + <displayName>deploy</displayName> + <goals> + <goal>deploy</goal> + </goals> + </action> + </actions> Modified: trunk/framework/ebli-1d/src/main/java/org/fudaa/ebli/courbe/EGConfigureActionPalette.java =================================================================== --- trunk/framework/ebli-1d/src/main/java/org/fudaa/ebli/courbe/EGConfigureActionPalette.java 2012-09-04 09:13:04 UTC (rev 7605) +++ trunk/framework/ebli-1d/src/main/java/org/fudaa/ebli/courbe/EGConfigureActionPalette.java 2012-09-04 21:10:18 UTC (rev 7606) @@ -11,6 +11,7 @@ */ package org.fudaa.ebli.courbe; +import javax.swing.Action; import javax.swing.event.ListSelectionEvent; import org.fudaa.ebli.commun.EbliLib; Modified: trunk/framework/ebli-1d/src/main/java/org/fudaa/ebli/courbe/EGFillePanel.java =================================================================== --- trunk/framework/ebli-1d/src/main/java/org/fudaa/ebli/courbe/EGFillePanel.java 2012-09-04 09:13:04 UTC (rev 7605) +++ trunk/framework/ebli-1d/src/main/java/org/fudaa/ebli/courbe/EGFillePanel.java 2012-09-04 21:10:18 UTC (rev 7606) @@ -56,16 +56,12 @@ * @version $Id: EGFillePanel.java,v 1.32 2007-05-22 14:19:04 deniger Exp $ */ public class EGFillePanel extends BuPanel implements PropertyChangeListener, ActionListener, CtuluSelectionInterface, - CtuluImageProducer { + CtuluImageProducer { protected final EGVue vue_; - JLabel lbTools_; - EbliActionInterface[] personnalAction_; - final protected EGInteractionSelection selection_; - EbliActionInterface[] specificTools_; /** @@ -115,7 +111,6 @@ // public JComponent getInfoPanel() { // return suiviInfos_.getTableInfos(); // } - protected EbliActionInterface[] buildActions() { final List r = new ArrayList(8); final List actionForGroup = new ArrayList(5); @@ -123,7 +118,7 @@ vue_.graphe_.addKeyListener(selection_); vue_.addInteractiveCmp(selection_); EGActionInteraction a = new EGActionInteraction(EbliResource.EBLI.getString("S\xE9lection ponctuelle"), - EbliResource.EBLI.getIcon("fleche"), "SELECT", selection_); + EbliResource.EBLI.getIcon("fleche"), "SELECT", selection_); a.putValue(Action.SHORT_DESCRIPTION, EbliResource.EBLI.getString("S\xE9lectionner des points")); a.putValue(Action.ACCELERATOR_KEY, KeyStroke.getKeyStroke('s')); r.add(a); @@ -131,8 +126,7 @@ actionForGroup.add(a); EbliActionAbstract s = new EbliActionSimple(EbliResource.EBLI.getString("Restaurer"), EbliResource.EBLI - .getIcon("restore"), "RESTORE") { - + .getIcon("restore"), "RESTORE") { public void actionPerformed(ActionEvent _e) { vue_.getGraphe().restore(); } @@ -142,13 +136,13 @@ s.putValue(EbliActionInterface.SECOND_KEYSTROKE, KeyStroke.getKeyStroke(KeyEvent.VK_F5, 0)); r.add(s); s = new EbliActionChangeState(EbliLib.getS("Restaurer automatiquement"), EbliResource.EBLI.getIcon("restoreauto"), - "AUTO_REST") { + "AUTO_REST") { public void changeAction() { getGraphe().setAutoRestore(isSelected()); } }; // EM:Si la fonctionnalit\xE9 'Restaurer automatiquement' est d\xE9j\xE0 activ\xE9e, selectionner l'action. - ((EbliActionChangeState)s).setSelected(getGraphe().isAutoRestore()); + ((EbliActionChangeState) s).setSelected(getGraphe().isAutoRestore()); // s.putValue(Action.SHORT_DESCRIPTION, EbliLib.getS("Restaurer automatiquement la vue")); r.add(s); @@ -192,7 +186,7 @@ final EGInteractionDeplacementPoint pt = new EGInteractionDeplacementPoint(this); vue_.addInteractiveCmp(pt); a = new EGActionInteraction(EbliResource.EBLI.getString("D\xE9placer un point"), EbliResource.EBLI - .getIcon("node-move-hand"), "MOVE_POINT", pt); + .getIcon("node-move-hand"), "MOVE_POINT", pt); a.putValue(Action.SHORT_DESCRIPTION, EbliResource.EBLI.getString("D\xE9placer le point s\xE9lectionn\xE9")); r.add(a); pt.addPropertyChangeListener(this); @@ -206,18 +200,16 @@ } // r.add(new EGConfigureActionPalette(vue_.graphe_.getModel())); - r.add(new EbliActionSimple(EbliLib.getS("Configuration"), BuResource.BU.getToolIcon("configurer"), "CONFIGURE") { + r.add(new EbliActionSimple(EbliLib.getS("Configurer les courbes"), BuResource.BU.getToolIcon("configurer"), "CONFIGURE") { public void actionPerformed(ActionEvent _e) { EGPaletteLegendeGraphe palette = new EGPaletteLegendeGraphe(getGraphe()); palette.setPreferredSize(new Dimension(500, 600)); palette.afficheModale(CtuluLibSwing.getFrameAncestor(EGFillePanel.this)); } - }); final BPaletteInfoAbstractAction info = new BPaletteInfoAbstractAction() { - public JComponent buildContentPane() { return new EGPaletteInfo(EGFillePanel.this, null); } @@ -243,8 +235,7 @@ if (getModel().canAddCourbe()) { r.add(null); final EbliActionSimple addAction = new EbliActionSimple(EbliLib.getS("Ajouter une courbe"), BuResource.BU - .getToolIcon("creer"), "NEW_CURVE") { - + .getToolIcon("creer"), "NEW_CURVE") { public void actionPerformed(ActionEvent _e) { getModel().addNewCourbe(vue_.graphe_.getCmd(), EGFillePanel.this, EGFillePanel.this.getGraphe()); vue_.graphe_.restore(); @@ -252,7 +243,7 @@ }; getModel().decoreAddButton(addAction); addAction.putValue(Action.ACCELERATOR_KEY, KeyStroke.getKeyStroke(KeyEvent.VK_M, InputEvent.CTRL_DOWN_MASK - | InputEvent.SHIFT_DOWN_MASK)); + | InputEvent.SHIFT_DOWN_MASK)); r.add(addAction); } @@ -290,7 +281,6 @@ } protected void fillPopupMenu(final BuPopupMenu _menu) { - } public void popupMenu(final int _x, final int _y) { @@ -300,21 +290,21 @@ boolean actif = false; final EGCourbe c = vue_.graphe_.getSelectedComponent(); final boolean cModifiable = (c != null) && (c.getModel().isModifiable()) && (getSelection() != null) - && (!getSelection().isEmpty()); + && (!getSelection().isEmpty()); m.addMenuItem(EbliLib.getS("Modifier les points s\xE9lectionn\xE9s"), "MODIFY_POINTS", EbliResource.EBLI - .getToolIcon("node-edit"), cModifiable)/* .addActionListener(this) */; + .getToolIcon("node-edit"), cModifiable)/* .addActionListener(this) */; actif = cModifiable && (getSelection().getNbSelectedIndex() >= 2); m.addMenuItem(EbliLib.getS("Aligner les points"), "ALIGN_POINTS", EbliResource.EBLI.getToolIcon("node-corner"), - actif)/* .addActionListener(this) */; + actif)/* .addActionListener(this) */; actif = c != null && c.getModel().isModifiable() && c.getModel().isXModifiable() - && (getSelection().getNbSelectedIndex() >= 2); + && (getSelection().getNbSelectedIndex() >= 2); m.addMenuItem(EbliLib.getS("Raffiner"), "ADD_POINTS", EbliResource.EBLI.getToolIcon("node-add"), actif)/* - * .addActionListener - * (this) - */; + * .addActionListener + * (this) + */; actif = c != null && cModifiable && c.getModel().isXModifiable() && c.getModel().getNbValues() > 2; m.addMenuItem(EbliLib.getS("Supprimer un point"), "REMOVE_POINTS", EbliResource.EBLI.getToolIcon("node-delete"), - actif)/* .addActionListener(this) */; + actif)/* .addActionListener(this) */; m.add(new BuSeparator()); fillSpecificMenu(m); m.show(this, _x, _y); @@ -327,7 +317,7 @@ final String c = _evt.getActionCommand(); if ("MODIFY_POINTS".equals(c)) { EGTransfoLib.modifier(vue_.graphe_, getCourbeSelected(), getSelection().getSelectedIndex(), vue_.getGraphe() - .getCmd()); + .getCmd()); } else if ("ALIGN_POINTS".equals(c)) { final EGCourbe courbe = getCourbeSelected(); if (courbe != null) { @@ -340,7 +330,7 @@ final CtuluListSelectionInterface i = getSelection(); if ((i != null) && (i.getNbSelectedIndex() >= 2)) { EGTransfoLib.ajouterPoint(vue_.graphe_, getCourbeSelected(), i.getMinIndex(), i.getMaxIndex(), vue_.getGraphe() - .getCmd()); + .getCmd()); } } else if ("REMOVE_POINTS".equals(c)) { final EGCourbe courbe = getCourbeSelected(); @@ -358,7 +348,9 @@ */ public void fillSpecificMenu(final JMenu _m) { final EbliActionInterface[] ac = getSpecificActions(); - if (ac == null) { return; } + if (ac == null) { + return; + } final int n = ac.length; for (int i = 0; i < n; i++) { final EbliActionInterface a = ac[i]; @@ -375,7 +367,9 @@ */ public void fillSpecificMenu(final JPopupMenu _popup) { final EbliActionInterface[] ac = getSpecificActions(); - if (ac == null) { return; } + if (ac == null) { + return; + } final int n = ac.length; for (int i = 0; i < n; i++) { final EbliActionInterface a = ac[i]; @@ -387,7 +381,8 @@ } } - public void find() {} + public void find() { + } /** * @return la taille de l'image generee par defaut par ce composant @@ -438,7 +433,8 @@ } } - public void replace() {} + public void replace() { + } public void select() { selection_.selectAll(); @@ -446,7 +442,7 @@ /** * Les outils seront reconstruits avec les nouvelles actions suppl\xE9mentaires. - * + * * @param _a nouvelles actions a ajouter. */ public final void setPersonnalAction(final EbliActionInterface[] _a) { @@ -455,5 +451,4 @@ } personnalAction_ = _a; } - } \ No newline at end of file Modified: trunk/framework/ebli-1d/src/main/java/org/fudaa/ebli/courbe/EGTreeCellRenderer.java =================================================================== --- trunk/framework/ebli-1d/src/main/java/org/fudaa/ebli/courbe/EGTreeCellRenderer.java 2012-09-04 09:13:04 UTC (rev 7605) +++ trunk/framework/ebli-1d/src/main/java/org/fudaa/ebli/courbe/EGTreeCellRenderer.java 2012-09-04 21:10:18 UTC (rev 7606) @@ -56,6 +56,7 @@ } public static class AxeChooserRenderer extends EGTreeCellRenderer { + final EGAxeVertical vert_; public AxeChooserRenderer(final EGAxeVertical _vert) { @@ -86,9 +87,7 @@ } } } - } - JTextField r1_; JLabel r2_; JLabel r3_; @@ -101,7 +100,6 @@ public EGTreeCellRenderer(final boolean _isList) { r1_ = new BuTextField() { - public void setUI(final TextUI _ui) { super.setUI(_ui); setBorder(null); @@ -137,10 +135,10 @@ } public Component getTableCellRendererComponent(final JTable _table, final Object _value, final boolean _isSelected, - final boolean _hasFocus, final int _row, final int _column) { + final boolean _hasFocus, final int _row, final int _column) { updateComponent(_table.getFont(), UIManager.getColor("Table.foreground"), UIManager.getColor("Table.background"), - UIManager.getColor("Table.selectionForeground"), UIManager.getColor("Table.selectionBackground"), _value, - _isSelected); + UIManager.getColor("Table.selectionForeground"), UIManager.getColor("Table.selectionBackground"), _value, + _isSelected); if (_column == 0) { return r3_; } @@ -151,8 +149,13 @@ } public void updateComponent(final Font _f, final Color _foregroundColor, final Color _backGroundColor, - final Color _selectionColor, final Color _selectionBackGroungColor, final Object _value, final boolean _selected) { + final Color _selectionColor, final Color _selectionBackGroungColor, final Object _value, final boolean _selected) { startUpdateComponent(); + if (_value == null) { + r1_.setText(CtuluLibString.EMPTY_STRING); + r1_.setToolTipText(CtuluLibString.EMPTY_STRING); + return; + } r1_.setText(_value.toString()); r1_.setToolTipText(_value.toString()); r1_.setFont(_f); @@ -217,17 +220,18 @@ finishUpdateComponent(_value); } - protected void startUpdateComponent() {} + protected void startUpdateComponent() { + } - protected void finishUpdateComponent(final Object _value) {} + protected void finishUpdateComponent(final Object _value) { + } public Component getListCellRendererComponent(final JList _list, final Object _value, final int _index, - final boolean _isSelected, final boolean _cellHasFocus) { + final boolean _isSelected, final boolean _cellHasFocus) { updateComponent(_list.getFont(), _list.getForeground(), _list.getBackground(), _list.getSelectionForeground(), - _list.getSelectionBackground(), _value, _isSelected); + _list.getSelectionBackground(), _value, _isSelected); return this; } - Color treeSelectionForeground_; Color treeSelectionBackground_; @@ -240,11 +244,11 @@ } updateComponent(_tree.getFont(), _tree.getForeground(), _tree.getBackground(), treeSelectionForeground_, - treeSelectionBackground_, _value, _selected); + treeSelectionBackground_, _value, _selected); } public Component getTreeCellRendererComponent(final JTree _tree, final Object _value, final boolean _selected, - final boolean _expanded, final boolean _leaf, final int _row, final boolean _hasFocus) { + final boolean _expanded, final boolean _leaf, final int _row, final boolean _hasFocus) { updateTreeCellRenderer(_tree, _value, _selected); return this; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <de...@us...> - 2012-09-10 21:59:49
|
Revision: 7618 http://fudaa.svn.sourceforge.net/fudaa/?rev=7618&view=rev Author: deniger Date: 2012-09-10 21:59:42 +0000 (Mon, 10 Sep 2012) Log Message: ----------- Modified Paths: -------------- trunk/framework/ebli-1d/src/main/java/org/fudaa/ebli/courbe/EGAxe.java trunk/framework/ebli-1d/src/main/java/org/fudaa/ebli/courbe/EGAxeConfigureTarget.java trunk/framework/ebli-1d/src/main/java/org/fudaa/ebli/courbe/EGAxeVerticalPersist.java trunk/framework/ebli-1d/src/main/java/org/fudaa/ebli/courbe/EGCourbe.java trunk/framework/ebli-1d/src/main/java/org/fudaa/ebli/courbe/EGCourbePersist.java trunk/framework/ebli-1d/src/main/java/org/fudaa/ebli/courbe/EGCourbePersistBuilder.java trunk/framework/ebli-1d/src/main/java/org/fudaa/ebli/courbe/EGGraphe.java trunk/framework/ebli-1d/src/main/java/org/fudaa/ebli/courbe/EGLegendPanelManager.java trunk/framework/ebli-1d/src/main/java/org/fudaa/ebli/courbe/EGRepere.java trunk/framework/ebli-1d/src/main/java/org/fudaa/ebli/courbe/EGTableGraphePanel.java trunk/framework/ebli-common/src/main/java/org/fudaa/ebli/trace/TraceBox.java Modified: trunk/framework/ebli-1d/src/main/java/org/fudaa/ebli/courbe/EGAxe.java =================================================================== --- trunk/framework/ebli-1d/src/main/java/org/fudaa/ebli/courbe/EGAxe.java 2012-09-10 06:19:34 UTC (rev 7617) +++ trunk/framework/ebli-1d/src/main/java/org/fudaa/ebli/courbe/EGAxe.java 2012-09-10 21:59:42 UTC (rev 7618) @@ -90,6 +90,8 @@ protected boolean isExtremiteDessinee_; protected boolean isTitreCentre_ = true; protected TickIterator reuseIterator_; + + protected Object key; public EGAxe() { titre_ = ""; @@ -101,6 +103,16 @@ initDisplayValues(); } + public Object getKey() { + return key; + } + + public void setKey(Object key) { + this.key = key; + } + + + public final void initDisplayValues() { if (traceGraduations_ == null) { traceGraduations_ = new TraceLigneModel(TraceLigne.TIRETE, 1, Color.black); Modified: trunk/framework/ebli-1d/src/main/java/org/fudaa/ebli/courbe/EGAxeConfigureTarget.java =================================================================== --- trunk/framework/ebli-1d/src/main/java/org/fudaa/ebli/courbe/EGAxeConfigureTarget.java 2012-09-10 06:19:34 UTC (rev 7617) +++ trunk/framework/ebli-1d/src/main/java/org/fudaa/ebli/courbe/EGAxeConfigureTarget.java 2012-09-10 21:59:42 UTC (rev 7618) @@ -30,11 +30,12 @@ * @version $Id: EGAxeConfigureTarget.java,v 1.3 2007-05-22 14:19:05 deniger Exp $ */ public abstract class EGAxeConfigureTarget implements BSelecteurTargetInterface, - BConfigurableInterface { + BConfigurableInterface { protected static class AffichageConfigurator extends EGAxeConfigureTarget { private final class ItemLineUpdater implements ItemListener { + private final JToggleButton cb; private final BSelecteurLineModel line; @@ -59,6 +60,9 @@ public BSelecteurInterface[] createSelecteurs() { final List res = new ArrayList(); + if (target_ == null) { + return new BSelecteurInterface[0]; + } BSelecteurCheckBox cb; cb = new BSelecteurCheckBox(BSelecteurCheckBox.PROP_VISIBLE, EbliLib.getS("Axe Visible")); res.add(cb); @@ -99,39 +103,80 @@ } public Object getProperty(final String _key) { - if (_key == BSelecteurColorChooser.DEFAULT_PROPERTY) { return target_.getLineColor(); } - if (_key == BSelecteurReduitFonteNewVersion.PROPERTY) { return target_.getFont(); } - if (_key == EGAxeVertical.PROP_DROITE) { return Boolean.valueOf(((EGAxeVertical) target_).isDroite()); } - if (_key == EGAxe.PROP_GRADUATIONS) { return Boolean.valueOf(target_.isGraduations()); } - if (_key == EGAxe.PROP_EXTREMITE_VISIBLE) { return Boolean.valueOf(target_.isExtremiteDessinee()); } - if (_key == BSelecteurCheckBox.PROP_VISIBLE) { return Boolean.valueOf(target_.isVisible()); } - if (_key == EGAxe.PROP_IS_GRID_GRADUATIONS_PAINTED) { return Boolean.valueOf(target_.isTraceGrille()); } - if (_key == EGAxe.PROP_IS_GRID_SOUS_GRADUATIONS_PAINTED) { return Boolean.valueOf(target_.isTraceSousGrille()); } - if (_key == EGAxe.PROP_TRACE_GRADUATIONS) { return target_.getTraceGraduations(); } - if (_key == EGAxe.PROP_TRACE_SOUS_GRADUATIONS) { return target_.getTraceSousGraduations(); } + if (_key == BSelecteurColorChooser.DEFAULT_PROPERTY) { + return target_.getLineColor(); + } + if (_key == BSelecteurReduitFonteNewVersion.PROPERTY) { + return target_.getFont(); + } + if (_key == EGAxeVertical.PROP_DROITE) { + return Boolean.valueOf(((EGAxeVertical) target_).isDroite()); + } + if (_key == EGAxe.PROP_GRADUATIONS) { + return Boolean.valueOf(target_.isGraduations()); + } + if (_key == EGAxe.PROP_EXTREMITE_VISIBLE) { + return Boolean.valueOf(target_.isExtremiteDessinee()); + } + if (_key == BSelecteurCheckBox.PROP_VISIBLE) { + return Boolean.valueOf(target_.isVisible()); + } + if (_key == EGAxe.PROP_IS_GRID_GRADUATIONS_PAINTED) { + return Boolean.valueOf(target_.isTraceGrille()); + } + if (_key == EGAxe.PROP_IS_GRID_SOUS_GRADUATIONS_PAINTED) { + return Boolean.valueOf(target_.isTraceSousGrille()); + } + if (_key == EGAxe.PROP_TRACE_GRADUATIONS) { + return target_.getTraceGraduations(); + } + if (_key == EGAxe.PROP_TRACE_SOUS_GRADUATIONS) { + return target_.getTraceSousGraduations(); + } return null; } public boolean doSetProperty(final String _key, final Object _newProp) { - if (_key == BSelecteurReduitFonteNewVersion.PROPERTY) { return target_.setFont((Font) _newProp); } - if (_key == BSelecteurColorChooser.DEFAULT_PROPERTY) { return target_.setLineColor((Color) _newProp); } - if (_key == EGAxe.PROP_TRACE_GRADUATIONS) { return target_.setTraceGraduations((TraceLigneModel) _newProp); } - if (_key == EGAxe.PROP_TRACE_SOUS_GRADUATIONS) { return target_ - .setTraceSousGraduations((TraceLigneModel) _newProp); } + if (_key == BSelecteurReduitFonteNewVersion.PROPERTY) { + return target_.setFont((Font) _newProp); + } + if (_key == BSelecteurColorChooser.DEFAULT_PROPERTY) { + return target_.setLineColor((Color) _newProp); + } + if (_key == EGAxe.PROP_TRACE_GRADUATIONS) { + return target_.setTraceGraduations((TraceLigneModel) _newProp); + } + if (_key == EGAxe.PROP_TRACE_SOUS_GRADUATIONS) { + return target_ + .setTraceSousGraduations((TraceLigneModel) _newProp); + } final boolean booleanValue = ((Boolean) _newProp).booleanValue(); - if (_key == EGAxe.PROP_IS_GRID_GRADUATIONS_PAINTED) { return target_.setTraceGrille(booleanValue); } - if (_key == EGAxe.PROP_IS_GRID_SOUS_GRADUATIONS_PAINTED) { return target_.setTraceSousGrille(booleanValue); } - if (_key == EGAxe.PROP_IS_GRID_SOUS_GRADUATIONS_PAINTED) { return target_.setGraduations(booleanValue); } - if (_key == BSelecteurCheckBox.PROP_VISIBLE) { return target_.setVisible(booleanValue); } + if (_key == EGAxe.PROP_IS_GRID_GRADUATIONS_PAINTED) { + return target_.setTraceGrille(booleanValue); + } + if (_key == EGAxe.PROP_IS_GRID_SOUS_GRADUATIONS_PAINTED) { + return target_.setTraceSousGrille(booleanValue); + } + if (_key == EGAxe.PROP_IS_GRID_SOUS_GRADUATIONS_PAINTED) { + return target_.setGraduations(booleanValue); + } + if (_key == BSelecteurCheckBox.PROP_VISIBLE) { + return target_.setVisible(booleanValue); + } - if (_key == EGAxeVertical.PROP_DROITE) { return ((EGAxeVertical) target_).setDroite(booleanValue); } - if (_key == EGAxe.PROP_GRADUATIONS) { return target_.setGraduations(booleanValue); } - if (_key == EGAxe.PROP_EXTREMITE_VISIBLE) { return target_.setExtremiteDessinee(booleanValue); } + if (_key == EGAxeVertical.PROP_DROITE) { + return ((EGAxeVertical) target_).setDroite(booleanValue); + } + if (_key == EGAxe.PROP_GRADUATIONS) { + return target_.setGraduations(booleanValue); + } + if (_key == EGAxe.PROP_EXTREMITE_VISIBLE) { + return target_.setExtremiteDessinee(booleanValue); + } return false; } - } protected static class TitleConfigure extends EGAxeConfigureTarget { @@ -141,6 +186,9 @@ } public BSelecteurInterface[] createSelecteurs() { + if (target_ == null) { + return new BSelecteurInterface[0]; + } final List res = new ArrayList(); BSelecteurCheckBox cb = new BSelecteurCheckBox(EGAxe.PROP_TITLE_VISIBLE); cb.setTitle(EbliLib.getS("Titre visible")); @@ -166,46 +214,61 @@ final JToggleButton cbCentered = cb.getCb(); final JToggleButton cbDroite = cbVerticalDroite.getCb(); cbVertical.getCb().addItemListener(new ItemListener() { - public void itemStateChanged(final ItemEvent _e) { cbCentered.setEnabled(cbVert.isSelected()); cbDroite.setEnabled(cbVert.isSelected()); } - }); } return (BSelecteurInterface[]) res.toArray(new BSelecteurInterface[res.size()]); } public Object getProperty(final String _key) { - if (_key == EGAxe.PROP_TITLE_VISIBLE) { return Boolean.valueOf(target_.isTitreVisible()); } - if (_key == EGAxe.PROP_UNIT_VISIBLE) { return Boolean.valueOf(target_.isUniteVisible()); } - if (_key == EGAxe.PROP_TITLE_CENTERED) { return Boolean.valueOf(target_.isTitreCentre()); } - if (_key == EGAxeVertical.PROP_TITLE_VERTICAL) { return Boolean.valueOf(((EGAxeVertical) target_) - .isTitreVertical()); } - if (_key == EGAxeVertical.PROP_TITLE_VERTICAL_DROITE) { return Boolean.valueOf(((EGAxeVertical) target_) - .isTitreVerticalDroite()); } + if (_key == EGAxe.PROP_TITLE_VISIBLE) { + return Boolean.valueOf(target_.isTitreVisible()); + } + if (_key == EGAxe.PROP_UNIT_VISIBLE) { + return Boolean.valueOf(target_.isUniteVisible()); + } + if (_key == EGAxe.PROP_TITLE_CENTERED) { + return Boolean.valueOf(target_.isTitreCentre()); + } + if (_key == EGAxeVertical.PROP_TITLE_VERTICAL) { + return Boolean.valueOf(((EGAxeVertical) target_) + .isTitreVertical()); + } + if (_key == EGAxeVertical.PROP_TITLE_VERTICAL_DROITE) { + return Boolean.valueOf(((EGAxeVertical) target_) + .isTitreVerticalDroite()); + } return null; } public boolean doSetProperty(final String _key, final Object _newProp) { final boolean b = ((Boolean) _newProp).booleanValue(); - if (_key == EGAxe.PROP_TITLE_VISIBLE) { return target_.setTitreVisible(b); } - if (_key == EGAxe.PROP_UNIT_VISIBLE) { return target_.setUniteVisible(b); } - if (_key == EGAxeVertical.PROP_TITLE_VERTICAL) { return ((EGAxeVertical) target_).setTitreVertical(b); } - if (_key == EGAxeVertical.PROP_TITLE_VERTICAL_DROITE) { return ((EGAxeVertical) target_) - .setTitreVerticalDroite(b); } - if (_key == EGAxe.PROP_TITLE_CENTERED) { return target_.setTitreCentre(b); } + if (_key == EGAxe.PROP_TITLE_VISIBLE) { + return target_.setTitreVisible(b); + } + if (_key == EGAxe.PROP_UNIT_VISIBLE) { + return target_.setUniteVisible(b); + } + if (_key == EGAxeVertical.PROP_TITLE_VERTICAL) { + return ((EGAxeVertical) target_).setTitreVertical(b); + } + if (_key == EGAxeVertical.PROP_TITLE_VERTICAL_DROITE) { + return ((EGAxeVertical) target_) + .setTitreVerticalDroite(b); + } + if (_key == EGAxe.PROP_TITLE_CENTERED) { + return target_.setTitreCentre(b); + } return false; } - } - final EGParent dispatcher_; final EGAxe target_; - final String title_; public EGAxeConfigureTarget(final EGAxe _target, final EGParent _dispatcher, final String _title) { @@ -215,7 +278,8 @@ title_ = _title; } - public void addPropertyChangeListener(final String _key, final PropertyChangeListener _l) {} + public void addPropertyChangeListener(final String _key, final PropertyChangeListener _l) { + } public Object getMin(final String _key) { return getProperty(_key); @@ -248,9 +312,9 @@ } public void removePropertyChangeListener(final String _key, final PropertyChangeListener _l) { - // target_.removeListener(_key, _l); + // target_.removeListener(_key, _l); } - public void stopConfiguration() {} - + public void stopConfiguration() { + } } Modified: trunk/framework/ebli-1d/src/main/java/org/fudaa/ebli/courbe/EGAxeVerticalPersist.java =================================================================== --- trunk/framework/ebli-1d/src/main/java/org/fudaa/ebli/courbe/EGAxeVerticalPersist.java 2012-09-10 06:19:34 UTC (rev 7617) +++ trunk/framework/ebli-1d/src/main/java/org/fudaa/ebli/courbe/EGAxeVerticalPersist.java 2012-09-10 21:59:42 UTC (rev 7618) @@ -7,122 +7,128 @@ import org.fudaa.ebli.trace.TraceLigne; import org.fudaa.ebli.trace.TraceLigneModel; - /** * Classe persistante des axe verticaux + * * @author Adrien Hadoux * */ public class EGAxeVerticalPersist { - boolean droite; - boolean titreVertical; - boolean titreVerticalDroite; - String titre; - boolean titreVisible = true; - String unite; - boolean visible; - Font font; - boolean graduations; - TraceLigne grille; - boolean isIteratorUptodate; - Color lineColor; - CtuluRange range; - /** - * Booleen qui indique si l'on trace ou non la graduation - */ - boolean traceGrille_=false; - - /** - * Booleen qui indique si l'on trcae - */ - boolean traceSousGrille_=false; - - TraceLigneModel traceGraduations_=null; - TraceLigneModel traceSousGraduations_=null; - /** - * Mode nb graduations - */ - int nbPas_; - - /** - * Mode on donne la longueur des pas - */ - double longueurPas_; - /** - * le mode de graduation - */ - int modeGraduations_; + boolean droite; + boolean titreVertical; + boolean titreVerticalDroite; + String titre; + boolean titreVisible = true; + String unite; + boolean visible; + Font font; + boolean graduations; + TraceLigne grille; + boolean isIteratorUptodate; + Color lineColor; + CtuluRange range; + /** + * Booleen qui indique si l'on trace ou non la graduation + */ + boolean traceGrille_ = false; + /** + * Booleen qui indique si l'on trcae + */ + boolean traceSousGrille_ = false; + TraceLigneModel traceGraduations_ = null; + TraceLigneModel traceSousGraduations_ = null; + /** + * Mode nb graduations + */ + int nbPas_; + /** + * Mode on donne la longueur des pas + */ + double longueurPas_; + /** + * le mode de graduation + */ + int modeGraduations_; + int nbSousGraduations_; + private boolean isExtremiteDessinee_; - int nbSousGraduations_; - private boolean isExtremiteDessinee_; - - public EGAxeVerticalPersist(EGAxeVertical axeY) { - // TODO Auto-generated constructor stub - fillInfoWith(axeY); - } - - private void fillInfoWith(EGAxeVertical axeY ){ - this.droite = axeY.droite_; - this.titreVertical = axeY.titreVertical_; - this.titreVerticalDroite = axeY.titreVerticalDroite_; - this.titre = axeY.titre_; - this.titreVisible = axeY.titreVisible_; - this.unite = axeY.unite_; - this.visible = axeY.visible_; - this.font = axeY.font_; - this.graduations = axeY.graduations_; + public EGAxeVerticalPersist(EGAxeVertical axeY) { + // TODO Auto-generated constructor stub + fillInfoWith(axeY); + } + + public boolean isDroite() { + return droite; + } + + public void setDroite(boolean droite) { + this.droite = droite; + } + + private void fillInfoWith(EGAxeVertical axeY) { + this.droite = axeY.droite_; + this.titreVertical = axeY.titreVertical_; + this.titreVerticalDroite = axeY.titreVerticalDroite_; + this.titre = axeY.titre_; + this.titreVisible = axeY.titreVisible_; + this.unite = axeY.unite_; + this.visible = axeY.visible_; + this.font = axeY.font_; + this.graduations = axeY.graduations_; // this.grille = axeY.grille_; - this.isIteratorUptodate = axeY.isIteratorUptodate_; - this.lineColor = axeY.lineColor_; - - //-- persistance grilles et sous grilles --// - traceGrille_=axeY.traceGrille_; - traceSousGrille_=axeY.traceSousGrille_; - traceGraduations_=axeY.traceGraduations_; - if(traceGraduations_==null && grille!=null){ - axeY.traceSousGraduations_=grille.getModel(); + this.isIteratorUptodate = axeY.isIteratorUptodate_; + this.lineColor = axeY.lineColor_; + + //-- persistance grilles et sous grilles --// + traceGrille_ = axeY.traceGrille_; + traceSousGrille_ = axeY.traceSousGrille_; + traceGraduations_ = axeY.traceGraduations_; + if (traceGraduations_ == null && grille != null) { + axeY.traceSousGraduations_ = grille.getModel(); } - traceSousGraduations_=axeY.traceSousGraduations_; - nbPas_=axeY.nbPas_; - longueurPas_=axeY.longueurPas_; - modeGraduations_=axeY.getModeGraduations(); - nbSousGraduations_=axeY.nbSousGraduations_; - range=axeY.range_; - isExtremiteDessinee_=axeY.isExtremiteDessinee_; - } - - - - public EGAxeVertical generateAxe(){ - EGAxeVertical axeY=new EGAxeVertical(); - axeY.droite_ = this.droite; - axeY.titreVertical_ = this.titreVertical; - axeY.titreVerticalDroite_ = this.titreVerticalDroite; - axeY.titre_ = this.titre; - axeY.titreVisible_ = this.titreVisible; - axeY.unite_ = this.unite; - axeY.visible_ = this.visible; - axeY.font_ = this.font; - axeY.isExtremiteDessinee_=this.isExtremiteDessinee_; - axeY.graduations_ = this.graduations; + traceSousGraduations_ = axeY.traceSousGraduations_; + nbPas_ = axeY.nbPas_; + longueurPas_ = axeY.longueurPas_; + modeGraduations_ = axeY.getModeGraduations(); + nbSousGraduations_ = axeY.nbSousGraduations_; + range = axeY.range_; + isExtremiteDessinee_ = axeY.isExtremiteDessinee_; + } + + public void apply(EGAxeVertical axeY) { + axeY.droite_ = this.droite; + axeY.titreVertical_ = this.titreVertical; + axeY.titreVerticalDroite_ = this.titreVerticalDroite; + axeY.titre_ = this.titre; + axeY.titreVisible_ = this.titreVisible; + axeY.unite_ = this.unite; + axeY.visible_ = this.visible; + axeY.font_ = this.font; + axeY.isExtremiteDessinee_ = this.isExtremiteDessinee_; + axeY.graduations_ = this.graduations; // axeY.grille_ = this.grille; - axeY.isIteratorUptodate_ = this.isIteratorUptodate; - axeY.lineColor_ = this.lineColor; - - //-- persistance grilles et sous grilles --// - axeY.traceGrille_=traceGrille_; - axeY.traceSousGrille_=traceSousGrille_; - axeY.traceGraduations_=traceGraduations_; - axeY.traceSousGraduations_=traceSousGraduations_; - axeY.nbPas_=nbPas_; - axeY.longueurPas_=longueurPas_; - axeY.setModeGraduations(modeGraduations_); - axeY.nbSousGraduations_=nbSousGraduations_; - if(range!=null) - axeY.range_.initWith(range); - axeY.initDisplayValues(); - return axeY; - } - + axeY.isIteratorUptodate_ = this.isIteratorUptodate; + axeY.lineColor_ = this.lineColor; + + //-- persistance grilles et sous grilles --// + axeY.traceGrille_ = traceGrille_; + axeY.traceSousGrille_ = traceSousGrille_; + axeY.traceGraduations_ = traceGraduations_; + axeY.traceSousGraduations_ = traceSousGraduations_; + axeY.nbPas_ = nbPas_; + axeY.longueurPas_ = longueurPas_; + axeY.setModeGraduations(modeGraduations_); + axeY.nbSousGraduations_ = nbSousGraduations_; + if (range != null) { + axeY.range_.initWith(range); + } + axeY.initDisplayValues(); + } + + public EGAxeVertical generateAxe() { + EGAxeVertical axeY = new EGAxeVertical(); + apply(axeY); + return axeY; + } } Modified: trunk/framework/ebli-1d/src/main/java/org/fudaa/ebli/courbe/EGCourbe.java =================================================================== --- trunk/framework/ebli-1d/src/main/java/org/fudaa/ebli/courbe/EGCourbe.java 2012-09-10 06:19:34 UTC (rev 7617) +++ trunk/framework/ebli-1d/src/main/java/org/fudaa/ebli/courbe/EGCourbe.java 2012-09-10 21:59:42 UTC (rev 7618) @@ -52,6 +52,7 @@ import org.fudaa.ebli.trace.TraceLigneModel; import com.vividsolutions.jts.geom.Envelope; +import java.awt.Rectangle; /** * Cette Courbe suppose que tous les x du mod\xE8le sont rang\xE9es dans l'ordre croissant. @@ -78,7 +79,7 @@ final TraceIconModel iconeModel_; EGCourbeSurfacePainter surfacePainter_; TraceBox tbox_; - TraceBox tboxLabels_; + protected TraceBox tboxLabels_; /** * @param _model le model a prendre en compte @@ -131,7 +132,7 @@ } } - private void initLabelsTraceBox(Color _c) { + protected void initLabelsTraceBox(Color _c) { if (tboxLabels_ == null) { tboxLabels_ = new TraceBox(); tboxLabels_.setColorFond(Color.WHITE); @@ -200,7 +201,7 @@ tbox_.setColorBoite(marqueur.model_.getCouleur()); // -- tracer marqueurs horitzontaux --// - if (axeY.containsPoint(marqueur.getValue()) && marqueur.isVisible() && marqueur.traceHorizontal_) { + if (axeY != null && axeY.containsPoint(marqueur.getValue()) && marqueur.isVisible() && marqueur.traceHorizontal_) { final int yie = _t.getYEcran(marqueur.getValue(), axeY); int x = xmin + 3; final String str; @@ -487,13 +488,23 @@ } // Les labels ont m\xEAme couleur que la courbe. initLabelsTraceBox(trLigne.getCouleur()); + Rectangle view = new Rectangle(); + view.x = _t.getMinEcranX(); + view.y = 0; + view.height = _t.getH(); + view.width = _t.getW(); for (int i = 0; i < nbPt; i++) { xi = model_.getX(i); yi = model_.getY(i); xie = _t.getXEcran(xi); - yie = _t.getYEcran(yi, getAxeY()); + if (getAxeY() == null) { + yie = getYEcranForAxeYNull(yi, _t); + yiVisible = true; + } else { + yie = _t.getYEcran(yi, getAxeY()); + yiVisible = getAxeY().containsPoint(yi); + } xiVisible = _t.getXAxe().containsPoint(xi); - yiVisible = getAxeY().containsPoint(yi); if (model_.isPointDrawn(i) && xiVisible && yiVisible) { // Paint point label @@ -517,8 +528,8 @@ } else { yBox = ((int) yie) + 10; } - // Paint - tboxLabels_.paintBox(_g, xBox, yBox, pLabel); + + paintLabelBox(i, _g, xBox, yBox, pLabel, _t, view); } } // Paint point @@ -543,15 +554,9 @@ paintSurface(_g, _t, i); if (!nuagePoints_) { - // -- attention si le point depasse de l'\xE9cran il faut dessinner le trait jusqu'\xE0 la limite de l'axe--// - double newyi = Math.min(yi, getAxeY().getMaximum()); - newyi = Math.max(newyi, getAxeY().getMinimum()); - double newyie = _t.getYEcran(newyi, getAxeY()); + double newyie = getYEcran(yi, _t); + double newyie2 = getYEcran(ypeVal, _t); - double newyi2 = Math.min(ypeVal, getAxeY().getMaximum()); - newyi2 = Math.max(newyi2, getAxeY().getMinimum()); - double newyie2 = _t.getYEcran(newyi2, getAxeY()); - trLigne.dessineTrait(_g, xie, newyie, xpe, newyie2); } else { @@ -1182,4 +1187,32 @@ this.getAxeY().ajusteFor(this); this.getAxeX().setBounds(getXMin(), getXMax()); } + + public double getYEcran(double yi, final EGRepere _t) { + if (getAxeY() == null) { + return getYEcranForAxeYNull(yi, _t); + } + // -- attention si le point depasse de l'\xE9cran il faut dessinner le trait jusqu'\xE0 la limite de l'axe--// + double newyi = Math.min(yi, getAxeY().getMaximum()); + newyi = Math.max(newyi, getAxeY().getMinimum()); + double newyie = _t.getYEcran(newyi, getAxeY()); + return newyie; + } + + public double getYEcranForAxeYNull(double yi, final EGRepere _t) { + double yie; + double ratio = Math.min(1, Math.max(0, yi)); + if (ratio >= 1) { + yie = _t.getMaxEcranY(); + } else if (ratio <= 0) { + yie = _t.getMinEcranY(); + } else { + yie = _t.getMinEcranY() + (_t.getMaxEcranY() - _t.getMinEcranY()) * ratio; + } + return yie; + } + + protected void paintLabelBox(int i, final Graphics2D _g, int xBox, int yBox, String pLabel, final EGRepere _t, Rectangle view) { + tboxLabels_.paintBox(_g, xBox, yBox, pLabel, view); + } } \ No newline at end of file Modified: trunk/framework/ebli-1d/src/main/java/org/fudaa/ebli/courbe/EGCourbePersist.java =================================================================== --- trunk/framework/ebli-1d/src/main/java/org/fudaa/ebli/courbe/EGCourbePersist.java 2012-09-10 06:19:34 UTC (rev 7617) +++ trunk/framework/ebli-1d/src/main/java/org/fudaa/ebli/courbe/EGCourbePersist.java 2012-09-10 21:59:42 UTC (rev 7618) @@ -47,10 +47,38 @@ EGCourbeSurfacePersist surfacePainter; // -- inverse ou non les x et y --// boolean inverse = false; + boolean displayLabels=false; + boolean displayTitle=false; public EGCourbePersist() { } + public TraceLigneModel getLineModel_() { + return lineModel_; + } + + public void setLineModel(TraceLigneModel lineModel_) { + this.lineModel_ = lineModel_; + } + + public boolean isDisplayLabels() { + return displayLabels; + } + + public void setDisplayLabels(boolean displayLabels) { + this.displayLabels = displayLabels; + } + + public boolean isDisplayTitle() { + return displayTitle; + } + + public void setDisplayTitle(boolean displayTitle) { + this.displayTitle = displayTitle; + } + + + public String getTitle() { return title_; } Modified: trunk/framework/ebli-1d/src/main/java/org/fudaa/ebli/courbe/EGCourbePersistBuilder.java =================================================================== --- trunk/framework/ebli-1d/src/main/java/org/fudaa/ebli/courbe/EGCourbePersistBuilder.java 2012-09-10 06:19:34 UTC (rev 7617) +++ trunk/framework/ebli-1d/src/main/java/org/fudaa/ebli/courbe/EGCourbePersistBuilder.java 2012-09-10 21:59:42 UTC (rev 7618) @@ -29,7 +29,7 @@ * @param log */ @Override - protected void postRestore(EGCourbe egObject, EGCourbePersist persist, Map params, CtuluAnalyze log) { + protected void postRestore(EGCourbe egObject, EGCourbePersist persist, Map params, CtuluAnalyze log) { initGraphicConfiguration(egObject, persist); egObject.setTitle(persist.getTitle()); if (persist.inverse) { @@ -37,7 +37,6 @@ } } - public boolean saveXY() { return true; } @@ -111,6 +110,8 @@ if (persist.listeMarqueurs_ != null) { courbeToModify.setMarqueurs(persist.listeMarqueurs_); } + courbeToModify.setDisplayPointLabels(persist.displayLabels); + courbeToModify.setDisplayTitleOnCurve(persist.displayTitle); } public final static String X_KEY = "X"; @@ -165,6 +166,8 @@ res.listeMarqueurs_ = courbe.getMarqueurs(); res.inverse = courbe.isInverse; + res.displayLabels = courbe.displayPointLabels_; + res.displayTitle = courbe.displayTitleOnCurve_; } } Modified: trunk/framework/ebli-1d/src/main/java/org/fudaa/ebli/courbe/EGGraphe.java =================================================================== --- trunk/framework/ebli-1d/src/main/java/org/fudaa/ebli/courbe/EGGraphe.java 2012-09-10 06:19:34 UTC (rev 7617) +++ trunk/framework/ebli-1d/src/main/java/org/fudaa/ebli/courbe/EGGraphe.java 2012-09-10 21:59:42 UTC (rev 7618) @@ -285,6 +285,9 @@ final EGObject o = model.getEGObject(i); if ((getObject(i).isVisible()) && (o.isSomethingToDisplay())) { final EGAxeVertical axe = getObject(i).getAxeY(); + if(axe==null){ + continue; + } if (axe.isVisible() && !axeSet.contains(axe)) { axeSet.add(axe); @@ -390,7 +393,7 @@ // on part dans l'autre sens pour les axe for (int i = 0; i < nbElement; i++) { final EGObject g = model.getEGObject(i); - if (!g.isVisible() || !g.isSomethingToDisplay()) { + if (g.getAxeY()==null||!g.isVisible() || !g.isSomethingToDisplay()) { continue; } if (!axeOffset_.containsKey(g.getAxeY())) { @@ -606,6 +609,9 @@ for (final Iterator it = axeYRange.entrySet().iterator(); it.hasNext();) { final Map.Entry e = (Map.Entry) it.next(); final EGAxeVertical axeY = (EGAxeVertical) e.getKey(); + if(axeY==null){ + continue; + } final CtuluRange r = (CtuluRange) e.getValue(); if (Double.isNaN(r.max_) || Double.isInfinite(r.max_) || (r.max_ <= -Double.MAX_VALUE)) { r.max_ = 0; Modified: trunk/framework/ebli-1d/src/main/java/org/fudaa/ebli/courbe/EGLegendPanelManager.java =================================================================== --- trunk/framework/ebli-1d/src/main/java/org/fudaa/ebli/courbe/EGLegendPanelManager.java 2012-09-10 06:19:34 UTC (rev 7617) +++ trunk/framework/ebli-1d/src/main/java/org/fudaa/ebli/courbe/EGLegendPanelManager.java 2012-09-10 21:59:42 UTC (rev 7618) @@ -15,17 +15,17 @@ * @author Frederic Deniger */ public class EGLegendPanelManager extends MouseAdapter implements EGGrapheModelListener { - + JPanel panel; EGGraphe graphe; - + void createPanel() { panel = new JPanel(new BuGridLayout(1, 1, 3, true, true)); panel.setOpaque(false); panel.setDoubleBuffered(false); rebuild(); } - + @Override public void mouseClicked(MouseEvent e) { if (graphe == null) { @@ -39,10 +39,10 @@ pnLegend.selectCourbe((EGCourbe) clientProperty); pnLegend.afficheModale(panel); } - + } } - + public void setGraphe(EGGraphe graphe) { if (this.graphe != null) { this.graphe.getModel().removeModelListener(this); @@ -57,60 +57,63 @@ } } boolean editable = true; - + public boolean isEditable() { return editable; } - + public void setEditable(boolean editable) { this.editable = editable; } - + @Override public void structureChanged() { rebuild(); } - + @Override public void courbeContentChanged(EGObject _c, boolean _mustRestore) { } - + @Override public void courbeAspectChanged(EGObject _c, boolean _visibil) { rebuild(); } - + @Override public void axeContentChanged(EGAxe _c) { } - + @Override public void axeAspectChanged(EGAxe _c) { } - + public EGGraphe getGraphe() { return graphe; } - + public JPanel getPanel() { if (panel == null) { createPanel(); } return panel; } - + private void rebuild() { panel.removeAll(); panel.setDoubleBuffered(false); EGCourbe[] courbes = graphe.getModel().getCourbes(); - for (EGCourbe eGCourbe : courbes) { + for (EGCourbe courbe : courbes) { + if (!courbe.isVisible_) { + continue; + } JLabel label = new JLabel(); EGIconForCourbe icon = new EGIconForCourbe(); - icon.updateFromCourbe(eGCourbe); + icon.updateFromCourbe(courbe); label.setIcon(icon); - label.setText(eGCourbe.getTitle()); - label.setToolTipText(eGCourbe.getTitle()); - label.putClientProperty("COURBE", eGCourbe); + label.setText(courbe.getTitle()); + label.setToolTipText(courbe.getTitle()); + label.putClientProperty("COURBE", courbe); label.setOpaque(false); panel.add(label); label.addMouseListener(this); Modified: trunk/framework/ebli-1d/src/main/java/org/fudaa/ebli/courbe/EGRepere.java =================================================================== --- trunk/framework/ebli-1d/src/main/java/org/fudaa/ebli/courbe/EGRepere.java 2012-09-10 06:19:34 UTC (rev 7617) +++ trunk/framework/ebli-1d/src/main/java/org/fudaa/ebli/courbe/EGRepere.java 2012-09-10 21:59:42 UTC (rev 7618) @@ -114,6 +114,12 @@ return h_; } + public int getW() { + return w_; + } + + + public EGRepere duplicate(EGGrapheDuplicator _duplicator) { EGRepere duplic = new EGRepere(); Modified: trunk/framework/ebli-1d/src/main/java/org/fudaa/ebli/courbe/EGTableGraphePanel.java =================================================================== --- trunk/framework/ebli-1d/src/main/java/org/fudaa/ebli/courbe/EGTableGraphePanel.java 2012-09-10 06:19:34 UTC (rev 7617) +++ trunk/framework/ebli-1d/src/main/java/org/fudaa/ebli/courbe/EGTableGraphePanel.java 2012-09-10 21:59:42 UTC (rev 7618) @@ -454,6 +454,12 @@ } boolean afficheNomCourbe_ = true; + public BuLabel getTitleLabel() { + return lb_; + } + + + /** * Initialise tous les composants n\xE9cessaires. */ Modified: trunk/framework/ebli-common/src/main/java/org/fudaa/ebli/trace/TraceBox.java =================================================================== --- trunk/framework/ebli-common/src/main/java/org/fudaa/ebli/trace/TraceBox.java 2012-09-10 06:19:34 UTC (rev 7617) +++ trunk/framework/ebli-common/src/main/java/org/fudaa/ebli/trace/TraceBox.java 2012-09-10 21:59:42 UTC (rev 7618) @@ -11,14 +11,14 @@ import java.awt.Color; import java.awt.FontMetrics; import java.awt.Graphics2D; +import java.awt.Rectangle; import javax.swing.SwingConstants; import org.fudaa.ctulu.CtuluLibString; /** - * Une classe permettant de tracer un texte \xE0 une position (x,y) donn\xE9e. Le texte peut \xEAtre trac\xE9 : <ul> <li>Centr\xE9/\xE0 gauche/\xE0 - * droite/au milieu/en bas/en haut de la position suivant les constantes {@link SwingConstants}.</li> <li>Avec une d\xE9coration - * (fond/contour rectangle visible)</li> </ul> + * Une classe permettant de tracer un texte \xE0 une position (x,y) donn\xE9e. Le texte peut \xEAtre trac\xE9 : <ul> <li>Centr\xE9/\xE0 gauche/\xE0 droite/au milieu/en + * bas/en haut de la position suivant les constantes {@link SwingConstants}.</li> <li>Avec une d\xE9coration (fond/contour rectangle visible)</li> </ul> * * @author Fred Deniger * @version $Id: TraceBox.java,v 1.5 2006-09-19 14:55:49 deniger Exp $ @@ -98,6 +98,10 @@ public int currentWidth_ = -1; public void paintBox(final Graphics2D _g2d, final int _x, final int _y, final String _s) { + paintBox(_g2d, _x, _y, _s, null); + } + + public void paintBox(final Graphics2D _g2d, final int _x, final int _y, final String _s, Rectangle view) { if (traceLigne_ == null) { traceLigne_ = new TraceLigne(); } @@ -129,6 +133,12 @@ } else if (vPosition_ == SwingConstants.BOTTOM) { yTopLeft -= hOuter; } + if (view != null) { + xTopLeft = Math.min(view.x + view.width - wOuter, xTopLeft); + yTopLeft = Math.min(view.y + view.height - hOuter, yTopLeft); + xTopLeft = Math.max(xTopLeft, view.x); + yTopLeft = Math.max(yTopLeft, view.y); + } if (drawFond_) { _g2d.setColor(getColorFond()); _g2d.fillRect(xTopLeft + 1, yTopLeft + 1, wOuter - 2, hOuter - 2); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <de...@us...> - 2012-09-10 22:28:25
|
Revision: 7620 http://fudaa.svn.sourceforge.net/fudaa/?rev=7620&view=rev Author: deniger Date: 2012-09-10 22:28:19 +0000 (Mon, 10 Sep 2012) Log Message: ----------- Modified Paths: -------------- trunk/framework/ctulu-ui/src/main/java/org/fudaa/ctulu/gui/CtuluCellTextDecimalRenderer.java trunk/framework/ebli-1d/src/main/java/org/fudaa/ebli/courbe/EGExportData.java trunk/framework/ebli-1d/src/main/java/org/fudaa/ebli/courbe/EGTableAction.java Modified: trunk/framework/ctulu-ui/src/main/java/org/fudaa/ctulu/gui/CtuluCellTextDecimalRenderer.java =================================================================== --- trunk/framework/ctulu-ui/src/main/java/org/fudaa/ctulu/gui/CtuluCellTextDecimalRenderer.java 2012-09-10 22:11:28 UTC (rev 7619) +++ trunk/framework/ctulu-ui/src/main/java/org/fudaa/ctulu/gui/CtuluCellTextDecimalRenderer.java 2012-09-10 22:28:19 UTC (rev 7620) @@ -1,6 +1,5 @@ /** - * Licence GPL - * Copyright Genesis + * Licence GPL Copyright Genesis */ package org.fudaa.ctulu.gui; @@ -11,6 +10,7 @@ * @author deniger */ public class CtuluCellTextDecimalRenderer extends CtuluCellTextRenderer { + CtuluNumberFormatI formatter = CtuluNumberFormatDefault.DEFAULT_FMT; /** @@ -31,7 +31,13 @@ protected void setValue(Object _value) { setHorizontalTextPosition(RIGHT); setHorizontalAlignment(RIGHT); - if (_value == null) return; - super.setValue(formatter.format(((Number) _value).doubleValue())); + if (_value == null) { + return; + } + if (String.class.equals(_value.getClass())) { + super.setValue(_value); + } else { + super.setValue(formatter.format(((Number) _value).doubleValue())); + } } } Modified: trunk/framework/ebli-1d/src/main/java/org/fudaa/ebli/courbe/EGExportData.java =================================================================== --- trunk/framework/ebli-1d/src/main/java/org/fudaa/ebli/courbe/EGExportData.java 2012-09-10 22:11:28 UTC (rev 7619) +++ trunk/framework/ebli-1d/src/main/java/org/fudaa/ebli/courbe/EGExportData.java 2012-09-10 22:28:19 UTC (rev 7620) @@ -18,6 +18,7 @@ import java.util.Arrays; import java.util.Collection; import java.util.List; +import jxl.write.Label; import jxl.write.Number; import jxl.write.WritableCell; @@ -34,6 +35,20 @@ */ public abstract class EGExportData implements CtuluTableModelInterface { + public Object getXValueFor(final double xValue) { + if (g_.getModel().getAxeX().getSpecificFormat() != null) { + return g_.getModel().getAxeX().getSpecificFormat().format(xValue); + } + return CtuluLib.getDouble(xValue); + } + + public Object getYValueFor(final EGCourbe courbe, final double yValue) { + if (courbe.getAxeY() != null && courbe.getAxeY().getSpecificFormat() != null) { + return courbe.getAxeY().getSpecificFormat().format(yValue); + } + return CtuluLib.getDouble(yValue); + } + final static class AllData extends EGExportData { AllData(final EGCourbe[] _cs, final EGGraphe _g) { @@ -52,15 +67,17 @@ public Object getValue(final int _row, final int _col) { final boolean x = (_col % 2 == 0); final int courbeIdx = x ? _col / 2 : (_col - 1) / 2; - if (_row >= cs_[courbeIdx].getModel().getNbValues()) { + final EGCourbe courbe = cs_[courbeIdx]; + if (_row >= courbe.getModel().getNbValues()) { return null; } if (x) { - return CtuluLib.getDouble(cs_[courbeIdx].getModel().getX(_row)); + final double xValue = courbe.getModel().getX(_row); + return getXValueFor(xValue); } - return CtuluLib.getDouble(cs_[courbeIdx].getModel().getY(_row)); + final double yValue = courbe.getModel().getY(_row); + return getYValueFor(courbe, yValue); } - } static String[] buildColName(final EGCourbe[] _c, final String _axeX) { @@ -106,12 +123,14 @@ if (_row >= idxs_[courbeIdx].length) { return null; } + final EGCourbe courbe = cs_[courbeIdx]; if (x) { - return CtuluLib.getDouble(cs_[courbeIdx].getModel().getX(idxs_[courbeIdx][_row])); + final double xValue = courbe.getModel().getX(idxs_[courbeIdx][_row]); + return getXValueFor(xValue); } - return CtuluLib.getDouble(cs_[courbeIdx].getModel().getY(idxs_[courbeIdx][_row])); + final double y = courbe.getModel().getY(idxs_[courbeIdx][_row]); + return getYValueFor(courbe, y); } - } private final static class SameH extends EGExportData { @@ -145,15 +164,14 @@ public Object getValue(final int _row, final int _col) { final double x = time_[_row]; if (_col == 0) { - return CtuluLib.getDouble(x); + return getXValueFor(x); } - return CtuluLib.getDouble(cs_[_col - 1].interpol(x)); + return getYValueFor(cs_[_col - 1], cs_[_col - 1].interpol(x)); } - } public static EGExportData createExportData(final EGCourbe[] courbesInitiales, final EGGraphe _g, final boolean _isSameH, - final boolean _onlyHiewed, final ProgressionInterface _prog) { + final boolean _onlyHiewed, final ProgressionInterface _prog) { List<EGCourbe> courbes = new ArrayList<EGCourbe>(); for (int i = 0; i < courbesInitiales.length; i++) { EGCourbe egCourbe = courbesInitiales[i]; @@ -172,12 +190,9 @@ return new AllData(_cs, _g); } - String[] column_; - EGCourbe[] cs_; EGGraphe g_; - int maxCol_; int maxLine_; @@ -203,11 +218,21 @@ } public WritableCell getExcelWritable(final int _row, final int _col, final int _rowInXls, final int _colInXls) { - final Double d = (Double) getValue(_row, _col); - if (d == null) { + final Object value = getValue(_row, _col); + if (value == null) { return null; } - return new Number(_colInXls, _rowInXls, d.doubleValue()); + if (value instanceof Double) { + final Double d = (Double) value; + return new Number(_colInXls, _rowInXls, d.doubleValue()); + } + String asString = value.toString(); + try { + double d = Double.parseDouble(asString.replace(',', '.')); + return new Number(_colInXls, _rowInXls, d); + } catch (NumberFormatException ex) { + } + return new Label(_colInXls, _rowInXls, asString); } public final int getMaxCol() { @@ -217,5 +242,4 @@ public final int getMaxRow() { return maxLine_; } - } \ No newline at end of file Modified: trunk/framework/ebli-1d/src/main/java/org/fudaa/ebli/courbe/EGTableAction.java =================================================================== --- trunk/framework/ebli-1d/src/main/java/org/fudaa/ebli/courbe/EGTableAction.java 2012-09-10 22:11:28 UTC (rev 7619) +++ trunk/framework/ebli-1d/src/main/java/org/fudaa/ebli/courbe/EGTableAction.java 2012-09-10 22:28:19 UTC (rev 7620) @@ -61,19 +61,41 @@ final EbliTableInfoPanel pn = new EbliTableInfoPanel(new CtuluUIDialog(graphe_), this, null); pn.showInDialog(); } + boolean displayAll; + boolean addOptions = true; + public boolean isDisplayAll() { + return displayAll; + } + + public void setDisplayAll(boolean displayAll) { + this.displayAll = displayAll; + } + + public boolean isAddOptions() { + return addOptions; + } + + public void setAddOptions(boolean addOptions) { + this.addOptions = addOptions; + } + public BuTable createValuesTable() { final EGCourbe[] cs = graphe_.getModel().getCourbes(); final EGObject[] selected = graphe_.getModel().getSelectedObjects(); final int nb = selected == null ? 0 : selected.length; final List courbesSelected = new ArrayList(nb); - if (selected != null) { + if (displayAll) { + for (int i = 0; i < cs.length; i++) { + cs[i].fillWithCurves(courbesSelected); + } + } else if (selected != null) { for (int i = 0; i < nb; i++) { selected[i].fillWithCurves(courbesSelected); } } final EGMultiCourbeTableModel tableModel = new EGMultiCourbeTableModel(cs, (EGCourbe[]) courbesSelected.toArray(new EGCourbe[courbesSelected - .size()]), graphe_); + .size()]), graphe_); final CtuluTable table = new CtuluTable(tableModel); String title = null; final JInternalFrame iframe = (JInternalFrame) SwingUtilities.getAncestorOfClass(JInternalFrame.class, graphe_); @@ -89,31 +111,34 @@ title = EbliResource.EBLI.getString("Courbes"); } EbliTableInfoPanel.setTitle(table, title); - final BuMenu menu = new BuMenu(EbliLib.getS("Options"), "OPTIONS"); - menu.setIcon(BuResource.BU.getMenuIcon("configurer")); - final ActionListener ac = new OptionActionListener(tableModel, table); - final boolean isCourbeSelected = courbesSelected.size() > 0; - menu.addCheckBox(EbliLib.getS("Afficher uniquement les courbes s\xE9lectionn\xE9es"), "SHOW_SELECTED_COURBES", null, isCourbeSelected, isCourbeSelected) - .addActionListener(ac); - menu.addCheckBox(EbliLib.getS("Afficher une seule colonne des abscisses"), "SHOW_ONE_TIME", null, true, false).addActionListener(ac); - tableModel.setShowOnlySelected(isCourbeSelected); - final CtuluPopupMenu popup = new CtuluPopupMenu(); - popup.addCheckBox(EbliLib.getS("Afficher uniquement les courbes s\xE9lectionn\xE9es"), "SHOW_SELECTED_COURBES", null, isCourbeSelected, - isCourbeSelected).addActionListener(ac); - popup.addCheckBox(EbliLib.getS("Afficher une seule colonne des abscisses"), "SHOW_ONE_TIME", null, true, false).addActionListener(ac); - table.addMouseListener(new MouseAdapter() { - public void mouseReleased(final MouseEvent _e) { - if (EbliLib.isPopupMouseEvent(_e)) { - popup.show(table, _e.getX(), _e.getY()); + if (addOptions) { + final BuMenu menu = new BuMenu(EbliLib.getS("Options"), "OPTIONS"); + menu.setIcon(BuResource.BU.getMenuIcon("configurer")); + final ActionListener ac = new OptionActionListener(tableModel, table); + final boolean isCourbeSelected = courbesSelected.size() > 0; + menu.addCheckBox(EbliLib.getS("Afficher uniquement les courbes s\xE9lectionn\xE9es"), "SHOW_SELECTED_COURBES", null, isCourbeSelected, isCourbeSelected) + .addActionListener(ac); + menu.addCheckBox(EbliLib.getS("Afficher une seule colonne des abscisses"), "SHOW_ONE_TIME", null, true, false).addActionListener(ac); + tableModel.setShowOnlySelected(isCourbeSelected); + final CtuluPopupMenu popup = new CtuluPopupMenu(); + popup.addCheckBox(EbliLib.getS("Afficher uniquement les courbes s\xE9lectionn\xE9es"), "SHOW_SELECTED_COURBES", null, isCourbeSelected, + isCourbeSelected).addActionListener(ac); + popup.addCheckBox(EbliLib.getS("Afficher une seule colonne des abscisses"), "SHOW_ONE_TIME", null, true, false).addActionListener(ac); + table.addMouseListener(new MouseAdapter() { + public void mouseReleased(final MouseEvent _e) { + if (EbliLib.isPopupMouseEvent(_e)) { + popup.show(table, _e.getX(), _e.getY()); + } } - } - }); + }); + EbliTableInfoPanel.setJMenuBarComponents(table, new JComponent[]{menu}); + } EbliTableInfoPanel.setShowSelectedRow(table, false); - EbliTableInfoPanel.setJMenuBarComponents(table, new JComponent[] { menu }); return table; } static class OptionActionListener implements ActionListener { + final EGMultiCourbeTableModel target_; final CtuluTable table_; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <de...@us...> - 2012-09-12 21:20:07
|
Revision: 7625 http://fudaa.svn.sourceforge.net/fudaa/?rev=7625&view=rev Author: deniger Date: 2012-09-12 21:20:00 +0000 (Wed, 12 Sep 2012) Log Message: ----------- Modified Paths: -------------- trunk/framework/ctulu-common/src/main/java/org/fudaa/ctulu/table/CtuluTable.java trunk/framework/ebli-1d/src/main/java/org/fudaa/ebli/courbe/EGLegendPanelManager.java trunk/framework/ebli-1d/src/main/java/org/fudaa/ebli/courbe/EGTableGraphePanel.java trunk/framework/ebli-1d/src/main/java/org/fudaa/ebli/courbe/EGTableModel.java Modified: trunk/framework/ctulu-common/src/main/java/org/fudaa/ctulu/table/CtuluTable.java =================================================================== --- trunk/framework/ctulu-common/src/main/java/org/fudaa/ctulu/table/CtuluTable.java 2012-09-12 09:24:35 UTC (rev 7624) +++ trunk/framework/ctulu-common/src/main/java/org/fudaa/ctulu/table/CtuluTable.java 2012-09-12 21:20:00 UTC (rev 7625) @@ -166,6 +166,7 @@ this.getActionMap().put("paste", new AbstractAction("paste") { + @Override public void actionPerformed(final ActionEvent _evt) { paste(); } @@ -173,6 +174,7 @@ }); this.getActionMap().put("copy", new AbstractAction("copy") { + @Override public void actionPerformed(final ActionEvent _evt) { copy(); } Modified: trunk/framework/ebli-1d/src/main/java/org/fudaa/ebli/courbe/EGLegendPanelManager.java =================================================================== --- trunk/framework/ebli-1d/src/main/java/org/fudaa/ebli/courbe/EGLegendPanelManager.java 2012-09-12 09:24:35 UTC (rev 7624) +++ trunk/framework/ebli-1d/src/main/java/org/fudaa/ebli/courbe/EGLegendPanelManager.java 2012-09-12 21:20:00 UTC (rev 7625) @@ -4,8 +4,14 @@ package org.fudaa.ebli.courbe; import com.memoire.bu.BuGridLayout; +import com.memoire.bu.BuVerticalLayout; +import java.awt.BorderLayout; +import java.awt.Color; +import java.awt.FlowLayout; +import java.awt.GridLayout; import java.awt.event.MouseAdapter; import java.awt.event.MouseEvent; +import javax.swing.BorderFactory; import javax.swing.JComponent; import javax.swing.JLabel; import javax.swing.JPanel; @@ -17,12 +23,17 @@ public class EGLegendPanelManager extends MouseAdapter implements EGGrapheModelListener { JPanel panel; + JPanel mainPanel; EGGraphe graphe; void createPanel() { - panel = new JPanel(new BuGridLayout(1, 1, 3, true, true)); + panel = new JPanel(new BuVerticalLayout(1, false, false)); panel.setOpaque(false); panel.setDoubleBuffered(false); + mainPanel = new JPanel(new FlowLayout(FlowLayout.CENTER)); + mainPanel.setDoubleBuffered(false); + mainPanel.setOpaque(false); + mainPanel.add(panel); rebuild(); } @@ -93,10 +104,10 @@ } public JPanel getPanel() { - if (panel == null) { + if (mainPanel == null) { createPanel(); } - return panel; + return mainPanel; } private void rebuild() { Modified: trunk/framework/ebli-1d/src/main/java/org/fudaa/ebli/courbe/EGTableGraphePanel.java =================================================================== --- trunk/framework/ebli-1d/src/main/java/org/fudaa/ebli/courbe/EGTableGraphePanel.java 2012-09-12 09:24:35 UTC (rev 7624) +++ trunk/framework/ebli-1d/src/main/java/org/fudaa/ebli/courbe/EGTableGraphePanel.java 2012-09-12 21:20:00 UTC (rev 7625) @@ -33,6 +33,7 @@ import javax.swing.table.TableModel; import com.memoire.bu.*; +import javax.swing.table.TableColumn; import org.fudaa.ctulu.CtuluCommandComposite; import org.fudaa.ctulu.CtuluDoubleParser; @@ -53,35 +54,35 @@ * @version $Id: EGTableGraphePanel.java,v 1.31 2007-06-05 08:58:39 deniger Exp $ */ public class EGTableGraphePanel extends BuPanel implements EGSelectionListener, EGGrapheModelListener { - + public static class SpecTableModel extends EGTableModel { - + private EGTableGraphePanel graphePanel; Double newX_; Double newY_; - + public SpecTableModel(EGTableGraphePanel graphePanel) { this.graphePanel = graphePanel; } - + @Override public void fireTableRowsDeleted(int firstRow, int lastRow) { newX_ = null; newY_ = null; super.fireTableRowsDeleted(firstRow, lastRow); } - + @Override protected void selectedCourbeChanged(final EGCourbe _a) { newX_ = null; newY_ = null; super.selectedCourbeChanged(_a); } - + public Class getColumnClass(final int _columnIndex) { return Double.class; } - + public int getRowCount() { final EGAxeHorizontal h = getH(); if (c_ == null || h == null) { @@ -92,7 +93,7 @@ } return super.getRowCount(); } - + public Object getValueAt(final int _rowIndex, final int _columnIndex) { if (c_ == null) { return CtuluLibString.ESPACE; @@ -108,14 +109,14 @@ return super.getValueAt(_rowIndex, _columnIndex); } boolean updating_; - + public void setValueAt(final Object _value, final int _rowIndex, final int _columnIndex) { if (updating_ || c_ == null || _value == null || _value.toString().trim().length() == 0) { return; } if (_rowIndex == c_.getModel().getNbValues()) { try { - + final Double d = CtuluDoubleParser.parseValue(_value.toString()); if (d == null) { return; @@ -154,7 +155,7 @@ } } } - + private static Action getEnterAction() { return new AbstractAction() { public void actionPerformed(final ActionEvent _e) { @@ -165,7 +166,7 @@ if (t.isEditing()) { t.getCellEditor().stopCellEditing(); } - + if (col == tableModel.yRowIndex) { col = tableModel.xRowIndex; row++; @@ -180,11 +181,11 @@ t.getColumnModel().getSelectionModel().setSelectionInterval(col, col); t.scrollRectToVisible(t.getCellRect(row, col, true)); } - + } }; } - + public static void setDefaultEnterAction(final JTable _t) { final ActionMap map = _t.getActionMap(); map.put("theSuperActionOfTheyear", EGTableGraphePanel.getEnterAction()); @@ -208,9 +209,9 @@ * @version $Id: EGTableGraphePanel.java,v 1.31 2007-06-05 08:58:39 deniger Exp $ */ public static class EvolTable extends CtuluTable { - + Action deleteAction; - + public EvolTable() { super(); setTransferHandler(new EgCourbeTransfertHandler()); @@ -232,20 +233,20 @@ super(_model); setTransferHandler(new EgCourbeTransfertHandler()); } - + void setDeleteAction(Action deleteAction) { this.deleteAction = deleteAction; } - + protected void delete() { deleteAction.actionPerformed(null); } - + @Override public TransferHandler getTransferHandler() { return super.getTransferHandler(); } - + public EGTableModel getEGTableModel() { return (EGTableModel) super.getModel(); } @@ -262,7 +263,7 @@ int selectedColumm = getSelectedColumn(); int selectedRow = getSelectedRow(); final CtuluDoubleParser doubleParser = new CtuluDoubleParser(); - + final CtuluCommandComposite cmp = new CtuluCommandComposite(); if (selectedRow >= 0) { int maxUpdate = updateLines(_tab, model, selectedColumm, selectedRow, doubleParser, cmp); @@ -274,7 +275,7 @@ } model.a_.getCmd().addCmd(cmp.getSimplify()); } - + public void cut() { // vide on fait rien if (getSelectionModel().isSelectionEmpty()) { @@ -291,7 +292,7 @@ model.c_.getModel().removeValue(row, model.a_.getCmd()); } } - + private void addValuesInModel(final List _tab, final EGTableModel _model, final CtuluDoubleParser _doubleParser, final CtuluCommandComposite _cmp, final int _maxUpdate) { final int nbLine = _tab.size(); @@ -333,15 +334,15 @@ newX.add(x); newY.add(y); } - + } - + } if (newX.size() > 0) { _model.addValueAt(newX.toNativeArray(), newY.toNativeArray(), _cmp); } } - + private int updateLines(final List _tab, final EGTableModel _model, final int _selectedColumm, final int _selectedRow, final CtuluDoubleParser _doubleParser, final CtuluCommandComposite _cmp) { final int nbLine = _tab.size(); @@ -376,7 +377,7 @@ return maxUpdate; } private boolean canEdit_; - + @Override protected boolean processKeyBinding(final KeyStroke _ks, final KeyEvent _e, final int _condition, final boolean _pressed) { @@ -386,7 +387,7 @@ if (action != null) { return SwingUtilities.notifyAction(action, _ks, _e, this, _e.getModifiers()); - + } } final int keyCode = _ks.getKeyCode(); @@ -411,7 +412,7 @@ } return super.processKeyBinding(_ks, _e, _condition, _pressed); } - + public boolean editCellAt(final int _row, final int _column) { if (canEdit_) { canEdit_ = false; @@ -433,7 +434,7 @@ } return res; } - + protected void setValue(final Object _value) { if (_value == null) { setText(EbliLib.getS("Ajouter")); @@ -444,16 +445,16 @@ }; EGInteractionSelection selection_; EvolTable t_; - + public EGTableGraphePanel() { this(true); } - + public EvolTable getTable() { return t_; } boolean afficheNomCourbe_ = true; - + public BuLabel getTitleLabel() { return lb_; } @@ -483,12 +484,12 @@ r = a_.getTransformer().getXAxe().getValueEditor(); } else if (_column == 1 && a_ != null && a_.getSelectedComponent() != null) { r = a_.getSelectedComponent().getAxeY().getValueEditor(); - + } final TableCellEditor ed = r == null ? null : r.createTableEditorComponent(); return ed == null ? super.getCellEditor(_row, _column) : ed; } - + public TableCellRenderer getDefaultRenderer(final Class _columnClass) { if (Double.class.equals(_columnClass)) { return renderer_; @@ -508,7 +509,7 @@ return true; } }); - + t_.setModel(createValuesTableModel()); t_.getSelectionModel().setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION); t_.setCellSelectionEnabled(true); @@ -526,11 +527,11 @@ add(pn, BuBorderLayout.SOUTH); setPreferredSize(new Dimension(150, 200)); } - + protected SpecTableModel createValuesTableModel() { return new SpecTableModel(this); } - + private void eventReceived() { if (t_.getCellEditor() != null) { t_.getCellEditor().cancelCellEditing(); @@ -553,7 +554,7 @@ } } } - + void updateButtons() { final EGCourbe c = a_.getSelectedComponent(); if (btAdd_ != null) { @@ -583,13 +584,19 @@ } } } - + private void updateDatas(final EGCourbe _c) { if (t_.getCellEditor() != null) { t_.getCellEditor().cancelCellEditing(); } getSpecTableModel().selectedCourbeChanged(_c); - + //we update to column names: + int nbCol = Math.max(getSpecTableModel().getColumnCount(), t_.getColumnModel().getColumnCount()); + for (int i = 0; i < nbCol; i++) { + TableColumn column = t_.getColumnModel().getColumn(i); + column.setHeaderValue(getSpecTableModel().getColumnName(i)); + } + if (_c == null) { lb_.setText(CtuluLibString.ESPACE); lbCourbeInfo_.setText(CtuluLibString.ESPACE); @@ -609,51 +616,50 @@ } lbCourbeInfo_.setText(txt); } - t_.doLayout(); - t_.setPreferredSize(t_.getPreferredSize()); + t_.revalidate(); revalidate(); doLayout(); repaint(); } - + protected void tableCopy() { t_.copy(); } - + protected void tableCut() { t_.cut(); } - + protected void tablePaste() { t_.paste(); } EbliActionSimple actionDelete; - + public EbliActionSimple getActionDelete() { if (actionDelete == null) { actionDelete = new DeleteAction(); } return actionDelete; } - + public class DeleteAction extends EbliActionSimple { - + public DeleteAction() { super(EbliLib.getS("Supprimer des points"), EbliResource.EBLI.getToolIcon("node-delete"), "REMOVE_POINTS"); putValue(ACCELERATOR_KEY, KeyStroke.getKeyStroke("control D")); } - + @Override public void updateStateBeforeShow() { setEnabled(btRemove_.isEnabled()); } - + @Override public void actionPerformed(ActionEvent _e) { btRemove_.doClick(); } } - + public void addPanelAction(final EGFillePanel _p) { // si le contenu n'est pas modifiable ou si les boutons ont deja ete // initialise on oublie .... @@ -702,47 +708,47 @@ btRemove_.doClick(); } }); - + } - + public static void removeButton(JButton bt) { if (bt != null && bt.getParent() != null) { bt.getParent().remove(bt); } } - + public void removeEditButtons() { removeButton(btAdd_); removeButton(btAlign_); removeButton(btRemove_); } - + public void setLabel(final BuLabel _lb) { lbXyInfo_ = _lb; } - + public void axeAspectChanged(final EGAxe _c) { } - + public void axeContentChanged(final EGAxe _c) { (getSpecTableModel()).fireTableChanged(new TableModelEvent(getSpecTableModel(), 0, getSpecTableModel().getRowCount() - 1, TableModelEvent.ALL_COLUMNS, TableModelEvent.UPDATE)); repaint(); } - + SpecTableModel getSpecTableModel() { return (SpecTableModel) t_.getModel(); } - + public void courbeAspectChanged(final EGObject _c, final boolean _visibil) { } - + public void courbeContentChanged(final EGObject _c, final boolean _mustRestore) { eventReceived(); } - + public void intervalAdded(final ListDataEvent _e) { } - + public void intervalRemoved(final ListDataEvent _e) { } @@ -764,7 +770,7 @@ updateDatas(_a.getSelectedComponent()); eventReceived(); } - + public void updateState() { updateDatas(a_.getSelectedComponent()); updateButtons(); @@ -780,7 +786,7 @@ return; } if (selection_ != null && updater_ != null) { - + selection_.getSelection().removeListeSelectionListener(updater_); t_.getSelectionModel().removeListSelectionListener(updater_); } @@ -789,14 +795,14 @@ protected void doAfterCtuluListSectionChanged() { updateButtons(); } - + protected void doAfterTableSectionChanged() { updateButtons(); updateRowSelection(); } }; } - + protected void updateRowSelection() { final int[] rows = t_.getSelectedRows(); if (rows != null) { @@ -823,16 +829,16 @@ t_.getColumnModel().getColumn(1).setHeaderValue(_t); revalidate(); } - + public void structureChanged() { } - + public void valueChanged(final ListSelectionEvent _e) { updateDatas(a_.getSelectedComponent()); updateButtons(); - + } - + public void valueChanged(final TreeSelectionEvent _e) { final Object o = _e.getPath().getLastPathComponent(); if (o instanceof EGCourbe) { Modified: trunk/framework/ebli-1d/src/main/java/org/fudaa/ebli/courbe/EGTableModel.java =================================================================== --- trunk/framework/ebli-1d/src/main/java/org/fudaa/ebli/courbe/EGTableModel.java 2012-09-12 09:24:35 UTC (rev 7624) +++ trunk/framework/ebli-1d/src/main/java/org/fudaa/ebli/courbe/EGTableModel.java 2012-09-12 21:20:00 UTC (rev 7625) @@ -98,7 +98,6 @@ protected void selectedCourbeChanged(final EGCourbe _a) { c_ = _a; fireTableDataChanged(); - fireTableStructureChanged(); } public EGAxeHorizontal getH() { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <de...@us...> - 2012-09-19 17:05:11
|
Revision: 7647 http://fudaa.svn.sourceforge.net/fudaa/?rev=7647&view=rev Author: deniger Date: 2012-09-19 17:05:02 +0000 (Wed, 19 Sep 2012) Log Message: ----------- recherche Modified Paths: -------------- trunk/framework/ctulu-ui/src/main/java/org/fudaa/ctulu/gui/CtuluCellTextRenderer.java trunk/framework/ebli-2d/src/main/java/org/fudaa/ebli/calque/ZEbliCalquesPanel.java trunk/framework/ebli-2d/src/main/java/org/fudaa/ebli/calque/find/CalqueFindActionAbstract.java trunk/framework/ebli-common/src/main/java/org/fudaa/ebli/find/EbliFindActionAbstract.java Added Paths: ----------- trunk/framework/ebli-2d/nbactions.xml Modified: trunk/framework/ctulu-ui/src/main/java/org/fudaa/ctulu/gui/CtuluCellTextRenderer.java =================================================================== --- trunk/framework/ctulu-ui/src/main/java/org/fudaa/ctulu/gui/CtuluCellTextRenderer.java 2012-09-19 17:03:51 UTC (rev 7646) +++ trunk/framework/ctulu-ui/src/main/java/org/fudaa/ctulu/gui/CtuluCellTextRenderer.java 2012-09-19 17:05:02 UTC (rev 7647) @@ -26,6 +26,7 @@ */ @SuppressWarnings("serial") public class CtuluCellTextRenderer extends JLabel implements CtuluCellRenderer, TreeCellRenderer { + private CtuluCellDecorator decorator_; public CtuluCellTextRenderer() { @@ -37,8 +38,6 @@ setDecorator(_deco); setOpaque(true); setBorder(BORDER_NO_FOCUS); -/* setHorizontalTextPosition(SwingConstants.RIGHT); - setHorizontalAlignment(SwingConstants.RIGHT);*/ } public void updateUI() { @@ -48,7 +47,7 @@ } public Component getTableCellRendererComponent(final JTable _table, final Object _value, final boolean _isSelected, - final boolean _hasFocus, final int _row, final int _column) { + final boolean _hasFocus, final int _row, final int _column) { CtuluCellBooleanRenderer.updateRenderer(this, _table, _isSelected, _hasFocus, _row, _column); if (!_isSelected) { super.setForeground(_table.getForeground()); @@ -61,19 +60,23 @@ return this; } - public void validate() {} + public void validate() { + } /** * Overridden for performance reasons. See the <a href="#override">Implementation Note</a> for more information. */ - public void revalidate() {} + public void revalidate() { + } /** * Overridden for performance reasons. See the <a href="#override">Implementation Note</a> for more information. */ - public void repaint(final long _tm, final int _x, final int _y, final int _width, final int _height) {} + public void repaint(final long _tm, final int _x, final int _y, final int _width, final int _height) { + } - public void repaint(final Rectangle _r) {} + public void repaint(final Rectangle _r) { + } protected void firePropertyChange(final String _propertyName, final Object _oldValue, final Object _newValue) { if ("text".equals(_propertyName)) { @@ -81,14 +84,15 @@ } } - public void firePropertyChange(final String _propertyName, final boolean _oldValue, final boolean _newValue) {} + public void firePropertyChange(final String _propertyName, final boolean _oldValue, final boolean _newValue) { + } protected void setValue(final Object _value) { setText((_value == null) ? CtuluLibString.EMPTY_STRING : _value.toString()); } public Component getListCellRendererComponent(final JList _list, final Object _value, final int _index, - final boolean _isSelected, final boolean _cellHasFocus) { + final boolean _isSelected, final boolean _cellHasFocus) { CtuluCellBooleanRenderer.updateListCellRenderer(this, _list, _index, _isSelected, _cellHasFocus); setValue(_value); if (decorator_ != null) { @@ -96,12 +100,11 @@ } return this; } - Color treeSelectionForeground_; Color treeSelectionBackground_; public Component getTreeCellRendererComponent(final JTree _tree, final Object _value, final boolean _selected, - final boolean _expanded, final boolean _leaf, final int _row, final boolean _hasFocus) { + final boolean _expanded, final boolean _leaf, final int _row, final boolean _hasFocus) { if (treeSelectionForeground_ == null) { treeSelectionForeground_ = UIManager.getColor("Tree.selectionForeground"); } Added: trunk/framework/ebli-2d/nbactions.xml =================================================================== --- trunk/framework/ebli-2d/nbactions.xml (rev 0) +++ trunk/framework/ebli-2d/nbactions.xml 2012-09-19 17:05:02 UTC (rev 7647) @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="UTF-8"?> +<actions> + <action> + <actionName>CUSTOM-deploy</actionName> + <displayName>deploy</displayName> + <goals> + <goal>deploy</goal> + </goals> + </action> + </actions> Modified: trunk/framework/ebli-2d/src/main/java/org/fudaa/ebli/calque/ZEbliCalquesPanel.java =================================================================== --- trunk/framework/ebli-2d/src/main/java/org/fudaa/ebli/calque/ZEbliCalquesPanel.java 2012-09-19 17:03:51 UTC (rev 7646) +++ trunk/framework/ebli-2d/src/main/java/org/fudaa/ebli/calque/ZEbliCalquesPanel.java 2012-09-19 17:05:02 UTC (rev 7647) @@ -534,16 +534,10 @@ public final void inverseSelection() { getScene().inverseSelection(); - // if (getCalqueActif() instanceof ZCalqueAffichageDonneesInterface) { - // ((ZCalqueAffichageDonneesInterface) getCalqueActif()).inverseSelection(); - // } } public final void clearSelection() { getScene().clearSelection(); - // if (getCalqueActif() instanceof ZCalqueAffichageDonneesInterface) { - // ((ZCalqueAffichageDonneesInterface) getCalqueActif()).clearSelection(); - // } } public final ZEbliCalquePanelController getController() { Modified: trunk/framework/ebli-2d/src/main/java/org/fudaa/ebli/calque/find/CalqueFindActionAbstract.java =================================================================== --- trunk/framework/ebli-2d/src/main/java/org/fudaa/ebli/calque/find/CalqueFindActionAbstract.java 2012-09-19 17:03:51 UTC (rev 7646) +++ trunk/framework/ebli-2d/src/main/java/org/fudaa/ebli/calque/find/CalqueFindActionAbstract.java 2012-09-19 17:05:02 UTC (rev 7647) @@ -25,7 +25,6 @@ import org.fudaa.ebli.calque.ZCalqueSondeInterface; import org.fudaa.ebli.calque.ZEbliCalquesPanel; import org.fudaa.ebli.commun.EbliLib; -import org.fudaa.ebli.commun.EbliSelectionMode; import org.fudaa.ebli.commun.EbliSelectionState; import org.fudaa.ebli.find.EbliFindActionAbstract; import org.fudaa.ebli.find.EbliFindComponent; @@ -36,7 +35,6 @@ import org.fudaa.ebli.geometrie.GrBoite; import org.fudaa.ebli.geometrie.GrPoint; import org.fudaa.ebli.ressource.EbliResource; -import org.jdom.Parent; /** * @author deniger Modified: trunk/framework/ebli-common/src/main/java/org/fudaa/ebli/find/EbliFindActionAbstract.java =================================================================== --- trunk/framework/ebli-common/src/main/java/org/fudaa/ebli/find/EbliFindActionAbstract.java 2012-09-19 17:03:51 UTC (rev 7646) +++ trunk/framework/ebli-common/src/main/java/org/fudaa/ebli/find/EbliFindActionAbstract.java 2012-09-19 17:05:02 UTC (rev 7647) @@ -10,9 +10,6 @@ import gnu.trove.TIntHashSet; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; import java.util.StringTokenizer; import com.memoire.fu.Fu; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <de...@us...> - 2012-09-25 14:43:29
|
Revision: 7659 http://fudaa.svn.sourceforge.net/fudaa/?rev=7659&view=rev Author: deniger Date: 2012-09-25 14:43:22 +0000 (Tue, 25 Sep 2012) Log Message: ----------- la molette du milieu d?\195?\169place la vue Modified Paths: -------------- trunk/framework/ctulu-bu/src/main/java/com/memoire/bu/BuTable.java trunk/framework/ctulu-common/src/main/java/org/fudaa/ctulu/table/CtuluTable.java Added Paths: ----------- trunk/framework/ctulu-common/src/main/java/org/fudaa/ctulu/ToStringTransformable.java Modified: trunk/framework/ctulu-bu/src/main/java/com/memoire/bu/BuTable.java =================================================================== --- trunk/framework/ctulu-bu/src/main/java/com/memoire/bu/BuTable.java 2012-09-25 13:34:35 UTC (rev 7658) +++ trunk/framework/ctulu-bu/src/main/java/com/memoire/bu/BuTable.java 2012-09-25 14:43:22 UTC (rev 7659) @@ -1,9 +1,13 @@ /** - * @modification $Date: 2006-09-19 14:35:10 $ @statut unstable @file BuTable.java + * @modification $Date: 2006-09-19 14:35:10 $ + * @statut unstable + * @file BuTable.java * * @version 0.43 - * @author Guillaume Desnoix @email gui...@de... @license GNU General Public License 2 (GPL2) @copyright - * 1998-2005 Guillaume Desnoix + * @author Guillaume Desnoix + * @email gui...@de... + * @license GNU General Public License 2 (GPL2) + * @copyright 1998-2005 Guillaume Desnoix */ package com.memoire.bu; @@ -154,6 +158,14 @@ return convert0(getSelectedValues(), _separator); } + protected String transformToString(Object value) { + if (value == null) { + return null; + } + return value.toString(); + + } + private String convert0(Object[][] _values, String _separator) { int l = _values.length; StringBuffer r = new StringBuffer(l * 40); @@ -163,8 +175,9 @@ if (j != 0) { r.append(_separator); } - if (_values[i][j] != null) { - r.append(_values[i][j].toString()); + String valueAsString = transformToString(_values[i][j]); + if (valueAsString != null) { + r.append(valueAsString); } } r.append('\n'); Added: trunk/framework/ctulu-common/src/main/java/org/fudaa/ctulu/ToStringTransformable.java =================================================================== --- trunk/framework/ctulu-common/src/main/java/org/fudaa/ctulu/ToStringTransformable.java (rev 0) +++ trunk/framework/ctulu-common/src/main/java/org/fudaa/ctulu/ToStringTransformable.java 2012-09-25 14:43:22 UTC (rev 7659) @@ -0,0 +1,15 @@ +/* + GPL 2 + */ +package org.fudaa.ctulu; + +/** + * + * @author Frederic Deniger + */ +public interface ToStringTransformable { + + + String getAsString(); + +} Modified: trunk/framework/ctulu-common/src/main/java/org/fudaa/ctulu/table/CtuluTable.java =================================================================== --- trunk/framework/ctulu-common/src/main/java/org/fudaa/ctulu/table/CtuluTable.java 2012-09-25 13:34:35 UTC (rev 7658) +++ trunk/framework/ctulu-common/src/main/java/org/fudaa/ctulu/table/CtuluTable.java 2012-09-25 14:43:22 UTC (rev 7659) @@ -57,6 +57,7 @@ import com.memoire.fu.FuLog; import org.fudaa.ctulu.CtuluLibString; +import org.fudaa.ctulu.ToStringTransformable; import skt.swing.table.TableColumnAutoResizer; import skt.swing.table.TableColumnResizer; @@ -165,7 +166,6 @@ protected void init() { this.getActionMap().put("paste", new AbstractAction("paste") { - @Override public void actionPerformed(final ActionEvent _evt) { paste(); @@ -173,7 +173,6 @@ ; }); this.getActionMap().put("copy", new AbstractAction("copy") { - @Override public void actionPerformed(final ActionEvent _evt) { copy(); @@ -485,6 +484,14 @@ } } + @Override + protected String transformToString(Object value) { + if (value instanceof ToStringTransformable) { + return ((ToStringTransformable) value).getAsString(); + } + return super.transformToString(value); + } + /** * Ecrit sur une feuille Excel le tableau. * @@ -594,7 +601,7 @@ break; } } else { - valeurTexte = value.toString(); + valeurTexte = transformToString(value); format.setVerticalAlignment(VerticalAlignment.CENTRE); format.setAlignment(Alignment.CENTRE); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <de...@us...> - 2012-10-04 12:55:19
|
Revision: 7701 http://fudaa.svn.sourceforge.net/fudaa/?rev=7701&view=rev Author: deniger Date: 2012-10-04 12:55:12 +0000 (Thu, 04 Oct 2012) Log Message: ----------- Modified Paths: -------------- trunk/framework/ctulu-common/src/main/java/org/fudaa/ctulu/CtuluDefaultLogFormatter.java trunk/framework/ebli-1d/src/main/java/org/fudaa/ebli/courbe/EGPaletteLegendeGraphe.java Added Paths: ----------- trunk/framework/ebli-1d/src/main/java/org/fudaa/ebli/courbe/EGCourbeCellRenderer.java Modified: trunk/framework/ctulu-common/src/main/java/org/fudaa/ctulu/CtuluDefaultLogFormatter.java =================================================================== --- trunk/framework/ctulu-common/src/main/java/org/fudaa/ctulu/CtuluDefaultLogFormatter.java 2012-10-04 06:22:43 UTC (rev 7700) +++ trunk/framework/ctulu-common/src/main/java/org/fudaa/ctulu/CtuluDefaultLogFormatter.java 2012-10-04 12:55:12 UTC (rev 7701) @@ -12,7 +12,6 @@ * Formateur par defaut pour les logs */ public final static CtuluDefaultLogFormatter DEFAULT = new CtuluDefaultLogFormatter(); - private boolean printLevel = true; public CtuluDefaultLogFormatter(boolean printLevel) { @@ -103,6 +102,28 @@ return res.toString(); } + public static String asHtml(final CtuluLog log) { + return asHtml(log.getRecords(), log.getDefaultResourceBundle()); + + } + + public static String asHtml(final Collection<CtuluLogRecord> logs, ResourceBundle resourceBundle) { + if (logs == null) { + return CtuluLibString.EMPTY_STRING; + } + final StringBuilder res = new StringBuilder(10 + logs.size() * 40); + res.append("<html><body>"); + boolean first = true; + for (final CtuluLogRecord logRecord : logs) { + if (!first) { + res.append("<br>"); + } + first = false; + res.append(DEFAULT.formatMessage(logRecord, resourceBundle)); + } + return res.toString(); + } + @Override public synchronized String format(final LogRecord record) { final StringBuilder sb = new StringBuilder(256); Added: trunk/framework/ebli-1d/src/main/java/org/fudaa/ebli/courbe/EGCourbeCellRenderer.java =================================================================== --- trunk/framework/ebli-1d/src/main/java/org/fudaa/ebli/courbe/EGCourbeCellRenderer.java (rev 0) +++ trunk/framework/ebli-1d/src/main/java/org/fudaa/ebli/courbe/EGCourbeCellRenderer.java 2012-10-04 12:55:12 UTC (rev 7701) @@ -0,0 +1,30 @@ +/* + GPL 2 + */ +package org.fudaa.ebli.courbe; + +import org.fudaa.ctulu.gui.CtuluCellTextRenderer; + +/** + * Renderer qui affiche la courbe sous forme de sa courbe miniature et son libell\xE9 \xE0 cot\xE9 + * + * @author Adrien Hadoux + */ +@SuppressWarnings(value = "serial") +public class EGCourbeCellRenderer extends CtuluCellTextRenderer { + // ne pas refaire le travail !!!!!!! + private final EGIconForCourbe icon_ = new EGIconForCourbe(); + + public EGCourbeCellRenderer() { + } + + @Override + protected void setValue(final Object _value) { + final EGCourbe cb = (EGCourbe) _value; + icon_.updateFromCourbe(cb); + setIcon(icon_); + setText(cb.getTitle()); + setOpaque(true); + } + +} Modified: trunk/framework/ebli-1d/src/main/java/org/fudaa/ebli/courbe/EGPaletteLegendeGraphe.java =================================================================== --- trunk/framework/ebli-1d/src/main/java/org/fudaa/ebli/courbe/EGPaletteLegendeGraphe.java 2012-10-04 06:22:43 UTC (rev 7700) +++ trunk/framework/ebli-1d/src/main/java/org/fudaa/ebli/courbe/EGPaletteLegendeGraphe.java 2012-10-04 12:55:12 UTC (rev 7701) @@ -71,29 +71,6 @@ public void axeAspectChanged(final EGAxe c) { } } - - /** - * Renderer qui affiche la courbe sous forme de sa courbe miniature et son libell\xE9 \xE0 cot\xE9 - * - * @author Adrien Hadoux - */ - @SuppressWarnings("serial") - private static class LegendeRenderer extends CtuluCellTextRenderer { // ne pas refaire le travail !!!!!!! - - private final EGIconForCourbe icon_ = new EGIconForCourbe(); - - public LegendeRenderer() { - } - - @Override - protected void setValue(final Object _value) { - final EGCourbe cb = (EGCourbe) _value; - icon_.updateFromCourbe(cb); - setIcon(icon_); - setText(cb.getTitle()); - setOpaque(true); - } - } class CustomDefaultListModel extends DefaultListModel { @@ -258,7 +235,7 @@ } } list_.setModel(model_); - list_.setCellRenderer(new LegendeRenderer()); + list_.setCellRenderer(new EGCourbeCellRenderer()); list_.getSelectionModel().addListSelectionListener(this); list_.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |