]> gitweb.fperrin.net Git - GpsPrune.git/blob - tim/prune/gui/MapChart.java
Version 4, January 2008
[GpsPrune.git] / tim / prune / gui / MapChart.java
1 package tim.prune.gui;
2
3 import java.awt.Color;
4 import java.awt.Dimension;
5 import java.awt.FontMetrics;
6 import java.awt.Graphics;
7 import java.awt.event.ActionEvent;
8 import java.awt.event.ActionListener;
9 import java.awt.event.KeyEvent;
10 import java.awt.event.KeyListener;
11 import java.awt.event.MouseEvent;
12 import java.awt.event.MouseMotionListener;
13 import java.awt.event.MouseWheelEvent;
14 import java.awt.event.MouseWheelListener;
15 import java.awt.image.BufferedImage;
16
17 import javax.swing.JCheckBoxMenuItem;
18 import javax.swing.JMenuItem;
19 import javax.swing.JPopupMenu;
20
21 import tim.prune.App;
22 import tim.prune.DataSubscriber;
23 import tim.prune.I18nManager;
24 import tim.prune.data.DataPoint;
25 import tim.prune.data.TrackInfo;
26
27
28 /**
29  * Display component for the main map
30  */
31 public class MapChart extends GenericChart implements MouseWheelListener, KeyListener, MouseMotionListener
32 {
33         // Constants
34         private static final int POINT_RADIUS = 4;
35         private static final int CLICK_SENSITIVITY = 10;
36         private static final double ZOOM_SCALE_FACTOR = 1.2;
37         private static final int PAN_DISTANCE = 10;
38         private static final int LIMIT_WAYPOINT_NAMES = 40;
39
40         // Colours
41         private static final Color COLOR_BG         = Color.WHITE;
42         private static final Color COLOR_POINT      = Color.BLUE;
43         private static final Color COLOR_CURR_RANGE = Color.GREEN;
44         private static final Color COLOR_CROSSHAIRS = Color.RED;
45         private static final Color COLOR_WAYPT_NAME = Color.BLACK;
46
47         // Instance variables
48         private App _app = null;
49         private BufferedImage _image = null;
50         private JPopupMenu _popup = null;
51         private JCheckBoxMenuItem _autoPanMenuItem = null;
52         private JCheckBoxMenuItem _connectPointsMenuItem = null;
53         private int _numPoints = -1;
54         private double _scale;
55         private double _offsetX, _offsetY, _zoomScale;
56         private int _lastSelectedPoint = -1;
57         private int _dragStartX = -1, _dragStartY = -1;
58         private int _zoomDragFromX = -1, _zoomDragFromY = -1;
59         private int _zoomDragToX = -1, _zoomDragToY = -1;
60         private boolean _zoomDragging = false;
61
62
63         /**
64          * Constructor
65          * @param inApp App object for callbacks
66          * @param inTrackInfo track info object
67          */
68         public MapChart(App inApp, TrackInfo inTrackInfo)
69         {
70                 super(inTrackInfo);
71                 _app = inApp;
72                 makePopup();
73                 addMouseListener(this);
74                 addMouseWheelListener(this);
75                 addMouseMotionListener(this);
76                 setFocusable(true);
77                 addKeyListener(this);
78                 MINIMUM_SIZE = new Dimension(200, 250);
79                 _zoomScale = 1.0;
80         }
81
82
83         /**
84          * Override track updating to refresh image
85          */
86         public void dataUpdated(byte inUpdateType)
87         {
88                 // Check if number of points has changed or data has been edited
89                 if (_track.getNumPoints() != _numPoints || (inUpdateType & DATA_EDITED) > 0)
90                 {
91                         _image = null;
92                         _lastSelectedPoint = -1;
93                         _numPoints = _track.getNumPoints();
94                 }
95                 super.dataUpdated(inUpdateType);
96         }
97
98
99         /**
100          * Override paint method to draw map
101          * @param inG graphics object
102          */
103         public void paint(Graphics inG)
104         {
105                 if (_track == null)
106                 {
107                         super.paint(inG);
108                         return;
109                 }
110
111                 int width = getWidth();
112                 int height = getHeight();
113                 int x, y;
114
115                 // Find x and y ranges, and scale to fit
116                 double scaleX = (_track.getXRange().getMaximum() - _track.getXRange().getMinimum())
117                   / (width - 2 * (BORDER_WIDTH + POINT_RADIUS));
118                 double scaleY = (_track.getYRange().getMaximum() - _track.getYRange().getMinimum())
119                   / (height - 2 * (BORDER_WIDTH + POINT_RADIUS));
120                 _scale = scaleX;
121                 if (scaleY > _scale) _scale = scaleY;
122
123                 // Autopan if necessary
124                 int selectedPoint = _trackInfo.getSelection().getCurrentPointIndex();
125                 if (_autoPanMenuItem.isSelected() && selectedPoint >= 0 && selectedPoint != _lastSelectedPoint)
126                 {
127                         // Autopan is enabled and a point is selected - work out x and y to see if it's within range
128                         x = width/2 + (int) ((_track.getX(selectedPoint) - _offsetX) / _scale * _zoomScale);
129                         y = height/2 - (int) ((_track.getY(selectedPoint) - _offsetY) / _scale * _zoomScale);
130                         if (x <= BORDER_WIDTH)
131                         {
132                                 // autopan left
133                                 _offsetX -= (width / 4 - x) * _scale / _zoomScale;
134                                 _image = null;
135                         }
136                         else if (x >= (width - BORDER_WIDTH))
137                         {
138                                 // autopan right
139                                 _offsetX += (x - width * 3/4) * _scale / _zoomScale;
140                                 _image = null;
141                         }
142                         if (y <= BORDER_WIDTH)
143                         {
144                                 // autopan up
145                                 _offsetY += (height / 4 - y) * _scale / _zoomScale;
146                                 _image = null;
147                         }
148                         else if (y >= (height - BORDER_WIDTH))
149                         {
150                                 // autopan down
151                                 _offsetY -= (y - height * 3/4) * _scale / _zoomScale;
152                                 _image = null;
153                         }
154                 }
155                 _lastSelectedPoint = selectedPoint;
156
157                 // Create background if necessary
158                 if (_image == null || width != _image.getWidth() || height != _image.getHeight())
159                 {
160                         createBackgroundImage();
161                 }
162                 // return if image has been set to null by other thread
163                 if (_image == null) {return;}
164
165                 // draw buffered image onto g
166                 inG.drawImage(_image, 0, 0, width, height, COLOR_BG, null);
167
168                 // draw selected range, if any
169                 if (_trackInfo.getSelection().hasRangeSelected() && !_zoomDragging)
170                 {
171                         int rangeStart = _trackInfo.getSelection().getStart();
172                         int rangeEnd = _trackInfo.getSelection().getEnd();
173                         inG.setColor(COLOR_CURR_RANGE);
174                         for (int i=rangeStart; i<=rangeEnd; i++)
175                         {
176                                 x = width/2 + (int) ((_track.getX(i) - _offsetX) / _scale * _zoomScale);
177                                 y = height/2 - (int) ((_track.getY(i) - _offsetY) / _scale * _zoomScale);
178                                 if (x > BORDER_WIDTH && x < (width - BORDER_WIDTH)
179                                         && y < (height - BORDER_WIDTH) && y > BORDER_WIDTH)
180                                 {
181                                         inG.drawRect(x - 2, y - 2, 4, 4);
182                                 }
183                         }
184                 }
185
186                 // Highlight selected point
187                 if (selectedPoint >= 0 && !_zoomDragging)
188                 {
189                         inG.setColor(COLOR_CROSSHAIRS);
190                         x = width/2 + (int) ((_track.getX(selectedPoint) - _offsetX) / _scale * _zoomScale);
191                         y = height/2 - (int) ((_track.getY(selectedPoint) - _offsetY) / _scale * _zoomScale);
192                         if (x > BORDER_WIDTH && x < (width - BORDER_WIDTH)
193                                 && y < (height - BORDER_WIDTH) && y > BORDER_WIDTH)
194                         {
195                                 // Draw cross-hairs for current point
196                                 inG.drawLine(x, BORDER_WIDTH, x, height - BORDER_WIDTH);
197                                 inG.drawLine(BORDER_WIDTH, y, width - BORDER_WIDTH, y);
198
199                                 // Show selected point afterwards to make sure it's on top
200                                 inG.drawOval(x - 2, y - 2, 4, 4);
201                                 inG.drawOval(x - 3, y - 3, 6, 6);
202                         }
203                 }
204
205                 // Draw rectangle for dragging zoom area
206                 if (_zoomDragging)
207                 {
208                         inG.setColor(COLOR_CROSSHAIRS);
209                         inG.drawLine(_zoomDragFromX, _zoomDragFromY, _zoomDragFromX, _zoomDragToY);
210                         inG.drawLine(_zoomDragFromX, _zoomDragFromY, _zoomDragToX, _zoomDragFromY);
211                         inG.drawLine(_zoomDragToX, _zoomDragFromY, _zoomDragToX, _zoomDragToY);
212                         inG.drawLine(_zoomDragFromX, _zoomDragToY, _zoomDragToX, _zoomDragToY);
213                 }
214
215                 // Attempt to grab keyboard focus if possible
216                 //requestFocus();  (causes problems here)
217         }
218
219
220         /**
221          * Plot the points onto an offscreen image
222          * which doesn't have to be redrawn when the selection changes
223          */
224         private void createBackgroundImage()
225         {
226                 int width = getWidth();
227                 int height = getHeight();
228                 int x, y;
229                 int lastX = 0, lastY = 0;
230                 // Initialise image
231                 if (_image == null || _image.getWidth() != width || _image.getHeight() != height) {
232                         _image = new BufferedImage(width, height, BufferedImage.TYPE_INT_RGB);
233                 }
234                 Graphics bufferedG = _image.getGraphics();
235                 super.paint(bufferedG);
236
237                 // Loop and show all points
238                 int numPoints = _track.getNumPoints();
239                 bufferedG.setColor(COLOR_POINT);
240                 int halfWidth = width/2;
241                 int halfHeight = height/2;
242                 boolean currPointTrackpoint = false, lastPointTrackpoint = false;
243                 for (int i=0; i<numPoints; i++)
244                 {
245                         x = halfWidth + (int) ((_track.getX(i) - _offsetX) / _scale * _zoomScale);
246                         y = halfHeight - (int) ((_track.getY(i) - _offsetY) / _scale * _zoomScale);
247                         if (x > BORDER_WIDTH && x < (width - BORDER_WIDTH)
248                                 && y < (height - BORDER_WIDTH) && y > BORDER_WIDTH)
249                         {
250                                 // draw block for point (a bit faster than circles)
251                                 bufferedG.drawRect(x - 2, y - 2, 3, 3);
252
253                                 // See whether to connect the point with previous one or not
254                                 currPointTrackpoint = !_track.getPoint(i).isWaypoint() && _track.getPoint(i).getPhoto() == null;
255                                 if (_connectPointsMenuItem.isSelected() && currPointTrackpoint && lastPointTrackpoint)
256                                 {
257                                         bufferedG.drawLine(lastX, lastY, x, y);
258                                 }
259                                 lastPointTrackpoint = currPointTrackpoint;
260                         }
261                         else {
262                                 lastPointTrackpoint = false;
263                         }
264                         lastX = x; lastY = y;
265                 }
266
267                 // Loop again and show waypoints with names
268                 bufferedG.setColor(COLOR_WAYPT_NAME);
269                 FontMetrics fm = bufferedG.getFontMetrics();
270                 int nameHeight = fm.getHeight();
271                 int numWaypointNamesShown = 0;
272                 for (int i=0; i<numPoints; i++)
273                 {
274                         DataPoint point = _track.getPoint(i);
275                         String waypointName = point.getWaypointName();
276                         if (waypointName != null && !waypointName.equals(""))
277                         {
278                                 // escape if nothing more to do
279                                 if (numWaypointNamesShown >= LIMIT_WAYPOINT_NAMES || _image == null) {break;}
280                                 // calculate coordinates of point
281                                 x = halfWidth + (int) ((_track.getX(i) - _offsetX) / _scale * _zoomScale);
282                                 y = halfHeight - (int) ((_track.getY(i) - _offsetY) / _scale * _zoomScale);
283                                 if (x > BORDER_WIDTH && x < (width - BORDER_WIDTH)
284                                                 && y < (height - BORDER_WIDTH) && y > BORDER_WIDTH)
285                                 {
286                                         bufferedG.fillOval(x - 3, y - 3, 6, 6);
287                                         // Figure out where to draw name so it doesn't obscure track
288                                         int nameWidth = fm.stringWidth(waypointName);
289                                         if (nameWidth < (width - 2 * BORDER_WIDTH))
290                                         {
291                                                 boolean drawnName = false;
292                                                 // Make arrays for coordinates right left up down
293                                                 int[] nameXs = {x + 2, x - nameWidth - 2, x - nameWidth/2, x - nameWidth/2};
294                                                 int[] nameYs = {y + (nameHeight/2), y + (nameHeight/2), y - 2, y + nameHeight + 2};
295                                                 for (int extraSpace = 4; extraSpace < 13 && !drawnName; extraSpace+=2)
296                                                 {
297                                                         // Shift arrays for coordinates right left up down
298                                                         nameXs[0] += 2; nameXs[1] -= 2;
299                                                         nameYs[2] -= 2; nameYs[3] += 2;
300                                                         // Check each direction in turn right left up down
301                                                         for (int a=0; a<4; a++)
302                                                         {
303                                                                 if (nameXs[a] > BORDER_WIDTH && (nameXs[a] + nameWidth) < (width - BORDER_WIDTH)
304                                                                         && nameYs[a] < (height - BORDER_WIDTH) && (nameYs[a] - nameHeight) > BORDER_WIDTH
305                                                                         && !overlapsPoints(nameXs[a], nameYs[a], nameWidth, nameHeight))
306                                                                 {
307                                                                         // Found a rectangle to fit - draw name here and quit
308                                                                         bufferedG.drawString(waypointName, nameXs[a], nameYs[a]);
309                                                                         drawnName = true;
310                                                                         break;
311                                                                 }
312                                                         }
313                                                 }
314                                         }
315                                 }
316                         }
317                 }
318                 bufferedG.dispose();
319         }
320
321
322         /**
323          * Tests whether there are any data points within the specified x,y rectangle
324          * @param inX left X coordinate
325          * @param inY bottom Y coordinate
326          * @param inWidth width of rectangle
327          * @param inHeight height of rectangle
328          * @return true if there's at least one data point in the rectangle
329          */
330         private boolean overlapsPoints(int inX, int inY, int inWidth, int inHeight)
331         {
332                 try
333                 {
334                         // loop over x coordinate of rectangle
335                         for (int x=0; x<inWidth; x++)
336                         {
337                                 // loop over y coordinate of rectangle
338                                 for (int y=0; y<inHeight; y++)
339                                 {
340                                         int pixelColor = _image.getRGB(inX + x, inY - y);
341                                         if (pixelColor != -1) return true;
342                                 }
343                         }
344                 }
345                 catch (NullPointerException e) {
346                         // ignore null pointers, just return false
347                 }
348                 return false;
349         }
350
351
352         /**
353          * Make the popup menu for right-clicking the map
354          */
355         private void makePopup()
356         {
357                 _popup = new JPopupMenu();
358                 JMenuItem zoomIn = new JMenuItem(I18nManager.getText("menu.map.zoomin"));
359                 zoomIn.addActionListener(new ActionListener() {
360                         public void actionPerformed(ActionEvent e)
361                         {
362                                 zoomMap(true);
363                         }});
364                 zoomIn.setEnabled(true);
365                 _popup.add(zoomIn);
366                 JMenuItem zoomOut = new JMenuItem(I18nManager.getText("menu.map.zoomout"));
367                 zoomOut.addActionListener(new ActionListener() {
368                         public void actionPerformed(ActionEvent e)
369                         {
370                                 zoomMap(false);
371                         }});
372                 zoomOut.setEnabled(true);
373                 _popup.add(zoomOut);
374                 JMenuItem zoomFull = new JMenuItem(I18nManager.getText("menu.map.zoomfull"));
375                 zoomFull.addActionListener(new ActionListener() {
376                         public void actionPerformed(ActionEvent e)
377                         {
378                                 zoomToFullScale();
379                         }});
380                 zoomFull.setEnabled(true);
381                 _popup.add(zoomFull);
382                 _connectPointsMenuItem = new JCheckBoxMenuItem(I18nManager.getText("menu.map.connect"));
383                 _connectPointsMenuItem.addActionListener(new ActionListener() {
384                         public void actionPerformed(ActionEvent e)
385                         {
386                                 // redraw map
387                                 dataUpdated(DataSubscriber.ALL);
388                         }
389                 });
390                 _connectPointsMenuItem.setSelected(false);
391                 _popup.add(_connectPointsMenuItem);
392                 _autoPanMenuItem = new JCheckBoxMenuItem(I18nManager.getText("menu.map.autopan"));
393                 _autoPanMenuItem.setSelected(true);
394                 _popup.add(_autoPanMenuItem);
395         }
396
397
398         /**
399          * Zoom map to full scale
400          */
401         private void zoomToFullScale()
402         {
403                 _zoomScale = 1.0;
404                 _offsetX = 0.0;
405                 _offsetY = 0.0;
406                 _numPoints = 0;
407                 dataUpdated(DataSubscriber.ALL);
408         }
409
410
411         /**
412          * Zoom map either in or out by one step
413          * @param inZoomIn true to zoom in, false for out
414          */
415         private void zoomMap(boolean inZoomIn)
416         {
417                 if (inZoomIn)
418                 {
419                         // Zoom in
420                         _zoomScale *= ZOOM_SCALE_FACTOR;
421                 }
422                 else
423                 {
424                         // Zoom out
425                         _zoomScale /= ZOOM_SCALE_FACTOR;
426                         if (_zoomScale < 0.5) _zoomScale = 0.5;
427                 }
428                 _numPoints = 0;
429                 dataUpdated(DataSubscriber.ALL);
430         }
431
432
433         /**
434          * Pan the map by the specified amounts
435          * @param inUp upwards pan
436          * @param inRight rightwards pan
437          */
438         private void panMap(int inUp, int inRight)
439         {
440                 double panFactor = _scale / _zoomScale;
441                 _offsetY = _offsetY + (inUp * panFactor);
442                 _offsetX = _offsetX - (inRight * panFactor);
443                 // Limit pan to sensible range??
444                 _numPoints = 0;
445                 _image = null;
446                 repaint();
447         }
448
449
450         /**
451          * React to click on map display
452          * @param inE mouse event
453          */
454         public void mouseClicked(MouseEvent inE)
455         {
456                 this.requestFocus();
457                 if (_track != null)
458                 {
459                         int xClick = inE.getX();
460                         int yClick = inE.getY();
461                         // Check click is within main area (not in border)
462                         if (xClick > BORDER_WIDTH && yClick > BORDER_WIDTH && xClick < (getWidth() - BORDER_WIDTH)
463                                 && yClick < (getHeight() - BORDER_WIDTH))
464                         {
465                                 // Check left click or right click
466                                 if (inE.isMetaDown())
467                                 {
468                                         // Only show popup if track has data
469                                         if (_track != null && _track.getNumPoints() > 0)
470                                                 _popup.show(this, xClick, yClick);
471                                 }
472                                 else
473                                 {
474                                         // Find point within range of click point
475                                         double pointX = (xClick - getWidth()/2) * _scale / _zoomScale + _offsetX;
476                                         double pointY = (getHeight()/2 - yClick) * _scale / _zoomScale + _offsetY;
477                                         int selectedPointIndex = _track.getNearestPointIndex(
478                                                 pointX, pointY, CLICK_SENSITIVITY * _scale, false);
479                                         // Select the given point (or deselect if no point was found)
480                                         _trackInfo.getSelection().selectPoint(selectedPointIndex);
481                                 }
482                         }
483                 }
484         }
485
486
487         /**
488          * Respond to mouse released to reset dragging
489          * @see java.awt.event.MouseListener#mouseReleased(java.awt.event.MouseEvent)
490          */
491         public void mouseReleased(MouseEvent e)
492         {
493                 _dragStartX = _dragStartY = -1;
494                 if (e.isMetaDown())
495                 {
496                         if (_zoomDragFromX >= 0 || _zoomDragFromY >= 0)
497                         {
498                                 // zoom area marked out - calculate offset and zoom
499                                 int xPan = (getWidth() - _zoomDragFromX - e.getX()) / 2;
500                                 int yPan = (getHeight() - _zoomDragFromY - e.getY()) / 2;
501                                 double xZoom = Math.abs(getWidth() * 1.0 / (e.getX() - _zoomDragFromX));
502                                 double yZoom = Math.abs(getHeight() * 1.0 / (e.getY() - _zoomDragFromY));
503                                 double extraZoom = (xZoom>yZoom?yZoom:xZoom);
504                                 // deselect point if selected (to stop autopan)
505                                 _trackInfo.getSelection().selectPoint(-1);
506                                 // Pan first to ensure pan occurs with correct scale
507                                 panMap(yPan, xPan);
508                                 // Then zoom in and request repaint
509                                 _zoomScale = _zoomScale * extraZoom;
510                                 _image = null;
511                                 repaint();
512                         }
513                         _zoomDragFromX = _zoomDragFromY = -1;
514                         _zoomDragging = false;
515                 }
516         }
517
518
519         /**
520          * Respond to mouse wheel events to zoom the map
521          * @see java.awt.event.MouseWheelListener#mouseWheelMoved(java.awt.event.MouseWheelEvent)
522          */
523         public void mouseWheelMoved(MouseWheelEvent e)
524         {
525                 zoomMap(e.getWheelRotation() < 0);
526         }
527
528
529         /**
530          * @see java.awt.event.KeyListener#keyPressed(java.awt.event.KeyEvent)
531          */
532         public void keyPressed(KeyEvent e)
533         {
534                 int code = e.getKeyCode();
535                 // Check for meta key
536                 if (e.isControlDown())
537                 {
538                         // Check for arrow keys to zoom in and out
539                         if (code == KeyEvent.VK_UP)
540                                 zoomMap(true);
541                         else if (code == KeyEvent.VK_DOWN)
542                                 zoomMap(false);
543                         // Key nav for next/prev point
544                         else if (code == KeyEvent.VK_LEFT)
545                                 _trackInfo.getSelection().selectPreviousPoint();
546                         else if (code == KeyEvent.VK_RIGHT)
547                                 _trackInfo.getSelection().selectNextPoint();
548                 }
549                 else
550                 {
551                         // Check for arrow keys to pan
552                         int upwardsPan = 0;
553                         if (code == KeyEvent.VK_UP)
554                                 upwardsPan = PAN_DISTANCE;
555                         else if (code == KeyEvent.VK_DOWN)
556                                 upwardsPan = -PAN_DISTANCE;
557                         int rightwardsPan = 0;
558                         if (code == KeyEvent.VK_RIGHT)
559                                 rightwardsPan = -PAN_DISTANCE;
560                         else if (code == KeyEvent.VK_LEFT)
561                                 rightwardsPan = PAN_DISTANCE;
562                         panMap(upwardsPan, rightwardsPan);
563                         // Check for delete key to delete current point
564                         if (code == KeyEvent.VK_DELETE && _trackInfo.getSelection().getCurrentPointIndex() >= 0)
565                         {
566                                 _app.deleteCurrentPoint();
567                                 // reset last selected point to trigger autopan
568                                 _lastSelectedPoint = -1;
569                         }
570                 }
571         }
572
573
574         /**
575          * @see java.awt.event.KeyListener#keyReleased(java.awt.event.KeyEvent)
576          */
577         public void keyReleased(KeyEvent e)
578         {
579                 // ignore
580         }
581
582
583         /**
584          * @see java.awt.event.KeyListener#keyTyped(java.awt.event.KeyEvent)
585          */
586         public void keyTyped(KeyEvent e)
587         {
588                 // ignore
589         }
590
591
592         /**
593          * @see java.awt.event.MouseMotionListener#mouseDragged(java.awt.event.MouseEvent)
594          */
595         public void mouseDragged(MouseEvent e)
596         {
597                 if (!e.isMetaDown())
598                 {
599                         if (_dragStartX > 0)
600                         {
601                                 int xShift = e.getX() - _dragStartX;
602                                 int yShift = e.getY() - _dragStartY;
603                                 panMap(yShift, xShift);
604                         }
605                         _dragStartX = e.getX();
606                         _dragStartY = e.getY();
607                 }
608                 else
609                 {
610                         // Right click-and-drag for zoom
611                         if (_zoomDragFromX < 0 || _zoomDragFromY < 0)
612                         {
613                                 _zoomDragFromX = e.getX();
614                                 _zoomDragFromY = e.getY();
615                         }
616                         else
617                         {
618                                 _zoomDragToX = e.getX();
619                                 _zoomDragToY = e.getY();
620                                 _zoomDragging = true;
621                         }
622                         repaint();
623                 }
624         }
625
626
627         /**
628          * @see java.awt.event.MouseMotionListener#mouseMoved(java.awt.event.MouseEvent)
629          */
630         public void mouseMoved(MouseEvent e)
631         {
632                 // ignore
633         }
634 }