svn-document-layout / trunk / org.gvsig.app.document.layout2.app / org.gvsig.app.document.layout2.app.mainplugin / src / main / java / org / gvsig / app / project / documents / layout / LayoutContext.java @ 168
History | View | Annotate | Download (7.23 KB)
1 |
/* gvSIG. Geographic Information System of the Valencian Government
|
---|---|
2 |
*
|
3 |
* Copyright (C) 2007-2008 Infrastructures and Transports Department
|
4 |
* of the Valencian Government (CIT)
|
5 |
*
|
6 |
* This program is free software; you can redistribute it and/or
|
7 |
* modify it under the terms of the GNU General Public License
|
8 |
* as published by the Free Software Foundation; either version 2
|
9 |
* of the License, or (at your option) any later version.
|
10 |
*
|
11 |
* This program is distributed in the hope that it will be useful,
|
12 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
13 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
14 |
* GNU General Public License for more details.
|
15 |
*
|
16 |
* You should have received a copy of the GNU General Public License
|
17 |
* along with this program; if not, write to the Free Software
|
18 |
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
19 |
* MA 02110-1301, USA.
|
20 |
*
|
21 |
*/
|
22 |
package org.gvsig.app.project.documents.layout; |
23 |
|
24 |
import java.awt.geom.AffineTransform; |
25 |
|
26 |
import org.gvsig.app.project.documents.layout.commands.FrameCommandsRecord; |
27 |
import org.gvsig.app.project.documents.layout.fframes.IFFrame; |
28 |
import org.gvsig.app.project.documents.layout.toc.TocModelObserver; |
29 |
import org.gvsig.fmap.mapcontext.MapContext; |
30 |
import org.gvsig.tools.observer.Observable; |
31 |
import org.gvsig.tools.observer.Observer; |
32 |
import org.gvsig.tools.persistence.Persistent; |
33 |
|
34 |
/**
|
35 |
* @author <a href="mailto:jpiera@gvsig.org">Jorge Piera Llodrá</a>
|
36 |
*/
|
37 |
public interface LayoutContext extends Persistent, Observable { |
38 |
|
39 |
/**
|
40 |
* Returns the AffineTransform that is applying in the Layout.
|
41 |
*
|
42 |
* @return AffineTransform
|
43 |
*/
|
44 |
public AffineTransform getAT(); |
45 |
|
46 |
/**
|
47 |
* Call all LayoutDrawListeners.
|
48 |
*
|
49 |
*/
|
50 |
public void notifAllObservers(); |
51 |
|
52 |
/**
|
53 |
* It returns the print attributes of the Layout.
|
54 |
*
|
55 |
* @return Attributes.
|
56 |
*/
|
57 |
public Attributes getAttributes(); |
58 |
|
59 |
/**
|
60 |
* Inserts the print attributes of Layout.
|
61 |
*
|
62 |
* @param attributes
|
63 |
* Attributes.
|
64 |
*/
|
65 |
public void setAtributes(Attributes attributes); |
66 |
|
67 |
/**
|
68 |
* It obtains the Array with all the FFrames that have been added al Layout.
|
69 |
*
|
70 |
* @return Array with all the FFrames that have been added al Layout.
|
71 |
*/
|
72 |
public IFFrame[] getFFrames(); |
73 |
|
74 |
/**
|
75 |
* It obtains the FFrame from an index.
|
76 |
**/
|
77 |
public IFFrame getFFrame(int i); |
78 |
|
79 |
/**
|
80 |
* It orders the FFrames depending on its position specified by level.
|
81 |
*
|
82 |
*/
|
83 |
public void updateFFrames(); |
84 |
|
85 |
/**
|
86 |
* Remove the fframes selected.
|
87 |
*
|
88 |
*/
|
89 |
public void delFFrameSelected(); |
90 |
|
91 |
/**
|
92 |
* Clear the selection of FFrames.
|
93 |
*
|
94 |
*/
|
95 |
public void clearSelection(); |
96 |
|
97 |
/**
|
98 |
* Remove the fframe of index.
|
99 |
*
|
100 |
*/
|
101 |
public void delFFrame(int index); |
102 |
|
103 |
/**
|
104 |
* Remove the fframe of parameter.
|
105 |
*
|
106 |
* @param frame
|
107 |
* FFrame to remove.
|
108 |
*/
|
109 |
public void delFFrame(IFFrame frame); |
110 |
|
111 |
/**
|
112 |
* Returns the EditableFeatureSource, is the control of all change in the
|
113 |
* FFrames of Layout.
|
114 |
*
|
115 |
* @return EditableFatureSource.
|
116 |
*/
|
117 |
public FrameCommandsRecord getFrameCommandsRecord();
|
118 |
|
119 |
/**
|
120 |
* It adds a fframe to Arraylist of FFrames .
|
121 |
*
|
122 |
* @param frame
|
123 |
* fframe to add.
|
124 |
* @param clearSelection
|
125 |
* True
|
126 |
* True if clean the selection of the fframes already added and
|
127 |
* false if intends to maintain the same selection.
|
128 |
* @param select
|
129 |
* Boolean that indicates if has to remain selected the FFrame
|
130 |
* that is added or not.
|
131 |
*/
|
132 |
public void addFFrame(IFFrame frame, boolean clearSelection, boolean select); |
133 |
|
134 |
/**
|
135 |
* It adds a fframe to Arraylist of FFrames with the same properties.
|
136 |
*
|
137 |
* @param frame
|
138 |
* fframe to add.
|
139 |
*/
|
140 |
public void addFFrameSameProperties(IFFrame frame); |
141 |
|
142 |
/**
|
143 |
* Returns other number behind the current fframes.
|
144 |
*
|
145 |
* @return new Position behind.
|
146 |
*/
|
147 |
public int getNumBehind(); |
148 |
|
149 |
/**
|
150 |
* Returns other number before the current fframes.
|
151 |
*
|
152 |
* @return new Position before.
|
153 |
*/
|
154 |
public int getNumBefore(); |
155 |
|
156 |
/**
|
157 |
* It returns all the fframes included them erased and modified in all
|
158 |
* its previous forms.
|
159 |
*
|
160 |
* @return IFFrame[] Array of FFrames.
|
161 |
*/
|
162 |
public IFFrame[] getAllFFrames(); |
163 |
|
164 |
/**
|
165 |
* Gets the list of selected FFrames
|
166 |
*
|
167 |
* @return An Array of selected FFrames
|
168 |
*/
|
169 |
public IFFrame[] getSelectedFFrames(); |
170 |
|
171 |
/**
|
172 |
* Gets the list of selected FFrames that are instance of
|
173 |
* the provided Class.
|
174 |
* @param <T>
|
175 |
*
|
176 |
* @param clazz A class
|
177 |
* @return An Array of selected FFrames
|
178 |
*/
|
179 |
public <T> T[] getSelectedFFrames(Class<T> clazz); |
180 |
|
181 |
/**
|
182 |
* It returns if the Layout is in edition.
|
183 |
*
|
184 |
* @return True if Layout is in edition.
|
185 |
*/
|
186 |
public boolean isEditable(); |
187 |
|
188 |
/**
|
189 |
* It inserts if the Layout is in edition.
|
190 |
*
|
191 |
* @param b
|
192 |
* True if Layout is in edition.
|
193 |
*/
|
194 |
public void setEditable(boolean b); |
195 |
|
196 |
/**
|
197 |
* It returns if has been applying in the fframes that are added to Layout
|
198 |
* the grid, or not.
|
199 |
*
|
200 |
* @return true if has been applying the grid.
|
201 |
*/
|
202 |
public boolean isAdjustingToGrid(); |
203 |
|
204 |
/**
|
205 |
* It inserts if has been applying in the fframes that are added to Layout
|
206 |
* the grid, or not.
|
207 |
*
|
208 |
* @param b
|
209 |
* true if has been applying the grid.
|
210 |
*/
|
211 |
public void setAdjustToGrid(boolean b); |
212 |
|
213 |
/**
|
214 |
* It inserts if is shown or not the rule of the Layout.
|
215 |
*
|
216 |
* @param b
|
217 |
* True if is shown or not the rule of the Layout.
|
218 |
*/
|
219 |
public void setRuler(boolean b); |
220 |
|
221 |
/**
|
222 |
* Returns if is shown or not the rule of the Layout.
|
223 |
*
|
224 |
* @return True si se muestra la regla.
|
225 |
*/
|
226 |
public boolean getRuler(); |
227 |
|
228 |
/**
|
229 |
* It returns if has been showing the grid of Layout, or not.
|
230 |
*
|
231 |
* @return true if has been showing the grid of Layout.
|
232 |
*/
|
233 |
public boolean isGridVisible(); |
234 |
|
235 |
/**
|
236 |
* It inserts if draws the Grid in the Layout or not.
|
237 |
*
|
238 |
* @param b
|
239 |
* True if draws the Grid in the Layout.
|
240 |
*/
|
241 |
public void setGridVisible(boolean b); |
242 |
|
243 |
/**
|
244 |
* Refresh all FFrames of Layout.
|
245 |
*/
|
246 |
public void fullRefresh(); |
247 |
|
248 |
public void setNumBehind(int numBehind); |
249 |
|
250 |
public void setNumBefore(int numBefore); |
251 |
|
252 |
/**
|
253 |
* Sets the model of the TOC. The LayoutPanel will create
|
254 |
* a TOC in the user interface if a tocModel has been set.
|
255 |
*/
|
256 |
public void setTocModel(MapContext tocModel); |
257 |
|
258 |
/**
|
259 |
* Gets the model of the TOC. The LayoutPanel will create
|
260 |
* a TOC in the user interface if a tocModel has been set.
|
261 |
*/
|
262 |
public MapContext getTocModel();
|
263 |
|
264 |
/**
|
265 |
* Triggers a notification to the TocModel observers of type
|
266 |
* {@link TocModelChangedNotification#MODEL_CHANGED}
|
267 |
*/
|
268 |
public void notifyTocUpdated(TocModelChangedNotification.Type notificationType); |
269 |
|
270 |
public void addTocObserver(TocModelObserver observer); |
271 |
|
272 |
public void removeTocObserver(TocModelObserver observer); |
273 |
|
274 |
public void removeTocObservers(); |
275 |
|
276 |
} |