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