svn-gvsig-desktop / trunk / applications / appgvSIG / src / com / iver / cit / gvsig / project / documents / layout / commands / EditableFeatureSource.java @ 10626
History | View | Annotate | Download (4.81 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.project.documents.layout.commands; |
42 |
|
43 |
import java.awt.Image; |
44 |
|
45 |
import com.iver.cit.gvsig.exceptions.commands.EditionCommandException; |
46 |
import com.iver.cit.gvsig.fmap.edition.commands.CommandRecord; |
47 |
import com.iver.cit.gvsig.project.documents.layout.fframes.IFFrame; |
48 |
|
49 |
|
50 |
/**
|
51 |
* Interface of class to control the edition of FFrames.
|
52 |
*
|
53 |
* @author Vicente Caballero Navarro
|
54 |
*/
|
55 |
public interface EditableFeatureSource { |
56 |
/**
|
57 |
* Returns from an index the FFrame.
|
58 |
*
|
59 |
* @param index
|
60 |
*
|
61 |
* @return FFrame.
|
62 |
*/
|
63 |
IFFrame getFFrame(int index);
|
64 |
/**
|
65 |
* Returns all the fframes that are not removed.
|
66 |
*
|
67 |
* @return Vector with fframes.
|
68 |
*/
|
69 |
IFFrame[] getFFrames();
|
70 |
/**
|
71 |
* Returns the number of FFrame.
|
72 |
*
|
73 |
* @return Number of FFrames
|
74 |
*/
|
75 |
int getFFrameCount();
|
76 |
/**
|
77 |
* Add a FFrame in the mechanism of control creating a command.
|
78 |
*
|
79 |
* @param f FFrame to add
|
80 |
*/
|
81 |
void addFFrame(IFFrame f);
|
82 |
/**
|
83 |
* Undo the last command added.
|
84 |
* @throws EditionCommandException
|
85 |
*/
|
86 |
void undo() throws EditionCommandException; |
87 |
/**
|
88 |
* Redo the last command undid.
|
89 |
* @throws EditionCommandException
|
90 |
*/
|
91 |
void redo() throws EditionCommandException; |
92 |
/**
|
93 |
* Returns if there are more commands to undo
|
94 |
*
|
95 |
* @return True if there are more commands to undo
|
96 |
*/
|
97 |
boolean moreUndoCommands();
|
98 |
/**
|
99 |
* Returns if there are more commands to redo
|
100 |
*
|
101 |
* @return True if there are more commands to redo
|
102 |
*/
|
103 |
boolean moreRedoCommands();
|
104 |
/**
|
105 |
* Remove the FFrame by the index.
|
106 |
*
|
107 |
* @param index
|
108 |
*/
|
109 |
void removeFFrame(int index); |
110 |
/**
|
111 |
* Modify a fframe to another fframe new.
|
112 |
*
|
113 |
* @param fant Previous Fframe.
|
114 |
* @param fnew New FFrame.
|
115 |
*/
|
116 |
boolean modifyFFrame(IFFrame fant, IFFrame fnew);
|
117 |
|
118 |
void setImage(Image i); |
119 |
|
120 |
Image getImage();
|
121 |
/**
|
122 |
* Start a composed command of other simpler commands.
|
123 |
* Create an only one command to reproduce if all at once.
|
124 |
*/
|
125 |
void startComplexCommand();
|
126 |
/**
|
127 |
* Terminate a composed command.
|
128 |
*/
|
129 |
void endComplexCommand(String description); |
130 |
/**
|
131 |
* Undo add FFrame from index.
|
132 |
*
|
133 |
* @param index
|
134 |
*/
|
135 |
void undoAddFFrame(int index); |
136 |
/**
|
137 |
* Add FFrame.
|
138 |
*
|
139 |
* @param frame
|
140 |
*
|
141 |
* @return index of new fframe.
|
142 |
*/
|
143 |
int doAddFFrame(IFFrame frame);
|
144 |
/**
|
145 |
* Add FFrame from index.
|
146 |
*
|
147 |
* @param frame New FFrame.
|
148 |
* @param index Index of new FFrame.
|
149 |
*/
|
150 |
void doAddFFrame(IFFrame frame, int index); |
151 |
/**
|
152 |
* Undo modify an FFrame modified.
|
153 |
*
|
154 |
* @param fant Previous fframe.
|
155 |
* @param fnew New FFrame.
|
156 |
* @param indexAnt Actual index.
|
157 |
* @param indexLast Previous index.
|
158 |
*/
|
159 |
void undoModifyFFrame( int indexAnt, |
160 |
int previousIndex);
|
161 |
/**
|
162 |
* Modify FFrame from index and new FFrame.
|
163 |
*
|
164 |
* @param indexAnt Actual index.
|
165 |
* @param frameNext New FFrame.
|
166 |
*
|
167 |
* @return New index of FFrame.
|
168 |
*/
|
169 |
int doModifyFFrame(int indexAnt, IFFrame frameNext); |
170 |
/**
|
171 |
* Undo Remove FFrame from index.
|
172 |
*
|
173 |
* @param index Actual index of FFrame.
|
174 |
*/
|
175 |
void undoRemoveFFrame(int index); |
176 |
/**
|
177 |
* Remove FFrame from actual index.
|
178 |
*
|
179 |
* @param index Actual index.
|
180 |
*/
|
181 |
void doRemoveFFrame(int index); |
182 |
/**
|
183 |
* Returns all the fframes, remove and done not remove.
|
184 |
*
|
185 |
* @return All FFrames.
|
186 |
*/
|
187 |
IFFrame[] getAllFFrames();
|
188 |
/**
|
189 |
* Returns the command record.
|
190 |
*
|
191 |
* @return CommandRecord.
|
192 |
*/
|
193 |
CommandRecord getCommandRecord(); |
194 |
} |