/[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

trunk/src/skrueger/geotools/MapView.java revision 261 by mojays, Fri Jul 31 17:05:18 2009 UTC branches/1.0-gt2-2.6/src/skrueger/geotools/MapView.java revision 417 by alfonx, Fri Sep 25 16:34:10 2009 UTC
# Line 37  import javax.swing.JComponent; Line 37  import javax.swing.JComponent;
37  import javax.swing.JPanel;  import javax.swing.JPanel;
38  import javax.swing.JSplitPane;  import javax.swing.JSplitPane;
39    
40    import net.miginfocom.swing.MigLayout;
41    
42  import org.apache.log4j.Logger;  import org.apache.log4j.Logger;
43    
44  import schmitzm.geotools.gui.GeoMapPane;  import schmitzm.geotools.gui.GeoMapPane;
# Line 77  public class MapView extends JPanel { Line 79  public class MapView extends JPanel {
79                  // Needed because variables for the overwritten methods                  // Needed because variables for the overwritten methods
80                  // are not yet set.                  // are not yet set.
81                  getGeoMapPane().getMapPane().setWaitCursorComponent(parentGui);                  getGeoMapPane().getMapPane().setWaitCursorComponent(parentGui);
                 if (toolBar == null)  
                         toolBar = new MapPaneToolBar(getMapPane());  
82                  jToolBar = toolBar;                  jToolBar = toolBar;
83          }          }
84    
# Line 125  public class MapView extends JPanel { Line 125  public class MapView extends JPanel {
125                   * 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
126                   * a gmp                   * a gmp
127                   */                   */
128                  JPanel newRight = new JPanel(new BorderLayout());                  JPanel newRight = new JPanel(new MigLayout("center, wrap 1","[grow]","[][grow]"));
129                  newRight.add(getToolBar(), BorderLayout.NORTH);                  newRight.add(getToolBar());
130                  newRight.add(getGeoMapPane(), BorderLayout.CENTER);                  newRight.add(getGeoMapPane(),"growx, growy");
131                  getSplitPane().add(newRight);                  getSplitPane().add(newRight);
132    
133                  this.add(getSplitPane(), BorderLayout.CENTER);                  this.add(getSplitPane(), BorderLayout.CENTER);
# Line 136  public class MapView extends JPanel { Line 136  public class MapView extends JPanel {
136          /**          /**
137           * Returns the tool bar which controls the active mouse actions on the map.           * Returns the tool bar which controls the active mouse actions on the map.
138           *           *
139           * @return           * @return never <code>null</code>, will rather create a default
140           */           */
141          public MapPaneToolBar getToolBar() {          public MapPaneToolBar getToolBar() {
142                    if (jToolBar == null) {
143                            jToolBar = new MapPaneToolBar(getMapPane());
144                    }
145                  return jToolBar;                  return jToolBar;
146          }          }
147    

Legend:
Removed from v.261  
changed lines
  Added in v.417

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26