/[schmitzm]/trunk/src/skrueger/geotools/MapView.java
ViewVC logotype

Diff of /trunk/src/skrueger/geotools/MapView.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 48 by alfonx, Fri Apr 17 12:49:33 2009 UTC revision 148 by alfonx, Thu Jun 18 16:31:56 2009 UTC
# Line 1  Line 1 
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;
# Line 14  import schmitzm.geotools.gui.JMapPane; Line 15  import schmitzm.geotools.gui.JMapPane;
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
# Line 26  import schmitzm.swing.SwingUtil; Line 26  import schmitzm.swing.SwingUtil;
26  public class MapView extends JPanel {  public class MapView extends JPanel {
27          private static final Logger LOGGER = Logger.getLogger(MapView.class);          private static final Logger LOGGER = Logger.getLogger(MapView.class);
28    
29          private final JSplitPane splitPane = new JSplitPane(          public final JSplitPane splitPane = new JSplitPane(
30                          JSplitPane.HORIZONTAL_SPLIT);                          JSplitPane.HORIZONTAL_SPLIT);
31    
32          protected MapPaneStatusBar statusBar = null;          protected MapPaneStatusBar statusBar = null;
# Line 44  public class MapView extends JPanel { Line 44  public class MapView extends JPanel {
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;
# Line 60  public class MapView extends JPanel { Line 60  public class MapView extends JPanel {
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          /**          /**
# Line 80  public class MapView extends JPanel { Line 80  public class MapView extends JPanel {
80                                  5, 2, 5)));                                  5, 2, 5)));
81                  this.add(statusBar, BorderLayout.SOUTH);                  this.add(statusBar, BorderLayout.SOUTH);
82    
83                  splitPane.setDividerLocation(0.4);                  splitPane.setDividerLocation(-1);
84                  splitPane.setDividerSize(5);                  splitPane.setDividerSize(5);
85                    
86                    splitPane.setResizeWeight(0.0);
87    
88                  splitPane.add(getSidePane());                  splitPane.add(getSidePane());
89    
# Line 93  public class MapView extends JPanel { Line 95  public class MapView extends JPanel {
95                  newRight.add(getToolBar(), BorderLayout.NORTH);                  newRight.add(getToolBar(), BorderLayout.NORTH);
96                  newRight.add(getGeoMapPane(), BorderLayout.CENTER);                  newRight.add(getGeoMapPane(), BorderLayout.CENTER);
97                  splitPane.add(newRight);                  splitPane.add(newRight);
98                    
99                    
100    
101                  this.add(splitPane, BorderLayout.CENTER);                  this.add(splitPane, BorderLayout.CENTER);
102          }          }

Legend:
Removed from v.48  
changed lines
  Added in v.148

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26