root / branches / v2_0_0_prep / applications / appgvSIG / src / org / gvsig / app / project / documents / view / gui / DefaultViewPanel.java @ 38601
History | View | Annotate | Download (18.5 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 |
|
23 |
/*
|
24 |
* AUTHORS (In addition to CIT):
|
25 |
* 2004-2009 IVER TI
|
26 |
*
|
27 |
*/
|
28 |
package org.gvsig.app.project.documents.view.gui; |
29 |
|
30 |
import java.awt.BorderLayout; |
31 |
import java.awt.Color; |
32 |
import java.awt.Dimension; |
33 |
import java.beans.PropertyChangeEvent; |
34 |
import java.beans.PropertyChangeListener; |
35 |
import java.util.HashMap; |
36 |
import java.util.Iterator; |
37 |
|
38 |
import javax.swing.JSplitPane; |
39 |
|
40 |
import org.cresques.cts.IProjection; |
41 |
|
42 |
import org.gvsig.andami.PluginServices; |
43 |
import org.gvsig.andami.messages.NotificationManager; |
44 |
import org.gvsig.andami.ui.mdiFrame.NewStatusBar; |
45 |
import org.gvsig.andami.ui.mdiManager.WindowInfo; |
46 |
import org.gvsig.app.project.DefaultProject; |
47 |
import org.gvsig.app.project.documents.Document; |
48 |
import org.gvsig.app.project.documents.view.MapOverview; |
49 |
import org.gvsig.app.project.documents.view.ViewDocument; |
50 |
import org.gvsig.app.project.documents.view.toc.gui.TOC; |
51 |
import org.gvsig.app.project.documents.view.toolListeners.AreaListener; |
52 |
import org.gvsig.app.project.documents.view.toolListeners.InfoListener; |
53 |
import org.gvsig.app.project.documents.view.toolListeners.MeasureListener; |
54 |
import org.gvsig.app.project.documents.view.toolListeners.PanListener; |
55 |
import org.gvsig.app.project.documents.view.toolListeners.PointSelectListener; |
56 |
import org.gvsig.app.project.documents.view.toolListeners.PolygonSelectListener; |
57 |
import org.gvsig.app.project.documents.view.toolListeners.RectangleSelectListener; |
58 |
import org.gvsig.app.project.documents.view.toolListeners.StatusBarListener; |
59 |
import org.gvsig.app.project.documents.view.toolListeners.ZoomInListener; |
60 |
import org.gvsig.app.project.documents.view.toolListeners.ZoomOutListener; |
61 |
import org.gvsig.fmap.mapcontext.MapContext; |
62 |
import org.gvsig.fmap.mapcontext.events.ColorEvent; |
63 |
import org.gvsig.fmap.mapcontext.events.ExtentEvent; |
64 |
import org.gvsig.fmap.mapcontext.events.ProjectionEvent; |
65 |
import org.gvsig.fmap.mapcontext.events.listeners.ViewPortListener; |
66 |
import org.gvsig.fmap.mapcontext.layers.FLayer; |
67 |
import org.gvsig.fmap.mapcontext.layers.FLayers; |
68 |
import org.gvsig.fmap.mapcontext.layers.vectorial.FLyrVect; |
69 |
import org.gvsig.fmap.mapcontrol.MapControl; |
70 |
import org.gvsig.fmap.mapcontrol.MapControlCreationException; |
71 |
import org.gvsig.fmap.mapcontrol.MapControlLocator; |
72 |
import org.gvsig.fmap.mapcontrol.MapControlManager; |
73 |
import org.gvsig.fmap.mapcontrol.tools.ZoomOutRightButtonListener; |
74 |
import org.gvsig.fmap.mapcontrol.tools.Behavior.Behavior; |
75 |
import org.gvsig.fmap.mapcontrol.tools.Behavior.MouseMovementBehavior; |
76 |
import org.gvsig.fmap.mapcontrol.tools.Behavior.MouseWheelBehavior; |
77 |
import org.gvsig.fmap.mapcontrol.tools.Behavior.MoveBehavior; |
78 |
import org.gvsig.fmap.mapcontrol.tools.Behavior.PointBehavior; |
79 |
import org.gvsig.fmap.mapcontrol.tools.Behavior.PolygonBehavior; |
80 |
import org.gvsig.fmap.mapcontrol.tools.Behavior.PolylineBehavior; |
81 |
import org.gvsig.fmap.mapcontrol.tools.Behavior.RectangleBehavior; |
82 |
import org.gvsig.utils.console.JConsole; |
83 |
import org.gvsig.utils.console.JDockPanel; |
84 |
import org.gvsig.utils.console.ResponseListener; |
85 |
import org.gvsig.utils.console.jedit.JEditTextArea; |
86 |
|
87 |
/**
|
88 |
* <p>
|
89 |
* <b>Class View</b>. This class represents the gvSIG specific internal window
|
90 |
* where the maps are displayed and where the events coming from the user are
|
91 |
* captured.
|
92 |
* </p>
|
93 |
* <p>
|
94 |
* It is composed by three main visual areas:
|
95 |
* </p>
|
96 |
* <ol>
|
97 |
* <li>
|
98 |
* <b>Map control</b>: the map area located in the right area of the window. It
|
99 |
* takes up the biggest part of the window.</li>
|
100 |
* <li>
|
101 |
* <b>Table of contents (TOC)</b>: is a list of layers displayed in the view.
|
102 |
* The TOC is located on the left-top corner of the View and is the place where
|
103 |
* the user can modify the order, the legends, the visibility and other
|
104 |
* properties of the layers.</li>
|
105 |
* <li>
|
106 |
* <b>Map overview</b>: is a small MapControl located in the left-bottom corner
|
107 |
* of the View where the user can put some layers which summarizes the view. It
|
108 |
* is used to make the navigation easier and faster.</li>
|
109 |
* </ol>
|
110 |
*
|
111 |
* @author 2005- Vicente Caballero
|
112 |
* @author 2009- Joaquin del Cerro
|
113 |
*
|
114 |
*/
|
115 |
public class DefaultViewPanel extends AbstractViewPanel { |
116 |
/**
|
117 |
*
|
118 |
*/
|
119 |
private static final long serialVersionUID = -4044661458841786519L; |
120 |
|
121 |
private JConsole console;
|
122 |
private JDockPanel dockConsole = null; |
123 |
protected ResponseAdapter consoleResponseAdapter = new ResponseAdapter(); |
124 |
protected boolean isShowConsole = false; |
125 |
private ViewPortListener viewPortListener;
|
126 |
private static MapControlManager mapControlManager = MapControlLocator |
127 |
.getMapControlManager(); |
128 |
|
129 |
/**
|
130 |
* Creates a new View object. Before being used, the object must be
|
131 |
* initialized.
|
132 |
*
|
133 |
* @see initialize()
|
134 |
*/
|
135 |
public DefaultViewPanel() {
|
136 |
super();
|
137 |
this.setName("View"); |
138 |
// TODO Remove this when the system lo load libraries is finished
|
139 |
if (mapControlManager == null) { |
140 |
mapControlManager = MapControlLocator.getMapControlManager(); |
141 |
} |
142 |
} |
143 |
|
144 |
public DefaultViewPanel(Document document) { |
145 |
this();
|
146 |
this.initialize();
|
147 |
this.setDocument(document);
|
148 |
} |
149 |
|
150 |
/**
|
151 |
* Create the internal componentes and populate the window with them.
|
152 |
* If the layout properties were set using the
|
153 |
* <code>setWindowData(WindowData)</code> method, the window will be
|
154 |
* populated according to this properties.
|
155 |
*/
|
156 |
protected void initialize() { |
157 |
super.initialize();
|
158 |
initComponents(); |
159 |
hideConsole(); |
160 |
getConsolePanel().addResponseListener(consoleResponseAdapter); |
161 |
} |
162 |
|
163 |
public void setDocument(Document document) { |
164 |
setModel((ViewDocument) document); |
165 |
} |
166 |
|
167 |
public Document getDocument() { |
168 |
return this.modelo; |
169 |
} |
170 |
|
171 |
public void setModel(ViewDocument model) { |
172 |
this.modelo = model;
|
173 |
// Se registra como listener de cambios en FMap
|
174 |
MapContext fmap = modelo.getMapContext(); |
175 |
|
176 |
FLayers layers = fmap.getLayers(); |
177 |
for (int i = 0; i < layers.getLayersCount(); i++) { |
178 |
if (layers.getLayer(i).isEditing()
|
179 |
&& layers.getLayer(i) instanceof FLyrVect) {
|
180 |
this.showConsole();
|
181 |
} |
182 |
} |
183 |
|
184 |
// Se configura el mapControl
|
185 |
m_MapControl.setMapContext(fmap); |
186 |
m_TOC.setMapContext(fmap); |
187 |
m_MapControl.getMapContext().getLayers().addLegendListener(m_TOC); |
188 |
|
189 |
m_MapControl.setBackground(new Color(255, 255, 255)); |
190 |
if (modelo.getMapOverViewContext() != null) { |
191 |
m_MapLoc.setModel(modelo.getMapOverViewContext()); |
192 |
} |
193 |
model.addPropertyChangeListener(new PropertyChangeListener() { |
194 |
public void propertyChange(PropertyChangeEvent evt) { |
195 |
if (evt.getPropertyName().equals("name")) { |
196 |
PluginServices.getMDIManager() |
197 |
.getWindowInfo(DefaultViewPanel.this) |
198 |
.setTitle( |
199 |
PluginServices.getText(this, "Vista") + ": " |
200 |
+ (String) evt.getNewValue());
|
201 |
} |
202 |
} |
203 |
}); |
204 |
if (m_MapControl.getViewPort() != null) { |
205 |
viewPortListener = new ViewPortListener() {
|
206 |
public void extentChanged(ExtentEvent e) { |
207 |
if (PluginServices.getMainFrame() != null) { |
208 |
PluginServices |
209 |
.getMainFrame() |
210 |
.getStatusBar() |
211 |
.setControlValue( |
212 |
"scale",
|
213 |
String.valueOf(m_MapControl
|
214 |
.getMapContext().getScaleView())); |
215 |
PluginServices |
216 |
.getMainFrame() |
217 |
.getStatusBar() |
218 |
.setMessage( |
219 |
"projection",
|
220 |
getMapControl().getViewPort() |
221 |
.getProjection().getAbrev()); |
222 |
} |
223 |
} |
224 |
|
225 |
public void backColorChanged(ColorEvent e) { |
226 |
// Do nothing
|
227 |
} |
228 |
|
229 |
public void projectionChanged(ProjectionEvent e) { |
230 |
m_MapLoc.setProjection(e.getNewProjection()); |
231 |
} |
232 |
}; |
233 |
m_MapControl.getViewPort().addViewPortListener(viewPortListener); |
234 |
} |
235 |
} |
236 |
|
237 |
public JConsole getConsolePanel() {
|
238 |
if (console == null) { |
239 |
console = new JConsole();
|
240 |
// Para distinguir cuando se est? escribiendo sobre la consola y
|
241 |
// cuando no.
|
242 |
console.setJTextName("CADConsole");
|
243 |
} |
244 |
return console;
|
245 |
} |
246 |
|
247 |
private JDockPanel getDockConsole() {
|
248 |
if (dockConsole == null) { |
249 |
dockConsole = new JDockPanel(getConsolePanel());
|
250 |
} |
251 |
return dockConsole;
|
252 |
} |
253 |
|
254 |
public void addConsoleListener(String prefix, ResponseListener listener) { |
255 |
consoleResponseAdapter.putSpaceListener(prefix, listener); |
256 |
|
257 |
} |
258 |
|
259 |
public void removeConsoleListener(ResponseListener listener) { |
260 |
consoleResponseAdapter.deleteListener(listener); |
261 |
|
262 |
} |
263 |
|
264 |
public void focusConsole(String text) { |
265 |
getConsolePanel().addResponseText(text); |
266 |
|
267 |
JEditTextArea jeta = getConsolePanel().getTxt(); |
268 |
jeta.requestFocusInWindow(); |
269 |
jeta.setCaretPosition(jeta.getText().length()); |
270 |
|
271 |
} |
272 |
|
273 |
public void hideConsole() { |
274 |
isShowConsole = false;
|
275 |
getDockConsole().setVisible(false);
|
276 |
|
277 |
} |
278 |
|
279 |
public void showConsole() { |
280 |
if (isShowConsole) {
|
281 |
return;
|
282 |
} |
283 |
isShowConsole = true;
|
284 |
getMapControl().remove(getDockConsole()); |
285 |
getMapControl().setLayout(new BorderLayout()); |
286 |
getMapControl().add(getDockConsole(), BorderLayout.SOUTH);
|
287 |
getDockConsole().setVisible(true);
|
288 |
|
289 |
} |
290 |
|
291 |
static class ResponseAdapter implements ResponseListener { |
292 |
|
293 |
private HashMap<String, ResponseListener> spaceListener = |
294 |
new HashMap<String, ResponseListener>(); |
295 |
|
296 |
public void putSpaceListener(String namespace, ResponseListener listener) { |
297 |
spaceListener.put(namespace, listener); |
298 |
} |
299 |
|
300 |
public void acceptResponse(String response) { |
301 |
boolean nameSpace = false; |
302 |
int n = -1; |
303 |
if (response != null) { |
304 |
if ((n = response.indexOf(':')) != -1) { |
305 |
nameSpace = true;
|
306 |
} |
307 |
} |
308 |
|
309 |
if (nameSpace) {
|
310 |
ResponseListener listener = |
311 |
spaceListener.get(response.substring(0, n));
|
312 |
if (listener != null) { |
313 |
listener.acceptResponse(response.substring(n + 1));
|
314 |
} |
315 |
} else {
|
316 |
Iterator<ResponseListener> i =
|
317 |
spaceListener.values().iterator(); |
318 |
while (i.hasNext()) {
|
319 |
ResponseListener listener = i.next(); |
320 |
listener.acceptResponse(response); |
321 |
} |
322 |
} |
323 |
} |
324 |
|
325 |
/**
|
326 |
* @param listener
|
327 |
*/
|
328 |
public void deleteListener(ResponseListener listener) { |
329 |
Iterator<String> i = spaceListener.keySet().iterator(); |
330 |
while (i.hasNext()) {
|
331 |
String namespace = i.next();
|
332 |
ResponseListener l = spaceListener.get(namespace); |
333 |
if (l == listener) {
|
334 |
spaceListener.remove(namespace); |
335 |
} |
336 |
} |
337 |
} |
338 |
|
339 |
} |
340 |
|
341 |
protected void initComponents() { // GEN-BEGIN:initComponents |
342 |
m_MapControl = new MapControl(); // Default is paintEnabled = false. |
343 |
// Remember to activate it
|
344 |
try {
|
345 |
m_MapControl.setMapControlDrawer(mapControlManager |
346 |
.createDefaultMapControlDrawer()); |
347 |
} catch (MapControlCreationException e) {
|
348 |
NotificationManager.addError(e); |
349 |
} |
350 |
|
351 |
m_MapControl.addExceptionListener(mapControlExceptionListener); |
352 |
m_TOC = new TOC();
|
353 |
|
354 |
// Ponemos el localizador
|
355 |
m_MapLoc = new MapOverview(m_MapControl);
|
356 |
try {
|
357 |
m_MapLoc.setMapControlDrawer(mapControlManager |
358 |
.createDefaultMapControlDrawer()); |
359 |
} catch (MapControlCreationException e) {
|
360 |
NotificationManager.addError(e); |
361 |
} |
362 |
removeAll(); |
363 |
tempMainSplit = new ViewSplitPane(JSplitPane.HORIZONTAL_SPLIT); |
364 |
|
365 |
if (windowLayout == null) { |
366 |
m_MapLoc.setPreferredSize(new Dimension(150, 200)); |
367 |
tempMainSplit.setPreferredSize(new Dimension(500, 300)); |
368 |
} |
369 |
|
370 |
if (!isPalette()) {
|
371 |
tempSplitToc = new JSplitPane(JSplitPane.VERTICAL_SPLIT); |
372 |
tempSplitToc.setTopComponent(m_TOC); |
373 |
tempSplitToc.setBottomComponent(m_MapLoc); |
374 |
tempSplitToc.setResizeWeight(0.7);
|
375 |
tempMainSplit.setLeftComponent(tempSplitToc); |
376 |
} else {
|
377 |
tempMainSplit.setLeftComponent(m_TOC); |
378 |
} |
379 |
m_TOC.setVisible(true);
|
380 |
tempMainSplit.setRightComponent(m_MapControl); |
381 |
this.setLayout(new BorderLayout()); |
382 |
this.add(tempMainSplit, BorderLayout.CENTER); |
383 |
|
384 |
if (windowLayout != null) { |
385 |
try {
|
386 |
tempMainSplit.setDividerLocation(Integer.valueOf(
|
387 |
windowLayout.get("MainDivider.Location")).intValue());
|
388 |
if (windowLayout.get("TOCDivider.Location") != null) { |
389 |
tempSplitToc.setDividerLocation(Integer.valueOf(
|
390 |
windowLayout.get("TOCDivider.Location")).intValue());
|
391 |
} |
392 |
} catch (NumberFormatException ex) { |
393 |
PluginServices.getLogger().error( |
394 |
"Error restoring View properties");
|
395 |
} |
396 |
} |
397 |
|
398 |
// Listener de eventos de movimiento que pone las coordenadas del rat?n
|
399 |
// en la barra de estado
|
400 |
StatusBarListener sbl = new StatusBarListener(m_MapControl);
|
401 |
|
402 |
// Zoom out (pinchas y el mapa se centra y te muestra m?s).
|
403 |
// No es dibujando un rect?ngulo, es solo pinchando.
|
404 |
|
405 |
ZoomOutListener zol = new ZoomOutListener(m_MapControl);
|
406 |
|
407 |
m_MapControl.addBehavior("zoomOut", new Behavior[] { |
408 |
new PointBehavior(zol), new MouseMovementBehavior(sbl) }); |
409 |
|
410 |
// pan
|
411 |
|
412 |
PanListener pl = new PanListener(m_MapControl);
|
413 |
m_MapControl.addBehavior("pan", new Behavior[] { new MoveBehavior(pl), |
414 |
new MouseMovementBehavior(sbl) });
|
415 |
|
416 |
// Medir
|
417 |
|
418 |
MeasureListener mli = new MeasureListener(m_MapControl);
|
419 |
m_MapControl.addBehavior("medicion", new Behavior[] { |
420 |
new PolylineBehavior(mli), new MouseMovementBehavior(sbl) }); |
421 |
|
422 |
// Area
|
423 |
|
424 |
AreaListener ali = new AreaListener(m_MapControl);
|
425 |
m_MapControl.addBehavior("area", new Behavior[] { |
426 |
new PolygonBehavior(ali), new MouseMovementBehavior(sbl) }); |
427 |
|
428 |
// Seleccion por punto
|
429 |
PointSelectListener psl = new PointSelectListener(m_MapControl);
|
430 |
m_MapControl.addBehavior("pointSelection", new Behavior[] { |
431 |
new PointBehavior(psl), new MouseMovementBehavior(sbl) }); |
432 |
|
433 |
// Info por punto
|
434 |
InfoListener il = new InfoListener(m_MapControl);
|
435 |
m_MapControl.addBehavior("info", new Behavior[] { |
436 |
new PointBehavior(il), new MouseMovementBehavior(sbl) }); |
437 |
|
438 |
// Selecci?n por rect?ngulo
|
439 |
RectangleSelectListener rsl = new RectangleSelectListener(m_MapControl);
|
440 |
m_MapControl.addBehavior("rectSelection", new Behavior[] { |
441 |
new RectangleBehavior(rsl), new MouseMovementBehavior(sbl) }); |
442 |
|
443 |
// Selecci?n por pol?gono
|
444 |
PolygonSelectListener poligSel = |
445 |
new PolygonSelectListener(m_MapControl);
|
446 |
m_MapControl.addBehavior("polSelection", new Behavior[] { |
447 |
new PolygonBehavior(poligSel), new MouseMovementBehavior(sbl) }); |
448 |
|
449 |
// Zoom por rect?ngulo
|
450 |
ZoomOutRightButtonListener zoil = |
451 |
new ZoomOutRightButtonListener(m_MapControl);
|
452 |
ZoomInListener zil = new ZoomInListener(m_MapControl);
|
453 |
m_MapControl.addBehavior("zoomIn", new Behavior[] { |
454 |
new RectangleBehavior(zil), new PointBehavior(zoil), |
455 |
new MouseMovementBehavior(sbl) });
|
456 |
|
457 |
/*
|
458 |
SelectImageListener sil = new SelectImageListener(m_MapControl);
|
459 |
m_MapControl.addBehavior("selectImage", new Behavior[] {
|
460 |
new PointBehavior(sil), new MouseMovementBehavior(sbl) });
|
461 |
*/
|
462 |
|
463 |
m_MapControl.setTool("zoomIn"); // Por defecto |
464 |
m_MapControl.addCombinedBehavior(new MouseWheelBehavior());
|
465 |
} |
466 |
|
467 |
public void windowActivated() { |
468 |
NewStatusBar statusbar = PluginServices.getMainFrame().getStatusBar(); |
469 |
MapContext mapContext = this.getMapControl().getMapContext();
|
470 |
|
471 |
statusbar.setMessage("units",
|
472 |
PluginServices.getText(this, mapContext.getDistanceName()));
|
473 |
statusbar.setControlValue("scale",
|
474 |
String.valueOf(mapContext.getScaleView()));
|
475 |
IProjection proj = getMapControl().getViewPort().getProjection(); |
476 |
if (proj != null) { |
477 |
statusbar.setMessage("projection", proj.getAbrev());
|
478 |
} else {
|
479 |
statusbar.setMessage("projection", ""); |
480 |
} |
481 |
} |
482 |
|
483 |
public void windowClosed() { |
484 |
super.windowClosed();
|
485 |
if (viewPortListener != null) { |
486 |
getMapControl().getViewPort().removeViewPortListener( |
487 |
viewPortListener); |
488 |
} |
489 |
if (getMapOverview() != null) { |
490 |
getMapOverview().getViewPort().removeViewPortListener( |
491 |
getMapOverview()); |
492 |
} |
493 |
|
494 |
} |
495 |
|
496 |
public void toPalette() { |
497 |
isPalette = true;
|
498 |
m_MapLoc.setPreferredSize(new Dimension(200, 150)); |
499 |
m_MapLoc.setSize(new Dimension(200, 150)); |
500 |
movp = new MapOverViewPalette(m_MapLoc, this); |
501 |
PluginServices.getMDIManager().addWindow(movp); |
502 |
FLayer[] layers =
|
503 |
getViewDocument().getMapContext().getLayers().getActives(); |
504 |
if (layers.length > 0 && layers[0] instanceof FLyrVect) { |
505 |
if (((FLyrVect) layers[0]).isEditing()) { |
506 |
showConsole(); |
507 |
return;
|
508 |
} |
509 |
} |
510 |
hideConsole(); |
511 |
|
512 |
} |
513 |
|
514 |
public void restore() { |
515 |
isPalette = false;
|
516 |
PluginServices.getMDIManager().closeWindow(movp); |
517 |
FLayer[] layers =
|
518 |
getViewDocument().getMapContext().getLayers().getActives(); |
519 |
if (layers.length > 0 && layers[0] instanceof FLyrVect) { |
520 |
if (((FLyrVect) layers[0]).isEditing()) { |
521 |
showConsole(); |
522 |
return;
|
523 |
} |
524 |
} |
525 |
hideConsole(); |
526 |
JSplitPane tempSplitToc = new JSplitPane(JSplitPane.VERTICAL_SPLIT); |
527 |
tempSplitToc.setTopComponent(m_TOC); |
528 |
tempSplitToc.setBottomComponent(m_MapLoc); |
529 |
tempSplitToc.setResizeWeight(0.7);
|
530 |
tempMainSplit.setLeftComponent(tempSplitToc); |
531 |
} |
532 |
|
533 |
/**
|
534 |
* Sets the default map overview background color that will be used in
|
535 |
* subsequent projects.
|
536 |
*
|
537 |
* @param color
|
538 |
* @deprecated use instead
|
539 |
* Project.getPreferences().setDefaultMapoverViewBackColor
|
540 |
*/
|
541 |
public static void setDefaultMapOverViewBackColor(Color color) { |
542 |
DefaultProject.getPreferences().setDefaultOverviewBackColor(color); |
543 |
} |
544 |
|
545 |
/**
|
546 |
* Returns the current default map overview background color defined which
|
547 |
* is the color defined when the user does not define any other one
|
548 |
*
|
549 |
* @return java.awt.Color
|
550 |
* @deprecated use instead
|
551 |
* Project.getPreferences().setDefaultMapoverViewBackColor
|
552 |
*/
|
553 |
public static Color getDefaultMapOverViewBackColor() { |
554 |
return DefaultProject.getPreferences().getDefaultOverviewBackColor();
|
555 |
} |
556 |
|
557 |
/**
|
558 |
* Returns the current default view background color defined which is the
|
559 |
* color defined when the user does not define any other one
|
560 |
*
|
561 |
* @return java.awt.Color
|
562 |
* @deprecated use instead Project.getPreferences().getDefaultViewBackColor
|
563 |
*/
|
564 |
public static Color getDefaultBackColor() { |
565 |
return DefaultProject.getPreferences().getDefaultViewBackColor();
|
566 |
} |
567 |
|
568 |
/**
|
569 |
* @deprecated use instead Project.getPreferences().setDefaultViewBackColor
|
570 |
*/
|
571 |
public static void setDefaultBackColor(Color color) { |
572 |
DefaultProject.getPreferences().setDefaultViewBackColor(color); |
573 |
} |
574 |
|
575 |
public Object getWindowProfile() { |
576 |
return WindowInfo.EDITOR_PROFILE;
|
577 |
} |
578 |
|
579 |
} |