1 |
package skrueger.geotools; |
package skrueger.geotools; |
2 |
|
|
3 |
import java.awt.BorderLayout; |
import java.awt.BorderLayout; |
4 |
|
import java.awt.Window; |
5 |
|
|
6 |
import javax.swing.BorderFactory; |
import javax.swing.BorderFactory; |
7 |
import javax.swing.JComponent; |
import javax.swing.JComponent; |
15 |
import schmitzm.geotools.gui.MapContextControlPane; |
import schmitzm.geotools.gui.MapContextControlPane; |
16 |
import schmitzm.geotools.gui.MapPaneStatusBar; |
import schmitzm.geotools.gui.MapPaneStatusBar; |
17 |
import schmitzm.geotools.styling.ColorMapManager; |
import schmitzm.geotools.styling.ColorMapManager; |
|
import schmitzm.swing.SwingUtil; |
|
18 |
|
|
19 |
/** |
/** |
20 |
* Achtung! Dieser code ist verwuestet |
* Achtung! Dieser code ist verwuestet |
44 |
* {@link GeoMapPane}, a {@link MapContextManagerInterface} on the left, |
* {@link GeoMapPane}, a {@link MapContextManagerInterface} on the left, |
45 |
* and some buttons floating over the {@link JMapPane} |
* and some buttons floating over the {@link JMapPane} |
46 |
*/ |
*/ |
47 |
public MapView(MapPaneToolBar toolBar) { |
public MapView(Window parentGui, MapPaneToolBar toolBar) { |
48 |
super(new BorderLayout()); |
super(new BorderLayout()); |
49 |
// Call initialize() by yourself afterwards. |
// Call initialize() by yourself afterwards. |
50 |
// Needed because variables for the overwritten methods |
// Needed because variables for the overwritten methods |
51 |
// are not yet set. |
// are not yet set. |
52 |
getGeoMapPane().getMapPane().setWaitCursorComponent(SwingUtil.getParentWindow(this)); |
getGeoMapPane().getMapPane().setWaitCursorComponent(parentGui); |
53 |
if ( toolBar == null ) |
if ( toolBar == null ) |
54 |
toolBar = new MapPaneToolBar(getMapPane()); |
toolBar = new MapPaneToolBar(getMapPane()); |
55 |
jToolBar = toolBar; |
jToolBar = toolBar; |
60 |
* {@link GeoMapPane}, a {@link MapContextManagerInterface} on the left, |
* {@link GeoMapPane}, a {@link MapContextManagerInterface} on the left, |
61 |
* and some buttons floating over the {@link JMapPane} |
* and some buttons floating over the {@link JMapPane} |
62 |
*/ |
*/ |
63 |
public MapView() { |
public MapView(Window parentGui) { |
64 |
this(null); |
this(parentGui, null); |
65 |
} |
} |
66 |
|
|
67 |
/** |
/** |
93 |
newRight.add(getToolBar(), BorderLayout.NORTH); |
newRight.add(getToolBar(), BorderLayout.NORTH); |
94 |
newRight.add(getGeoMapPane(), BorderLayout.CENTER); |
newRight.add(getGeoMapPane(), BorderLayout.CENTER); |
95 |
splitPane.add(newRight); |
splitPane.add(newRight); |
96 |
|
|
97 |
|
|
98 |
|
|
99 |
this.add(splitPane, BorderLayout.CENTER); |
this.add(splitPane, BorderLayout.CENTER); |
100 |
} |
} |