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

enlarge blue square

parent 305043e6
...@@ -81,7 +81,7 @@ Drawable, MouseMotionListener { ...@@ -81,7 +81,7 @@ Drawable, MouseMotionListener {
// the Jpanal that holds all the components to be displayed // the Jpanal that holds all the components to be displayed
display = new JPanel(new BorderLayout()); display = new JPanel(new BorderLayout());
// the ad hoc compenment (specific internal class // the ad hoc component (specific internal class
DisplayComponent displayComponent = new DisplayComponent(); DisplayComponent displayComponent = new DisplayComponent();
displayComponent.addMouseMotionListener(this); displayComponent.addMouseMotionListener(this);
displayComponent.setVisible(true); displayComponent.setVisible(true);
...@@ -226,18 +226,21 @@ Drawable, MouseMotionListener { ...@@ -226,18 +226,21 @@ Drawable, MouseMotionListener {
//AffineTransform af = new AffineTransform(W / rangeX, 0., 0., //AffineTransform af = new AffineTransform(W / rangeX, 0., 0.,
// -H / rangeY, -W * minX / rangeX, H * (1. + minY / rangeY)); // -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());
Graphics2D g2d = (Graphics2D) g;
g2d.setStroke(new BasicStroke(2)); // define the line
// Draw Background // Draw Background
g.setColor(Color.BLUE); g.setColor(Color.WHITE);
g.fillRect(0, 0, (int) W, (int) H); g.fillRect(0, 0, (int) W, (int) H);
// prepare the graphics
this.paintComponents(g); this.paintComponents(g);
Graphics2D g2d = (Graphics2D) g;
g2d.setStroke(new BasicStroke(2)); // define the line g.setColor(Color.BLUE);
int side =(int) ((W<H? W:H) * 1.05);
g.fillRect(0, 0, side, side);
this.paintComponents(g);
// draw the continent // draw the continent
g.setColor(Color.GRAY); g.setColor(Color.GRAY);
...@@ -247,7 +250,6 @@ Drawable, MouseMotionListener { ...@@ -247,7 +250,6 @@ Drawable, MouseMotionListener {
g2d.fill(displayContinent); g2d.fill(displayContinent);
} }
// draw the legend // draw the legend
colorScaleEnum.getScale().drawLegend(g2d, threshold); colorScaleEnum.getScale().drawLegend(g2d, threshold);
......
Markdown is supported
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