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

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

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

revision 414 by alfonx, Thu Sep 24 13:23:08 2009 UTC revision 417 by alfonx, Fri Sep 25 16:34:10 2009 UTC
# Line 30  Line 30 
30  package skrueger.geotools;  package skrueger.geotools;
31    
32  import java.awt.Color;  import java.awt.Color;
 import java.awt.Dimension;  
33  import java.awt.Graphics;  import java.awt.Graphics;
34  import java.awt.event.ActionEvent;  import java.awt.event.ActionEvent;
35  import java.awt.event.ActionListener;  import java.awt.event.ActionListener;
# Line 198  public class MapPaneToolBar extends JToo Line 197  public class MapPaneToolBar extends JToo
197           */           */
198          public MapPaneToolBar(JMapPane mapPane) {          public MapPaneToolBar(JMapPane mapPane) {
199                  super("Control the map", JToolBar.HORIZONTAL);                  super("Control the map", JToolBar.HORIZONTAL);
200                    
201                    // I want to see nothing on the background
202                    setOpaque(false);
203                    setBorder(null);
204                    
205                  this.toolButtonGroup = new ButtonGroup();                  this.toolButtonGroup = new ButtonGroup();
206                                    
207                  // Create a Listener to listen to the zooms on the JMapPane                  // Create a Listener to listen to the zooms on the JMapPane
# Line 272  public class MapPaneToolBar extends JToo Line 276  public class MapPaneToolBar extends JToo
276           * puts all tool buttons and all actions buttons to the tool bar.           * puts all tool buttons and all actions buttons to the tool bar.
277           */           */
278          protected void init() {          protected void init() {
279                    
280                  initToolsAndActions();                  initToolsAndActions();
281    
282                  addSeparator(SEPERATOR0, new JToolBar.Separator());                  addSeparator(SEPERATOR0, new JToolBar.Separator());
# Line 321  public class MapPaneToolBar extends JToo Line 326  public class MapPaneToolBar extends JToo
326                  setSelectedTool(selectedTool);                  setSelectedTool(selectedTool);
327    
328          }          }
329            
330            @Override
331            public void paint(Graphics g) {
332                    super.paint(g);
333            }
334    
335          /**          /**
336           * Clears the GUI of all components and adds all tool and action buttons to           * Clears the GUI of all components and adds all tool and action buttons to
337           * the tool bar.           * the tool bar.
338           */           */
339          public void initToolBar() {          public void initToolBar() {
340                  setAlignmentY(1f);  //              setOpaque(true);
341    //              
342    //              setAlignmentY(1f);
343    //              setAlignmentX(0.5f);
344                  removeAll();                  removeAll();
345                  // Separator to the left of the tool actions to start                  
346                  // the tool buttons with the map (not with the coordinate grid)  //              // Separator to the left of the tool actions to start
347                  Dimension dimension = new Dimension(49, 10);  //              // the tool buttons with the map (not with the coordinate grid)
348                  addSeparator(dimension);  //              Dimension dimension = new Dimension(49, 10);
349    //              addSeparator(dimension);
350                    
351                    
352                  // Tool buttons                  // Tool buttons
353                  for (Integer bKey : toolAndActionButtons.keySet()) {                  for (Integer bKey : toolAndActionButtons.keySet()) {
354                                                    

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

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26