/[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 654 by alfonx, Mon Feb 1 18:13:14 2010 UTC revision 655 by alfonx, Wed Feb 3 11:47:44 2010 UTC
# Line 641  public class MapPaneToolBar extends JToo Line 641  public class MapPaneToolBar extends JToo
641           *         {@linkplain #getToolButton(int) tool button}           *         {@linkplain #getToolButton(int) tool button}
642           */           */
643          public AbstractButton getButton(int id) {          public AbstractButton getButton(int id) {
644                    
645                    //ACHUTNG: Das ist ein SK QUICK FIX! TODO
646                    if (!(toolAndActionButtons.get(id) instanceof AbstractButton)) return null;
647                    
648                  AbstractButton button = (AbstractButton) toolAndActionButtons.get(id);                  AbstractButton button = (AbstractButton) toolAndActionButtons.get(id);
649                  if (button == null)                  if (button == null)
650                          LOGGER.warn("Unknown tool or action ID: " + id);                          LOGGER.warn("Unknown tool or action ID: " + id);
# Line 782  public class MapPaneToolBar extends JToo Line 786  public class MapPaneToolBar extends JToo
786           *            is {@code false}           *            is {@code false}
787           */           */
788          public void setAllToolsEnabled(boolean enabled, boolean hideOnDisable) {          public void setAllToolsEnabled(boolean enabled, boolean hideOnDisable) {
789                  for (int tool : toolAndActionButtons.keySet())                  for (int id : toolAndActionButtons.keySet()) {
790                          setButtonEnabled(tool, enabled, hideOnDisable);                          if (toolAndActionButtons.get(id) instanceof JToggleButton) {
791                            setButtonEnabled(id, enabled, hideOnDisable);
792                            }
793                    }
794          }          }
795            
796          /**          /**
797           * Sets the activation for all actions.           * Sets the activation for all actions.
798           *           *

Legend:
Removed from v.654  
changed lines
  Added in v.655

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26