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