svn-gvsig-desktop / tags / v1_1_Build_1003 / extensions / extCAD / src / com / iver / cit / gvsig / gui / cad / CADTool.java @ 12271
History | View | Annotate | Download (3.48 KB)
1 | 3702 | caballero | /* 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 | 3883 | caballero | import java.awt.Color; |
43 | import java.awt.Graphics; |
||
44 | 4313 | fjp | import java.awt.event.InputEvent; |
45 | 4637 | caballero | import java.util.ArrayList; |
46 | 3883 | caballero | |
47 | 3702 | caballero | import com.iver.cit.gvsig.fmap.core.v02.FConstant; |
48 | import com.iver.cit.gvsig.fmap.core.v02.FSymbol; |
||
49 | 5733 | caballero | import com.iver.cit.gvsig.gui.cad.exception.CommandException; |
50 | 4637 | caballero | import com.iver.cit.gvsig.layers.VectorialLayerEdited; |
51 | 3702 | caballero | |
52 | |||
53 | /**
|
||
54 | * DOCUMENT ME!
|
||
55 | *
|
||
56 | * @author $author$
|
||
57 | */
|
||
58 | public interface CADTool { |
||
59 | 9065 | caballero | |
60 | 11427 | caballero | |
61 | 4637 | caballero | public static int TOPGEOMETRY = 2000; |
62 | 3702 | caballero | |
63 | public void init(); |
||
64 | 3744 | caballero | public void end(); |
65 | 4313 | fjp | public void transition(double x, double y, InputEvent event); |
66 | 3829 | caballero | public void transition(double d); |
67 | 5733 | caballero | public void transition(String s) throws CommandException; |
68 | 4366 | caballero | public void addPoint(double x,double y,InputEvent event); |
69 | 3829 | caballero | public void addValue(double d); |
70 | public void addOption(String s); |
||
71 | 3702 | caballero | public void setQuestion(String s); |
72 | 3711 | caballero | |
73 | 3702 | caballero | /**
|
74 | * Recibe un graphics en el que se encuentra dibujada la
|
||
75 | * EditableFeatureSource que se pasa como par?metro. En este m?todo, la
|
||
76 | * herramienta ha de implementar el dibujado de la operaci?n que se est?
|
||
77 | * realizando dependiendo del estado. Por ejemplo al dibujar un c?rculo
|
||
78 | * mediante 3 puntos, cuando la herramienta se encuentre en el estado en
|
||
79 | * el que s?lo falta un punto, se dibujar? el c?rculo teniendo en cuenta
|
||
80 | * como tercer punto el puntero del rat?n (pasado en los par?metros x e
|
||
81 | * y). Este m?todo es invocado tras cada transici?n y cada vez que se
|
||
82 | * mueve el rat?n.
|
||
83 | *
|
||
84 | * @param g DOCUMENT ME!
|
||
85 | * @param efs DOCUMENT ME!
|
||
86 | * @param selectedGeometries DOCUMENT ME!
|
||
87 | * @param x DOCUMENT ME!
|
||
88 | * @param y DOCUMENT ME!
|
||
89 | */
|
||
90 | 3829 | caballero | void drawOperation(Graphics g,double x, double y); |
91 | 3702 | caballero | |
92 | /**
|
||
93 | * Obtiene la pregunta que saldr? en la consola relativa al estado en el
|
||
94 | * que se encuentra la herramienta
|
||
95 | *
|
||
96 | * @return DOCUMENT ME!
|
||
97 | */
|
||
98 | String getQuestion();
|
||
99 | |||
100 | /**
|
||
101 | * DOCUMENT ME!
|
||
102 | *
|
||
103 | * @param cta DOCUMENT ME!
|
||
104 | */
|
||
105 | public void setCadToolAdapter(CADToolAdapter cta); |
||
106 | |||
107 | /**
|
||
108 | * DOCUMENT ME!
|
||
109 | *
|
||
110 | * @return DOCUMENT ME!
|
||
111 | */
|
||
112 | public CADToolAdapter getCadToolAdapter();
|
||
113 | 3883 | caballero | public String[] getDescriptions(); |
114 | public void setDescription(String[] descriptions); |
||
115 | 4118 | caballero | public String getName(); |
116 | 4637 | caballero | public VectorialLayerEdited getVLE();
|
117 | void clearSelection();
|
||
118 | 5170 | caballero | public boolean isApplicable(int shapeType); |
119 | 9065 | caballero | public void setPreviosTool(DefaultCADTool tool); |
120 | public void restorePreviousTool(); |
||
121 | 3702 | caballero | } |