/[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 162 by alfonx, Mon Jun 22 21:05:20 2009 UTC revision 164 by alfonx, Tue Jun 23 16:06:23 2009 UTC
# Line 24  import schmitzm.geotools.styling.ColorMa Line 24  import schmitzm.geotools.styling.ColorMa
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;
# Line 73  public class MapView extends JPanel { Line 73  public class MapView extends JPanel {
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());
# Line 87  public class MapView extends JPanel { Line 91  public class MapView extends JPanel {
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
# Line 100  public class MapView extends JPanel { Line 108  public class MapView extends JPanel {
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          /**          /**
# Line 117  public class MapView extends JPanel { Line 125  public class MapView extends JPanel {
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    

Legend:
Removed from v.162  
changed lines
  Added in v.164

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26