svn-gvsig-desktop / branches / v2_0_0_prep / libFMap_mapcontrol / src / org / gvsig / fmap / mapcontrol / tools / MapTool.java @ 21203
History | View | Annotate | Download (951 Bytes)
1 |
/*
|
---|---|
2 |
* Created on 28-oct-2004
|
3 |
*/
|
4 |
package org.gvsig.fmap.mapcontrol.tools; |
5 |
|
6 |
import java.awt.Cursor; |
7 |
import java.awt.Graphics; |
8 |
import java.awt.geom.Point2D; |
9 |
|
10 |
import org.gvsig.fmap.mapcontrol.MapControl; |
11 |
|
12 |
|
13 |
/**
|
14 |
* Herramienta del MapControl.
|
15 |
* Ejecuta acciones respondiendo a eventos, por delegaci?n desde MapControl.
|
16 |
*
|
17 |
* @author Luis W. Sevilla <sevilla_lui@gva.es>
|
18 |
*/
|
19 |
public abstract class MapTool { |
20 |
protected MapControl mc = null; |
21 |
protected Cursor cursor = null; |
22 |
|
23 |
public MapTool(MapControl mc) {
|
24 |
this.mc = mc;
|
25 |
} |
26 |
/**
|
27 |
* Recibe los eventos del rat?n.
|
28 |
*/
|
29 |
abstract public void cmd(Point2D pt, int bt, int mouseEvent); |
30 |
|
31 |
|
32 |
abstract public void paintComponent(Graphics g); |
33 |
/**
|
34 |
* Devuelve un Bitset con los eventos de raton que requiere.
|
35 |
* @return eventsWanted (BitSet)
|
36 |
* /
|
37 |
public int getEventsWanted() {
|
38 |
return eventsWanted;
|
39 |
}*/
|
40 |
|
41 |
public Cursor getCursor() { |
42 |
return cursor;
|
43 |
} |
44 |
} |