root / trunk / extensions / extCAD / src / com / iver / cit / gvsig / gui / cad / CADTool.java @ 3829
History | View | Annotate | Download (3.42 KB)
1 |
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana
|
---|---|
2 |
*
|
3 |
* Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
|
4 |
*
|
5 |
* This program is free software; you can redistribute it and/or
|
6 |
* modify it under the terms of the GNU General Public License
|
7 |
* as published by the Free Software Foundation; either version 2
|
8 |
* of the License, or (at your option) any later version.
|
9 |
*
|
10 |
* This program is distributed in the hope that it will be useful,
|
11 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
12 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
13 |
* GNU General Public License for more details.
|
14 |
*
|
15 |
* You should have received a copy of the GNU General Public License
|
16 |
* along with this program; if not, write to the Free Software
|
17 |
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,USA.
|
18 |
*
|
19 |
* For more information, contact:
|
20 |
*
|
21 |
* Generalitat Valenciana
|
22 |
* Conselleria d'Infraestructures i Transport
|
23 |
* Av. Blasco Ib??ez, 50
|
24 |
* 46010 VALENCIA
|
25 |
* SPAIN
|
26 |
*
|
27 |
* +34 963862235
|
28 |
* gvsig@gva.es
|
29 |
* www.gvsig.gva.es
|
30 |
*
|
31 |
* or
|
32 |
*
|
33 |
* IVER T.I. S.A
|
34 |
* Salamanca 50
|
35 |
* 46005 Valencia
|
36 |
* Spain
|
37 |
*
|
38 |
* +34 963163400
|
39 |
* dac@iver.es
|
40 |
*/
|
41 |
package com.iver.cit.gvsig.gui.cad; |
42 |
import com.iver.cit.gvsig.fmap.core.v02.FConstant; |
43 |
import com.iver.cit.gvsig.fmap.core.v02.FSymbol; |
44 |
import com.iver.cit.gvsig.fmap.edition.VectorialEditableAdapter; |
45 |
import com.iver.cit.gvsig.fmap.layers.FBitSet; |
46 |
|
47 |
import java.awt.Color; |
48 |
import java.awt.Graphics; |
49 |
|
50 |
|
51 |
/**
|
52 |
* DOCUMENT ME!
|
53 |
*
|
54 |
* @author $author$
|
55 |
*/
|
56 |
public interface CADTool { |
57 |
public static FSymbol drawingSymbol = new FSymbol(FConstant.SYMBOL_TYPE_POINT, |
58 |
Color.RED);
|
59 |
public static FSymbol modifySymbol = new FSymbol(FConstant.SYMBOL_TYPE_POINT, |
60 |
Color.GRAY);
|
61 |
public static FSymbol selectSymbol = new FSymbol(FConstant.SYMBOL_TYPE_POINT, |
62 |
Color.ORANGE);
|
63 |
|
64 |
public void init(); |
65 |
public void end(); |
66 |
public void transition(double x, double y); |
67 |
public void transition(double d); |
68 |
public void transition(String s); |
69 |
public void setVectorialAdapter(VectorialEditableAdapter vea); |
70 |
public VectorialEditableAdapter getVectorialAdapter();
|
71 |
public void addPoint(double x,double y); |
72 |
public void addValue(double d); |
73 |
public void addOption(String s); |
74 |
public void setQuestion(String s); |
75 |
|
76 |
/**
|
77 |
* Recibe un graphics en el que se encuentra dibujada la
|
78 |
* EditableFeatureSource que se pasa como par?metro. En este m?todo, la
|
79 |
* herramienta ha de implementar el dibujado de la operaci?n que se est?
|
80 |
* realizando dependiendo del estado. Por ejemplo al dibujar un c?rculo
|
81 |
* mediante 3 puntos, cuando la herramienta se encuentre en el estado en
|
82 |
* el que s?lo falta un punto, se dibujar? el c?rculo teniendo en cuenta
|
83 |
* como tercer punto el puntero del rat?n (pasado en los par?metros x e
|
84 |
* y). Este m?todo es invocado tras cada transici?n y cada vez que se
|
85 |
* mueve el rat?n.
|
86 |
*
|
87 |
* @param g DOCUMENT ME!
|
88 |
* @param efs DOCUMENT ME!
|
89 |
* @param selectedGeometries DOCUMENT ME!
|
90 |
* @param x DOCUMENT ME!
|
91 |
* @param y DOCUMENT ME!
|
92 |
*/
|
93 |
void drawOperation(Graphics g,double x, double y); |
94 |
|
95 |
/**
|
96 |
* Obtiene la pregunta que saldr? en la consola relativa al estado en el
|
97 |
* que se encuentra la herramienta
|
98 |
*
|
99 |
* @return DOCUMENT ME!
|
100 |
*/
|
101 |
String getQuestion();
|
102 |
|
103 |
/**
|
104 |
* DOCUMENT ME!
|
105 |
*
|
106 |
* @param cta DOCUMENT ME!
|
107 |
*/
|
108 |
public void setCadToolAdapter(CADToolAdapter cta); |
109 |
|
110 |
/**
|
111 |
* DOCUMENT ME!
|
112 |
*
|
113 |
* @return DOCUMENT ME!
|
114 |
*/
|
115 |
public CADToolAdapter getCadToolAdapter();
|
116 |
} |