Changeset 5034 in josm


Ignore:
Timestamp:
Mar 3, 2012 11:19:59 AM (15 months ago)
Author:
jttt
Message:

short circuit logic should be used

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/MapFrame.java

    r4932 r5034  
    101101    public SelectionListDialog selectionListDialog; 
    102102    public PropertiesDialog propertiesDialog; 
    103      
     103 
    104104    /** 
    105105     * The panel list of all toggle dialog icons. To add new toggle dialog actions, use addToggleDialog 
     
    110110 
    111111    public final ButtonGroup toolGroup = new ButtonGroup(); 
    112      
     112 
    113113    private List<IconToggleButton> allDialogButtons = new ArrayList<IconToggleButton>(); 
    114114    private List<IconToggleButton> allMapModeButtons = new ArrayList<IconToggleButton>(); 
    115      
     115 
    116116    private final ListAllButtonsAction listAllDialogsAction = new ListAllButtonsAction(allDialogButtons); 
    117117    private final ListAllButtonsAction listAllMapModesAction = new ListAllButtonsAction(allMapModeButtons); 
     
    361361        listAllMapModesButton.setFont(listAllMapModesButton.getFont().deriveFont(Font.PLAIN)); 
    362362        jb.add(listAllMapModesButton); 
    363          
     363 
    364364        if(Main.pref.getBoolean("sidetoolbar.togglevisible", true)) { 
    365365            jb.addSeparator(new Dimension(0,18)); 
     
    414414        private JButton button; 
    415415        private Collection<? extends HideableButton> buttons; 
    416          
    417                  
     416 
     417 
    418418        public ListAllButtonsAction(Collection<? extends HideableButton> buttons) { 
    419419            this.buttons = buttons; 
     
    459459        toolBarToggle.repaint(); 
    460460        for (IconToggleButton b : allMapModeButtons) { 
    461              b.applyButtonHiddenPreferences(); 
     461            b.applyButtonHiddenPreferences(); 
    462462        } 
    463463        toolBarActions.repaint(); 
    464464    } 
    465      
     465 
    466466    /** 
    467467     * Replies the instance of a toggle dialog of type <code>type</code> managed by this 
     
    540540        // invalidate repaint cache 
    541541        Main.map.mapView.preferenceChanged(null); 
    542          
    543         // After all listeners notice new layer, some buttons will be disabled/enabled  
     542 
     543        // After all listeners notice new layer, some buttons will be disabled/enabled 
    544544        // and possibly need to be hidden/shown. 
    545545        SwingUtilities.invokeLater(new Runnable() { 
     
    549549        }); 
    550550    } 
    551      
     551 
    552552 
    553553    private MapMode getLastMapMode(Layer newLayer) { 
     
    556556            // if no action is selected - try to select default action 
    557557            Action defaultMode = getDefaultButtonAction(); 
    558             if (defaultMode instanceof MapMode & ((MapMode)defaultMode).layerIsSupported(newLayer)) { 
     558            if (defaultMode instanceof MapMode && ((MapMode)defaultMode).layerIsSupported(newLayer)) { 
    559559                mode = (MapMode) defaultMode; 
    560560            } 
Note: See TracChangeset for help on using the changeset viewer.