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; |
45 |
* {@link GeoMapPane}, a {@link MapContextManagerInterface} on the left, |
* {@link GeoMapPane}, a {@link MapContextManagerInterface} on the left, |
46 |
* and some buttons floating over the {@link JMapPane} |
* and some buttons floating over the {@link JMapPane} |
47 |
*/ |
*/ |
48 |
public MapView(MapPaneToolBar toolBar) { |
public MapView(Window parentGui, MapPaneToolBar toolBar) { |
49 |
super(new BorderLayout()); |
super(new BorderLayout()); |
50 |
// Call initialize() by yourself afterwards. |
// Call initialize() by yourself afterwards. |
51 |
// Needed because variables for the overwritten methods |
// Needed because variables for the overwritten methods |
52 |
// are not yet set. |
// are not yet set. |
53 |
getGeoMapPane().getMapPane().setWaitCursorComponent(SwingUtil.getParentWindow(this)); |
getGeoMapPane().getMapPane().setWaitCursorComponent(parentGui); |
54 |
if ( toolBar == null ) |
if ( toolBar == null ) |
55 |
toolBar = new MapPaneToolBar(getMapPane()); |
toolBar = new MapPaneToolBar(getMapPane()); |
56 |
jToolBar = toolBar; |
jToolBar = toolBar; |
61 |
* {@link GeoMapPane}, a {@link MapContextManagerInterface} on the left, |
* {@link GeoMapPane}, a {@link MapContextManagerInterface} on the left, |
62 |
* and some buttons floating over the {@link JMapPane} |
* and some buttons floating over the {@link JMapPane} |
63 |
*/ |
*/ |
64 |
public MapView() { |
public MapView(Window parentGui) { |
65 |
this(null); |
this(parentGui, null); |
66 |
} |
} |
67 |
|
|
68 |
/** |
/** |