|
From: <de...@us...> - 2012-04-17 14:22:31
|
Revision: 7078
http://fudaa.svn.sourceforge.net/fudaa/?rev=7078&view=rev
Author: deniger
Date: 2012-04-17 14:22:21 +0000 (Tue, 17 Apr 2012)
Log Message:
-----------
Modified Paths:
--------------
trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/post/dialogSpec/TrPostWizardCourbeTemporelle.java
trunk/soft/fudaa-prepro/ui/src/main/resources/org/fudaa/fudaa/tr/common/tr_en.fr_txt
Modified: trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/post/dialogSpec/TrPostWizardCourbeTemporelle.java
===================================================================
--- trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/post/dialogSpec/TrPostWizardCourbeTemporelle.java 2012-04-17 14:04:10 UTC (rev 7077)
+++ trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/post/dialogSpec/TrPostWizardCourbeTemporelle.java 2012-04-17 14:22:21 UTC (rev 7078)
@@ -110,10 +110,8 @@
@Override
public Class<?> getColumnClass(final int _columnIndex) {
- if (_columnIndex == 3)
- return Boolean.class;
- if (_columnIndex == 2 || _columnIndex == 1)
- return JButton.class;
+ if (_columnIndex == 3) return Boolean.class;
+ if (_columnIndex == 2 || _columnIndex == 1) return JButton.class;
return String.class;
}
@@ -142,12 +140,11 @@
// -- connaitre la bonen liste entre les points reels et interpol\xE9s
if (_columnIndex == 0) {
+ if (isInterpolated(_rowIndex)) { return TrLib.getString("Interpol\xE9");// + " " + getPointInt(_rowIndex).idxElt_
+ }
if (isElement) {
return TrResource.TR.getString("El\xE9ment {0}", Integer.toString(getPointReel(_rowIndex) + 1));
- }
- if (!isInterpolated(_rowIndex))
- return "Point " + (getPointReel(_rowIndex) + 1);
- else return TrLib.getString("Interpol\xE9");// + " " + getPointInt(_rowIndex).idxElt_
+ } else return TrResource.TR.getString("Point {0}", Integer.toString(getPointReel(_rowIndex) + 1));
} else if (_columnIndex == 1) {
if (!isInterpolated(_rowIndex)) {
@@ -157,9 +154,7 @@
if (!isInterpolated(_rowIndex)) {
return format(getY(getPointReel(_rowIndex)));
} else return format(getPointInt(_rowIndex).getY());
- } else if (_columnIndex == 3) {
- return isInterpolated(_rowIndex);
- }
+ } else if (_columnIndex == 3) { return isInterpolated(_rowIndex); }
return null;
@@ -189,12 +184,11 @@
}
void updatelabel() {
- if (label_ != null)
- if (isElement) {
- label_.setText(TrResource.TR.getString("Nb El\xE9ments {0}", Integer.toString(listPointOrMeshes.size())));
- } else {
- label_.setText(TrResource.TR.getString("Nb points {0}", Integer.toString(listPointOrMeshes.size())));
- }
+ if (label_ != null) if (isElement) {
+ label_.setText(TrResource.TR.getString("Nb El\xE9ments {0}", Integer.toString(listPointOrMeshes.size())));
+ } else {
+ label_.setText(TrResource.TR.getString("Nb points {0}", Integer.toString(listPointOrMeshes.size())));
+ }
}
}
@@ -208,7 +202,8 @@
// private int[] ptIdx_;
BuCheckBox checkboxNewGraphe_ = new BuCheckBox(TrResource.TR.getString("Cr\xE9er un nouveau graphe"));
- BuCheckBox traceOrigineDansVue2d_ = new BuCheckBox(TrResource.TR.getString("Cr\xE9er calque avec points d'origine de la courbe"));
+ BuCheckBox traceOrigineDansVue2d_ = new BuCheckBox(
+ TrResource.TR.getString("Cr\xE9er calque avec points d'origine de la courbe"));
private final MvExportChooseVarAndTime chooserVarTime_;
@@ -252,26 +247,20 @@
assert _pt != null;
}
listPointOrMeshes = new ArrayList();
- if (_ptIdx != null)
- for (int i = 0; i < _ptIdx.length; i++)
- listPointOrMeshes.add(_ptIdx[i]);
+ if (_ptIdx != null) for (int i = 0; i < _ptIdx.length; i++)
+ listPointOrMeshes.add(_ptIdx[i]);
- if (_pt != null)
- listPointOrMeshes.add(_pt);
+ if (_pt != null) listPointOrMeshes.add(_pt);
}
public double getX(int idx) {
- if (isElement) {
- return source.getGrid().getCentreXElement(idx);
- }
+ if (isElement) { return source.getGrid().getCentreXElement(idx); }
return source.getGrid().getPtX(idx);
}
public double getY(int idx) {
- if (isElement) {
- return source.getGrid().getCentreXElement(idx);
- }
+ if (isElement) { return source.getGrid().getCentreXElement(idx); }
return source.getGrid().getPtY(idx);
}
@@ -296,8 +285,10 @@
jlisteGraphesSelections.setBorder(BorderFactory.createTitledBorder(TrResource.TR.getString("Graphes choisis")));
jlisteGraphesSelections.setCellRenderer(new GrapheCellRenderer());
final JPanel panelControle = new JPanel(new FlowLayout(FlowLayout.CENTER));
- final JButton select = new JButton(TrResource.TR.getString("Ajouter"), EbliResource.EBLI.getIcon("crystal22_avancervite"));
- final JButton unselect = new JButton(TrResource.TR.getString("Enlever"), EbliResource.EBLI.getIcon("crystal22_reculervite"));
+ final JButton select = new JButton(TrResource.TR.getString("Ajouter"),
+ EbliResource.EBLI.getIcon("crystal22_avancervite"));
+ final JButton unselect = new JButton(TrResource.TR.getString("Enlever"),
+ EbliResource.EBLI.getIcon("crystal22_reculervite"));
select.addActionListener(new ActionListener() {
@Override
public void actionPerformed(final ActionEvent _e) {
@@ -392,8 +383,8 @@
@Override
public boolean editCellAt(int _row, int _column, EventObject _e) {
- if (_e instanceof MouseEvent && ((MouseEvent) _e).getClickCount() == 2)
- saisirPoints("" + getValueAt(_row, 1), "" + getValueAt(_row, 2), false, _row, model);
+ if (_e instanceof MouseEvent && ((MouseEvent) _e).getClickCount() == 2) saisirPoints("" + getValueAt(_row, 1),
+ "" + getValueAt(_row, 2), false, _row, model);
return false;
}
@@ -401,9 +392,12 @@
content.add(new BuScrollPane(tableau), BorderLayout.CENTER);
final JPanel control = new JPanel(new FlowLayout(FlowLayout.CENTER));
if (!isElement) {
- content.add(
- new JLabel(TrResource.getS("Saisir des points en cliquant sur ajouter. Modifier des points en cliquant sur les valeurs puis modifier.")),
- BorderLayout.NORTH);
+ content
+ .add(
+ new JLabel(
+ TrResource
+ .getS("Saisir des points en cliquant sur ajouter. Modifier des points en cliquant sur les valeurs puis modifier.")),
+ BorderLayout.NORTH);
// -- ajout du jtext pour ajout uniquement d'un point interpol\xE9 --//
@@ -426,8 +420,8 @@
@Override
public void actionPerformed(final ActionEvent _e) {
final int pointToModify = tableau.getSelectedRow();
- if (pointToModify != -1)
- saisirPoints("" + model.getValueAt(pointToModify, 1), "" + model.getValueAt(pointToModify, 2), false, pointToModify, model);
+ if (pointToModify != -1) saisirPoints("" + model.getValueAt(pointToModify, 1),
+ "" + model.getValueAt(pointToModify, 2), false, pointToModify, model);
}
});
@@ -435,7 +429,7 @@
control.add(modifier);
}
// control.add(new JLabel(TrResource.getS("Supprimer la s\xE9lection:")));
- final JButton supprimer = new JButton("Supprimer", EbliResource.EBLI.getIcon("crystal_detruire"));
+ final JButton supprimer = new JButton(TrLib.getString("Supprimer"), EbliResource.EBLI.getIcon("crystal_detruire"));
supprimer.addActionListener(new ActionListener() {
@Override
public void actionPerformed(final ActionEvent _e) {
@@ -446,7 +440,7 @@
listPointOrMeshes.remove(listePointToDelete[i] - (nbLignesSupprimees++));
}
model.fireTableDataChanged();
- indicateurPoints_.setText("Nb points: " + listPointOrMeshes.size());
+ indicateurPoints_.setText(TrResource.getS("Nombre de points: {0}", Integer.toString(listPointOrMeshes.size())));
// if (listePoints_.size() == 0) pointsSaisis = false;
}
}
@@ -465,10 +459,10 @@
// -- ajout du panel de selection des zcqlauePoints de la vue 2d --//
- builderPointsCalque_ = new TrEvolutionBuilderFromTree.PostEvolutionTemporelles(this.calque_, model, listPointOrMeshes);
+ builderPointsCalque_ = new TrEvolutionBuilderFromTree.PostEvolutionTemporelles(this.calque_, model,
+ listPointOrMeshes);
JTree buildTree = builderPointsCalque_.buildTree();
- if (buildTree.getModel().getChildCount(buildTree.getModel().getRoot()) == 0)
- return content;
+ if (buildTree.getModel().getChildCount(buildTree.getModel().getRoot()) == 0) return content;
splitpanel.setTopComponent(content);
@@ -522,10 +516,9 @@
if (modelPointsReels != null) {
modelTotal = modelPointsReels;
if (modelPointsInt != null)
- // --merge avec le precedent --//
- modelTotal.mergeWithAnotherTreeModel(modelPointsInt);
- } else if (modelPointsInt != null)
- modelTotal = modelPointsInt;
+ // --merge avec le precedent --//
+ modelTotal.mergeWithAnotherTreeModel(modelPointsInt);
+ } else if (modelPointsInt != null) modelTotal = modelPointsInt;
modelTotal.getAxeX().setUnite("s");
@@ -553,8 +546,7 @@
pn.setLayout(new BuGridLayout(2));
pn.addLabel(TrLib.getString("Indiquer le nom du calque \xE0 cr\xE9er"));
JTextField tf = nomCalque_;
- if (tf.getText() == null || tf.getText().length() == 0)
- tf.setText("Origine \xE9volution temporelle");
+ if (tf.getText() == null || tf.getText().length() == 0) tf.setText("Origine \xE9volution temporelle");
String titreCalque = tf.getText();
FSigLayerGroup group = TrPostWizardProfilSpatial.getGroup(idTemporel, calque_);
@@ -623,8 +615,7 @@
}
// -- creation d un nouveau graphe si coch\xE9 --//
- if (checkboxNewGraphe_.isSelected())
- createNewGraphe(modelTotal, prog);
+ if (checkboxNewGraphe_.isSelected()) createNewGraphe(modelTotal, prog);
// -- ajout des courbes dans les graphes --//
for (int i = 0; i < listeGraphesChoisis_.size(); i++) {
@@ -663,7 +654,7 @@
final int idxElt = TrIsoLayerDefault.sondeSelection(point, calque_.getIsoLayer().getIsoModel());
if (idxElt > -1)
- return new TrPostInterpolatePoint(idxElt, x, y, new GISPrecision());
+ return new TrPostInterpolatePoint(idxElt, x, y, new GISPrecision());
return null;
}
@@ -675,8 +666,7 @@
* @return
*/
int findPointReel(final double x, final double y) {
- if (calque_.isRubar())
- return -1;
+ if (calque_.isRubar()) return -1;
CtuluListSelection nearestNode = EfIndexHelper.getNearestNode(getSource().getGrid(), x, y, 1E-2, null);
return (nearestNode == null || nearestNode.isEmpty()) ? -1 : nearestNode.getMinIndex();
@@ -692,8 +682,7 @@
final ArrayList<TrPostInterpolatePoint> res = new ArrayList<TrPostInterpolatePoint>();
for (int i = 0; i < listPointOrMeshes.size(); i++)
- if (isInterpolated(i))
- res.add(getPointInt(i));
+ if (isInterpolated(i)) res.add(getPointInt(i));
final TrPostInterpolatePoint[] listeInt = new TrPostInterpolatePoint[res.size()];
for (int i = 0; i < res.size(); i++)
@@ -711,8 +700,7 @@
final ArrayList<Integer> res = new ArrayList<Integer>();
for (int i = 0; i < listPointOrMeshes.size(); i++)
- if (!isInterpolated(i))
- res.add(getPointReel(i));
+ if (!isInterpolated(i)) res.add(getPointReel(i));
final int[] listeReels = new int[res.size()];
for (int i = 0; i < res.size(); i++)
@@ -762,20 +750,17 @@
switch (current_) {
case 0: {
- if (panelSelectionPoints == null)
- panelSelectionPoints = constructSelectionPoint();
+ if (panelSelectionPoints == null) panelSelectionPoints = constructSelectionPoint();
return panelSelectionPoints;
}
case 1: {
- if (listPointOrMeshes.size() == 0) {
- return new JLabel(TrResource.getS("Erreur, aucun points s\xE9lectionn\xE9s, veuillez appuyer sur pr\xE9c\xE9dent et ajouter des points."));
- }
+ if (listPointOrMeshes.size() == 0) { return new JLabel(
+ TrResource.getS("Erreur, aucun points s\xE9lectionn\xE9s, veuillez appuyer sur pr\xE9c\xE9dent et ajouter des points.")); }
return chooserVarTime_;
}
case 2: {
- if (panelSelectiongraphes == null)
- panelSelectiongraphes = constructPanelSelectionGraphe();
+ if (panelSelectiongraphes == null) panelSelectiongraphes = constructPanelSelectionGraphe();
return panelSelectiongraphes;
}
}
@@ -799,11 +784,9 @@
public int getStepDisabledButtons() {
int r = super.getStepDisabledButtons();
if (current_ == 1) {
- if (!pointsSaisis())
- r |= BuButtonPanel.SUIVANT;
+ if (!pointsSaisis()) r |= BuButtonPanel.SUIVANT;
} else if (current_ == 2) {
- if ((listeGraphesChoisis_ == null || listeGraphesChoisis_.size() == 0) && !checkboxNewGraphe_.isSelected())
- r |= BuButtonPanel.TERMINER;
+ if ((listeGraphesChoisis_ == null || listeGraphesChoisis_.size() == 0) && !checkboxNewGraphe_.isSelected()) r |= BuButtonPanel.TERMINER;
// -- pour empecher d avancer, voir ci dessous
// r |= BuButtonPanel.SUIVANT;
}
@@ -849,7 +832,7 @@
@Override
public String getTaskTitle() {
- return "Evolutions temporelles";
+ return TrLib.getString("Evolutions temporelles");
}
/**
@@ -908,7 +891,8 @@
*
* @param create
*/
- public void saisirPoints(final String val1, final String val2, final boolean create, final int indexToModify, final ModelListePoints model) {
+ public void saisirPoints(final String val1, final String val2, final boolean create, final int indexToModify,
+ final ModelListePoints model) {
final BuTextField textX = new BuTextField(10);
textX.setCharValidator(BuCharValidator.FLOAT);
textX.setStringValidator(BuStringValidator.FLOAT);
@@ -919,10 +903,8 @@
textY.setStringValidator(BuStringValidator.FLOAT);
textY.setValueValidator(BuValueValidator.FLOAT);
// -- init --//
- if (val1 != null)
- textX.setText(val1);
- if (val2 != null)
- textY.setText(val2);
+ if (val1 != null) textX.setText(val1);
+ if (val2 != null) textY.setText(val2);
final JDialog dialog = CtuluLibSwing.createDialogOnActiveWindow(TrResource.getS("Ajouter des points"));
final JButton ajouter = new JButton("Valider", EbliResource.EBLI.getIcon("crystal_ajouter"));
@@ -943,7 +925,8 @@
final TrPostInterpolatePoint interpol = findPointInterpol(newX, newY);
if (interpol == null) {
- calque_.getCtuluUI().error("Erreur", TrResource.getS("Ce point n'existe pas et ne peut \xEAtre interpol\xE9"), true);
+ calque_.getCtuluUI().error("Erreur", TrResource.getS("Ce point n'existe pas et ne peut \xEAtre interpol\xE9"),
+ true);
return;
}
@@ -985,8 +968,7 @@
control.add(ajouter);
String title;
- if (create)
- title = TrResource.getS("Creation de point");
+ if (create) title = TrResource.getS("Creation de point");
else title = TrResource.getS("Modification de point");
final JPanel content = new JPanel(new BorderLayout());
Modified: trunk/soft/fudaa-prepro/ui/src/main/resources/org/fudaa/fudaa/tr/common/tr_en.fr_txt
===================================================================
--- trunk/soft/fudaa-prepro/ui/src/main/resources/org/fudaa/fudaa/tr/common/tr_en.fr_txt 2012-04-17 14:04:10 UTC (rev 7077)
+++ trunk/soft/fudaa-prepro/ui/src/main/resources/org/fudaa/fudaa/tr/common/tr_en.fr_txt 2012-04-17 14:22:21 UTC (rev 7078)
@@ -738,11 +738,16 @@
Graphes choisis=selected graphs
Cr\xE9er calque avec points d'origine de la courbe=Create a layer containing points used to create curves
S\xE9lectionner au moins une extremit\xE9 de siphon=Select at least a culvert's end
+Supprimer=Remove
+Nombre de points\: {0}=Number of points\: {0}
+Evolutions temporelles=Time Evolutions
+Points s\xE9lectionn\xE9s=Selected points
Choisir les points=Choose points
S\xE9lectionner au moins un siphon=Select at least one culvert
S\xE9lectionner deux sources=Select two sources
Erreur dans la s\xE9lection=Selection error
S\xE9lection vide=Empty selection
+Point {0}=Point {0}
Un seul bord liquide doit \xEAtre s\xE9lectionn\xE9=Only one liquid boundary must be selected
Ce bord doit contenir des variables \xE9ditables spatiallement=This boundary must contain contain editable variables
Activer le mode "Noeuds fronti\xE8res"=Enable the mode "Frontier nodes"
@@ -759,6 +764,7 @@
Affiche les \xE9volutions temporelles sur la s\xE9lection ou sur l'interpolation=Display time curves on the selection or on the current interpolation
S\xE9lectionner au moins un objet ou activer la sonde=Select at leat one object or active the interpolation
El\xE9ment {0}=Mesh {0}
+El\xE9ment=Mesh
Nb El\xE9ments {0}=Number of meshes {0}
Nb points {0}=Number of nodes {0}
Enlever les seuils s\xE9lectionn\xE9s=Remove the selected weirs
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|