24 |
public class MapView extends JPanel { |
public class MapView extends JPanel { |
25 |
private static final Logger LOGGER = Logger.getLogger(MapView.class); |
private static final Logger LOGGER = Logger.getLogger(MapView.class); |
26 |
|
|
27 |
public final JSplitPane splitPane = new JSplitPane( |
private final JSplitPane splitPane = new JSplitPane( |
28 |
JSplitPane.HORIZONTAL_SPLIT); |
JSplitPane.HORIZONTAL_SPLIT); |
29 |
|
|
30 |
protected MapPaneStatusBar statusBar = null; |
protected MapPaneStatusBar statusBar = null; |
73 |
} |
} |
74 |
|
|
75 |
/** |
/** |
76 |
* Calls #getSidePanel() which can be overwritten. |
* This routine creates the main components of the GUI: The left Side and the map on the right side.<br/> |
77 |
|
* Calls #getSidePanel() which can be overwritten (call super!).<br/> |
78 |
|
* |
79 |
|
* This method initialized the variables {@link #statusBar} and {@link #splitPane} |
80 |
* |
* |
81 |
* @see #adjustSizeOfGeoMapPane() |
* @see #adjustSizeOfGeoMapPane() |
82 |
*/ |
*/ |
83 |
public void initialize() { |
public void initialize() { |
84 |
// horizontales SplitPane initialisieren |
// horizontales SplitPane initialisieren |
85 |
|
|
86 |
// Status-Line to show Coordinates and Rastervalues. |
// Status-Line to show Coordinates and Rastervalues. |
87 |
statusBar = new MapPaneStatusBar(getGeoMapPane() |
statusBar = new MapPaneStatusBar(getGeoMapPane() |
88 |
.getMapPane()); |
.getMapPane()); |
91 |
5, 2, 5))); |
5, 2, 5))); |
92 |
this.add(statusBar, BorderLayout.SOUTH); |
this.add(statusBar, BorderLayout.SOUTH); |
93 |
|
|
|
splitPane.setDividerLocation(-1); |
|
|
splitPane.setDividerSize(5); |
|
94 |
|
|
95 |
splitPane.setResizeWeight(0.0); |
/** |
96 |
splitPane.add(getSidePane()); |
* The layout of the split pane can be configured in the atlas. |
97 |
|
*/ |
98 |
|
getSplitPane().setDividerSize(5); |
99 |
|
getSplitPane().setDividerLocation(-1); |
100 |
|
|
101 |
|
getSplitPane().setResizeWeight(0.0); |
102 |
|
getSplitPane().add(getSidePane()); |
103 |
|
|
104 |
/*********************************************************************** |
/*********************************************************************** |
105 |
* To the right side we now add a JPanel that consists of a toolbar and |
* To the right side we now add a JPanel that consists of a toolbar and |
108 |
JPanel newRight = new JPanel(new BorderLayout()); |
JPanel newRight = new JPanel(new BorderLayout()); |
109 |
newRight.add(getToolBar(), BorderLayout.NORTH); |
newRight.add(getToolBar(), BorderLayout.NORTH); |
110 |
newRight.add(getGeoMapPane(), BorderLayout.CENTER); |
newRight.add(getGeoMapPane(), BorderLayout.CENTER); |
111 |
splitPane.add(newRight); |
getSplitPane().add(newRight); |
112 |
|
|
113 |
this.add(splitPane, BorderLayout.CENTER); |
this.add(getSplitPane(), BorderLayout.CENTER); |
114 |
} |
} |
115 |
|
|
116 |
/** |
/** |
125 |
* Returns the split pane which divides the layer list from the map panel. |
* Returns the split pane which divides the layer list from the map panel. |
126 |
*/ |
*/ |
127 |
public JSplitPane getSplitPane() { |
public JSplitPane getSplitPane() { |
128 |
return this.splitPane; |
return splitPane; |
129 |
} |
} |
130 |
|
|
131 |
|
|