|
From: <de...@us...> - 2012-10-26 11:00:58
|
Revision: 7812
http://fudaa.svn.sourceforge.net/fudaa/?rev=7812&view=rev
Author: deniger
Date: 2012-10-26 11:00:45 +0000 (Fri, 26 Oct 2012)
Log Message:
-----------
Utilisation de SwingX 1.6
Modified Paths:
--------------
trunk/framework/ctulu-ui/pom.xml
trunk/framework/ebli-1d/pom.xml
trunk/framework/ebli-2d/pom.xml
trunk/framework/ebli-common/src/main/java/org/fudaa/ebli/palette/PaletteRefreshPanel.java
trunk/framework/ebli-common/src/main/java/org/fudaa/ebli/palette/PaletteSelecteurCouleurPlage.java
trunk/framework/fudaa-common/pom.xml
trunk/framework/pom.xml
Modified: trunk/framework/ctulu-ui/pom.xml
===================================================================
--- trunk/framework/ctulu-ui/pom.xml 2012-10-25 21:59:52 UTC (rev 7811)
+++ trunk/framework/ctulu-ui/pom.xml 2012-10-26 11:00:45 UTC (rev 7812)
@@ -1,27 +1,27 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.fudaa.framework</groupId>
- <artifactId>fudaa-framework</artifactId>
- <version>1.4-SNAPSHOT</version>
- </parent>
- <groupId>org.fudaa.framework.ctulu</groupId>
- <artifactId>ctulu-ui</artifactId>
- <name>ctulu-ui</name>
- <dependencies>
- <dependency>
- <groupId>${ctuluGroupId}</groupId>
- <artifactId>ctulu-common</artifactId>
- </dependency>
- <dependency>
- <groupId>org.swinglabs</groupId>
- <artifactId>swingx</artifactId>
- </dependency>
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <scope>test</scope>
- </dependency>
- </dependencies>
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.fudaa.framework</groupId>
+ <artifactId>fudaa-framework</artifactId>
+ <version>1.4-SNAPSHOT</version>
+ </parent>
+ <groupId>org.fudaa.framework.ctulu</groupId>
+ <artifactId>ctulu-ui</artifactId>
+ <name>ctulu-ui</name>
+ <dependencies>
+ <dependency>
+ <groupId>${ctuluGroupId}</groupId>
+ <artifactId>ctulu-common</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.swinglabs.swingx</groupId>
+ <artifactId>swingx-all</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
</project>
Modified: trunk/framework/ebli-1d/pom.xml
===================================================================
--- trunk/framework/ebli-1d/pom.xml 2012-10-25 21:59:52 UTC (rev 7811)
+++ trunk/framework/ebli-1d/pom.xml 2012-10-26 11:00:45 UTC (rev 7812)
@@ -1,35 +1,35 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.fudaa.framework</groupId>
- <artifactId>fudaa-framework</artifactId>
- <version>1.4-SNAPSHOT</version>
- </parent>
- <groupId>org.fudaa.framework.ebli</groupId>
- <artifactId>ebli-1d</artifactId>
- <name>ebli-1d</name>
- <dependencies>
- <dependency>
- <groupId>${ebliGroupId}</groupId>
- <artifactId>ebli-common</artifactId>
- </dependency>
- <dependency>
- <groupId>org.swinglabs</groupId>
- <artifactId>swingx</artifactId>
- </dependency>
- <dependency>
- <groupId>com.thoughtworks.xstream</groupId>
- <artifactId>xstream</artifactId>
- </dependency>
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.fudaa.framework.dodico</groupId>
- <artifactId>dodico-common</artifactId>
- </dependency>
- </dependencies>
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.fudaa.framework</groupId>
+ <artifactId>fudaa-framework</artifactId>
+ <version>1.4-SNAPSHOT</version>
+ </parent>
+ <groupId>org.fudaa.framework.ebli</groupId>
+ <artifactId>ebli-1d</artifactId>
+ <name>ebli-1d</name>
+ <dependencies>
+ <dependency>
+ <groupId>${ebliGroupId}</groupId>
+ <artifactId>ebli-common</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.swinglabs.swingx</groupId>
+ <artifactId>swingx-all</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>com.thoughtworks.xstream</groupId>
+ <artifactId>xstream</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.fudaa.framework.dodico</groupId>
+ <artifactId>dodico-common</artifactId>
+ </dependency>
+ </dependencies>
</project>
Modified: trunk/framework/ebli-2d/pom.xml
===================================================================
--- trunk/framework/ebli-2d/pom.xml 2012-10-25 21:59:52 UTC (rev 7811)
+++ trunk/framework/ebli-2d/pom.xml 2012-10-26 11:00:45 UTC (rev 7812)
@@ -1,37 +1,37 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.fudaa.framework</groupId>
- <artifactId>fudaa-framework</artifactId>
- <version>1.4-SNAPSHOT</version>
- </parent>
- <groupId>org.fudaa.framework.ebli</groupId>
- <artifactId>ebli-2d</artifactId>
- <name>ebli-2d</name>
- <dependencies>
- <dependency>
- <groupId>${ebliGroupId}</groupId>
- <artifactId>ebli-common</artifactId>
- </dependency>
- <dependency>
- <groupId>${ebliGroupId}</groupId>
- <artifactId>ebli-common</artifactId>
- <scope>test</scope>
- <type>test-jar</type>
- </dependency>
- <dependency>
- <groupId>org.swinglabs</groupId>
- <artifactId>swingx</artifactId>
- </dependency>
- <dependency>
- <groupId>com.thoughtworks.xstream</groupId>
- <artifactId>xstream</artifactId>
- </dependency>
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <scope>test</scope>
- </dependency>
- </dependencies>
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.fudaa.framework</groupId>
+ <artifactId>fudaa-framework</artifactId>
+ <version>1.4-SNAPSHOT</version>
+ </parent>
+ <groupId>org.fudaa.framework.ebli</groupId>
+ <artifactId>ebli-2d</artifactId>
+ <name>ebli-2d</name>
+ <dependencies>
+ <dependency>
+ <groupId>${ebliGroupId}</groupId>
+ <artifactId>ebli-common</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>${ebliGroupId}</groupId>
+ <artifactId>ebli-common</artifactId>
+ <scope>test</scope>
+ <type>test-jar</type>
+ </dependency>
+ <dependency>
+ <groupId>org.swinglabs.swingx</groupId>
+ <artifactId>swingx-all</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>com.thoughtworks.xstream</groupId>
+ <artifactId>xstream</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
</project>
Modified: trunk/framework/ebli-common/src/main/java/org/fudaa/ebli/palette/PaletteRefreshPanel.java
===================================================================
--- trunk/framework/ebli-common/src/main/java/org/fudaa/ebli/palette/PaletteRefreshPanel.java 2012-10-25 21:59:52 UTC (rev 7811)
+++ trunk/framework/ebli-common/src/main/java/org/fudaa/ebli/palette/PaletteRefreshPanel.java 2012-10-26 11:00:45 UTC (rev 7812)
@@ -50,6 +50,7 @@
import com.memoire.bu.BuLib;
import com.memoire.bu.BuPanel;
import com.memoire.bu.BuVerticalLayout;
+import org.fudaa.ctulu.CtuluNumberFormatI;
/**
* @author DENIGER
@@ -57,27 +58,16 @@
public class PaletteRefreshPanel extends CtuluDialogPanel implements ActionListener, ItemListener {
private final JTextField newNb_;
-
JButton btMax_;
-
JButton btMin_;
-
BuComboBox cbPalette_;
-
JCheckBox cbModifyRange_;
-
TraceIcon icMax_;
-
TraceIcon icMin_;
-
JComponent newMax_;
-
JComponent newMin_;
-
final PaletteSelecteurCouleurPlage plage_;
-
BuGlassPaneStop stop_;
-
JDialog owner_;
final void setOwner(final JDialog _owner) {
@@ -86,13 +76,12 @@
private String getHelpTextString() {
return "<html><body>" + EbliLib.getS("Les modifications sont automatiquement sauvegard\xE9es") + ".<br><br>"
- + EbliLib.getS("Il est possible de partager des palettes gr\xE2ce aux fonction d'import/export") + ".<br><br>"
- + EbliLib.getS("Il y a deux types de palettes:") + "<br><ul><li>"
- + EbliLib.getS("Palette lin\xE9aire: toutes les couleurs de l'intervalle seront utilis\xE9es") + "</li><li>"
- + EbliLib.getS("Palette sp\xE9cifi\xE9e par l'utilisateur: seules les couleurs sp\xE9cifi\xE9es seront utilis\xE9es (si suffisantes)")
- + "</li></ul></body></html>";
+ + EbliLib.getS("Il est possible de partager des palettes gr\xE2ce aux fonction d'import/export") + ".<br><br>"
+ + EbliLib.getS("Il y a deux types de palettes:") + "<br><ul><li>"
+ + EbliLib.getS("Palette lin\xE9aire: toutes les couleurs de l'intervalle seront utilis\xE9es") + "</li><li>"
+ + EbliLib.getS("Palette sp\xE9cifi\xE9e par l'utilisateur: seules les couleurs sp\xE9cifi\xE9es seront utilis\xE9es (si suffisantes)")
+ + "</li></ul></body></html>";
}
-
CtuluTitledPanelCheckBox pnMinMaxRanges_;
/**
@@ -109,7 +98,7 @@
pnMinMaxRanges_ = CtuluLibSwing.createTitleCheckBox(EbliLib.getS("Modifier les plages"));
cbModifyRange_ = pnMinMaxRanges_.getTitleCb();
cbModifyRange_.setToolTipText("<html>" + EbliLib.getS("Si s\xE9lectionn\xE9, les plages de la palette seront modifi\xE9es") + "<br>"
- + EbliLib.getS("Si non s\xE9lectionn\xE9, seules les couleurs seront mises \xE0 jour") + "</html>");
+ + EbliLib.getS("Si non s\xE9lectionn\xE9, seules les couleurs seront mises \xE0 jour") + "</html>");
pnMinMaxRanges_.setLayout(new BuGridLayout(2, 5, 5));
newNb_ = addLabelIntegerText(pnMinMaxRanges_, EbliLib.getS("Nombre de plages"));
@@ -134,8 +123,8 @@
pnMinMaxRanges_.add(newMax_);
final double[] ds = this.plage_.getMinMax();
if (ds != null) {
- plage_.valueEditor_.setValue(Double.toString(ds[1]), newMax_);
- plage_.valueEditor_.setValue(Double.toString(ds[0]), newMin_);
+ plage_.valueEditor_.setValue(doubleToString(ds[1]), newMax_);
+ plage_.valueEditor_.setValue(doubleToString(ds[0]), newMin_);
}
if ((this.plage_.target_ != null) && (this.plage_.target_.isDonneesBoiteAvailable())) {
final BuPanel right = new BuPanel();
@@ -157,7 +146,6 @@
// affiche
btMax_ = new JButton();
btMax_.addActionListener(new ActionListener() {
-
public void actionPerformed(final ActionEvent _e) {
icMax_.setCouleur(JColorChooser.showDialog(owner_, EbliResource.EBLI.getString("Couleur pour le max"), icMax_.getCouleur()));
paletteContinu_.setMax(icMax_.getCouleur());
@@ -176,7 +164,6 @@
icMax_.setCouleur(plage == null ? Color.CYAN : plage.getCouleur());
btMin_ = new JButton();
btMin_.addActionListener(new ActionListener() {
-
public void actionPerformed(final ActionEvent _e) {
icMin_.setCouleur(JColorChooser.showDialog(owner_, EbliResource.EBLI.getString("Couleur pour le min"), icMin_.getCouleur()));
paletteContinu_.setMin(icMin_.getCouleur());
@@ -225,6 +212,16 @@
cbPalette_.addItemListener(this);
updateEditPanel();
}
+
+ private String doubleToString(double d){
+ if(plage_.isUseFormatter()){
+ CtuluNumberFormatI defaultFormatter = plage_.getDefaultFormatter();
+ if(defaultFormatter!=null){
+ return defaultFormatter.format(d);
+ }
+ }
+ return Double.toString(d);
+ }
/**
* @return le bouton a utiliser pour rechercher le min max sur le pas de temps en cours
@@ -235,18 +232,14 @@
bt.setText(EbliLib.getS("les valeurs max/min du pas de temps"));
bt.setToolTipText(EbliLib.getS("Initialiser les champs avec le maximum et le minimum des donn\xE9es sur la pas de temps"));
bt.addActionListener(new ActionListener() {
-
public void actionPerformed(final ActionEvent _e) {
BuLib.invokeNow(new Runnable() {
-
public void run() {
startComputing();
}
-
});
new Thread() {
-
public void run() {
if (PaletteRefreshPanel.this.plage_.dataBoite_ == null) {
PaletteRefreshPanel.this.plage_.dataBoite_ = new CtuluRange();
@@ -257,11 +250,10 @@
plage_.valueEditor_.setValue(null, newMin_);
erreurNotFound();
} else {
- plage_.valueEditor_.setValue(Double.toString(PaletteRefreshPanel.this.plage_.dataBoite_.max_), newMax_);
- plage_.valueEditor_.setValue(Double.toString(PaletteRefreshPanel.this.plage_.dataBoite_.min_), newMin_);
+ plage_.valueEditor_.setValue(doubleToString(PaletteRefreshPanel.this.plage_.dataBoite_.max_), newMax_);
+ plage_.valueEditor_.setValue(doubleToString(PaletteRefreshPanel.this.plage_.dataBoite_.min_), newMin_);
}
final Runnable r = new Runnable() {
-
public void run() {
stopComputing();
}
@@ -277,10 +269,9 @@
protected void erreurNotFound() {
EventQueue.invokeLater(new Runnable() {
-
public void run() {
CtuluLibDialog.showWarn(owner_, "Min/max",
- EbliLib.getS("Les bornes n'ont pas \xE9t\xE9 trouv\xE9es.\n Avez-vous s\xE9lectionner une variable et \xE9ventuellement un pas de temps ?"));
+ EbliLib.getS("Les bornes n'ont pas \xE9t\xE9 trouv\xE9es.\n Avez-vous s\xE9lectionner une variable et \xE9ventuellement un pas de temps ?"));
}
});
}
@@ -293,17 +284,13 @@
bt.setText(EbliLib.getS("les valeurs max/min pour tous les pas de temps"));
bt.setToolTipText(EbliLib.getS("Initialiser les champs avec le maximum et le minimum des donn\xE9es sur tous les pas de temps"));
bt.addActionListener(new ActionListener() {
-
public void actionPerformed(final ActionEvent _e) {
BuLib.invokeNow(new Runnable() {
-
public void run() {
startComputing();
}
-
});
new Thread() {
-
public void run() {
if (PaletteRefreshPanel.this.plage_.dataBoite_ == null) {
PaletteRefreshPanel.this.plage_.dataBoite_ = new CtuluRange();
@@ -314,11 +301,10 @@
plage_.valueEditor_.setValue(null, newMin_);
erreurNotFound();
} else {
- plage_.valueEditor_.setValue(Double.toString(PaletteRefreshPanel.this.plage_.dataBoite_.max_), newMax_);
- plage_.valueEditor_.setValue(Double.toString(PaletteRefreshPanel.this.plage_.dataBoite_.min_), newMin_);
+ plage_.valueEditor_.setValue(doubleToString(PaletteRefreshPanel.this.plage_.dataBoite_.max_), newMax_);
+ plage_.valueEditor_.setValue(doubleToString(PaletteRefreshPanel.this.plage_.dataBoite_.min_), newMin_);
}
final Runnable r = new Runnable() {
-
public void run() {
stopComputing();
}
@@ -358,7 +344,6 @@
final PaletteCouleurDiscontinu d = (PaletteCouleurDiscontinu) o;
final PaletteEditorPanel panel = new PaletteEditorPanel(d.getTitle(), PaletteManager.copy(d.getCs()));
final CtuluDialogPanel pn = new CtuluDialogPanel() {
-
public boolean isDataValid() {
if (panel.getColors().length == 0) {
@@ -391,17 +376,11 @@
}
}
}
-
BuPanel palette_;
-
BuPanel pnContinu_;
-
BuPanel pnDisc_;
-
PaletteCouleurContinu paletteContinu_;
-
JComponent editPalette_;
-
private BuCheckBox cbLog;
void startComputing() {
@@ -443,7 +422,9 @@
newPalette.setLogScale(isLogScale);
this.plage_.model_.setPlages(newPalette);
this.plage_.ajusteAllLegendes();
- this.plage_.target_.getPaletteCouleur().setLogScale(isLogScale);
+ if (plage_.target_.getPaletteCouleur() != null) {
+ this.plage_.target_.getPaletteCouleur().setLogScale(isLogScale);
+ }
} else {
plage_.model_.modifyColors(c);
}
@@ -510,14 +491,13 @@
public static void initPlages(final int _nb, final double _min, final double _max, final List _l, final BPalettePlage _p, boolean useLogScale) {
// int nb = Math.max(_nb, 1);
int nb = _nb;
- if (_min == _max && nb!=0) {
+ if (_min == _max && nb != 0) {
nb = 1;
}
_l.clear();
// initialisation des plages
for (int i = 0; i < nb; i++) {
-
}
double max = _max;
final double min = _min;
@@ -531,7 +511,7 @@
_l.add(p0);
p0.setMin(min);
p0.setMax(max);
- } else if (nb!=0) {
+ } else if (nb != 0) {
// par construction les plages sont dans le bon ordre !
TDoubleArrayList values = new TDoubleArrayList();
values.add(min);
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-10-25 21:59:52 UTC (rev 7811)
+++ trunk/framework/ebli-common/src/main/java/org/fudaa/ebli/palette/PaletteSelecteurCouleurPlage.java 2012-10-26 11:00:45 UTC (rev 7812)
@@ -12,7 +12,6 @@
package org.fudaa.ebli.palette;
import java.awt.BorderLayout;
-import java.awt.Checkbox;
import java.awt.Color;
import java.awt.FlowLayout;
import java.awt.Font;
@@ -33,7 +32,6 @@
import javax.swing.event.ListSelectionEvent;
import javax.swing.event.ListSelectionListener;
-import com.lowagie.text.pdf.PdfFormField;
import com.memoire.bu.*;
import org.fudaa.ctulu.CtuluLibString;
@@ -45,7 +43,6 @@
import org.fudaa.ctulu.gui.CtuluDecimalFormatEditPanel;
import org.fudaa.ctulu.gui.CtuluDialog;
import org.fudaa.ctulu.gui.CtuluDialogPanel;
-import org.fudaa.ctulu.gui.CtuluLibDialog;
import org.fudaa.ctulu.gui.CtuluLibSwing;
import org.fudaa.ctulu.gui.CtuluPopupMenu;
import org.fudaa.ebli.commun.BPalettePanelInterface;
@@ -61,8 +58,13 @@
* @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 {
+ ActionListener, MouseListener, BPalettePanelInterface, BuBorders {
+ public CtuluNumberFormatI getDefaultFormatter() {
+ CtuluNumberFormatI ctuluNumberFormatI = default_ == null ? null : default_.getFormatter();
+ return ctuluNumberFormatI;
+ }
+
class PlageTableModel extends AbstractListModel implements TraceIsoPlageInterface {
public PlageTableModel() {
@@ -188,70 +190,42 @@
public static boolean isTargetValid(final Object _o) {
return (_o instanceof BPalettePlageTarget) && ((BPalettePlageTarget) _o).isPaletteModifiable();
}
-
private transient BPalettePlageDefault default_;
-
JButton btApply_;
-
BuToolButton btAssombrir_;
-
JButton btColor_;
-
BuToolButton btEcl_;
-
BuButton btFormat_;
BuButton btExport_;
BuButton btImport_;
-
JButton btRefresh_;
-
BuCheckBox cbChangedLeg_;
-
CtuluRange dataBoite_;
-
TraceIcon ic_;
-
boolean isAdjusting_;
-
BuMenuItem itemRemove_;
-
BuMenuItem itemSplit_;
-
JLabel lbPalTitle_;
JCheckBox subTitleVisible;
JCheckBox cbReduit;
-
JList list_;
-
CtuluPopupMenu menu_;
-
PlageTableModel model_;
-
JPanel panelData_;
-
BPlageAbstract plageEnCours_;
-
List plages_;
-
BuScrollPane sp_;
-
BPalettePlageTarget target_;
-
JTextField tfPlageLeg_;
-
JTextField tfTitlePalette_;
-
JComponent txtMax_;
-
JComponent txtMin_;
BuLabel lbMax_;
BuLabel lbMin_;
-
CtuluValueEditorI valueEditor_ = CtuluValueEditorDefaults.DOUBLE_EDITOR;
-
protected boolean isDiscreteTarget_;
-
private BuPanel btpn;
+ final BuPanel pnTitle;
public PaletteSelecteurCouleurPlage() {
super();
@@ -265,9 +239,9 @@
subTitleVisible.setVisible(false);
cbReduit = new JCheckBox();
cbReduit.setText(EbliLib.getS("L\xE9gende r\xE9duite"));
-
+
tfTitlePalette_ = new BuTextField(10);
- final BuPanel pnTitle = new BuPanel(new BuGridLayout(2));
+ pnTitle = new BuPanel(new BuGridLayout(2));
pnTitle.add(new BuLabel(EbliLib.getS("Titre:")));
pnTitle.add(tfTitlePalette_);
top.add(lbPalTitle_);
@@ -346,7 +320,20 @@
btpn.add(bt);
}
- private void actionApply() {
+ public JButton getBtApply() {
+ return btApply_;
+ }
+
+ public JTextField getTfTitlePalette() {
+ return tfTitlePalette_;
+ }
+
+ public void setTitlePanelVisible(boolean b) {
+ pnTitle.setVisible(b);
+ lbPalTitle_.setVisible(b);
+ }
+
+ public void actionApply() {
savePanel();
final BPlageInterface[] vp = new BPlageInterface[plages_.size()];
plages_.toArray(vp);
@@ -356,7 +343,7 @@
if (subTitleVisible.isVisible()) {
default_.setSubTitleVisible(subTitleVisible.isSelected());
}
- if(cbReduit.isEnabled()){
+ if (cbReduit.isEnabled()) {
default_.setReduit(cbReduit.isSelected());
}
target_.setPaletteCouleurPlages(default_);
@@ -377,7 +364,7 @@
}
private void actionFormat() {
- CtuluNumberFormatI ctuluNumberFormatI = default_ == null ? null : default_.getFormatter();
+ CtuluNumberFormatI ctuluNumberFormatI = getDefaultFormatter();
/*
* CtuluNumberFormatI fmt = getDefaultFormat(); if (fmt == null) { fmt = CtuluLib.DEFAULT_NUMBER_FORMAT; }
*/
@@ -432,15 +419,21 @@
}
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();
@@ -463,13 +456,18 @@
final BPlage nplage = new BPlage(plageEnCours_);
double mini = min + i * step;
double maxi = min + (i + 1) * step;
- if (i == nb - 1) maxi = max;
+ if (i == nb - 1) {
+ maxi = max;
+ }
nplage.setMinMax(Double.parseDouble(default_.formatter_.format(mini)),
- Double.parseDouble(default_.formatter_.format(maxi)));
+ 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);
- else plages_.add(idx + i, nplage);
+ if (isLast) {
+ plages_.add(nplage);
+ } else {
+ plages_.add(idx + i, nplage);
+ }
}
model_.fireAdd(idx + 1, idx + nb - 1);
updatePanel();
@@ -500,15 +498,14 @@
} 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());
+ cbReduit.setSelected(target_.getPaletteCouleur() != null && target_.getPaletteCouleur().isReduit());
+ cbReduit.setEnabled(target_.getPaletteCouleur() != null && target_.getPaletteCouleur().isReduitEnable());
}
}
/*
* void setModified(){ btApply_.setEnabled(true); }
*/
-
/**
* Met a jour le panneau des donn\xE9es.
*/
@@ -538,7 +535,6 @@
if (cbChangedLeg_ == null) {
cbChangedLeg_ = new BuCheckBox(EbliLib.getS("Label") + suff);
cbChangedLeg_.addItemListener(new ItemListener() {
-
public void itemStateChanged(final ItemEvent _e) {
if (cbChangedLeg_.isSelected()) {
if (plageEnCours_ != null && tfPlageLeg_ != null) {
@@ -548,7 +544,9 @@
} else if (tfPlageLeg_ != null) {
tfPlageLeg_.setText(CtuluLibString.EMPTY_STRING);
}
- if (tfPlageLeg_ != null) tfPlageLeg_.setEnabled(cbChangedLeg_.isSelected());
+ if (tfPlageLeg_ != null) {
+ tfPlageLeg_.setEnabled(cbChangedLeg_.isSelected());
+ }
}
});
@@ -570,13 +568,17 @@
}
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,7 +597,9 @@
}
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);
}
@@ -611,14 +615,23 @@
modified |= p.setLegende(tfPlageLeg_.getText());
// Fred deja effectue par la premiere ligne
} /*
- * else { modified |= p.ajusteLegendes(default_.getFormatter(), default_.getSep()); }
- */
+ * else { modified |= p.ajusteLegendes(default_.getFormatter(), default_.getSep()); }
+ */
}
if (modified) {
model_.fireModified(plageEnCours_);
}
}
+ boolean useFormatter;
+ public boolean isUseFormatter() {
+ return useFormatter;
+ }
+
+ public void setUseFormatter(boolean useFormatter) {
+ this.useFormatter = useFormatter;
+ }
+
void updatePanel() {
if (plageEnCours_ == null) {
ic_.setCouleur(btColor_.getForeground());
@@ -631,9 +644,21 @@
ic_.setType(plageEnCours_.getIconeType());
// final CtuluNumberFormatI fmt = plageEnCours_.getgetDefaultFormat();
String s = Double.toString(plageEnCours_.getMin());
+ if (useFormatter) {
+ CtuluNumberFormatI ctuluNumberFormatI = getDefaultFormatter();
+ if (ctuluNumberFormatI != null) {
+ s = ctuluNumberFormatI.format(plageEnCours_.getMin());
+ }
+ }
valueEditor_.setValue(s, txtMin_);
txtMin_.setToolTipText(s);
s = Double.toString(plageEnCours_.getMax());
+ if (useFormatter) {
+ CtuluNumberFormatI ctuluNumberFormatI = getDefaultFormatter();
+ if (ctuluNumberFormatI != null) {
+ s = ctuluNumberFormatI.format(plageEnCours_.getMax());
+ }
+ }
valueEditor_.setValue(s, txtMax_);
txtMax_.setToolTipText(s);
tfPlageLeg_.setText(plageEnCours_.getLegende());
@@ -650,14 +675,16 @@
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_))) {
+ && (valueEditor_.isValueValidFromComponent(txtMax_))) {
double nmin = Double.parseDouble(valueEditor_.getStringValue(txtMin_));
double nmax = Double.parseDouble(valueEditor_.getStringValue(txtMax_));
@@ -719,6 +746,10 @@
}
}
+ public BuButton getBtFormat() {
+ return btFormat_;
+ }
+
private void importPalette() {
BuFileChooser chooser = new BuFileChooser();
PaletteFileFilter filter = new PaletteFileFilter();
@@ -753,19 +784,24 @@
}
}
- 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)) {
@@ -784,7 +820,8 @@
}
}
- public void paletteDeactivated() {}
+ public void paletteDeactivated() {
+ }
public void propertyChange(final PropertyChangeEvent _evt) {
setTargetPalette(target_, true);
@@ -792,7 +829,9 @@
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);
}
@@ -842,7 +881,10 @@
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();
+ String subTitleLabel = null;
+ if (_m.getPaletteCouleur() != null) {
+ subTitleLabel = _m.getPaletteCouleur().getSubTitleLabel();
+ }
if (subTitleLabel != null) {
subTitleVisible.setVisible(true);
subTitleVisible.setText(EbliLib.getS("Afficher") + ": " + subTitleLabel);
@@ -877,5 +919,4 @@
}
}
}
-
-}
\ No newline at end of file
+}
Modified: trunk/framework/fudaa-common/pom.xml
===================================================================
--- trunk/framework/fudaa-common/pom.xml 2012-10-25 21:59:52 UTC (rev 7811)
+++ trunk/framework/fudaa-common/pom.xml 2012-10-26 11:00:45 UTC (rev 7812)
@@ -1,35 +1,35 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.fudaa.framework</groupId>
- <artifactId>fudaa-framework</artifactId>
- <version>1.4-SNAPSHOT</version>
- </parent>
- <groupId>org.fudaa.framework.fudaa</groupId>
- <artifactId>fudaa-common</artifactId>
- <name>fudaa-common</name>
- <dependencies>
- <dependency>
- <groupId>${ctuluGroupId}</groupId>
- <artifactId>ctulu-ui</artifactId>
- </dependency>
- <dependency>
- <groupId>org.swinglabs</groupId>
- <artifactId>swingx</artifactId>
- </dependency>
- <dependency>
- <groupId>${dodicoGroupId}</groupId>
- <artifactId>dodico-common</artifactId>
- </dependency>
- <dependency>
- <groupId>${ebliGroupId}</groupId>
- <artifactId>ebli-common</artifactId>
- </dependency>
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <scope>test</scope>
- </dependency>
- </dependencies>
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.fudaa.framework</groupId>
+ <artifactId>fudaa-framework</artifactId>
+ <version>1.4-SNAPSHOT</version>
+ </parent>
+ <groupId>org.fudaa.framework.fudaa</groupId>
+ <artifactId>fudaa-common</artifactId>
+ <name>fudaa-common</name>
+ <dependencies>
+ <dependency>
+ <groupId>${ctuluGroupId}</groupId>
+ <artifactId>ctulu-ui</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.swinglabs.swingx</groupId>
+ <artifactId>swingx-all</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>${dodicoGroupId}</groupId>
+ <artifactId>dodico-common</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>${ebliGroupId}</groupId>
+ <artifactId>ebli-common</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
</project>
Modified: trunk/framework/pom.xml
===================================================================
--- trunk/framework/pom.xml 2012-10-25 21:59:52 UTC (rev 7811)
+++ trunk/framework/pom.xml 2012-10-26 11:00:45 UTC (rev 7812)
@@ -12,7 +12,7 @@
<url>http://www.fudaa.fr/sites/devel/fudaa-framework/</url>
<properties>
<projetEncoding>ISO-8859-15</projetEncoding>
- <!-- la version du compiler -->
+ <!-- la version du compiler -->
<javaCompiler>1.6</javaCompiler>
</properties>
<packaging>pom</packaging>
@@ -82,7 +82,7 @@
<type>test-jar</type>
<scope>test</scope>
</dependency>
- <!-- dodico-->
+ <!-- dodico-->
<dependency>
<groupId>${dodicoGroupId}</groupId>
<artifactId>dodico-common</artifactId>
@@ -95,7 +95,7 @@
<type>test-jar</type>
<scope>test</scope>
</dependency>
- <!-- ebli-->
+ <!-- ebli-->
<dependency>
<groupId>${ebliGroupId}</groupId>
<artifactId>ebli-common</artifactId>
@@ -139,9 +139,9 @@
<groupId>${ebliGroupId}</groupId>
<artifactId>ebli-3d</artifactId>
<version>${project.version}</version>
- <!--
- voir http://maven.apache.org/guides/mini/guide-attached-tests.html
- -->
+ <!--
+ voir http://maven.apache.org/guides/mini/guide-attached-tests.html
+ -->
<type>test-jar</type>
<scope>test</scope>
</dependency>
@@ -175,7 +175,7 @@
<artifactId>dico-server</artifactId>
<version>${project.version}</version>
</dependency>
- <!-- dependence externes -->
+ <!-- dependence externes -->
<dependency>
<groupId>jsci</groupId>
<artifactId>jsci</artifactId>
@@ -194,10 +194,10 @@
<dependency>
<groupId>trove</groupId>
<artifactId>trove</artifactId>
- <!--
- attention la version 2.1.1 est bogue pour le calcul du min sur
- TDoubleArrayList
- -->
+ <!--
+ attention la version 2.1.1 est bogue pour le calcul du min sur
+ TDoubleArrayList
+ -->
<version>2.0.4</version>
</dependency>
@@ -243,21 +243,21 @@
<artifactId>commons-beanutils-core</artifactId>
<version>1.8.3</version>
</dependency>
-<!-- <dependency> -->
-<!-- <groupId>org.slf4j</groupId> -->
-<!-- <artifactId>log4j-over-slf4j</artifactId> -->
-<!-- <version>1.5.8</version> -->
-<!-- </dependency> -->
-<!-- <dependency> -->
-<!-- <groupId>org.slf4j</groupId> -->
-<!-- <artifactId>jcl-over-slf4j</artifactId> -->
-<!-- <version>1.5.8</version> -->
-<!-- </dependency> -->
-<!-- <dependency> -->
-<!-- <groupId>ch.qos.logback</groupId> -->
-<!-- <artifactId>logback-classic</artifactId> -->
-<!-- <version>0.9.11</version> -->
-<!-- </dependency> -->
+ <!-- <dependency> -->
+ <!-- <groupId>org.slf4j</groupId> -->
+ <!-- <artifactId>log4j-over-slf4j</artifactId> -->
+ <!-- <version>1.5.8</version> -->
+ <!-- </dependency> -->
+ <!-- <dependency> -->
+ <!-- <groupId>org.slf4j</groupId> -->
+ <!-- <artifactId>jcl-over-slf4j</artifactId> -->
+ <!-- <version>1.5.8</version> -->
+ <!-- </dependency> -->
+ <!-- <dependency> -->
+ <!-- <groupId>ch.qos.logback</groupId> -->
+ <!-- <artifactId>logback-classic</artifactId> -->
+ <!-- <version>0.9.11</version> -->
+ <!-- </dependency> -->
<dependency>
<groupId>com.lowagie</groupId>
@@ -305,11 +305,10 @@
<version>1.3.1</version>
<scope>provided</scope>
</dependency>
-
<dependency>
- <groupId>org.swinglabs</groupId>
- <artifactId>swingx</artifactId>
- <version>1.0</version>
+ <groupId>org.swinglabs.swingx</groupId>
+ <artifactId>swingx-all</artifactId>
+ <version>1.6.3</version>
</dependency>
<dependency>
<groupId>jep</groupId>
@@ -348,7 +347,7 @@
</dependency>
- <!-- Test -->
+ <!-- Test -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
@@ -370,7 +369,7 @@
</plugins>
<pluginManagement>
<plugins>
- <!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->
+ <!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->
<plugin>
<groupId>org.eclipse.m2e</groupId>
<artifactId>lifecycle-mapping</artifactId>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|