|
From: <de...@us...> - 2012-12-14 10:28:52
|
Revision: 8132
http://fudaa.svn.sourceforge.net/fudaa/?rev=8132&view=rev
Author: deniger
Date: 2012-12-14 10:28:45 +0000 (Fri, 14 Dec 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/EGInteractionSuivi.java
trunk/framework/ebli-1d/src/main/java/org/fudaa/ebli/courbe/EGInteractionSuiviAllOrdonnees.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-12-14 09:59:58 UTC (rev 8131)
+++ trunk/framework/ebli-1d/src/main/java/org/fudaa/ebli/courbe/EGAxe.java 2012-12-14 10:28:45 UTC (rev 8132)
@@ -428,7 +428,10 @@
* @param _val la valeur a considerer
* @return la chaine a utiliser pour l'affichage de valeur interpolee
*/
- public String getStringInterpolatedAffiche(final double _val) {
+ public String getStringInterpolatedAffiche(final double _val, boolean detail) {
+ if (detail && specificDetailFormat_ != null) {
+ return specificDetailFormat_.format(_val);
+ }
if (specificFormat_ != null) {
return specificFormat_.format(_val);
}
Modified: trunk/framework/ebli-1d/src/main/java/org/fudaa/ebli/courbe/EGInteractionSuivi.java
===================================================================
--- trunk/framework/ebli-1d/src/main/java/org/fudaa/ebli/courbe/EGInteractionSuivi.java 2012-12-14 09:59:58 UTC (rev 8131)
+++ trunk/framework/ebli-1d/src/main/java/org/fudaa/ebli/courbe/EGInteractionSuivi.java 2012-12-14 10:28:45 UTC (rev 8132)
@@ -131,16 +131,16 @@
tb_.getTraceLigne().setCouleur(r.getXAxe().getLineColor());
tb_.setHPosition(SwingConstants.CENTER);
tb_.setVPosition(SwingConstants.TOP);
- final String s = r.getXAxe().getStringInterpolatedAffiche(xreel_);
+ final String s = r.getXAxe().getStringInterpolatedAffiche(xreel_, true);
tb_.paintBox((Graphics2D) _g, x, mx, s);
tb_.setColorText(v_.getLineColor());
tb_.getTraceLigne().setCouleur(v_.getLineColor());
tb_.setHPosition(v_.isDroite() ? SwingConstants.LEFT : SwingConstants.RIGHT);
tb_.setVPosition(SwingConstants.CENTER);
- tb_.paintBox((Graphics2D) _g, xmax, y, v_.getStringInterpolatedAffiche(yreel_[i]));
+ tb_.paintBox((Graphics2D) _g, xmax, y, v_.getStringInterpolatedAffiche(yreel_[i], true));
if (logAndEcart) {
tb_.paintBox((Graphics2D) _g, x + 5, (int) yPressed_.get(i), v_.getStringInterpolatedAffiche(r.getYReel(
- (int) yPressed_.get(i), v_)));
+ (int) yPressed_.get(i), v_), true));
}
}
_g.setColor(old);
Modified: trunk/framework/ebli-1d/src/main/java/org/fudaa/ebli/courbe/EGInteractionSuiviAllOrdonnees.java
===================================================================
--- trunk/framework/ebli-1d/src/main/java/org/fudaa/ebli/courbe/EGInteractionSuiviAllOrdonnees.java 2012-12-14 09:59:58 UTC (rev 8131)
+++ trunk/framework/ebli-1d/src/main/java/org/fudaa/ebli/courbe/EGInteractionSuiviAllOrdonnees.java 2012-12-14 10:28:45 UTC (rev 8132)
@@ -22,33 +22,24 @@
/**
* @author Fred Deniger
- * @version $Id: EGInteractionSuivi.java,v 1.13 2006-09-19 14:55:53 deniger Exp
- * $
+ * @version $Id: EGInteractionSuivi.java,v 1.13 2006-09-19 14:55:53 deniger Exp $
*/
public class EGInteractionSuiviAllOrdonnees extends EGInteractiveComponent implements MouseListener,
- MouseMotionListener/* , EGGrapheModelListener */{
+ MouseMotionListener/* , EGGrapheModelListener */ {
boolean dessine_;
-
TraceIcon selected_;
-
TraceIcon normal_;
-
EGGraphe target_;
-
TraceBox tb_;
-
Color traceColor_;
-
EGAxeVertical v_;
-
double xreel_;
// TreeTableModelGraphe modelGraphe_ = new TreeTableModelGraphe();
// JXTreeTable treeTableNodes_ = new JXTreeTable(modelGraphe_);
// HashMap<EGCourbe, Double> mapCurvesY_ = new HashMap<EGCourbe, Double>();
// JLabel labelX_ = new JLabel("");
-
// public class TreeTableModelGraphe extends DefaultTreeTableModel {
// String[] titre_;
//
@@ -105,21 +96,6 @@
//
//
// }
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
// /** Methode qui construit la structure du model **/
// public void constructStructureModel() {
//
@@ -144,12 +120,10 @@
//
// }
//
-
// modelGraphe_.setRoot(root);
//
//
// }
-
// /**
// * Recupere la valeure associee a la courbe dans la map
// *
@@ -162,12 +136,9 @@
// else
// return new Double(0);
// }
-
-
/**
- * Retourne le composant graphique qui se met a jour auto en fonction du clic
- * utilisateur.
- *
+ * Retourne le composant graphique qui se met a jour auto en fonction du clic utilisateur.
+ *
* @return
*/
// JPanel tableInfo_;
@@ -186,21 +157,16 @@
//
// return tableInfo_;
// }
-
@Override
public String getDescription() {
return EbliLib.getS("suivi");
}
-
double yreel_;
-
int selectedPtIdx_;
-
EGActionPaletteAllCoordonnees paelette_;
-
+
/**
- * @param _a
- * la cible pour le suivi.
+ * @param _a la cible pour le suivi.
*/
public EGInteractionSuiviAllOrdonnees(final EGGraphe _a, EGActionPaletteAllCoordonnees palette) {
target_ = _a;
@@ -228,12 +194,12 @@
// palette_.setSize(200, 200);
//
// this.addPropertyChangeListener(palette_);
-
-
- }
+
+ }
int yPressed_;
HashMap<EGCourbe, Double> mapCurvesY_ = new HashMap<EGCourbe, Double>();
+
private void updateWithMouse(final int _x, final int _y) {
if (!isActive()) {
return;
@@ -244,7 +210,7 @@
xreel_ = (int) xreel_;
}
- for (int i = 0; i < target_.getModel().getCourbes().length; i++) {
+ for (int i = 0; i < target_.getModel().getCourbes().length; i++) {
final EGCourbe ci = target_.getModel().getCourbes()[i]; // target_.
// getSelectedComponent();
@@ -269,11 +235,11 @@
}
paelette_.maj(xreel_, mapCurvesY_);
-
+
repaint();
-
-
-
+
+
+
}
private boolean isExactPtSelect() {
@@ -319,16 +285,12 @@
tb_.getTraceLigne().setCouleur(r.getXAxe().getLineColor());
tb_.setHPosition(SwingConstants.CENTER);
tb_.setVPosition(SwingConstants.TOP);
- final String s = r.getXAxe().getStringInterpolatedAffiche(xreel_);
+ final String s = r.getXAxe().getStringInterpolatedAffiche(xreel_, true);
tb_.paintBox((Graphics2D) _g, x, mx, s);
tb_.setColorText(v_.getLineColor());
tb_.getTraceLigne().setCouleur(v_.getLineColor());
tb_.setHPosition(v_.isDroite() ? SwingConstants.LEFT : SwingConstants.RIGHT);
tb_.setVPosition(SwingConstants.CENTER);
-// tb_.paintBox((Graphics2D) _g, v_.isDroite() ? xmax : xmin, y, v_.getStringInterpolatedAffiche(yreel_));
-// if (logAndEcart) {
-// tb_.paintBox((Graphics2D) _g, x + 5, yPressed_, v_.getStringInterpolatedAffiche(r.getYReel(yPressed_, v_)));
- // }
final Font oldF = _g.getFont();
_g.setColor(old);
_g.setFont(oldF);
@@ -402,7 +364,6 @@
public void mouseReleased(final MouseEvent _e) {
}
-
/**
* Methode appelee a chque activation
*/
@@ -413,17 +374,16 @@
v_ = null;
if (target_ != null) {
target_.repaint();
-
-
-
-
+
+
+
+
}
- // palette_.firePropertyChange("visible", 1, 0);
-
+ // palette_.firePropertyChange("visible", 1, 0);
+
}
- // palette_.firePropertyChange("visible", 0, 1);
+ // palette_.firePropertyChange("visible", 0, 1);
}
-
// public void axeAspectChanged(EGAxe _c) {
// constructStructureModel();
//
@@ -449,11 +409,4 @@
//
//
// }
-
-
-
-
-
-
-
}
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|