From: <de...@us...> - 2009-10-14 21:56:10
|
Revision: 5266 http://fudaa.svn.sourceforge.net/fudaa/?rev=5266&view=rev Author: deniger Date: 2009-10-14 21:56:02 +0000 (Wed, 14 Oct 2009) Log Message: ----------- Modified Paths: -------------- trunk/framework/pom.xml Added Paths: ----------- trunk/framework/fudaa-common/src/main/java/org/fudaa/fudaa/commun/impl/FudaaProjetInformationPanel.java Removed Paths: ------------- trunk/framework/ebli-3d/src/main/java/org/fudaa/ebli/volume/controles/BControleVisible.java Property Changed: ---------------- trunk/framework/fudaa-common-courbe/ Deleted: trunk/framework/ebli-3d/src/main/java/org/fudaa/ebli/volume/controles/BControleVisible.java =================================================================== --- trunk/framework/ebli-3d/src/main/java/org/fudaa/ebli/volume/controles/BControleVisible.java 2009-10-14 21:54:08 UTC (rev 5265) +++ trunk/framework/ebli-3d/src/main/java/org/fudaa/ebli/volume/controles/BControleVisible.java 2009-10-14 21:56:02 UTC (rev 5266) @@ -1,79 +0,0 @@ -/* - * @creation 9 ao\xFBt 2004 - * @modification $Date: 2006-09-19 14:55:53 $ - * @license GNU General Public License 2 - * @copyright (c)1998-2001 CETMEF 2 bd Gambetta F-60231 Compiegne - * @mail de...@fu... - */ -package org.fudaa.ebli.volume.controles; - -import java.awt.event.ActionEvent; -import java.awt.event.ActionListener; -import java.beans.PropertyChangeEvent; -import java.beans.PropertyChangeListener; - -import javax.swing.JComponent; -import javax.swing.JPanel; - -import com.memoire.bu.BuCheckBox; -import com.memoire.bu.BuGridLayout; -import com.memoire.bu.BuLabel; -import com.memoire.bu.BuResource; - -/** - * Une checkbox pour controler l'affichage d'un composant. Ce composant recoit les changements de proprietes ("visible") - * pour se mettre a jour. Une reference est gardee vers le composant cible. - * - * @author Fred Deniger - * @version $Id: BControleVisible.java,v 1.7 2006-09-19 14:55:53 deniger Exp $ - */ -public class BControleVisible extends BuCheckBox implements PropertyChangeListener, ActionListener { - - private JComponent target_; - - public BControleVisible() { - super(); - addActionListener(this); - } - - public void setTarget(final JComponent _c) { - if (_c != target_) { - if (target_ != null) { - target_.removePropertyChangeListener(this); - } - target_ = _c; - if (target_ != null) { - setSelected(target_.isVisible()); - target_.addPropertyChangeListener("visible", this); - } - } - setEnabled(target_ != null); - } - - public void actionPerformed(final ActionEvent _e) { - if (target_ != null) { - target_.setVisible(isSelected()); - } - } - - public void propertyChange(final PropertyChangeEvent _evt) { - if (_evt.getSource() == target_) { - setSelected(target_.isVisible()); - } - - } - - /** - * Panneau permettant de controler l'etat de visibilite d'un composant. - * - * @return un panel avec un label et une checkbox. - */ - public static BControleVisible buildPanelVisible(final JPanel _dest) { - _dest.removeAll(); - _dest.setLayout(new BuGridLayout(2)); - _dest.add(new BuLabel(BuResource.BU.getString("Visible"))); - final BControleVisible r = new BControleVisible(); - _dest.add(r); - return r; - } -} \ No newline at end of file Copied: trunk/framework/fudaa-common/src/main/java/org/fudaa/fudaa/commun/impl/FudaaProjetInformationPanel.java (from rev 5216, trunk/business/fudaa-common-corba/src/main/java/org/fudaa/fudaa/commun/projet/FudaaProjetInformationPanel.java) =================================================================== --- trunk/framework/fudaa-common/src/main/java/org/fudaa/fudaa/commun/impl/FudaaProjetInformationPanel.java (rev 0) +++ trunk/framework/fudaa-common/src/main/java/org/fudaa/fudaa/commun/impl/FudaaProjetInformationPanel.java 2009-10-14 21:56:02 UTC (rev 5266) @@ -0,0 +1,101 @@ +/* + * @file FudaaProjetInformationPanel.java + * @creation 23 mars 2004 + * @modification $Date: 2006-10-19 13:55:16 $ + * @license GNU General Public License 2 + * @copyright (c)1998-2001 CETMEF 2 bd Gambetta F-60231 Compiegne + * @mail fud...@li... + */ +package org.fudaa.fudaa.commun.impl; + +import java.awt.Frame; + +import com.memoire.bu.BuBorderLayout; +import com.memoire.bu.BuGridLayout; +import com.memoire.bu.BuInformationsDocument; +import com.memoire.bu.BuPanel; +import com.memoire.bu.BuScrollPane; +import com.memoire.bu.BuTextArea; +import com.memoire.bu.BuTextField; + +import org.fudaa.ctulu.gui.CtuluDialogPanel; + +import org.fudaa.fudaa.commun.FudaaLib; + +/** + * @author Fred Deniger + * @version $Id: FudaaProjetInformationPanel.java,v 1.7 2006-10-19 13:55:16 deniger Exp $ + */ +public class FudaaProjetInformationPanel extends CtuluDialogPanel { + + BuInformationsDocument d_; + BuTextField author_; + BuTextField date_; + BuTextArea com_; + + /** + * @param _d les infos non nulles + */ + public FudaaProjetInformationPanel(final BuInformationsDocument _d) { + super(); + d_ = _d; + addEmptyBorder(10); + final BuPanel pn = new BuPanel(); + pn.setLayout(new BuGridLayout(2, 5, 5)); + author_ = addLabelStringText(pn, FudaaLib.getS("Auteur")); + author_.setText(d_.author); + date_ = addLabelStringText(pn, FudaaLib.getS("Date")); + date_.setText(d_.date); + setLayout(new BuBorderLayout(10, 10)); + add(pn, BuBorderLayout.CENTER); + com_ = new BuTextArea(); + com_.setText(d_.comment); + add(new BuScrollPane(com_), BuBorderLayout.SOUTH); + } + + /** + * @return les nouvelles info sur le doc si modifie. null sinon + */ + public BuInformationsDocument getModifyDoc(){ + boolean change = false; + if (!d_.author.equals(author_.getText().trim())) { + change = true; + } + else if (!d_.date.equals(date_.getText().trim())) { + change = true; + } + else if (!d_.comment.equals(com_.getText().trim())) { + change = true; + } + if (change) { + final BuInformationsDocument r = new BuInformationsDocument(); + r.author = author_.getText().trim(); + r.date = date_.getText().trim(); + r.comment = com_.getText().trim(); + return r; + } + return null; + } + + /** + * @param _f la fenetre + * @param _init le document init + * @return le doc modifie ou nul si pas de modif + */ + public static BuInformationsDocument editInfoDoc(final Frame _f,final BuInformationsDocument _init){ + BuInformationsDocument init = _init; + if (init == null) { + init = new BuInformationsDocument(); + } + final FudaaProjetInformationPanel pn = new FudaaProjetInformationPanel(init); + if (CtuluDialogPanel.isOkResponse(pn.afficheModale(_f))) { + final BuInformationsDocument d = pn.getModifyDoc(); + if (d != null) { + return d; + } else if (_init == null) { + return init; + } + } + return null; + } +} Property changes on: trunk/framework/fudaa-common-courbe ___________________________________________________________________ Added: svn:ignore + target Modified: trunk/framework/pom.xml =================================================================== --- trunk/framework/pom.xml 2009-10-14 21:54:08 UTC (rev 5265) +++ trunk/framework/pom.xml 2009-10-14 21:56:02 UTC (rev 5266) @@ -5,7 +5,7 @@ <parent> <groupId>org.fudaa.pom</groupId> <artifactId>super-pom</artifactId> - <version>0.2</version> + <version>0.3</version> </parent> <groupId>org.fudaa.framework</groupId> <artifactId>pom</artifactId> @@ -70,12 +70,26 @@ <artifactId>ctulu-gis</artifactId> <version>${version}</version> </dependency> + <dependency> + <groupId>${ctuluGroupId}</groupId> + <artifactId>ctulu-gis</artifactId> + <version>${version}</version> + <type>test-jar</type> + <scope>test</scope> + </dependency> <!-- dodico--> <dependency> <groupId>${dodicoGroupId}</groupId> <artifactId>dodico-common</artifactId> <version>${version}</version> </dependency> + <dependency> + <groupId>${dodicoGroupId}</groupId> + <artifactId>dodico-common</artifactId> + <version>${version}</version> + <type>test-jar</type> + <scope>test</scope> + </dependency> <!-- ebli--> <dependency> <groupId>${ebliGroupId}</groupId> @@ -146,6 +160,16 @@ <artifactId>fudaa-common-save</artifactId> <version>${version}</version> </dependency> + <dependency> + <groupId>org.fudaa.framework.dico</groupId> + <artifactId>dico-ui</artifactId> + <version>${version}</version> + </dependency> + <dependency> + <groupId>org.fudaa.framework.dico</groupId> + <artifactId>dico-server</artifactId> + <version>${version}</version> + </dependency> <!-- dependence externes --> <dependency> <groupId>jsci</groupId> @@ -328,19 +352,6 @@ <tagBase>https://fudaa.svn.sourceforge.net/svnroot/fudaa/tags</tagBase> </configuration> </plugin> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-jar-plugin</artifactId> - <version>2.2</version> - <executions> - <execution> - <goals> - <goal>test-jar</goal> - </goals> - </execution> - </executions> - </plugin> - </plugins> </build> </project> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |