Revision 109 trunk/libraries/libCq CMS for java.old/src/org/cresques/ui/cmd/Cmd.java
Cmd.java | ||
---|---|---|
1 | 1 |
package org.cresques.ui.cmd; |
2 | 2 |
|
3 |
import java.awt.Cursor; |
|
3 | 4 |
import java.awt.geom.Point2D; |
5 |
import java.util.TreeMap; |
|
4 | 6 |
|
5 | 7 |
import org.cresques.ui.CQMapCanvas; |
6 | 8 |
|
... | ... | |
21 | 23 |
public static final int type=0; |
22 | 24 |
CQMapCanvas canvas = null; |
23 | 25 |
int eventsWanted = 0; |
26 |
protected Cursor cursor = null; |
|
27 |
private static TreeMap cmdPool = null;; |
|
24 | 28 |
|
25 | 29 |
/** |
30 |
* Inicializaci?n de la pool de comandos. |
|
31 |
*/ |
|
32 |
static { |
|
33 |
cmdPool = new TreeMap(); |
|
34 |
} |
|
35 |
|
|
36 |
public static void register(String cmdStr, Cmd command) { |
|
37 |
Cmd.cmdPool.put(cmdStr, command); |
|
38 |
} |
|
39 |
|
|
40 |
public static Cmd get(String cmdStr) { |
|
41 |
return (Cmd) Cmd.cmdPool.get(cmdStr); |
|
42 |
} |
|
43 |
|
|
44 |
/** |
|
26 | 45 |
* Construye un nuevo Cmd para el Canvas |
27 | 46 |
* @param canvas |
28 | 47 |
*/ |
... | ... | |
42 | 61 |
public int getEventsWanted() { |
43 | 62 |
return eventsWanted; |
44 | 63 |
} |
64 |
|
|
65 |
public Cursor getCursor() { |
|
66 |
return cursor; |
|
67 |
} |
|
45 | 68 |
} |
Also available in: Unified diff