Commit a3b9890f authored by Lambert Patrick's avatar Lambert Patrick
Browse files

typography correction

Showing with 10 additions and 13 deletions
+10 -13
...@@ -11,6 +11,7 @@ import fr.cemagref.ohoui.filters.NoTransientField; ...@@ -11,6 +11,7 @@ import fr.cemagref.ohoui.filters.NoTransientField;
import fr.cemagref.ohoui.swing.OhOUI; import fr.cemagref.ohoui.swing.OhOUI;
import fr.cemagref.ohoui.swing.OhOUIDialog; import fr.cemagref.ohoui.swing.OhOUIDialog;
import fr.cemagref.simaqualife.kernel.util.TransientParameters; import fr.cemagref.simaqualife.kernel.util.TransientParameters;
import fr.cemagref.simaqualife.kernel.util.TransientParameters.InitTransientParameters;
import fr.cemagref.simaqualife.pilot.Pilot; import fr.cemagref.simaqualife.pilot.Pilot;
import java.awt.BasicStroke; import java.awt.BasicStroke;
import java.awt.BorderLayout; import java.awt.BorderLayout;
...@@ -100,7 +101,7 @@ Drawable, MouseMotionListener { ...@@ -100,7 +101,7 @@ Drawable, MouseMotionListener {
// load basin to a have access to the shape // load basin to a have access to the shape
bn = (BasinNetworkNEA) pilot.getAquaticWorld().getEnvironment(); bn = (BasinNetworkNEA) pilot.getAquaticWorld().getEnvironment();
// time in bn is not yet created // time in bn is not yet created
time = new Time(); time = new Time();
} }
...@@ -109,10 +110,10 @@ Drawable, MouseMotionListener { ...@@ -109,10 +110,10 @@ Drawable, MouseMotionListener {
public void valueChanged(ObservablesHandler arg0, Object arg1, long arg2) { public void valueChanged(ObservablesHandler arg0, Object arg1, long arg2) {
display.repaint(); display.repaint();
/* // update the label //update the label
String txt = Long.valueOf((time.getYear(pilot))).toString() + (" ") String txt = Long.valueOf((time.getYear(pilot))).toString() + (" ")
+ time.getSeason(pilot).toString(); + time.getSeason(pilot).toString();
label.setText(txt);*/ label.setText(txt);
} }
@Override @Override
...@@ -122,12 +123,11 @@ Drawable, MouseMotionListener { ...@@ -122,12 +123,11 @@ Drawable, MouseMotionListener {
@Override @Override
public void mouseMoved(MouseEvent e) { public void mouseMoved(MouseEvent e) {
int y = (e.getY()); int x = (e.getY());
int x = (e.getX()); int y = (e.getX());
// to update the label
String txt = (Long.valueOf(time.getYear(pilot))).toString() + (" ") String txt = (Long.valueOf(time.getYear(pilot))).toString() + (" ")
+ time.getSeason(pilot).toString() + " - "; + time.getSeason(pilot).toString() + " - " ;
// identify the basin under the mouse position and enrich the label // identify the basin under the mouse position and enrich the label
Basin basin; Basin basin;
...@@ -224,13 +224,10 @@ Drawable, MouseMotionListener { ...@@ -224,13 +224,10 @@ Drawable, MouseMotionListener {
@Override @Override
protected synchronized void paintComponent(Graphics g) { protected synchronized void paintComponent(Graphics g) {
// affine transmortaion to resize the drawing according to window size // affine transformation to resize the drawing according to the window size
//TODO fixed the same scalinf for x and y to avoid weird map deformation
double W = this.getWidth(); double W = this.getWidth();
double H = this.getHeight(); double H = this.getHeight();
double scaling = Math.min(W / rangeX, H / rangeY); double scaling = Math.min(W / rangeX, H / rangeY);
//AffineTransform af = new AffineTransform(W / rangeX, 0., 0.,
// -H / rangeY, -W * minX / rangeX, H * (1. + minY / rangeY));
AffineTransform af = new AffineTransform(scaling, 0., 0., AffineTransform af = new AffineTransform(scaling, 0., 0.,
-scaling, - minX * scaling, H + minY * scaling); -scaling, - minX * scaling, H + minY * scaling);
//System.out.println(af.toString()); //System.out.println(af.toString());
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment