Changeset 6070 in josm


Ignore:
Timestamp:
2013-07-17T00:01:49+02:00 (6 years ago)
Author:
stoecker
Message:

see #8853 remove tabs, trailing spaces, windows line ends, strange characters

Location:
trunk/src/org/openstreetmap/josm
Files:
200 edited

Legend:

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

    r5957 r6070  
    112112        return true;
    113113    }
    114    
     114
    115115    /**
    116116     * Global parent component for all dialogs and message boxes
    117117     */
    118118    public static Component parent;
    119    
     119
    120120    /**
    121121     * Global application.
    122122     */
    123123    public static Main main;
    124    
     124
    125125    /**
    126126     * Command-line arguments used to run the application.
    127127     */
    128128    public static String[] commandLineArgs;
    129    
     129
    130130    /**
    131131     * The worker thread slave. This is for executing all long and intensive
     
    134134     */
    135135    public final static ExecutorService worker = new ProgressMonitorExecutor();
    136    
     136
    137137    /**
    138138     * Global application preferences
     
    144144     */
    145145    public static final PrimitiveDeepCopy pasteBuffer = new PrimitiveDeepCopy();
    146    
     146
    147147    /**
    148148     * The layer source from which {@link Main#pasteBuffer} data comes from.
     
    154154     */
    155155    public static MapFrame map;
    156    
     156
    157157    /**
    158158     * Set to <code>true</code>, when in applet mode
     
    543543        contentPanePrivate.getActionMap().remove(action);
    544544    }
    545    
     545
    546546    /**
    547547     * Replies the registered action for the given shortcut
     
    565565
    566566    /**
    567      * Global panel. 
     567     * Global panel.
    568568     */
    569569    public static final JPanel panel = new JPanel(new BorderLayout());
     
    704704    /**
    705705     * Asks user to perform "save layer" operations (save .osm on disk and/or upload osm data to server) before osm layers deletion.
    706      * 
     706     *
    707707     * @param selectedLayers The layers to check. Only instances of {@link OsmDataLayer} are considered.
    708708     * @param exit {@code true} if JOSM is exiting, {@code false} otherwise.
     
    897897        }
    898898    }
    899    
     899
    900900    protected static void addListener() {
    901901        parent.addComponentListener(new WindowPositionSizeListener());
     
    10461046    /**
    10471047     * Listener for window switch events.
    1048      * 
     1048     *
    10491049     * These are events, when the user activates a window of another application
    10501050     * or comes back to JOSM. Window switches from one JOSM window to another
  • trunk/src/org/openstreetmap/josm/gui/DefaultNameFormatter.java

    r5847 r6070  
    392392                return comp;
    393393
    394             if (r1.getUniqueId() > r2.getUniqueId()) 
     394            if (r1.getUniqueId() > r2.getUniqueId())
    395395                return 1;
    396396            else if (r1.getUniqueId() < r2.getUniqueId())
  • trunk/src/org/openstreetmap/josm/gui/ExceptionDialogUtil.java

    r5584 r6070  
    247247        return Main.pref.get("osm-server.auth-method", "basic").equals("oauth");
    248248    }
    249    
     249
    250250    /**
    251251     * Explains a {@link OsmApiException} which was thrown because the authentication at
     
    278278     */
    279279    public static void explainAuthorizationFailed(OsmApiException e) {
    280        
     280
    281281        Matcher m;
    282282        String msg;
    283283        String url = e.getAccessedUrl();
    284284        Pattern p = Pattern.compile("http://.*/api/0.6/(node|way|relation)/(\\d+)/(\\d+)");
    285        
     285
    286286        // Special case for individual access to redacted versions
    287287        // See http://wiki.openstreetmap.org/wiki/Open_Database_License/Changes_in_the_API
     
    298298            msg = ExceptionUtil.explainFailedAuthorisation(e);
    299299        }
    300        
     300
    301301        HelpAwareOptionPane.showOptionDialog(
    302302                Main.parent,
  • trunk/src/org/openstreetmap/josm/gui/ExtendedDialog.java

    r5909 r6070  
    5151 *
    5252 * Note: The button indices are counted from 1 and upwards.
    53  * So for {@link #getValue()}, {@link #setDefaultButton(int)} and 
     53 * So for {@link #getValue()}, {@link #setDefaultButton(int)} and
    5454 * {@link #setCancelButton} the first button has index 1.
    55  * 
     55 *
    5656 * Simple example:
    5757 * <pre>
     
    274274    /**
    275275     * Retrieve the user choice after the dialog has been closed.
    276      * 
     276     *
    277277     * @return <ul> <li>The selected button. The count starts with 1.</li>
    278278     *              <li>A return value of {@link #DialogClosedOtherwise} means the dialog has been closed otherwise.</li>
     
    452452        }
    453453    }
    454    
     454
    455455    protected final WindowGeometry initWindowGeometry() {
    456456        return new WindowGeometry(rememberSizePref, defaultWindowGeometry);
  • trunk/src/org/openstreetmap/josm/gui/GettingStarted.java

    r5889 r6070  
    4040
    4141    public static class LinkGeneral extends JosmEditorPane implements HyperlinkListener {
    42        
     42
    4343        /**
    4444         * Constructs a new {@code LinkGeneral} with the given HTML text
  • trunk/src/org/openstreetmap/josm/gui/HelpAwareOptionPane.java

    r6051 r6070  
    4242        public final String helpTopic;
    4343        private boolean enabled;
    44        
     44
    4545        private final Collection<ChangeListener> listeners = new HashSet<ChangeListener>();
    46        
     46
    4747        /**
    4848         * Constructs a new {@code ButtonSpec}.
     
    7272            setEnabled(enabled);
    7373        }
    74        
     74
    7575        /**
    7676         * Determines if this button spec is enabled
     
    8181            return enabled;
    8282        }
    83        
     83
    8484        /**
    8585         * Enables or disables this button spec, depending on the value of the parameter {@code b}.
     
    9696            }
    9797        }
    98        
     98
    9999        private final boolean addChangeListener(ChangeListener listener) {
    100100            return listener != null ? listeners.add(listener) : false;
  • trunk/src/org/openstreetmap/josm/gui/JosmUserIdentityManager.java

    r5909 r6070  
    183183        return userInfo;
    184184    }
    185    
     185
    186186    /**
    187187     * Initializes the user identity manager from Basic Authentication values in the {@link org.openstreetmap.josm.data.Preferences}
     
    251251            }
    252252            return;
    253            
     253
    254254        } else if (evt.getKey().equals("osm-server.url")) {
    255255            if (!(evt.getNewValue() instanceof StringSetting)) return;
     
    260260                setPartiallyIdentified(getUserName());
    261261            }
    262            
     262
    263263        } else if (evt.getKey().equals("oauth.access-token.key")) {
    264264            accessTokenKeyChanged = true;
    265            
     265
    266266        } else if (evt.getKey().equals("oauth.access-token.secret")) {
    267267            accessTokenSecretChanged = true;
    268268        }
    269        
     269
    270270        if (accessTokenKeyChanged && accessTokenSecretChanged) {
    271271            accessTokenKeyChanged = false;
  • trunk/src/org/openstreetmap/josm/gui/MainApplication.java

    r5868 r6070  
    265265            System.exit(1);
    266266        }
    267        
     267
    268268        Main.commandLineArgs = argArray;
    269269
  • trunk/src/org/openstreetmap/josm/gui/MainMenu.java

    r5965 r6070  
    578578            showAudioMenu(true);
    579579        }
    580        
     580
    581581        Main.pref.addPreferenceChangeListener(new PreferenceChangedListener() {
    582582            @Override
     
    600600        new PresetsMenuEnabler(presetsMenu).refreshEnabled();
    601601    }
    602    
     602
    603603    protected void showAudioMenu(boolean showMenu) {
    604604        if (showMenu && audioMenu == null) {
  • trunk/src/org/openstreetmap/josm/gui/MapFrame.java

    r6056 r6070  
    145145
    146146    private final boolean unregisterTab;
    147    
     147
    148148    /**
    149149     * Default width of the toggle dialog area.
  • trunk/src/org/openstreetmap/josm/gui/MapStatus.java

    r6056 r6070  
    8383    final MapView mv;
    8484    final Collector collector;
    85    
     85
    8686    public class BackgroundProgressMonitor implements ProgressMonitorDialog {
    8787
     
    145145    final JProgressBar progressBar = new JProgressBar();
    146146    public final BackgroundProgressMonitor progressMonitor = new BackgroundProgressMonitor();
    147    
     147
    148148    private final MouseListener jumpToOnLeftClick;
    149149    private final SoMChangeListener somListener;
    150    
     150
    151151    private double distValue; // Distance value displayed in distText, stored if refresh needed after a change of system of measurement
    152152
     
    456456            EventQueue.invokeLater(new Runnable(){
    457457               public void run() {
    458                     staticPopup.hide(); 
     458                    staticPopup.hide();
    459459                }});
    460460        }
     
    531531            }
    532532            text.append(name);
    533            
     533
    534534            boolean idShown = Main.pref.getBoolean("osm-primitives.showid");
    535535            // fix #7557 - do not show ID twice
    536            
     536
    537537            if (!osm.isNew() && !idShown) {
    538538                text.append(" [id="+osm.getId()+"]");
     
    611611
    612612    private AWTEventListener awtListener = new AWTEventListener() {
    613          @Override 
     613         @Override
    614614         public void eventDispatched(AWTEvent event) {
    615615            if (event instanceof InputEvent &&
     
    700700                    @Override
    701701                    public void popupMenuWillBecomeVisible(PopupMenuEvent e) {
    702                         Component invoker = ((JPopupMenu)e.getSource()).getInvoker(); 
     702                        Component invoker = ((JPopupMenu)e.getSource()).getInvoker();
    703703                        jumpButton.setVisible(invoker == latText || invoker == lonText);
    704704                        doNotHide.setSelected(Main.pref.getBoolean("statusbar.always-visible", true));
     
    710710            }
    711711        });
    712        
     712
    713713        // also show Jump To dialog on mouse click (except context menu)
    714714        jumpToOnLeftClick = new MouseAdapter() {
     
    758758        add(angleText, GBC.std().insets(3,0,0,0));
    759759        add(distText, GBC.std().insets(3,0,0,0));
    760        
     760
    761761        distText.addMouseListener(new MouseAdapter() {
    762762            private final List<String> soms = new ArrayList<String>(new TreeSet<String>(NavigatableComponent.SYSTEMS_OF_MEASUREMENT.keySet()));
    763            
     763
    764764            @Override
    765765            public void mouseClicked(MouseEvent e) {
     
    769769            }
    770770        });
    771        
     771
    772772        NavigatableComponent.addSoMChangeListener(somListener = new SoMChangeListener() {
    773773            @Override public void systemOfMeasurementChanged(String oldSoM, String newSoM) {
     
    775775            }
    776776        });
    777        
     777
    778778        latText.addMouseListener(jumpToOnLeftClick);
    779779        lonText.addMouseListener(jumpToOnLeftClick);
    780        
     780
    781781        helpText.setEditable(false);
    782782        add(nameText, GBC.std().insets(3,0,0,0));
     
    803803        thread.start();
    804804    }
    805    
     805
    806806    public JPanel getAnglePanel() {
    807807        return angleText;
     
    892892    public void destroy() {
    893893        NavigatableComponent.removeSoMChangeListener(somListener);
    894        
     894
    895895        // MapFrame gets destroyed when the last layer is removed, but the status line background
    896896        // thread that collects the information doesn't get destroyed automatically.
  • trunk/src/org/openstreetmap/josm/gui/MapView.java

    r6052 r6070  
    8080     */
    8181    public interface LayerChangeListener {
    82        
     82
    8383        /**
    8484         * Notifies this listener that the active layer has changed.
     
    8787         */
    8888        void activeLayerChange(Layer oldLayer, Layer newLayer);
    89        
     89
    9090        /**
    9191         * Notifies this listener that a layer has been added.
     
    9393         */
    9494        void layerAdded(Layer newLayer);
    95        
     95
    9696        /**
    9797         * Notifies this listener that a layer has been removed.
     
    272272            @Override public void mouseMoved(MouseEvent e) {
    273273                lastMEvent = e;
    274             }           
     274            }
    275275            @Override
    276276            public void mousePressed(MouseEvent me) {
     
    288288    private Dimension oldSize = null;
    289289    private Point oldLoc = null;
    290    
     290
    291291    /*
    292292     * Call this method to keep map position on screen during next repaint
     
    296296        oldLoc  = getLocationOnScreen();
    297297    }
    298    
     298
    299299    /**
    300300     * Adds a GPX layer. A GPX layer is added below the lowest data layer.
     
    432432            setActiveLayer(determineNextActiveLayer(layersList), false);
    433433        }
    434        
     434
    435435        if (layer instanceof OsmDataLayer) {
    436436            ((OsmDataLayer)layer).removeLayerPropertyChangeListener(this);
     
    552552            zoomTo(newCenter);
    553553        }
    554        
     554
    555555        List<Layer> visibleLayers = getVisibleLayersInZOrder();
    556556
     
    565565
    566566        boolean canUseBuffer;
    567        
     567
    568568        synchronized (this) {
    569569            canUseBuffer = !paintPreferencesChanged;
  • trunk/src/org/openstreetmap/josm/gui/MenuScroller.java

    r5927 r6070  
    482482        }
    483483    }
    484    
     484
    485485    private class MenuScrollListener implements PopupMenuListener {
    486486
     
    597597        }
    598598    }
    599    
     599
    600600    private class MouseScrollListener implements MouseWheelListener {
    601601        public void mouseWheelMoved(MouseWheelEvent mwe) {
  • trunk/src/org/openstreetmap/josm/gui/NameFormatterHook.java

    r5903 r6070  
    1515     */
    1616    public String checkRelationTypeName(IRelation relation, String defaultName);
    17    
     17
    1818    /**
    1919     * Check the node format. Return the corrected format if needed, null otherwise.
     
    2323     */
    2424    public String checkFormat(INode node, String defaultName);
    25    
     25
    2626    /**
    2727     * Check the way format. Return the corrected format if needed, null otherwise.
  • trunk/src/org/openstreetmap/josm/gui/NavigatableComponent.java

    r6065 r6070  
    6464        void zoomChanged();
    6565    }
    66    
     66
    6767    /**
    6868     * Interface to notify listeners of the change of the system of measurement.
     
    7777        void systemOfMeasurementChanged(String oldSoM, String newSoM);
    7878    }
    79    
     79
    8080    /**
    8181     * Simple data class that keeps map center and scale in one object.
     
    150150    /**
    151151     * Removes a SoM change listener
    152      * 
     152     *
    153153     * @param listener the listener. Ignored if null or already absent
    154154     * @since 6056
     
    160160    /**
    161161     * Adds a SoM change listener
    162      * 
     162     *
    163163     * @param listener the listener. Ignored if null or already registered.
    164164     * @since 6056
     
    169169        }
    170170    }
    171    
     171
    172172    protected static void fireSoMChanged(String oldSoM, String newSoM) {
    173173        for (SoMChangeListener l : somChangeListeners) {
     
    190190    private Rectangle paintRect = null;
    191191    private Polygon paintPoly = null;
    192    
     192
    193193    public NavigatableComponent() {
    194194        setLayout(null);
     
    728728        return getNearestNode(p, predicate, use_selected, null);
    729729    }
    730    
     730
    731731    /**
    732732     * The *result* depends on the current map selection state IF use_selected is true
     
    734734     * If more than one node within node.snap-distance pixels is found,
    735735     * the nearest node selected is returned IF use_selected is true.
    736      * 
     736     *
    737737     * If there are no selected nodes near that point, the node that is related to some of the preferredRefs
    738738     *
     
    755755    public final Node getNearestNode(Point p, Predicate<OsmPrimitive> predicate,
    756756            boolean use_selected, Collection<OsmPrimitive> preferredRefs) {
    757        
     757
    758758        Map<Double, List<Node>> nlists = getNearestNodesImpl(p, predicate);
    759759        if (nlists.isEmpty()) return null;
    760        
     760
    761761        if (preferredRefs != null && preferredRefs.isEmpty()) preferredRefs = null;
    762762        Node ntsel = null, ntnew = null, ntref = null;
     
    793793
    794794        // take nearest selected, nearest new or true nearest node to p, in that order
    795         if (ntsel != null && useNtsel) 
     795        if (ntsel != null && useNtsel)
    796796            return ntsel;
    797         if (ntref != null) 
     797        if (ntref != null)
    798798            return ntref;
    799         if (ntnew != null) 
     799        if (ntnew != null)
    800800            return ntnew;
    801801        return nlists.values().iterator().next().get(0);
     
    956956        return (ntsel != null && use_selected) ? ntsel : wayseg;
    957957    }
    958    
     958
    959959     /**
    960960     * The *result* depends on the current map selection state IF use_selected is true.
     
    974974        WaySegment wayseg = null, ntsel = null, ntref = null;
    975975        if (preferredRefs != null && preferredRefs.isEmpty()) preferredRefs = null;
    976        
     976
    977977        searchLoop: for (List<WaySegment> wslist : getNearestWaySegmentsImpl(p, predicate).values()) {
    978978            for (WaySegment ws : wslist) {
     
    10031003            }
    10041004        }
    1005         if (ntsel != null && use_selected) 
     1005        if (ntsel != null && use_selected)
    10061006            return ntsel;
    10071007        if (ntref != null)
     
    11801180     */
    11811181    public final OsmPrimitive getNearestNodeOrWay(Point p, Predicate<OsmPrimitive> predicate, boolean use_selected) {
    1182         Collection<OsmPrimitive> sel = 
     1182        Collection<OsmPrimitive> sel =
    11831183                use_selected ? getCurrentDataSet().getSelected() : null;
    11841184        OsmPrimitive osm = getNearestNode(p, predicate, use_selected, sel);
     
    12951295            }
    12961296        }
    1297        
     1297
    12981298        // add nearby nodes
    12991299        for (List<Node> nlist : getNearestNodesImpl(p, predicate).values()) {
    13001300            nearestList.addAll(nlist);
    13011301        }
    1302        
     1302
    13031303        // add parent relations of nearby nodes and ways
    13041304        Set<OsmPrimitive> parentRelations = new HashSet<OsmPrimitive>();
     
    13111311        }
    13121312        nearestList.addAll(parentRelations);
    1313        
     1313
    13141314        if (ignore != null) {
    13151315            nearestList.removeAll(ignore);
     
    13921392     */
    13931393    public static class SystemOfMeasurement {
    1394        
     1394
    13951395        /** First value, in meters, used to translate unit according to above formula. */
    13961396        public final double aValue;
     
    14041404         *  @since 5870 */
    14051405        public final double areaCustomValue;
    1406         /** Specific optional area unit. Set to {@code null} if not used. 
     1406        /** Specific optional area unit. Set to {@code null} if not used.
    14071407         *  @since 5870 */
    14081408        public final String areaCustomName;
     
    14131413         * If a quantity x is given in m (x_m) and in unit a (x_a) then it translates as
    14141414         * x_a == x_m / aValue
    1415          * 
     1415         *
    14161416         * @param aValue First value, in meters, used to translate unit according to above formula.
    14171417         * @param aName First unit used to format text.
     
    14221422            this(aValue, aName, bValue, bName, -1, null);
    14231423        }
    1424        
     1424
    14251425        /**
    14261426         * System of measurement. Currently covers only length (and area) units.
     
    14281428         * If a quantity x is given in m (x_m) and in unit a (x_a) then it translates as
    14291429         * x_a == x_m / aValue
    1430          * 
     1430         *
    14311431         * @param aValue First value, in meters, used to translate unit according to above formula.
    14321432         * @param aName First unit used to format text.
    14331433         * @param bValue Second value, in meters, used to translate unit according to above formula.
    14341434         * @param bName Second unit used to format text.
    1435          * @param areaCustomValue Specific optional area value, in squared meters, between {@code aValue*aValue} and {@code bValue*bValue}. 
     1435         * @param areaCustomValue Specific optional area value, in squared meters, between {@code aValue*aValue} and {@code bValue*bValue}.
    14361436         *                        Set to {@code -1} if not used.
    14371437         * @param areaCustomName Specific optional area unit. Set to {@code null} if not used.
    1438          * 
     1438         *
    14391439         * @since 5870
    14401440         */
     
    14821482                return formatText(a, aName+"\u00b2");
    14831483        }
    1484        
     1484
    14851485        private static String formatText(double v, String unit) {
    14861486            return String.format(Locale.US, "%." + (v<9.999999 ? 2 : 1) + "f %s", v, unit);
     
    14931493     */
    14941494    public static final SystemOfMeasurement METRIC_SOM = new SystemOfMeasurement(1, "m", 1000, "km", 10000, "ha");
    1495    
     1495
    14961496    /**
    14971497     * Chinese system.
     
    14991499     */
    15001500    public static final SystemOfMeasurement CHINESE_SOM = new SystemOfMeasurement(1.0/3.0, "\u5e02\u5c3a" /* chi */, 500, "\u5e02\u91cc" /* li */);
    1501    
     1501
    15021502    /**
    15031503     * Imperial system (British Commonwealth and former British Empire).
     
    15051505     */
    15061506    public static final SystemOfMeasurement IMPERIAL_SOM = new SystemOfMeasurement(0.3048, "ft", 1609.344, "mi", 4046.86, "ac");
    1507    
     1507
    15081508    /**
    15091509     * Nautical mile system (navigation, polar exploration).
     
    15791579        Cursors = c;
    15801580    }
    1581    
     1581
    15821582    @Override
    15831583    public void paint(Graphics g) {
     
    16131613        }
    16141614    }
    1615    
     1615
    16161616    /**
    16171617     * Requests to paint the given {@code Polygon} as a polyline (unclosed polygon).
     
    16281628        }
    16291629    }
    1630    
     1630
    16311631    /**
    16321632     * Requests to clear the rectangled previously drawn.
  • trunk/src/org/openstreetmap/josm/gui/PleaseWaitDialog.java

    r5895 r6070  
    8181    /**
    8282     * Constructs a new {@code PleaseWaitDialog}.
    83      * @param parent the {@code Component} from which the dialog is displayed. Can be {@code null}. 
     83     * @param parent the {@code Component} from which the dialog is displayed. Can be {@code null}.
    8484     */
    8585    public PleaseWaitDialog(Component parent) {
  • trunk/src/org/openstreetmap/josm/gui/SelectionManager.java

    r5764 r6070  
    221221        nc.requestPaintRect(getSelectionRectangle());
    222222    }
    223    
     223
    224224    private void paintLasso() {
    225225        if (mousePos == null || mousePosStart == null || mousePos == mousePosStart) {
  • trunk/src/org/openstreetmap/josm/gui/ShowHideButtonListener.java

    r4609 r6070  
    44/**
    55 * When some component (ToggleDialog, for example) is linked to button
    6  * and needs information about button showing/hiding events, this interface 
     6 * and needs information about button showing/hiding events, this interface
    77 * is used, setting the listener should be implemented by @class HideableButton
    88 */
  • trunk/src/org/openstreetmap/josm/gui/SideButton.java

    r5926 r6070  
    2626public class SideButton extends JButton implements Destroyable {
    2727    private final static int iconHeight = 20;
    28    
     28
    2929    private PropertyChangeListener propertyChangeListener;
    3030
  • trunk/src/org/openstreetmap/josm/gui/actionsupport/AlignImageryPanel.java

    r5927 r6070  
    2525/**
    2626 * The panel to nag a user ONCE that he/she has to align imagery.
    27  * 
     27 *
    2828 * @author zverik
    2929 */
     
    3333    public AlignImageryPanel(boolean oneLine) {
    3434        super();
    35        
     35
    3636        Font font = getFont().deriveFont(Font.PLAIN, 14.0f);
    3737        JLabel nagLabel = new JLabel(tr("Aerial imagery might be misaligned. Please check its offset using GPS tracks!"));
     
    3939        nagLabel.setFont(font);
    4040        detailsList.setFont(font);
    41        
     41
    4242        JButton closeButton = new JButton(ImageProvider.get("misc", "black_x"));
    4343        closeButton.setContentAreaFilled(false);
     
    5454            }
    5555        });
    56        
     56
    5757        setLayout(new GridBagLayout());
    5858        if (!oneLine) { // tune for small screens
     
    7979        }
    8080    }
    81    
     81
    8282}
  • trunk/src/org/openstreetmap/josm/gui/bbox/BBoxChooser.java

    r5816 r6070  
    77 * A BBoxChooser is a component which provides a UI for choosing a
    88 * bounding box.
    9  * 
     9 *
    1010 */
    1111public interface BBoxChooser {
     
    2020     * Sets the current bounding box in this BboxChooser. If {@code bbox}
    2121     * is null the current bbox in this BBoxChooser is removed.
    22      * 
     22     *
    2323     * @param bbox the bounding box
    2424     */
     
    2929     * Replies null, if currently there isn't a bbox choosen in this
    3030     * BBoxChooser.
    31      * 
     31     *
    3232     * @return the currently selected bounding box
    3333     */
  • trunk/src/org/openstreetmap/josm/gui/bbox/SlippyMapControler.java

    r5925 r6070  
    5656    private SizeButton iSizeButton = null;
    5757    private SourceButton iSourceButton = null;
    58    
     58
    5959    private boolean isSelecting;
    6060
     
    7979        iSizeButton = sizeButton;
    8080        iSourceButton = sourceButton;
    81        
     81
    8282        isSelecting = false;
    8383
     
    158158                iStartSelectionPoint = null;
    159159                isSelecting = false;
    160                
     160
    161161            } else {
    162162                int sourceButton = iSourceButton.hit(e.getPoint());
  • trunk/src/org/openstreetmap/josm/gui/conflict/pair/ConflictResolver.java

    r5903 r6070  
    258258        selectFirstTabWithConflicts();
    259259    }
    260    
     260
    261261    public void selectFirstTabWithConflicts() {
    262262        for (int i = 0; i < tabbedPane.getTabCount(); i++) {
  • trunk/src/org/openstreetmap/josm/gui/conflict/pair/ListMergeModel.java

    r5903 r6070  
    8787    private boolean isFrozen = false;
    8888    private final ComparePairListModel comparePairListModel;
    89    
     89
    9090    private DataSet myDataset;
    9191    private Map<PrimitiveId, PrimitiveId> mergedMap;
     
    130130        return getMyPrimitiveById(entry);
    131131    }
    132    
     132
    133133    public final OsmPrimitive getMyPrimitiveById(PrimitiveId entry) {
    134134        OsmPrimitive result = myDataset.getPrimitiveById(entry);
     
    336336        fireModelDataChanged();
    337337    }
    338    
     338
    339339    protected final void initPopulate(OsmPrimitive my, OsmPrimitive their, Map<PrimitiveId, PrimitiveId> mergedMap) {
    340340        CheckParameterUtil.ensureParameterNotNull(my, "my");
  • trunk/src/org/openstreetmap/josm/gui/conflict/pair/ListMerger.java

    r5429 r6070  
    888888        );
    889889    }
    890    
     890
    891891    public void unlinkAsListener() {
    892892        myEntriesTable.unlinkAsListener();
     
    10311031        }
    10321032    }
    1033    
     1033
    10341034    protected final <P extends OsmPrimitive> OsmDataLayer findLayerFor(P primitive) {
    10351035        if (primitive != null) {
  • trunk/src/org/openstreetmap/josm/gui/conflict/pair/nodes/NodeListMerger.java

    r5335 r6070  
    6060        theirEntriesTable.setLayer(findLayerFor(theirWay));
    6161    }
    62    
     62
    6363    public void deletePrimitive(boolean deleted) {
    6464        if (deleted) {
  • trunk/src/org/openstreetmap/josm/gui/conflict/tags/CombinePrimitiveResolverDialog.java

    r5998 r6070  
    463463
    464464    /**
    465      * Replies the list of {@link Command commands} needed to resolve specified conflicts, 
     465     * Replies the list of {@link Command commands} needed to resolve specified conflicts,
    466466     * by displaying if necessary a {@link CombinePrimitiveResolverDialog} to the user.
    467467     * This dialog will allow the user to choose conflict resolution actions.
    468      * 
     468     *
    469469     * Non-expert users are informed first of the meaning of these operations, allowing them to cancel.
    470      * 
     470     *
    471471     * @param tagsOfPrimitives The tag collection of the primitives to be combined.
    472472     *                         Should generally be equal to {@code TagCollection.unionOfAllPrimitives(primitives)}
     
    480480            final Collection<? extends OsmPrimitive> primitives,
    481481            final Collection<? extends OsmPrimitive> targetPrimitives) throws UserCancelException {
    482        
     482
    483483        CheckParameterUtil.ensureParameterNotNull(tagsOfPrimitives, "tagsOfPrimitives");
    484484        CheckParameterUtil.ensureParameterNotNull(primitives, "primitives");
     
    511511        dialog.getRelationMemberConflictResolverModel().populate(parentRelations, primitives);
    512512        dialog.prepareDefaultDecisions();
    513        
     513
    514514        // Ensure a proper title is displayed instead of a previous target (fix #7925)
    515515        if (targetPrimitives.size() == 1) {
     
    555555                parentRelations.size(), parentRelations.size(), primitives.size(),
    556556                DefaultNameFormatter.getInstance().formatAsHtmlUnorderedList(parentRelations));
    557        
     557
    558558        if (!ConditionalOptionPaneUtil.showConfirmationDialog(
    559559                "combine_tags",
     
    596596                + "Do you want to continue?",
    597597                primitives.size(), conflicts);
    598        
     598
    599599        if (!ConditionalOptionPaneUtil.showConfirmationDialog(
    600600                "combine_tags",
  • trunk/src/org/openstreetmap/josm/gui/dialogs/ChangesetDialog.java

    r5958 r6070  
    8585    private CloseOpenChangesetsAction closeChangesetAction;
    8686    private LaunchChangesetManagerAction launchChangesetManagerAction;
    87    
     87
    8888    private ChangesetDialogPopup popupMenu;
    8989
     
    204204        launchChangesetManagerAction = new LaunchChangesetManagerAction();
    205205        cbInSelectionOnly.addItemListener(launchChangesetManagerAction);
    206        
     206
    207207        popupMenu = new ChangesetDialogPopup(lstInActiveDataLayer, lstInSelection);
    208208
     
    210210        lstInSelection.addMouseListener(popupMenuLauncher);
    211211        lstInActiveDataLayer.addMouseListener(popupMenuLauncher);
    212        
     212
    213213        createLayout(pnl, false, Arrays.asList(new SideButton[] {
    214214            new SideButton(selectObjectsAction, false),
  • trunk/src/org/openstreetmap/josm/gui/dialogs/CommandStackDialog.java

    r5958 r6070  
    7575    private SelectAction selectAction = new SelectAction();
    7676    private SelectAndZoomAction selectAndZoomAction = new SelectAndZoomAction();
    77    
     77
    7878    public CommandStackDialog(final MapFrame mapFrame) {
    7979        super(tr("Command Stack"), "commandstack", tr("Open a list of all commands (undo buffer)."),
     
    8989        undoTree.getSelectionModel().addTreeSelectionListener(undoSelectionListener);
    9090        InputMapUtils.unassignCtrlShiftUpDown(undoTree, JComponent.WHEN_FOCUSED);
    91        
     91
    9292        redoTree.addMouseListener(new MouseEventHandler());
    9393        redoTree.setRootVisible(false);
     
    124124            new SideButton(redoAction)
    125125        }));
    126        
     126
    127127        InputMapUtils.addEnterAction(undoTree, selectAndZoomAction);
    128128        InputMapUtils.addEnterAction(redoTree, selectAndZoomAction);
     
    303303        return node;
    304304    }
    305    
     305
    306306    /**
    307307     * Return primitives that are affected by some command
    308      * @param path GUI elements 
    309      * @return collection of affected primitives, onluy usable ones 
     308     * @param path GUI elements
     309     * @return collection of affected primitives, onluy usable ones
    310310     */
    311311    protected static FilteredCollection<OsmPrimitive> getAffectedPrimitives(TreePath path) {
     
    354354            Main.map.mapView.getEditLayer().data.setSelected( getAffectedPrimitives(path));
    355355        }
    356        
     356
    357357        @Override
    358358        public void updateEnabledState() {
     
    377377        }
    378378    }
    379    
     379
    380380    /**
    381381     * undo / redo switch to reduce duplicate code
     
    448448            super(new CommandStackPopup());
    449449        }
    450        
     450
    451451        @Override
    452452        public void mouseClicked(MouseEvent evt) {
     
    456456        }
    457457    }
    458    
     458
    459459    private class CommandStackPopup extends JPopupMenu {
    460460        public CommandStackPopup(){
  • trunk/src/org/openstreetmap/josm/gui/dialogs/ConflictDialog.java

    r6009 r6070  
    6767    /**
    6868     * Replies the color used to paint conflicts.
    69      * 
     69     *
    7070     * @return the color used to paint conflicts
    7171     * @since 1221
     
    8383    /** the list widget for the list of conflicts */
    8484    private JList lstConflicts;
    85    
     85
    8686    private final JPopupMenu popupMenu = new JPopupMenu();
    8787    private final PopupMenuHandler popupMenuHandler = new PopupMenuHandler(popupMenu);
     
    115115            btnResolve, btnSelect
    116116        }));
    117        
     117
    118118        popupMenuHandler.addAction(Main.main.menu.autoScaleActions.get("conflict"));
    119119    }
     
    143143        DataSet.removeSelectionListener(this);
    144144    }
    145    
     145
    146146    /**
    147147     * Add a list selection listener to the conflicts list.
     
    152152        lstConflicts.getSelectionModel().addListSelectionListener(listener);
    153153    }
    154    
     154
    155155    /**
    156156     * Remove the given list selection listener from the conflicts list.
     
    161161        lstConflicts.getSelectionModel().removeListSelectionListener(listener);
    162162    }
    163    
     163
    164164    /**
    165165     * Replies the popup menu handler.
     
    218218    /**
    219219     * Paints all conflicts that can be expressed on the main window.
    220      * 
     220     *
    221221     * @param g The {@code Graphics} used to paint
    222222     * @param nc The {@code NavigatableComponent} used to get screen coordinates of nodes
     
    294294    /**
    295295     * returns the first selected item of the conflicts list
    296      * 
     296     *
    297297     * @return Conflict
    298298     */
     
    331331        return ht("/Dialog/ConflictList");
    332332    }
    333    
     333
    334334    class MouseEventHandler extends PopupMenuLauncher {
    335335        public MouseEventHandler() {
     
    438438            }
    439439            DataSet ds = Main.main.getCurrentDataSet();
    440             if (ds != null) { // Can't see how it is possible but it happened in #7942 
     440            if (ds != null) { // Can't see how it is possible but it happened in #7942
    441441                ds.setSelected(sel);
    442442            }
     
    450450        }
    451451    }
    452    
     452
    453453    /**
    454454     * Warns the user about the number of detected conflicts
  • trunk/src/org/openstreetmap/josm/gui/dialogs/HistoryDialog.java

    r5360 r6070  
    108108        historyTable.getSelectionModel().addListSelectionListener(showHistoryAction);
    109109        historyTable.getSelectionModel().addListSelectionListener(reloadAction);
    110        
     110
    111111        // Show history dialog on Enter/Spacebar
    112112        InputMapUtils.addEnterAction(historyTable, showHistoryAction);
  • trunk/src/org/openstreetmap/josm/gui/dialogs/RelationListDialog.java

    r6058 r6070  
    9292
    9393    private final NewAction newAction;
    94    
     94
    9595    /** the popup menu and its handler */
    9696    private final JPopupMenu popupMenu = new JPopupMenu();
     
    9898
    9999    private final JosmTextField filter;
    100    
     100
    101101    // Actions
    102102    /** the edit action */
     
    114114    /** add all selected primitives to the given relations */
    115115    private final AddSelectionToRelations addSelectionToRelations = new AddSelectionToRelations();
    116    
     116
    117117    HighlightHelper highlightHelper = new HighlightHelper();
    118118    private boolean highlightEnabled = Main.pref.getBoolean("draw.target-highlight", true);
     
    158158        // Setup popup menu handler
    159159        setupPopupMenuHandler();
    160        
     160
    161161        JPanel pane = new JPanel(new BorderLayout());
    162162        pane.add(filter, BorderLayout.NORTH);
     
    175175
    176176        InputMapUtils.unassignCtrlShiftUpDown(displaylist, JComponent.WHEN_FOCUSED);
    177        
     177
    178178        // Select relation on Ctrl-Enter
    179179        InputMapUtils.addEnterAction(displaylist, selectRelationAction);
     
    182182        displaylist.getActionMap().put("edit", editAction);
    183183        displaylist.getInputMap().put(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, KeyEvent.CTRL_MASK), "edit");
    184        
     184
    185185        updateActionsRelationLists();
    186186    }
    187    
     187
    188188    // inform all actions about list of relations they need
    189189    private void updateActionsRelationLists() {
    190190        List<Relation> sel = model.getSelectedRelations();
    191191        popupMenuHandler.setPrimitives(sel);
    192        
     192
    193193        Component focused = FocusManager.getCurrentKeyboardFocusManager().getFocusOwner();
    194        
     194
    195195        //update highlights
    196196        if (highlightEnabled && focused==displaylist && Main.isDisplayingMapView()) {
     
    200200        }
    201201    }
    202    
     202
    203203    @Override public void showNotify() {
    204204        MapView.addLayerChangeListener(newAction);
     
    214214        DataSet.removeSelectionListener(addSelectionToRelations);
    215215    }
    216    
     216
    217217    private void resetFilter() {
    218218        filter.setText(null);
     
    309309
    310310    class MouseEventHandler extends PopupMenuLauncher {
    311        
     311
    312312        public MouseEventHandler() {
    313313            super(popupMenu);
     
    318318            if (highlightEnabled) highlightHelper.clear();
    319319        }
    320        
     320
    321321        protected void setCurrentRelationAsSelection() {
    322322            Main.main.getCurrentDataSet().setSelected((Relation)displaylist.getSelectedValue());
     
    326326            EditRelationAction.launchEditor(getSelected());
    327327        }
    328        
     328
    329329        @Override public void mouseClicked(MouseEvent e) {
    330330            if (Main.main.getEditLayer() == null) return;
     
    338338        }
    339339    }
    340    
     340
    341341    /**
    342342     * The action for creating a new relation
     
    493493            }
    494494        }
    495        
     495
    496496        private void updateFilteredRelations() {
    497497            if (filter != null) {
     
    519519            return filteredRelations == null ? relations : filteredRelations;
    520520        }
    521        
     521
    522522        private Relation getVisibleRelation(int index) {
    523523            if (index < 0 || index >= getVisibleRelations().size()) return null;
     
    584584            return i;
    585585        }
    586        
     586
    587587        private Integer getVisibleRelationIndex(Relation rel) {
    588588            int i = getVisibleRelations().indexOf(rel);
     
    604604
    605605    private final void setupPopupMenuHandler() {
    606        
     606
    607607        // -- select action
    608608        popupMenuHandler.addAction(selectRelationAction);
     
    624624        popupMenuHandler.addAction(duplicateAction).setVisible(false);
    625625        popupMenuHandler.addAction(deleteRelationsAction).setVisible(false);
    626        
     626
    627627        popupMenuHandler.addAction(addSelectionToRelations);
    628628    }
    629    
     629
    630630    /* ---------------------------------------------------------------------------------- */
    631631    /* Methods that can be called from plugins                                            */
  • trunk/src/org/openstreetmap/josm/gui/dialogs/SelectionListDialog.java

    r6058 r6070  
    155155            }
    156156        });
    157                
     157
    158158        lstPrimitives.addMouseListener(new MouseEventHandler());
    159159
     
    192192            super(popupMenu);
    193193        }
    194        
     194
    195195        @Override
    196196        public void mouseClicked(MouseEvent e) {
     
    727727                text.append(tr("Unselectable now"));
    728728                this.sel=new ArrayList<OsmPrimitive>(); // empty selection
    729             }           
     729            }
    730730            if(ways + nodes + relations == 1)
    731731            {
  • trunk/src/org/openstreetmap/josm/gui/dialogs/ToggleDialog.java

    r6061 r6070  
    144144     */
    145145    protected JCheckBoxMenuItem windowMenuItem;
    146    
     146
    147147    /**
    148148     * The linked preferences class (optional). If set, accessible from the title bar with a dedicated button
     
    152152    /**
    153153     * Constructor
    154      * 
     154     *
    155155     * @param name  the name of the dialog
    156156     * @param iconName the name of the icon to be displayed
     
    493493                add(buttonsHide);
    494494            }
    495            
     495
    496496            // show the pref button if applicable
    497497            if (preferenceClass != null) {
     
    558558            return lblTitle.getText();
    559559        }
    560        
     560
    561561        public class DialogPopupMenu extends JPopupMenu {
    562562            public final JMenu buttonHidingMenu = new JMenu(tr("Side buttons"));
     
    589589            }
    590590        }
    591        
     591
    592592        public void registerMouseListener() {
    593593            addMouseListener(new MouseEventHandler());
    594594        }
    595        
     595
    596596        class MouseEventHandler extends PopupMenuLauncher {
    597597            public MouseEventHandler() {
     
    864864            buttonsHide.setVisible(false);
    865865        }
    866        
     866
    867867        // Register title bar mouse listener only after buttonActions has been initialized to have a complete popup menu
    868868        titleBar.registerMouseListener();
    869        
     869
    870870        return data;
    871871    }
  • trunk/src/org/openstreetmap/josm/gui/dialogs/ValidatorDialog.java

    r6009 r6070  
    7777    private final JPopupMenu popupMenu = new JPopupMenu();
    7878    private final PopupMenuHandler popupMenuHandler = new PopupMenuHandler(popupMenu);
    79    
     79
    8080    /** Last selected element */
    8181    private DefaultMutableTreeNode lastSelectedNode = null;
     
    417417        tree.addTreeSelectionListener(listener);
    418418    }
    419    
     419
    420420    /**
    421421     * Remove the given tree selection listener from the validator tree.
     
    426426        tree.removeTreeSelectionListener(listener);
    427427    }
    428    
     428
    429429    /**
    430430     * Replies the popup menu handler.
     
    435435        return popupMenuHandler;
    436436    }
    437    
     437
    438438    /**
    439439     * Replies the currently selected error, or {@code null}.
     
    451451        return null;
    452452    }
    453    
     453
    454454    /**
    455455     * Watches for double clicks and launches the popup menu.
    456456     */
    457457    class MouseEventHandler extends PopupMenuLauncher {
    458        
     458
    459459        public MouseEventHandler() {
    460460            super(popupMenu);
    461461        }
    462        
     462
    463463        @Override
    464464        public void mouseClicked(MouseEvent e) {
     
    483483            }
    484484        }
    485        
     485
    486486        @Override public void launch(MouseEvent e) {
    487487            TreePath selPath = tree.getPathForLocation(e.getX(), e.getY());
     
    585585            // do nothing
    586586        }
    587        
     587
    588588        protected void fixError(TestError error) throws InterruptedException, InvocationTargetException {
    589589            if (error.isFixable()) {
  • trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/ChangesetCacheManager.java

    r5998 r6070  
    557557
    558558    class MouseEventHandler extends PopupMenuLauncher {
    559        
     559
    560560        public MouseEventHandler() {
    561561            super(new ChangesetTablePopupMenu());
    562562        }
    563        
     563
    564564        @Override
    565565        public void mouseClicked(MouseEvent evt) {
  • trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/SingleChangesetDownloadPanel.java

    r5765 r6070  
    5151        tfChangesetId.getDocument().addDocumentListener(actDownload);
    5252        add(btn);
    53        
    54         if (Main.pref.getBoolean("downloadchangeset.autopaste", true)) { 
     53
     54        if (Main.pref.getBoolean("downloadchangeset.autopaste", true)) {
    5555            tfChangesetId.tryToPasteFromClipboard();
    5656        }
  • trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/query/ChangesetQueryDialog.java

    r5998 r6070  
    191191                    }
    192192                    break;
    193    
     193
    194194                case 2:
    195195                    if (getChangesetQuery() == null) {
  • trunk/src/org/openstreetmap/josm/gui/dialogs/properties/PropertiesDialog.java

    r6068 r6070  
    152152     */
    153153    private final TagEditHelper editHelper = new TagEditHelper(propertyData, valueCount);
    154    
     154
    155155    private final DataSetListenerAdapter dataChangedAdapter = new DataSetListenerAdapter(this);
    156156    private final HelpAction helpAction = new HelpAction();
     
    170170    private final SelectRelationAction selectRelationAction = new SelectRelationAction(false);
    171171    private final SelectRelationAction addRelationToSelectionAction = new SelectRelationAction(true);
    172    
     172
    173173    private final DownloadMembersAction downloadMembersAction = new DownloadMembersAction();
    174174    private final DownloadSelectedIncompleteMembersAction downloadSelectedIncompleteMembersAction = new DownloadSelectedIncompleteMembersAction();
    175    
     175
    176176    private final SelectMembersAction selectMembersAction = new SelectMembersAction(false);
    177177    private final SelectMembersAction addMembersToSelectionAction = new SelectMembersAction(true);
    178    
     178
    179179    private final HighlightHelper highlightHelper= new HighlightHelper();
    180    
     180
    181181    /**
    182182     * The Add button (needed to be able to disable it)
     
    195195     */
    196196    private final PresetListPanel presets = new PresetListPanel();
    197    
     197
    198198    /**
    199199     * Text to display when nothing selected.
     
    214214        }
    215215    };
    216    
     216
    217217    // <editor-fold defaultstate="collapsed" desc="Dialog construction and helper methods">
    218    
     218
    219219    /**
    220220     * Create a new PropertiesDialog
     
    231231        setupMembershipMenu();
    232232        buildMembershipTable();
    233        
     233
    234234        // combine both tables and wrap them in a scrollPane
    235235        JPanel bothTables = new JPanel();
     
    249249            bothTables.add(presets, GBC.eol().fill(GBC.HORIZONTAL).insets(5, 2, 5, 2));
    250250        }
    251        
     251
    252252        setupKeyboardShortcuts();
    253253
     
    257257        propertyTable.getSelectionModel().addListSelectionListener(deleteAction);
    258258        membershipTable.getSelectionModel().addListSelectionListener(deleteAction);
    259        
    260        
     259
     260
    261261        JScrollPane scrollPane = (JScrollPane) createLayout(bothTables, true, Arrays.asList(new SideButton[] {
    262262                this.btnAdd, this.btnEdit, this.btnDel
     
    273273        editHelper.loadTagsIfNeeded();
    274274    }
    275        
     275
    276276    private void buildPropertiesTable() {
    277277        // setting up the properties table
     
    280280        propertyTable.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);
    281281        propertyTable.getTableHeader().setReorderingAllowed(false);
    282        
     282
    283283        propertyTable.getColumnModel().getColumn(1).setCellRenderer(new DefaultTableCellRenderer(){
    284284            @Override public Component getTableCellRendererComponent(JTable table, Object value,
     
    383383        mod.getColumn(0).setPreferredWidth(200);
    384384    }
    385    
     385
    386386    /**
    387387     * creates the popup menu @field membershipMenu and its launcher on membership table
     
    432432        });
    433433    }
    434    
    435     /**
    436      * creates the popup menu @field propertyMenu and its launcher on property table 
     434
     435    /**
     436     * creates the popup menu @field propertyMenu and its launcher on property table
    437437     */
    438438    private void setupPropertiesMenu() {
     
    448448        propertyTable.addMouseListener(new PopupMenuLauncher(propertyMenu));
    449449    }
    450    
     450
    451451    /**
    452452     * Assignas all needed keys like Enter and Spacebar to most important actions
    453453     */
    454454    private void setupKeyboardShortcuts() {
    455        
     455
    456456        // ENTER = editAction, open "edit" dialog
    457457        propertyTable.getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT)
     
    461461                .put(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0),"onTableEnter");
    462462        membershipTable.getActionMap().put("onTableEnter",editAction);
    463        
    464         // INSERT button = addAction, open "add property" dialog 
     463
     464        // INSERT button = addAction, open "add property" dialog
    465465        propertyTable.getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT)
    466466                .put(KeyStroke.getKeyStroke(KeyEvent.VK_INSERT, 0),"onTableInsert");
    467467        propertyTable.getActionMap().put("onTableInsert",addAction);
    468        
     468
    469469        // unassign some standard shortcuts for JTable to allow upload / download
    470470        InputMapUtils.unassignCtrlShiftUpDown(propertyTable, JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT);
    471        
     471
    472472        // unassign some standard shortcuts for correct copy-pasting, fix #8508
    473473        propertyTable.setTransferHandler(null);
    474  
     474
    475475        propertyTable.getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT)
    476476                .put(KeyStroke.getKeyStroke(KeyEvent.VK_C, InputEvent.CTRL_MASK),"onCopy");
     
    479479        // allow using enter to add tags for all look&feel configurations
    480480        InputMapUtils.enableEnter(this.btnAdd);
    481        
     481
    482482        // DEL button = deleteAction
    483483        getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT).put(
     
    485485                );
    486486        getActionMap().put("delete", deleteAction);
    487        
     487
    488488        // F1 button = custom help action
    489489        getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT).put(
     
    491491        getActionMap().put("onHelp", helpAction);
    492492    }
    493    
     493
    494494         /**
    495495     * This simply fires up an {@link RelationEditor} for the relation shown; everything else
     
    506506                ((MemberInfo) membershipData.getValueAt(row, 1)).role).setVisible(true);
    507507    }
    508    
     508
    509509    private int findRow(TableModel model, Object value) {
    510510        for (int i=0; i<model.getRowCount(); i++) {
     
    514514        return -1;
    515515    }
    516    
     516
    517517    /**
    518518     * Update selection status, call @{link #selectionChanged} function.
     
    525525        }
    526526    }
    527    
     527
    528528   // </editor-fold>
    529529
    530530    // <editor-fold defaultstate="collapsed" desc="Event listeners methods">
    531    
     531
    532532    @Override
    533533    public void showNotify() {
     
    558558        }
    559559    }
    560    
     560
    561561    @Override
    562562    public void destroy() {
     
    625625                    ? e.getValue().keySet().iterator().next() : tr("<different>"));
    626626        }
    627        
     627
    628628        membershipData.setRowCount(0);
    629629
     
    698698        }
    699699    }
    700    
     700
    701701    /* ---------------------------------------------------------------------------------- */
    702702    /* EditLayerChangeListener                                                            */
     
    721721
    722722    // <editor-fold defaultstate="collapsed" desc="Methods that are called by plugins to extend fuctionality ">
    723    
     723
    724724    /**
    725725     * Replies the property popup menu handler.
     
    752752        return row > -1 ? (IRelation) membershipData.getValueAt(row, 0) : null;
    753753    }
    754        
     754
    755755    // </editor-fold>
    756    
     756
    757757     /**
    758758     * Class that watches for mouse clicks
     
    852852        }
    853853    };
    854    
     854
    855855    /**
    856856     * Action handling delete button press in properties dialog.
     
    940940            } else if (membershipTable.getSelectedRowCount() > 0) {
    941941                int[] rows = membershipTable.getSelectedRows();
    942                 // delete from last relation to convserve row numbers in the table 
     942                // delete from last relation to convserve row numbers in the table
    943943                for (int i=rows.length-1; i>=0; i--) {
    944944                    deleteFromRelation(rows[i]);
  • trunk/src/org/openstreetmap/josm/gui/dialogs/relation/ChildRelationBrowser.java

    r5925 r6070  
    415415                    refreshView(r);
    416416                }
    417                 SwingUtilities.invokeLater(new Runnable() { 
    418                     public void run() { 
    419                         Main.map.repaint(); 
    420                     } 
    421                 }); 
     417                SwingUtilities.invokeLater(new Runnable() {
     418                    public void run() {
     419                        Main.map.repaint();
     420                    }
     421                });
    422422            } catch (Exception e) {
    423423                if (canceled) {
  • trunk/src/org/openstreetmap/josm/gui/dialogs/relation/GenericRelationEditor.java

    r6068 r6070  
    216216                }
    217217        );
    218        
     218
    219219        tagEditorPanel.setNextFocusComponent(memberTable);
    220220        selectionTable.setFocusable(false);
     
    492492        tb.add(moveDownAction);
    493493        memberTable.getActionMap().put("moveDown", moveDownAction);
    494        
     494
    495495        tb.addSeparator();
    496496
     
    499499        memberTableModel.getSelectionModel().addListSelectionListener(editAction);
    500500        tb.add(editAction);
    501        
     501
    502502        // -- delete action
    503503        RemoveAction removeSelectedAction = new RemoveAction();
     
    505505        tb.add(removeSelectedAction);
    506506        memberTable.getActionMap().put("removeSelected", removeSelectedAction);
    507        
     507
    508508        tb.addSeparator();
    509509        // -- sort action
     
    536536        inputMap.put((KeyStroke) moveDownAction.getValue(AbstractAction.ACCELERATOR_KEY),"moveDown");
    537537        inputMap.put((KeyStroke) downloadIncompleteMembersAction.getValue(AbstractAction.ACCELERATOR_KEY),"downloadIncomplete");
    538        
     538
    539539        return tb;
    540540    }
     
    677677    }
    678678
    679    
     679
    680680    private void registerCopyPasteAction(AbstractAction action, Object actionName, KeyStroke shortcut) {
    681681        int mods = shortcut.getModifiers();
  • trunk/src/org/openstreetmap/josm/gui/dialogs/relation/MemberRoleCellEditor.java

    r4238 r6070  
    2626        this.ds = ds;
    2727        editor = new AutoCompletingTextField();
    28         editor.setBorder(BorderFactory.createEmptyBorder(1,1,1,1)); 
     28        editor.setBorder(BorderFactory.createEmptyBorder(1,1,1,1));
    2929        autoCompletionList = new AutoCompletionList();
    3030        editor.setAutoCompletionList(autoCompletionList);
     
    5757        return super.stopCellEditing();
    5858    }
    59    
     59
    6060    /** Returns the edit field for this cell editor. */
    6161    public AutoCompletingTextField getEditor() {
  • trunk/src/org/openstreetmap/josm/gui/dialogs/relation/MemberTable.java

    r6064 r6070  
    6363     */
    6464    protected void init() {
    65         MemberRoleCellEditor ce = (MemberRoleCellEditor)getColumnModel().getColumn(0).getCellEditor(); 
     65        MemberRoleCellEditor ce = (MemberRoleCellEditor)getColumnModel().getColumn(0).getCellEditor();
    6666        setRowHeight(ce.getEditor().getPreferredSize().height);
    6767        setAutoResizeMode(JTable.AUTO_RESIZE_ALL_COLUMNS);
     
    7575
    7676        initHighlighting();
    77        
     77
    7878        // install custom navigation actions
    7979        //
     
    8181        getActionMap().put("selectPreviousColumnCell", new SelectPreviousColumnCellAction());
    8282    }
    83    
     83
    8484    @Override
    8585    protected ZoomToAction buildZoomToAction() {
    8686        return new ZoomToAction(this);
    8787    }
    88    
     88
    8989    @Override
    9090    protected JPopupMenu buildPopupMenu() {
     
    9999        return menu;
    100100    }
    101    
     101
    102102    @Override
    103103    public Dimension getPreferredSize(){
     
    140140                }
    141141            }};
    142    
     142
    143143    private void initHighlighting() {
    144144        highlightEnabled = Main.pref.getBoolean("draw.target-highlight", true);
     
    217217        MapView.removeLayerChangeListener(zoomToGap);
    218218    }
    219    
     219
    220220    public void stopHighlighting() {
    221221        if (highlighterListener == null) return;
  • trunk/src/org/openstreetmap/josm/gui/dialogs/validator/ValidatorTreePanel.java

    r5911 r6070  
    380380        return updateCount;
    381381    }
    382    
     382
    383383    private void clearErrors() {
    384384        if (errors != null) {
  • trunk/src/org/openstreetmap/josm/gui/download/DownloadDialog.java

    r5998 r6070  
    144144
    145145        pnl.add(sizeCheck,  GBC.eol().anchor(GBC.EAST).insets(5,5,5,2));
    146        
     146
    147147        if (!ExpertToggleAction.isExpert()) {
    148148            JLabel infoLabel  = new JLabel(tr("Use left click&drag to select area, arrows or right mouse button to scroll map, wheel or +/- to zoom."));
     
    165165        pnl.add(btnDownload = new SideButton(actDownload = new DownloadAction()));
    166166        InputMapUtils.enableEnter(btnDownload);
    167        
     167
    168168        makeCheckBoxRespondToEnter(cbDownloadGpxData);
    169169        makeCheckBoxRespondToEnter(cbDownloadOsmData);
     
    308308        cbDownloadGpxData.setSelected(Main.pref.getBoolean("download.gps", false));
    309309        cbNewLayer.setSelected(Main.pref.getBoolean("download.newlayer", false));
    310         cbStartup.setSelected( isAutorunEnabled() ); 
     310        cbStartup.setSelected( isAutorunEnabled() );
    311311        int idx = Main.pref.getInteger("download.tab", 0);
    312312        if (idx < 0 || idx > tpDownloadAreaSelectors.getTabCount()) {
  • trunk/src/org/openstreetmap/josm/gui/download/SlippyMapChooser.java

    r5898 r6070  
    6363                w = iScreenSize.width * 90 / 100;
    6464                h = iScreenSize.height * 90 / 100;
    65                 iDownloadDialogDimension = iGui.getSize(); 
     65                iDownloadDialogDimension = iGui.getSize();
    6666            }
    6767            // shrink
     
    7373            }
    7474
    75             // resize and center the DownloadDialog 
    76             iGui.setBounds((iScreenSize.width - w) / 2, (iScreenSize.height - h) / 2, w, h); 
     75            // resize and center the DownloadDialog
     76            iGui.setBounds((iScreenSize.width - w) / 2, (iScreenSize.height - h) / 2, w, h);
    7777            repaint();
    7878        }
  • trunk/src/org/openstreetmap/josm/gui/history/CoordinateInfoViewer.java

    r5356 r6070  
    259259            LatLon coord = node.getCoords();
    260260            LatLon oppositeCoord = oppositeNode.getCoords();
    261            
     261
    262262            // display the coordinates
    263263            //
     
    267267            // update background color to reflect differences in the coordinates
    268268            //
    269             if (coord == oppositeCoord || 
     269            if (coord == oppositeCoord ||
    270270                    (coord != null && oppositeCoord != null && coord.lat() == oppositeCoord.lat())) {
    271271                lblLat.setBackground(Color.WHITE);
     
    273273                lblLat.setBackground(BGCOLOR_DIFFERENCE);
    274274            }
    275             if (coord == oppositeCoord || 
     275            if (coord == oppositeCoord ||
    276276                    (coord != null && oppositeCoord != null && coord.lon() == oppositeCoord.lon())) {
    277277                lblLon.setBackground(Color.WHITE);
     
    285285        }
    286286    }
    287    
     287
    288288    private static class DistanceViewer extends LatLonViewer {
    289289
    290290        private JLabel lblDistance;
    291        
     291
    292292        public DistanceViewer(HistoryBrowserModel model) {
    293293            super(model, PointInTimeType.REFERENCE_POINT_IN_TIME);
     
    329329            LatLon coord = node.getCoords();
    330330            LatLon oppositeCoord = oppositeNode.getCoords();
    331            
     331
    332332            // update distance
    333333            //
  • trunk/src/org/openstreetmap/josm/gui/io/ActionFlagsTableCell.java

    r5302 r6070  
    2828 * handles everything on its own, in other words it renders itself and also functions
    2929 * as editor so the checkboxes may be set by the user.
    30  * 
     30 *
    3131 * Intended usage is like this:
    3232 * ActionFlagsTableCell aftc = new ActionFlagsTableCell();
  • trunk/src/org/openstreetmap/josm/gui/io/ChangesetCommentModel.java

    r5266 r6070  
    1515     * Sets the current changeset comment and notifies observers if the comment
    1616     * has changed.
    17      * 
     17     *
    1818     * @param comment the new upload comment. Empty string assumed if null.
    1919     */
     
    2929    /**
    3030     * Replies the current changeset comment in this model.
    31      * 
     31     *
    3232     * @return the current changeset comment in this model.
    3333     */
  • trunk/src/org/openstreetmap/josm/gui/io/DownloadFileTask.java

    r5874 r6070  
    4949        this.mkdir = mkdir;
    5050        this.unpack = unpack;
    51     }   
    52    
     51    }
     52
    5353    private static class DownloadException extends Exception {
    5454        public DownloadException(String msg) {
     
    6868
    6969
    70     @Override 
     70    @Override
    7171    protected void cancel() {
    7272        this.canceled = true;
     
    7474    }
    7575
    76     @Override 
     76    @Override
    7777    protected void finish() {}
    7878
     
    9191                }
    9292            }
    93            
     93
    9494            URL url = new URL(address);
    9595            int size;
     
    100100                size = downloadConnection.getContentLength();
    101101            }
    102            
     102
    103103            progressMonitor.setTicksCount(100);
    104104            progressMonitor.subTask(tr("Downloading File {0}: {1} bytes...", file.getName(),size));
    105            
     105
    106106            in = downloadConnection.getInputStream();
    107107            out = new FileOutputStream(file);
     
    112112                out.write(buffer, 0, read);
    113113                count+=read;
    114                 if (canceled) break;                           
     114                if (canceled) break;
    115115                p2 = 100 * count / size;
    116116                if (p2!=p1) {
     
    142142    }
    143143
    144     @Override 
     144    @Override
    145145    protected void realRun() throws SAXException, IOException {
    146146        if (canceled) return;
     
    160160        return canceled;
    161161    }
    162    
     162
    163163    /**
    164164     * Recursive unzipping function
     
    166166     * @param file
    167167     * @param dir
    168      * @throws IOException 
     168     * @throws IOException
    169169     */
    170170    public static void unzipFileRecursively(File file, String dir) throws IOException {
  • trunk/src/org/openstreetmap/josm/gui/io/DownloadPrimitivesTask.java

    r5791 r6070  
    9595            if (osm == null) {
    9696                switch (id.getType()) {
    97                     case NODE: 
     97                    case NODE:
    9898                        osm = new Node(id.getUniqueId());
    9999                        break;
     
    128128            DataSetMerger merger = new DataSetMerger(ds, theirDataSet);
    129129            merger.merge();
    130            
     130
    131131            // if incomplete relation members exist, download them too
    132132            for (Relation r : ds.getRelations()) {
     
    165165                }
    166166            }
    167            
     167
    168168        } catch(Exception e) {
    169169            if (canceled) return;
     
    171171        }
    172172    }
    173    
     173
    174174    /**
    175175     * replies the set of ids of all primitives for which a fetch request to the
  • trunk/src/org/openstreetmap/josm/gui/io/RecentlyOpenedFilesMenu.java

    r5729 r6070  
    4949        });
    5050    }
    51    
     51
    5252    private void rebuild() {
    5353        removeAll();
  • trunk/src/org/openstreetmap/josm/gui/io/UploadDialog.java

    r5998 r6070  
    5656 * This is a dialog for entering upload options like the parameters for
    5757 * the upload changeset and the strategy for opening/closing a changeset.
    58  * 
     58 *
    5959 */
    6060public class UploadDialog extends JDialog implements PropertyChangeListener, PreferenceChangedListener{
     
    111111        //
    112112        pnl.add(pnlUploadedObjects = new UploadedObjectsSummaryPanel(), GBC.eol().fill(GBC.BOTH));
    113        
     113
    114114        // Custom components
    115115        for (Component c : customComponents) {
     
    309309    public void setDefaultChangesetTags(Map<String, String> tags) {
    310310        pnlTagSettings.setDefaultTags(tags);
    311          for (String key: tags.keySet()) { 
    312             if (key.equals("comment")) { 
     311         for (String key: tags.keySet()) {
     312            if (key.equals("comment")) {
    313313                changesetCommentModel.setComment(tags.get(key));
    314             } 
    315         } 
     314            }
     315        }
    316316    }
    317317
     
    370370        super.setVisible(visible);
    371371    }
    372    
    373     /**
    374      * Adds a custom component to this dialog. 
     372
     373    /**
     374     * Adds a custom component to this dialog.
    375375     * Custom components added at JOSM startup are displayed between the objects list and the properties tab pane.
    376376     * @param c The custom component to add. If {@code null}, this method does nothing.
  • trunk/src/org/openstreetmap/josm/gui/io/UploadSelectionDialog.java

    r5998 r6070  
    264264            putValue(Action.NAME, tr("Cancel"));
    265265            putValue(Action.SMALL_ICON, ImageProvider.get("", "cancel"));
    266             getRootPane().getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW) 
    267             .put(KeyStroke.getKeyStroke("ESCAPE"), "ESCAPE"); 
     266            getRootPane().getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW)
     267            .put(KeyStroke.getKeyStroke("ESCAPE"), "ESCAPE");
    268268            getRootPane().getActionMap().put("ESCAPE", this);
    269269            setEnabled(true);
  • trunk/src/org/openstreetmap/josm/gui/layer/CustomizeColor.java

    r4270 r6070  
    3434        this();
    3535        layers = new LinkedList<Layer>();
    36         layers.add(l); 
     36        layers.add(l);
    3737    }
    3838
  • trunk/src/org/openstreetmap/josm/gui/layer/GpxLayer.java

    r5959 r6070  
    113113        return new Date[]{earliest.getTime(), latest.getTime()};
    114114    }
    115    
     115
    116116    /**
    117117    * Returns minimum and maximum timestamps for all tracks
     
    138138        return new Date[]{new Date((long) (min * 1000)), new Date((long) (max * 1000)), };
    139139    }
    140    
    141    
     140
     141
    142142    /**
    143143     * returns a human readable string that shows the timespan of the given track
     
    288288                new LayerListPopup.InfoAction(this) };
    289289    }
    290    
     290
    291291    public boolean isLocalFile() {
    292292        return isLocalFile;
     
    335335            return true;
    336336    }
    337    
     337
    338338    public void filterTracksByDate(Date fromDate, Date toDate, boolean showWithoutDate) {
    339339        int i = 0;
     
    342342        for (GpxTrack trk : data.tracks) {
    343343            Date[] t = GpxLayer.getMinMaxTimeForTrack(trk);
    344            
     344
    345345            if (t==null) continue;
    346346            long tm = t[1].getTime();
     
    543543                }
    544544            }
    545            
     545
    546546            for (GpxTrack trk : data.tracks) {
    547547                for (GpxTrackSegment segment : trk.getSegments()) {
     
    880880        return SaveActionBase.createAndOpenSaveFileChooser(tr("Save GPX file"), GpxImporter.FILE_FILTER);
    881881    }
    882    
     882
    883883}
  • trunk/src/org/openstreetmap/josm/gui/layer/ImageryLayer.java

    r5963 r6070  
    130130            String url = info.getUrl();
    131131            if (url != null) {
    132                 panel.add(new JLabel(tr("URL: ")), GBC.std().insets(0, 5, 2, 0)); 
     132                panel.add(new JLabel(tr("URL: ")), GBC.std().insets(0, 5, 2, 0));
    133133                panel.add(new UrlLabel(url), GBC.eol().insets(2, 5, 10, 0));
    134134            }
  • trunk/src/org/openstreetmap/josm/gui/layer/Layer.java

    r5459 r6070  
    436436        // To be overriden if needed
    437437    }
    438    
     438
    439439    /**
    440440     * Replies the savable state of this layer (i.e if it can be saved through a "File->Save" dialog).
     
    445445        return false;
    446446    }
    447    
     447
    448448    /**
    449449     * Checks whether it is ok to launch a save (whether we have data, there is no conflict etc.)
     
    454454        return true;
    455455    }
    456    
     456
    457457    /**
    458458     * Creates a new "Save" dialog for this layer and makes it visible.<br/>
  • trunk/src/org/openstreetmap/josm/gui/layer/OsmDataLayer.java

    r6039 r6070  
    163163        void commandChanged(int queueSize, int redoSize);
    164164    }
    165    
     165
    166166    /**
    167167     * Listener called when a state of this layer has changed.
     
    175175        void uploadDiscouragedChanged(OsmDataLayer layer, boolean newValue);
    176176    }
    177    
     177
    178178    private final CopyOnWriteArrayList<LayerStateChangeListener> layerStateChangeListeners = new CopyOnWriteArrayList<LayerStateChangeListener>();
    179    
     179
    180180    /**
    181181     * Adds a layer state change listener
     
    189189        }
    190190    }
    191    
     191
    192192    /**
    193193     * Removes a layer property change listener
     
    259259        return ImageProvider.get("layer", "osmdata_small");
    260260    }
    261    
     261
    262262    /**
    263263     * TODO: @return Return a dynamic drawn icon of the map data. The icon is
     
    355355        mergeFrom(from, null);
    356356    }
    357    
     357
    358358    /**
    359359     * merges the primitives in dataset <code>from</code> into the dataset of
     
    415415
    416416    @Override public boolean isMergable(final Layer other) {
    417         // isUploadDiscouraged commented to allow merging between normal layers and discouraged layers with a warning (see #7684) 
     417        // isUploadDiscouraged commented to allow merging between normal layers and discouraged layers with a warning (see #7684)
    418418        return other instanceof OsmDataLayer;// && (isUploadDiscouraged() == ((OsmDataLayer)other).isUploadDiscouraged());
    419419    }
     
    781781        return true;
    782782    }
    783    
     783
    784784    /**
    785785     * Check the data set if it would be empty on save. It is empty, if it contains
  • trunk/src/org/openstreetmap/josm/gui/layer/TMSLayer.java

    r6042 r6070  
    128128    protected TileSource tileSource;
    129129    protected OsmTileLoader tileLoader;
    130    
     130
    131131    public static TileLoaderFactory loaderFactory = new TileLoaderFactory() {
    132132        @Override
     
    144144        }
    145145    };
    146    
     146
    147147    /**
    148148    * Plugins that wish to set custom tile loader should call this method
     
    151151        TMSLayer.loaderFactory = loaderFactory;
    152152    }
    153    
     153
    154154    HashSet<Tile> tileRequestsOutstanding = new HashSet<Tile>();
    155155    @Override
     
    170170        }*/
    171171    }
    172    
     172
    173173    @Override
    174174    public TileCache getTileCache() {
    175175        return tileCache;
    176176    }
    177    
     177
    178178    private class TmsTileClearController implements TileClearController, CancelListener {
    179179
    180180        private final ProgressMonitor monitor;
    181181        private boolean cancel = false;
    182        
     182
    183183        public TmsTileClearController(ProgressMonitor monitor) {
    184184            this.monitor = monitor;
     
    219219    /**
    220220     * Clears the tile cache.
    221      * 
    222      * If the current tileLoader is an instance of OsmTileLoader, a new 
    223      * TmsTileClearController is created and passed to the according clearCache 
     221     *
     222     * If the current tileLoader is an instance of OsmTileLoader, a new
     223     * TmsTileClearController is created and passed to the according clearCache
    224224     * method.
    225      * 
    226      * @param monitor 
     225     *
     226     * @param monitor
    227227     * @see MemoryTileCache#clear()
    228      * @see OsmFileCacheTileLoader#clearCache(org.openstreetmap.gui.jmapviewer.interfaces.TileSource, org.openstreetmap.gui.jmapviewer.OsmFileCacheTileLoader.TileClearController) 
     228     * @see OsmFileCacheTileLoader#clearCache(org.openstreetmap.gui.jmapviewer.interfaces.TileSource, org.openstreetmap.gui.jmapviewer.OsmFileCacheTileLoader.TileClearController)
    229229     */
    230230    void clearTileCache(ProgressMonitor monitor) {
     
    257257    /**
    258258     * Initiates a repaint of Main.map
    259      * 
     259     *
    260260     * @see Main#map
    261      * @see MapFrame#repaint() 
     261     * @see MapFrame#repaint()
    262262     */
    263263    void redraw() {
     
    360360     * Creates and returns a new TileSource instance depending on the {@link ImageryType}
    361361     * of the passed ImageryInfo object.
    362      * 
     362     *
    363363     * If no appropriate TileSource is found, null is returned.
    364      * Currently supported ImageryType are {@link ImageryType#TMS}, 
     364     * Currently supported ImageryType are {@link ImageryType#TMS},
    365365     * {@link ImageryType#BING}, {@link ImageryType#SCANEX}.
    366      * 
     366     *
    367367     * @param info
    368368     * @return a new TileSource instance or null if no TileSource for the ImageryInfo/ImageryType could be found.
    369      * @throws IllegalArgumentException 
     369     * @throws IllegalArgumentException
    370370     */
    371371    public static TileSource getTileSource(ImageryInfo info) throws IllegalArgumentException {
     
    706706        return zia;
    707707    }
    708    
     708
    709709    public boolean increaseZoomLevel() {
    710710        if (zoomIncreaseAllowed()) {
     
    739739        return currentZoomLevel > this.getMinZoomLvl();
    740740    }
    741    
     741
    742742    /**
    743743     * Zoom out from map.
    744      * 
     744     *
    745745     * @return    true, if zoom increasing was successfull, false othervise
    746746     */
     
    774774        return new Tile(tileSource, x, y, zoom);
    775775    }
    776    
     776
    777777    synchronized Tile getOrCreateTile(int x, int y, int zoom) {
    778778        Tile tile = getTile(x, y, zoom);
     
    852852        return !done;
    853853    }
    854    
     854
    855855    boolean imageLoaded(Image i) {
    856856        if (i == null)
     
    861861        return false;
    862862    }
    863    
     863
    864864    /**
    865      * Returns the image for the given tile if both tile and image are loaded. 
     865     * Returns the image for the given tile if both tile and image are loaded.
    866866     * Otherwise returns  null.
    867      * 
     867     *
    868868     * @param tile the Tile for which the image should be returned
    869869     * @return  the image of the tile or null.
     
    953953        }
    954954    }
    955    
     955
    956956    // This function is called for several zoom levels, not just
    957957    // the current one.  It should not trigger any tiles to be
     
    10731073        return Main.map.mapView.getPoint(Main.getProjection().latlon2eastNorth(ll).add(getDx(), getDy()));
    10741074    }
    1075    
     1075
    10761076    private Point pixelPos(Tile t) {
    10771077        double lon = tileSource.tileXToLon(t.getXtile(), t.getZoom());
     
    10791079        return pixelPos(tmpLL);
    10801080    }
    1081    
     1081
    10821082    private LatLon getShiftedLatLon(EastNorth en) {
    10831083        return Main.getProjection().eastNorth2latlon(en.add(-getDx(), -getDy()));
    10841084    }
    1085    
     1085
    10861086    private Coordinate getShiftedCoord(EastNorth en) {
    10871087        LatLon ll = getShiftedLatLon(en);
     
    11381138            }
    11391139        }
    1140        
     1140
    11411141        boolean tooSmall() {
    11421142            return this.tilesSpanned() < 2.1;
    11431143        }
    1144        
     1144
    11451145        boolean tooLarge() {
    11461146            return this.tilesSpanned() > 10;
    11471147        }
    1148        
     1148
    11491149        boolean insane() {
    11501150            return this.tilesSpanned() > 100;
    11511151        }
    1152        
     1152
    11531153        double tilesSpanned() {
    11541154            return Math.sqrt(1.0 * this.size());
     
    11681168            return this.__allTiles(false);
    11691169        }
    1170        
     1170
    11711171        List<Tile> allTilesCreate() {
    11721172            return this.__allTiles(true);
    11731173        }
    1174        
     1174
    11751175        private List<Tile> __allTiles(boolean create) {
    11761176            // Tileset is either empty or too large
     
    11931193            return ret;
    11941194        }
    1195        
     1195
    11961196        private List<Tile> allLoadedTiles() {
    11971197            List<Tile> ret = new ArrayList<Tile>();
  • trunk/src/org/openstreetmap/josm/gui/layer/ValidatorLayer.java

    r5907 r6070  
    6464        if (root == null || root.getChildCount() == 0)
    6565            return;
    66        
     66
    6767        PaintVisitor paintVisitor = new PaintVisitor(g, mv);
    6868
     
    8080            severity = severity.getPreviousSibling();
    8181        }
    82        
     82
    8383        paintVisitor.clearPaintedObjects();
    8484    }
  • trunk/src/org/openstreetmap/josm/gui/layer/geoimage/ImageDisplay.java

    r4698 r6070  
    3737    /** The image currently displayed */
    3838    private Image image = null;
    39    
     39
    4040    /** The image currently displayed */
    4141    private boolean errorLoading = false;
     
    9999                    ImageDisplay.this.image = img;
    100100                    visibleRect = new Rectangle(0, 0, img.getWidth(null), img.getHeight(null));
    101    
     101
    102102                    final int w = (int) visibleRect.getWidth();
    103103                    final int h = (int) visibleRect.getHeight();
    104    
     104
    105105                    outer: {
    106106                        final int hh, ww, q;
     
    131131                            break outer;
    132132                        }
    133    
     133
    134134                        final BufferedImage rot = new BufferedImage(ww, hh, BufferedImage.TYPE_INT_RGB);
    135135                        final AffineTransform xform = AffineTransform.getQuadrantRotateInstance(q, ax, ay);
     
    137137                        g.drawImage(image, xform, null);
    138138                        g.dispose();
    139    
     139
    140140                        visibleRect.setSize(ww, hh);
    141141                        image.flush();
  • trunk/src/org/openstreetmap/josm/gui/layer/gpx/ChooseTrackVisibilityAction.java

    r5927 r6070  
    4343public class ChooseTrackVisibilityAction extends AbstractAction {
    4444    private final GpxLayer layer;
    45  
     45
    4646    DateFilterPanel dateFilter;
    4747    JTable table;
    48    
     48
    4949    public ChooseTrackVisibilityAction(final GpxLayer layer) {
    5050        super(tr("Choose visible tracks"), ImageProvider.get("dialogs/filter"));
     
    124124        return t;
    125125    }
    126    
     126
    127127    boolean noUpdates=false;
    128    
     128
    129129    /** selects all rows (=tracks) in the table that are currently visible on the layer*/
    130130    private void selectVisibleTracksInTable() {
     
    154154        });
    155155    }
    156    
     156
    157157    private void updateVisibilityFromTable() {
    158158        ListSelectionModel s = (ListSelectionModel) table.getSelectionModel();
     
    163163        Main.map.repaint(100);
    164164    }
    165    
     165
    166166    @Override
    167167    public void actionPerformed(ActionEvent arg0) {
    168168        final JPanel msg = new JPanel(new GridBagLayout());
    169        
     169
    170170        dateFilter = new DateFilterPanel(layer, "gpx.traces", false);
    171171        dateFilter.setFilterAppliedListener(new ActionListener(){
     
    179179        });
    180180        dateFilter.loadFromPrefs();
    181        
     181
    182182        final JToggleButton b = new JToggleButton(new AbstractAction(tr("Select by date")) {
    183183            @Override public void actionPerformed(ActionEvent e) {
     
    193193        msg.add(b, GBC.std().insets(0,0,5,0));
    194194        msg.add(dateFilter, GBC.eol().insets(0,0,10,0).fill(GBC.HORIZONTAL));
    195        
     195
    196196        msg.add(new JLabel(tr("<html>Select all tracks that you want to be displayed. You can drag select a " + "range of tracks or use CTRL+Click to select specific ones. The map is updated live in the " + "background. Open the URLs by double clicking them.</html>")), GBC.eop().fill(GBC.HORIZONTAL));
    197197        // build table
     
    236236        Main.map.repaint();
    237237    }
    238    
     238
    239239}
  • trunk/src/org/openstreetmap/josm/gui/layer/gpx/ConvertToDataLayerAction.java

    r5927 r6070  
    6868        Main.main.removeLayer(layer);
    6969    }
    70    
     70
    7171}
  • trunk/src/org/openstreetmap/josm/gui/layer/gpx/CustomizeDrawingAction.java

    r5927 r6070  
    101101        Main.map.repaint();
    102102    }
    103    
     103
    104104}
  • trunk/src/org/openstreetmap/josm/gui/layer/gpx/DownloadAlongPanel.java

    r6054 r6070  
    2525 */
    2626public class DownloadAlongPanel extends JPanel {
    27        
    28         // Preferences keys
    29         private final String prefOsm;
    30         private final String prefGps;
    31         private final String prefDist;
    32         private final String prefArea;
    33         private final String prefNear;
    34 
    35         // Data types to download
     27   
     28    // Preferences keys
     29    private final String prefOsm;
     30    private final String prefGps;
     31    private final String prefDist;
     32    private final String prefArea;
     33    private final String prefNear;
     34
     35    // Data types to download
    3636    private final JCheckBox cbDownloadOsmData;
    3737    private final JCheckBox cbDownloadGpxData;
    3838
    3939    // Legacy list of values
    40         private static final Integer dist[] = { 5000, 500, 50 };
    41         private static final Integer area[] = { 20, 10, 5, 1 };
    42        
    43         private final JList buffer;
    44         private final JList maxRect;
    45         private final JList downloadNear;
    46        
    47         /**
    48         * Constructs a new {@code DownloadPanel}.
    49         * @param prefOsm Preference key determining if OSM data should be downloaded
    50         * @param prefGps Preference key determining if GPS data should be downloaded
    51         * @param prefDist Preference key determining maximum distance
    52         * @param prefArea Preference key determining maximum area
    53         * @param prefNear Preference key determining "near" parameter. Can be {@code null}
    54         */
    55         public DownloadAlongPanel(String prefOsm, String prefGps, String prefDist, String prefArea, String prefNear) {
    56                 super(new GridBagLayout());
    57                
    58                 this.prefOsm = prefOsm;
    59                 this.prefGps = prefGps;
    60                 this.prefDist = prefDist;
    61                 this.prefArea = prefArea;
    62                 this.prefNear = prefNear;
    63 
    64                 cbDownloadOsmData = new JCheckBox(tr("OpenStreetMap data"), Main.pref.getBoolean(prefOsm, true));
     40    private static final Integer dist[] = { 5000, 500, 50 };
     41    private static final Integer area[] = { 20, 10, 5, 1 };
     42   
     43    private final JList buffer;
     44    private final JList maxRect;
     45    private final JList downloadNear;
     46   
     47    /**
     48    * Constructs a new {@code DownloadPanel}.
     49    * @param prefOsm Preference key determining if OSM data should be downloaded
     50    * @param prefGps Preference key determining if GPS data should be downloaded
     51    * @param prefDist Preference key determining maximum distance
     52    * @param prefArea Preference key determining maximum area
     53    * @param prefNear Preference key determining "near" parameter. Can be {@code null}
     54    */
     55    public DownloadAlongPanel(String prefOsm, String prefGps, String prefDist, String prefArea, String prefNear) {
     56        super(new GridBagLayout());
     57       
     58        this.prefOsm = prefOsm;
     59        this.prefGps = prefGps;
     60        this.prefDist = prefDist;
     61        this.prefArea = prefArea;
     62        this.prefNear = prefNear;
     63
     64        cbDownloadOsmData = new JCheckBox(tr("OpenStreetMap data"), Main.pref.getBoolean(prefOsm, true));
    6565        cbDownloadOsmData.setToolTipText(tr("Select to download OSM data."));
    6666        add(cbDownloadOsmData,  GBC.std().insets(1,5,1,5));
     
    6969        add(cbDownloadGpxData,  GBC.eol().insets(5,5,1,5));
    7070       
    71                 add(new JLabel(tr("Download everything within:")), GBC.eol());
    72                 String s[] = new String[dist.length];
    73                 for (int i = 0; i < dist.length; ++i) {
    74                         s[i] = tr("{0} meters", dist[i]);
    75                 }
    76                 buffer = new JList(s);
    77                
    78                 double distanceValue = Main.pref.getDouble(prefDist, dist[0]);
    79                 int distanceLegacyIndex = 0;
    80                 for (int i = 0; i < dist.length; i++) {
    81                         if (dist[i] == (int)distanceValue) {
    82                                 distanceLegacyIndex = i;
    83                                 break;
    84                         }
    85                 }
    86                
    87                 buffer.setSelectedIndex(distanceLegacyIndex);
    88                 add(buffer, GBC.eol());
    89 
    90                 add(new JLabel(tr("Maximum area per request:")), GBC.eol());
    91                 s = new String[area.length];
    92                 for (int i = 0; i < area.length; ++i) {
    93                         s[i] = tr("{0} sq km", area[i]);
    94                 }
    95                 maxRect = new JList(s);
    96 
    97                 double areaValue = Main.pref.getDouble(prefArea, area[0]);
    98                 int areaLegacyIndex = 0;
    99                 for (int i = 0; i < area.length; i++) {
    100                         if (area[i] == (int)areaValue) {
    101                                 areaLegacyIndex = i;
    102                                 break;
    103                         }
    104                 }
    105                
    106                 maxRect.setSelectedIndex(areaLegacyIndex);
    107                 add(maxRect, GBC.eol());
    108                
    109                 if (prefNear != null) {
     71        add(new JLabel(tr("Download everything within:")), GBC.eol());
     72        String s[] = new String[dist.length];
     73        for (int i = 0; i < dist.length; ++i) {
     74            s[i] = tr("{0} meters", dist[i]);
     75        }
     76        buffer = new JList(s);
     77       
     78        double distanceValue = Main.pref.getDouble(prefDist, dist[0]);
     79        int distanceLegacyIndex = 0;
     80        for (int i = 0; i < dist.length; i++) {
     81            if (dist[i] == (int)distanceValue) {
     82                distanceLegacyIndex = i;
     83                break;
     84            }
     85        }
     86       
     87        buffer.setSelectedIndex(distanceLegacyIndex);
     88        add(buffer, GBC.eol());
     89
     90        add(new JLabel(tr("Maximum area per request:")), GBC.eol());
     91        s = new String[area.length];
     92        for (int i = 0; i < area.length; ++i) {
     93            s[i] = tr("{0} sq km", area[i]);
     94        }
     95        maxRect = new JList(s);
     96
     97        double areaValue = Main.pref.getDouble(prefArea, area[0]);
     98        int areaLegacyIndex = 0;
     99        for (int i = 0; i < area.length; i++) {
     100            if (area[i] == (int)areaValue) {
     101                areaLegacyIndex = i;
     102                break;
     103            }
     104        }
     105       
     106        maxRect.setSelectedIndex(areaLegacyIndex);
     107        add(maxRect, GBC.eol());
     108       
     109        if (prefNear != null) {
    110110            add(new JLabel(tr("Download near:")), GBC.eol());
    111111            downloadNear = new JList(new String[]{tr("track only"), tr("waypoints only"), tr("track and waypoints")});
    112112            downloadNear.setSelectedIndex(Main.pref.getInteger(prefNear, 0));
    113113            add(downloadNear, GBC.eol());
    114                 } else {
    115                     downloadNear = null;
    116                 }
    117         }
    118        
    119         /**
    120         * Gets the maximum distance in meters
    121         * @return The maximum distance, in meters
    122         */
    123         public final double getDistance() {
    124                 return dist[buffer.getSelectedIndex()];
    125         }
    126 
    127         /**
    128         * Gets the maximum area in squared kilometers
    129         * @return The maximum distance, in squared kilometers
    130         */
    131         public final double getArea() {
    132                 return area[maxRect.getSelectedIndex()];
    133         }
    134        
    135         /**
    136         * Gets the "download near" choosen value
    137         * @return the "download near" choosen value (0: track only, 1: waypoints only, 2: both)
    138         */
    139         public final int getNear() {
    140             return downloadNear.getSelectedIndex();
    141         }
    142        
     114        } else {
     115            downloadNear = null;
     116        }
     117    }
     118   
     119    /**
     120    * Gets the maximum distance in meters
     121    * @return The maximum distance, in meters
     122    */
     123    public final double getDistance() {
     124        return dist[buffer.getSelectedIndex()];
     125    }
     126
     127    /**
     128    * Gets the maximum area in squared kilometers
     129    * @return The maximum distance, in squared kilometers
     130    */
     131    public final double getArea() {
     132        return area[maxRect.getSelectedIndex()];
     133    }
     134   
     135    /**
     136    * Gets the "download near" choosen value
     137    * @return the "download near" choosen value (0: track only, 1: waypoints only, 2: both)
     138    */
     139    public final int getNear() {
     140        return downloadNear.getSelectedIndex();
     141    }
     142   
    143143    /**
    144144     * Replies true if the user selected to download OSM data
     
    158158        return cbDownloadGpxData.isSelected();
    159159    }
    160        
     160   
    161161    /**
    162162     * Remembers the current settings in the download panel
    163163     */
    164164    protected final void rememberSettings() {
    165                 Main.pref.put(prefOsm, isDownloadOsmData());
    166                 Main.pref.put(prefGps, isDownloadGpxData());
    167                 Main.pref.putDouble(prefDist, getDistance());
    168                 Main.pref.putDouble(prefArea, getArea());
    169                 if (prefNear != null) {
    170                     Main.pref.putInteger(prefNear, getNear());
    171                 }
     165        Main.pref.put(prefOsm, isDownloadOsmData());
     166        Main.pref.put(prefGps, isDownloadGpxData());
     167        Main.pref.putDouble(prefDist, getDistance());
     168        Main.pref.putDouble(prefArea, getArea());
     169        if (prefNear != null) {
     170            Main.pref.putInteger(prefNear, getNear());
     171        }
    172172    }
    173173   
     
    177177     */
    178178    protected final void addChangeListener(ChangeListener listener) {
    179         cbDownloadGpxData.addChangeListener(listener);
    180         cbDownloadOsmData.addChangeListener(listener);
     179        cbDownloadGpxData.addChangeListener(listener);
     180        cbDownloadOsmData.addChangeListener(listener);
    181181    }
    182182
  • trunk/src/org/openstreetmap/josm/gui/layer/gpx/DownloadAlongTrackAction.java

    r6054 r6070  
    2525 */
    2626public class DownloadAlongTrackAction extends DownloadAlongAction {
    27    
     27
    2828    static final int NEAR_TRACK = 0;
    2929    static final int NEAR_WAYPOINTS = 1;
     
    3636    private static final String PREF_DOWNLOAD_ALONG_TRACK_AREA = "downloadAlongTrack.area";
    3737    private static final String PREF_DOWNLOAD_ALONG_TRACK_NEAR = "downloadAlongTrack.near";
    38    
     38
    3939    private final GpxData data;
    4040
     
    5050    @Override
    5151    public void actionPerformed(ActionEvent e) {
    52        
     52
    5353        final DownloadAlongPanel panel = new DownloadAlongPanel(
    5454                PREF_DOWNLOAD_ALONG_TRACK_OSM, PREF_DOWNLOAD_ALONG_TRACK_GPS,
     
    5858            return;
    5959        }
    60        
     60
    6161        final int near = panel.getNear();
    6262
     
    124124                    return;
    125125                }
    126                 confirmAndDownloadAreas(a, max_area, panel.isDownloadOsmData(), panel.isDownloadGpxData(), 
     126                confirmAndDownloadAreas(a, max_area, panel.isDownloadOsmData(), panel.isDownloadGpxData(),
    127127                        tr("Download from OSM along this track"), progressMonitor);
    128128            }
  • trunk/src/org/openstreetmap/josm/gui/layer/gpx/DownloadWmsAlongTrackAction.java

    r5927 r6070  
    3737
    3838    private final GpxData data;
    39    
     39
    4040    public DownloadWmsAlongTrackAction(final GpxData data) {
    4141        super(tr("Precache imagery tiles along this track"), ImageProvider.get("downloadalongtrack"));
     
    118118        JOptionPane.showMessageDialog(Main.parent, tr("There are no imagery layers."), tr("No imagery layers"), JOptionPane.WARNING_MESSAGE);
    119119    }
    120    
     120
    121121}
  • trunk/src/org/openstreetmap/josm/gui/layer/gpx/ImportAudioAction.java

    r5927 r6070  
    3939public class ImportAudioAction extends AbstractAction {
    4040    private final GpxLayer layer;
    41    
     41
    4242    private static class Markers {
    4343        public boolean timedMarkersOmitted = false;
     
    114114        }
    115115    }
    116    
     116
    117117    /**
    118118     * Makes a new marker layer derived from this GpxLayer containing at least one audio marker
  • trunk/src/org/openstreetmap/josm/gui/layer/gpx/ImportImagesAction.java

    r5927 r6070  
    6262        }
    6363    }
    64    
     64
    6565}
  • trunk/src/org/openstreetmap/josm/gui/layer/gpx/MarkersFromNamedPointsAction.java

    r5927 r6070  
    4444        }
    4545    }
    46    
     46
    4747}
  • trunk/src/org/openstreetmap/josm/gui/layer/markerlayer/Marker.java

    r5684 r6070  
    321321     *
    322322     * Override in subclasses to add all necessary attributes.
    323      * 
     323     *
    324324     * @return the corresponding WayPoint with all relevant attributes
    325325     */
  • trunk/src/org/openstreetmap/josm/gui/mappaint/Cascade.java

    r5926 r6070  
    1818 */
    1919public class Cascade implements Cloneable {
    20    
     20
    2121    public static final Cascade EMPTY_CASCADE = new Cascade();
    2222
     
    2828        return get(key, def, klass, false);
    2929    }
    30    
     30
    3131    /**
    3232     * Get value for the given key
     
    182182    @Override
    183183    public Cascade clone() {
    184         @SuppressWarnings("unchecked") 
     184        @SuppressWarnings("unchecked")
    185185        HashMap<String, Object> clonedProp = (HashMap) ((HashMap) this.prop).clone();
    186186        Cascade c = new Cascade();
  • trunk/src/org/openstreetmap/josm/gui/mappaint/Environment.java

    r5705 r6070  
    5151    /**
    5252     * Creates a clone of the environment {@code other}
    53      * 
     53     *
    5454     * @param other the other environment. Must not be null.
    5555     */
     
    112112    /**
    113113     * Replies the current context.
    114      * 
     114     *
    115115     * @return the current context
    116116     */
  • trunk/src/org/openstreetmap/josm/gui/mappaint/LabelCompositionStrategy.java

    r4007 r6070  
    1515 * strategies on how to compose the text label which can be rendered close to a node
    1616 * or within an area in an OSM map.</p>
    17  * 
     17 *
    1818 * <p>The three strategies below support three rules for composing a label:
    1919 * <ul>
    2020 *   <li>{@link StaticLabelCompositionStrategy} - the label is given by a static text
    2121 *   specified in the MapCSS style file</li>
    22  * 
     22 *
    2323 *   <li>{@link TagLookupCompositionStrategy} - the label is given by the content of a
    2424 *   tag whose name specified in the MapCSS style file</li>
    25  * 
     25 *
    2626 *   <li>{@link DeriveLabelFromNameTagsCompositionStrategy} - the label is given by the value
    2727 *   of one
     
    167167        /**
    168168         * <p>Creates the strategy and initializes its name tags from the preferences.</p>
    169          * 
     169         *
    170170         * <p><strong>Note:</strong> If the list of name tags in the preferences changes, strategy instances
    171171         * are not notified. It's up to the client to listen to preference changes and
    172172         * invoke {@link #initNameTagsFromPreferences()} accordingly.</p>
    173          * 
     173         *
    174174         */
    175175        public DeriveLabelFromNameTagsCompositionStrategy() {
     
    179179        /**
    180180         * Sets the name tags to be looked up in order to build up the label
    181          * 
     181         *
    182182         * @param nameTags the name tags. null values are ignore.
    183183         */
     
    201201        /**
    202202         * Replies an unmodifiable list of the name tags used to compose the label.
    203          * 
     203         *
    204204         * @return the list of name tags
    205205         */
  • trunk/src/org/openstreetmap/josm/gui/mappaint/MapPaintStyles.java

    r5891 r6070  
    124124                .setOptional(true).get();
    125125    }
    126    
     126
    127127    public static ImageIcon getNodeIcon(Tag tag) {
    128128        return getNodeIcon(tag, true);
    129129    }
    130    
     130
    131131    public static ImageIcon getNodeIcon(Tag tag, boolean includeDeprecatedIcon) {
    132132        if (tag != null) {
  • trunk/src/org/openstreetmap/josm/gui/mappaint/StyleCache.java

    r3865 r6070  
    2828
    2929    public final static StyleCache EMPTY_STYLECACHE = (new StyleCache()).intern();
    30    
     30
    3131    private StyleCache() {
    3232        bd = new ArrayList<Double>();
     
    189189            bd.add(i, lower);
    190190            data.add(i, sl);
    191            
     191
    192192            //  --|--|----|--------|--
    193193            //   i-1 i   i+1      i+2
     
    200200        }
    201201    }
    202    
     202
    203203    public void consistencyTest() {
    204204        if (bd.size() < 2) throw new AssertionError();
  • trunk/src/org/openstreetmap/josm/gui/mappaint/TextElement.java

    r5342 r6070  
    3636    /**
    3737     * Creates a new text element
    38      * 
     38     *
    3939     * @param strategy the strategy indicating how the text is composed for a specific {@link OsmPrimitive} to be rendered.
    4040     * If null, no label is rendered.
     
    6060    /**
    6161     * Copy constructor
    62      * 
     62     *
    6363     * @param other the other element.
    6464     */
     
    7676     * Derives a suitable label composition strategy from the style properties in
    7777     * {@code c}.
    78      * 
     78     *
    7979     * @param c the style properties
    8080     * @return the label composition strategy
     
    109109     * Builds a text element from style properties in {@code c} and the
    110110     * default text color {@code defaultTextColor}
    111      * 
     111     *
    112112     * @param c the style properties
    113113     * @param defaultTextColor the default text color. Must not be null.
     
    161161    /**
    162162     * Replies the label to be rendered for the primitive {@code osm}.
    163      * 
     163     *
    164164     * @param osm the OSM object
    165165     * @return the label, or null, if {@code osm} is null or if no label can be
  • trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/Condition.java

    r4069 r6070  
    136136    /**
    137137     * <p>Represents a key/value condition which is either applied to a primitive.</p>
    138      * 
     138     *
    139139     */
    140140    public static class KeyValueCondition extends Condition {
     
    146146        /**
    147147         * <p>Creates a key/value-condition.</p>
    148          * 
     148         *
    149149         * @param k the key
    150150         * @param v the value
     
    208208     *                  LINK:        the parent is a relation and it has at least one member with the role
    209209     *                               "a label" referring to the child
    210      * 
     210     *
    211211     *     [!"a label"]  PRIMITIVE:  the primitive doesn't have a tag "a label"
    212212     *                   LINK:       the parent is a relation but doesn't have a member with the role
     
    224224
    225225        /**
    226          * 
     226         *
    227227         * @param label
    228228         * @param exclamationMarkPresent
  • trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/Instruction.java

    r5801 r6070  
    3838                if (key.equals(TEXT)) {
    3939                    /* Special case for declaration 'text: ...'
    40                      * 
     40                     *
    4141                     * - Treat the value 'auto' as keyword.
    4242                     * - Treat any other literal value 'litval' as as reference to tag with key 'litval'
    43                      * 
     43                     *
    4444                     * - Accept function expressions as is. This allows for
    4545                     *     tag(a_tag_name)                 value of a tag
  • trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/MapCSSException.java

    r4069 r6070  
    77    protected Integer line;
    88    protected Integer column;
    9    
     9
    1010    public MapCSSException(String specialmessage) {
    1111        this.specialmessage = specialmessage;
     
    1919        this.line = line;
    2020    }
    21    
     21
    2222    @Override
    2323    public String getMessage() {
  • trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/MapCSSRule.java

    r4074 r6070  
    88
    99public class MapCSSRule {
    10    
     10
    1111    public List<Selector> selectors;
    1212    public List<Instruction> declaration;
     
    1919    /**
    2020     * <p>Executes the instructions against the environment {@code env}</p>
    21      * 
     21     *
    2222     * @param env the environment
    2323     */
  • trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/MapCSSStyleSource.java

    r4252 r6070  
    4747     * <p>Creates a new style source from the MapCSS styles supplied in
    4848     * {@code css}</p>
    49      * 
     49     *
    5050     * @param css the MapCSS style declaration. Must not be null.
    5151     * @throws IllegalArgumentException thrown if {@code css} is null
  • trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/Selector.java

    r5841 r6070  
    3434    /**
    3535     * <p>Represents a child selector or a parent selector.</p>
    36      * 
     36     *
    3737     * <p>In addition to the standard CSS notation for child selectors, JOSM also supports
    3838     * an "inverse" notation:</p>
     
    4040     *    selector_a > selector_b { ... }       // the standard notation (child selector)
    4141     *    relation[type=route] > way { ... }    // example (all ways of a route)
    42      * 
     42     *
    4343     *    selector_a < selector_b { ... }       // the inverse notation (parent selector)
    4444     *    node[traffic_calming] < way { ... }   // example (way that has a traffic calming node)
     
    5555
    5656        /**
    57          * 
     57         *
    5858         * @param a the first selector
    5959         * @param b the second selector
     
    6969        /**
    7070         * <p>Finds the first referrer matching {@link #left}</p>
    71          * 
     71         *
    7272         * <p>The visitor works on an environment and it saves the matching
    7373         * referrer in {@code e.parent} and its relative position in the
    7474         * list referrers "child list" in {@code e.index}.</p>
    75          * 
     75         *
    7676         * <p>If after execution {@code e.parent} is null, no matching
    7777         * referrer was found.</p>
     
    196196        }
    197197    }
    198    
     198
    199199    /**
    200200     * Super class of {@link GeneralSelector} and {@link LinkSelector}
     
    204204
    205205        protected final List<Condition> conds;
    206        
     206
    207207        protected AbstractSelector(List<Condition> conditions) {
    208208            if (conditions == null || conditions.isEmpty()) {
  • trunk/src/org/openstreetmap/josm/gui/mappaint/xml/IconPrototype.java

    r3836 r6070  
    66
    77public class IconPrototype extends Prototype {
    8    
     8
    99    public IconReference icon;
    1010    public Boolean annotate;
  • trunk/src/org/openstreetmap/josm/gui/oauth/AdvancedOAuthPropertiesPanel.java

    r5886 r6070  
    3434 * <li>Access token URL</li>
    3535 * <li>Authorize URL</li>
    36  * 
     36 *
    3737 * @see OAuthParameters
    3838 * @since 2746
  • trunk/src/org/openstreetmap/josm/gui/oauth/ManualAuthorizationUI.java

    r5886 r6070  
    143143    public void setApiUrl(String apiUrl) {
    144144        super.setApiUrl(apiUrl);
    145         if (pnlMessage != null) { 
     145        if (pnlMessage != null) {
    146146            pnlMessage.setText(tr("<html><body>"
    147147                    + "Please enter an OAuth Access Token which is authorized to access the OSM server "
  • trunk/src/org/openstreetmap/josm/gui/oauth/OsmOAuthAuthorizationClient.java

    r6066 r6070  
    4040
    4141/**
    42  * An OAuth 1.0 authorization client. 
     42 * An OAuth 1.0 authorization client.
    4343 * @since 2746
    4444 */
  • trunk/src/org/openstreetmap/josm/gui/oauth/SemiAutomaticAuthorizationUI.java

    r5886 r6070  
    3737 * In contrast to the fully-automatic procedure the user is dispatched to an
    3838 * external browser for login and authorisation.
    39  * 
     39 *
    4040 * @since 2746
    4141 */
  • trunk/src/org/openstreetmap/josm/gui/preferences/AudioPreference.java

    r5886 r6070  
    3434        }
    3535    }
    36    
     36
    3737    private AudioPreference() {
    3838        super("audio", tr("Audio Settings"), tr("Settings for the audio player and audio markers."));
     
    5757    public void addGui(PreferenceTabbedPane gui) {
    5858        JPanel audio = new JPanel(new GridBagLayout());
    59        
     59
    6060        // audioMenuVisible
    6161        audioMenuVisible.setSelected(! Main.pref.getBoolean("audio.menuinvisible"));
  • trunk/src/org/openstreetmap/josm/gui/preferences/PreferenceDialog.java

    r5998 r6070  
    8686        this.setMaximumSize( Toolkit.getDefaultToolkit().getScreenSize());
    8787    }
    88    
     88
    8989    /**
    9090     * Replies the preferences tabbed pane.
  • trunk/src/org/openstreetmap/josm/gui/preferences/PreferenceSetting.java

    r4989 r6070  
    33
    44/**
    5  * Base interface of Preferences settings, should not be directly implemented, 
     5 * Base interface of Preferences settings, should not be directly implemented,
    66 * see {@link TabPreferenceSetting} and {@link SubPreferenceSetting}.
    77 */
     
    1818     */
    1919    boolean ok();
    20    
     20
    2121    /**
    2222     * Called to know if the preferences tab has only to be displayed in expert mode.
  • trunk/src/org/openstreetmap/josm/gui/preferences/PreferenceTabbedPane.java

    r5973 r6070  
    212212            }}, clazz);
    213213    }
    214    
     214
    215215    public boolean selectSubTabByPref(Class<? extends SubPreferenceSetting> clazz) {
    216216        for (PreferenceSetting setting : settings) {
     
    244244        return getSetting(ImageryPreference.class);
    245245    }
    246    
     246
    247247    public final ShortcutPreference getShortcutPreference() {
    248248        return getSetting(ShortcutPreference.class);
  • trunk/src/org/openstreetmap/josm/gui/preferences/ServerAccessPreference.java

    r5899 r6070  
    2525        }
    2626    }
    27    
     27
    2828    private ServerAccessPreference() {
    2929        super("connection", tr("Connection Settings"), tr("Connection Settings for the OSM server."), false, new JTabbedPane());
  • trunk/src/org/openstreetmap/josm/gui/preferences/SourceEntry.java

    r5220 r6070  
    99
    1010/**
    11  * A source entry primarily used to save the user's selection of mappaint styles, 
     11 * A source entry primarily used to save the user's selection of mappaint styles,
    1212 * but also for preset sources.
    1313 */
     
    6161            return false;
    6262        final SourceEntry other = (SourceEntry) obj;
    63         return equal(other.url, url) && 
     63        return equal(other.url, url) &&
    6464                equal(other.name, name) &&
    6565                equal(other.title, title) &&
  • trunk/src/org/openstreetmap/josm/gui/preferences/ToolbarPreferences.java

    r6020 r6070  
    147147            return new ActionDefinition(null);
    148148        }
    149        
     149
    150150        public boolean hasParameters() {
    151151            if (!(getAction() instanceof ParameterizedAction)) return false;
    152152            for (Object o: parameters.values()) {
    153153                if (o!=null) return true;
    154             } 
     154            }
    155155            return false;
    156156        }
     
    412412                            }
    413413                });
    414            
     414
    415415        JMenuItem configure = new JMenuItem(new AbstractAction(tr("Configure toolbar")) {
    416416            @Override
     
    430430                    p.setVisible(true);
    431431                // refresh toolbar to try using changed shortcuts without restart
    432                     Main.toolbar.refreshToolbarControl(); 
     432                    Main.toolbar.refreshToolbarControl();
    433433                }
    434434            });
     
    485485
    486486        private final class Move implements ActionListener {
    487             @Override 
     487            @Override
    488488            public void actionPerformed(ActionEvent e) {
    489489                if (e.getActionCommand().equals("<") && actionsTree.getSelectionCount() > 0) {
     
    10321032                final JButton b = addButtonAndShortcut(action);
    10331033                buttonActions.put(b, action);
    1034                
     1034
    10351035                Icon i = action.getDisplayIcon();
    10361036                if (i != null) {
     
    10551055        control.setVisible(control.getComponentCount() != 0);
    10561056    }
    1057    
     1057
    10581058    private JButton addButtonAndShortcut(ActionDefinition action) {
    10591059        Action act = action.getParametrizedAction();
    10601060        JButton b = control.add(act);
    1061        
     1061
    10621062        Shortcut sc = null;
    10631063        if (action.getAction() instanceof JosmAction) {
     
    10721072            paramCode =  action.parameters.hashCode();
    10731073        }
    1074        
     1074
    10751075        String tt = action.getDisplayTooltip();
    10761076        if (tt==null) {
     
    10911091            Main.unregisterShortcut(sc);
    10921092            Main.registerActionShortcut(act, sc);
    1093            
     1093
    10941094            // add shortcut info to the tooltip if needed
    10951095            if (sc.getAssignedUser()) {
     
    11001100            }
    11011101        }
    1102        
     1102
    11031103        if (!tt.isEmpty()) {
    11041104            b.setToolTipText(tt);
  • trunk/src/org/openstreetmap/josm/gui/preferences/ValidatorPreference.java

    r4976 r6070  
    3232        }
    3333    }
    34    
     34
    3535    private ValidatorPreference() {
    36         super("validator", tr("Data validator"), 
     36        super("validator", tr("Data validator"),
    3737                tr("An OSM data validator that checks for common errors made by users and editor programs."));
    3838    }
  • trunk/src/org/openstreetmap/josm/gui/preferences/advanced/AdvancedPreference.java

    r6022 r6070  
    9595        });
    9696        readPreferences(Main.pref);
    97        
     97
    9898        applyFilter();
    9999        table = new PreferencesTable(displayData);
     
    140140            }
    141141        });
    142        
     142
    143143        JButton export = new JButton(tr("Export selected items"));
    144144        p.add(export, GBC.std().insets(5,5,0,0));
     
    148148            }
    149149        });
    150        
     150
    151151        final JButton more = new JButton(tr("More..."));
    152152        p.add(more, GBC.std().insets(5,5,0,0));
     
    178178        allData = prepareData(loaded, orig, defaults);
    179179    }
    180    
     180
    181181    private File[] askUserForCustomSettingsFiles(boolean saveFileFlag, String title) {
    182182        FileFilter filter = new FileFilter() {
     
    195195            if (sel.length==1 && !sel[0].getName().contains(".")) sel[0]=new File(sel[0].getAbsolutePath()+".xml");
    196196            return sel;
    197         } 
     197        }
    198198        return new File[0];
    199199    }
    200  
     200
    201201    private void exportSelectedToXML() {
    202202        ArrayList<String> keys = new ArrayList<String>();
    203203        boolean hasLists = false;
    204        
     204
    205205        for (PrefEntry p: table.getSelectedItems()) {
    206206            // preferences with default values are not saved
     
    212212            }
    213213        }
    214        
     214
    215215        if (keys.isEmpty()) {
    216216            JOptionPane.showMessageDialog(Main.parent,
     
    233233        CustomConfigurator.exportPreferencesKeysToFile(files[0].getAbsolutePath(), answer == 0, keys);
    234234    }
    235    
     235
    236236    private void readPreferencesFromXML() {
    237237        File[] files = askUserForCustomSettingsFiles(false, tr("Open JOSM customization file"));
     
    262262        applyFilter();
    263263    }
    264    
     264
    265265    private Comparator<PrefEntry> customComparator = new Comparator<PrefEntry>() {
    266266        @Override
     
    273273        }
    274274    };
    275                
     275
    276276    private List<PrefEntry> prepareData(Map<String, Setting> loaded, Map<String, Setting> orig, Map<String, Setting> defaults) {
    277277        List<PrefEntry> data = new ArrayList<PrefEntry>();
     
    306306        return data;
    307307    }
    308    
     308
    309309    Map<String,String> profileTypes = new LinkedHashMap<String, String>();
    310    
     310
    311311    private JPopupMenu buildPopupMenu() {
    312312        JPopupMenu menu = new JPopupMenu();
     
    315315        profileTypes.put(marktr("toolbar"), "toolbar.*");
    316316        profileTypes.put(marktr("imagery"), "imagery.*");
    317        
     317
    318318        for (Entry<String,String> e: profileTypes.entrySet()) {
    319319            menu.add(new ExportProfileAction(Main.pref, e.getKey(), e.getValue()));
    320320        }
    321        
     321
    322322        menu.addSeparator();
    323323        menu.add(getProfileMenu());
     
    340340        return menu;
    341341    }
    342    
     342
    343343    private JMenu getProfileMenu() {
    344344        final JMenu p =new JMenu(tr("Load profile"));
     
    372372        return p;
    373373    }
    374    
     374
    375375    private class ImportProfileAction extends AbstractAction {
    376376        private final File file;
    377377        private final String type;
    378        
     378
    379379        public ImportProfileAction(String name, File file, String type) {
    380380            super(name);
  • trunk/src/org/openstreetmap/josm/gui/preferences/display/DrawingPreference.java

    r5703 r6070  
    126126        panel.add(onewayArrow, GBC.eop().insets(20,0,0,0));
    127127        panel.add(segmentOrderNumber, GBC.eop().insets(20,0,0,0));
    128        
     128
    129129        panel.add(new JLabel(tr("Select and draw mode options")),
    130130                GBC.eop().insets(5,10,0,0));
    131131        panel.add(virtualNodes, GBC.eop().insets(20,0,0,0));
    132132        panel.add(drawHelperLine, GBC.eop().insets(20, 0, 0, 0));
    133        
     133
    134134        panel.add(performanceLabel, GBC.eop().insets(5,10,0,0));
    135135        panel.add(useAntialiasing, GBC.eop().insets(20,0,0,0));
     
    137137        panel.add(useHighlighting, GBC.eop().insets(20,0,0,0));
    138138        panel.add(outlineOnly, GBC.eol().insets(20,0,0,0));
    139        
     139
    140140        panel.add(new JLabel(tr("Other options")),
    141141                GBC.eop().insets(5,10,0,0));
    142142        panel.add(sourceBounds, GBC.eop().insets(20,0,0,0));
    143143        panel.add(inactive, GBC.eop().insets(20,0,0,0));
    144        
     144
    145145        ExpertToggleAction.addVisibilitySwitcher(performanceLabel);
    146146        ExpertToggleAction.addVisibilitySwitcher(useAntialiasing);
  • trunk/src/org/openstreetmap/josm/gui/preferences/display/LanguagePreference.java

    r5631 r6070  
    4343        model = new LanguageComboBoxModel();
    4444        // Selecting the language BEFORE the JComboBox listens to model changes speed up initialization by ~35ms (see #7386)
    45         // See http://stackoverflow.com/questions/3194958/fast-replacement-for-jcombobox-basiccomboboxui 
     45        // See http://stackoverflow.com/questions/3194958/fast-replacement-for-jcombobox-basiccomboboxui
    4646        model.selectLanguage(Main.pref.get("language"));
    4747        langCombo = new JosmComboBox(model);
     
    5454        panel.add(langCombo, GBC.eol().fill(GBC.HORIZONTAL));
    5555        panel.add(Box.createVerticalGlue(), GBC.eol().fill(GBC.BOTH));
    56        
     56
    5757        TabPreferenceSetting tabPref = lafPreference.getTabPreferenceSetting(gui);
    5858        tabPref.registerSubTab(this, tabPref.getSubTab(lafPreference));
  • trunk/src/org/openstreetmap/josm/gui/preferences/imagery/AddImageryPanel.java

    r5886 r6070  
    2929    protected final JosmTextArea rawUrl = new JosmTextArea(3, 40);
    3030    protected final JosmTextField name = new JosmTextField();
    31    
     31
    3232    protected final Collection<ContentValidationListener> listeners = new ArrayList<ContentValidationListener>();
    33    
     33
    3434    /**
    3535     * A listener notified when the validation status of this panel change.
     
    3838        /**
    3939         * Called when the validation status of this panel changed
    40          * @param isValid true if the conditions required to close this panel are met   
     40         * @param isValid true if the conditions required to close this panel are met
    4141         */
    4242        public void contentChanged(boolean isValid);
     
    7171        return s.replaceAll("[\r\n]+", "").trim();
    7272    }
    73    
     73
    7474    protected final String getImageryName() {
    7575        return sanitize(name.getText());
     
    7979        return sanitize(rawUrl.getText());
    8080    }
    81    
     81
    8282    protected abstract boolean isImageryValid();
    8383
  • trunk/src/org/openstreetmap/josm/gui/preferences/imagery/AddTMSLayerPanel.java

    r5886 r6070  
    8989                (int) Math.ceil(view.getPreferredSpan(View.Y_AXIS)));
    9090    }
    91    
     91
    9292    protected final String getTmsUrl() {
    9393        return sanitize(tmsUrl.getText());
  • trunk/src/org/openstreetmap/josm/gui/preferences/imagery/AddWMSLayerPanel.java

    r6016 r6070  
    110110        tree.getLayerTree().addPropertyChangeListener("selectedLayers", new PropertyChangeListener() {
    111111            @Override
    112             public void propertyChange(PropertyChangeEvent evt) { 
     112            public void propertyChange(PropertyChangeEvent evt) {
    113113                onLayerSelectionChanged();
    114114            }
     
    135135            }
    136136        });
    137        
     137
    138138        registerValidableComponent(endpoint);
    139139        registerValidableComponent(rawUrl);
    140140        registerValidableComponent(wmsUrl);
    141141    }
    142    
     142
    143143    protected final void onLayerSelectionChanged() {
    144144        if (wms.getServiceUrl() != null) {
     
    161161        return info;
    162162    }
    163    
     163
    164164    protected final String getWmsUrl() {
    165165        return sanitize(wmsUrl.getText());
    166166    }
    167    
     167
    168168    protected boolean isImageryValid() {
    169169        if (getImageryName().isEmpty()) {
  • trunk/src/org/openstreetmap/josm/gui/preferences/imagery/ImageryPreference.java

    r5886 r6070  
    8888        addSettingsSection(p, name, section, GBC.eol());
    8989    }
    90    
     90
    9191    private void addSettingsSection(final JPanel p, String name, JPanel section, GBC gbc) {
    9292        final JLabel lbl = new JLabel(name);
     
    436436                    throw new IllegalStateException("Type " + type + " not supported");
    437437                }
    438                
     438
    439439                final AddImageryDialog addDialog = new AddImageryDialog(gui, p);
    440440                addDialog.showDialog();
    441                
     441
    442442                if (addDialog.getValue() == 1) {
    443443                    try {
     
    455455            }
    456456        }
    457        
     457
    458458        private class RemoveEntryAction extends AbstractAction implements ListSelectionListener {
    459459
  • trunk/src/org/openstreetmap/josm/gui/preferences/plugin/PluginListPanel.java

    r5609 r6070  
    8888        add(hint, gbc);
    8989    }
    90    
     90
    9191    /**
    9292     * A plugin checkbox.
     
    102102        }
    103103    }
    104    
     104
    105105    /**
    106106     * Listener called when the user selects/unselects a plugin checkbox.
     
    139139                        for (String s : pi.getRequiredPlugins()) {
    140140                            if (s.equals(cb.pi.getName())) {
    141                                 otherPlugins.add(pi.getName()); 
     141                                otherPlugins.add(pi.getName());
    142142                                break;
    143143                            }
     
    151151        }
    152152    };
    153    
     153
    154154
    155155    /**
  • trunk/src/org/openstreetmap/josm/gui/preferences/plugin/PluginPreferencesModel.java

    r5601 r6070  
    295295        return ret;
    296296    }
    297    
     297
    298298    /**
    299299     * Replies the set of all available plugins.
  • trunk/src/org/openstreetmap/josm/gui/preferences/projection/AbstractProjectionChoice.java

    r5548 r6070  
    77
    88abstract public class AbstractProjectionChoice implements ProjectionChoice {
    9    
     9
    1010    protected String name;
    1111    protected String id;
     
    5252
    5353    abstract public String getCurrentCode();
    54    
     54
    5555    abstract public String getProjectionName();
    5656
  • trunk/src/org/openstreetmap/josm/gui/preferences/projection/CustomProjectionChoice.java

    r5886 r6070  
    209209    public String getCurrentCode() {
    210210        // not needed - getProjection() is overridden
    211         throw new UnsupportedOperationException(); 
     211        throw new UnsupportedOperationException();
    212212    }
    213213
  • trunk/src/org/openstreetmap/josm/gui/preferences/projection/GaussKruegerProjectionChoice.java

    r5548 r6070  
    5353        return null;
    5454    }
    55    
     55
    5656    @Override
    5757    public String getProjectionName() {
  • trunk/src/org/openstreetmap/josm/gui/preferences/projection/LambertCC9ZonesProjectionChoice.java

    r5548 r6070  
    7777        return null;
    7878    }
    79    
     79
    8080    @Override
    8181    protected String indexToZone(int index) {
  • trunk/src/org/openstreetmap/josm/gui/preferences/projection/ProjectionChoice.java

    r5548 r6070  
    2020     *
    2121     * Will be used to save the user selection to the preference file.
    22      * 
     22     *
    2323     * @return the string identifier
    2424     */
     
    6767    /**
    6868     * Get Preferences from projection code.
    69      * 
     69     *
    7070     * @return null when code is not part of this projection choice.
    7171     * An empty Collection as return value indicates, that the code is supported,
     
    7676    /**
    7777     * Short name of the projection choice as shown in the GUI (combo box).
    78      * 
     78     *
    7979     * @return the name
    8080     */
  • trunk/src/org/openstreetmap/josm/gui/preferences/projection/ProjectionPreference.java

    r6056 r6070  
    9090         * see http://www.epsg-registry.org/
    9191         */
    92         mercator = registerProjectionChoice(tr("Mercator"), "core:mercator", 
     92        mercator = registerProjectionChoice(tr("Mercator"), "core:mercator",
    9393                3857);
    94        
     94
    9595        /**
    9696         * UTM.
     
    155155        /**
    156156         * Lambert 93 projection.
    157          * 
     157         *
    158158         * As specified by the IGN in this document
    159159         * http://professionnels.ign.fr/DISPLAY/000/526/702/5267026/NTG_87.pdf
     
    471471        return gui.getMapPreference();
    472472    }
    473    
     473
    474474    /**
    475475     * Selects the given projection.
  • trunk/src/org/openstreetmap/josm/gui/preferences/projection/UTMProjectionChoice.java

    r5548 r6070  
    2525
    2626    private Hemisphere hemisphere;
    27    
     27
    2828    private final static List<String> cbEntries = new ArrayList<String>();
    2929    static {
  • trunk/src/org/openstreetmap/josm/gui/preferences/shortcut/PrefJPanel.java

    r5954 r6070  
    161161            this.name = name;
    162162        }
    163        
     163
    164164        @Override
    165165        public Component getTableCellRendererComponent(JTable table, Object value, boolean
     
    186186        }
    187187    }
    188    
     188
    189189    private void initComponents() {
    190190        JPanel listPane = new JPanel();
  • trunk/src/org/openstreetmap/josm/gui/preferences/shortcut/ShortcutPreference.java

    r5954 r6070  
    1919
    2020    private String defaultFilter;
    21            
     21
    2222    public static class Factory implements PreferenceSettingFactory {
    2323        public PreferenceSetting createPreferenceSetting() {
     
    2525        }
    2626    }
    27    
     27
    2828    private ShortcutPreference() {
    2929        // icon source: http://www.iconfinder.net/index.php?q=key&page=icondetails&iconid=8553&size=128&q=key&s12=on&s16=on&s22=on&s32=on&s48=on&s64=on&s128=on
     
    3535        super("shortcuts", tr("Keyboard Shortcuts"), tr("Changing keyboard shortcuts manually."));
    3636    }
    37    
     37
    3838    @Override
    3939    public void addGui(PreferenceTabbedPane gui) {
     
    4949        return Shortcut.savePrefs();
    5050    }
    51    
     51
    5252    public void setDefaultFilter(String substring) {
    5353        defaultFilter = substring;
  • trunk/src/org/openstreetmap/josm/gui/tagging/TagEditorPanel.java

    r6068 r6070  
    6464        tagTable.setNextFocusComponent(nextFocusComponent);
    6565    }
    66    
     66
    6767    /**
    6868     * builds the panel with the button row
     
    123123            });
    124124        }
    125        
     125
    126126        addFocusListener(new FocusAdapter() {
    127127            @Override public void focusGained(FocusEvent e) {
  • trunk/src/org/openstreetmap/josm/gui/tagging/TagTable.java

    r6064 r6070  
    4747    private final TagEditorModel model;
    4848    private Component nextFocusComponent;
    49        
     49
    5050    /** a list of components to which focus can be transferred without stopping
    5151     * cell editing this table.
     
    104104                getCellEditor().stopCellEditing();
    105105            }
    106            
     106
    107107            if (row==-1 && col==-1) {
    108108                requestFocusInCell(0, 0);
    109109                return;
    110110            }
    111        
     111
    112112            if (col == 0) {
    113113                col++;
     
    290290            if (!key.trim().isEmpty()) {
    291291                model.appendNewTag();
    292             } 
     292            }
    293293            requestFocusInCell(model.getRowCount()-1, 0);
    294294        }
    295            
     295
    296296        protected void updateEnabledState() {
    297297            setEnabled(TagTable.this.isEnabled());
     
    435435        this.nextFocusComponent = nextFocusComponent;
    436436    }
    437    
     437
    438438    public TagCellEditor getTableCellEditor() {
    439439        return editor;
     
    472472        }
    473473        // there was a bug here - on older 1.6 Java versions Tab was not working
    474         // after such activation. In 1.7 it works OK, 
     474        // after such activation. In 1.7 it works OK,
    475475        // previous solution of usint awt.Robot was resetting mouse speed on Windows
    476476    }
  • trunk/src/org/openstreetmap/josm/gui/tagging/TaggingPreset.java

    r6068 r6070  
    7575    public String locale_name;
    7676   public final static String OPTIONAL_TOOLTIP_TEXT = "Optional tooltip text";
    77    
     77
    7878    /**
    7979     * The types as preparsed collection.
     
    8484    public TemplateEntry nameTemplate;
    8585    public Match nameTemplateFilter;
    86    
     86
    8787    /**
    8888     * Create an empty tagging preset. This will not have any items and
     
    239239        if (roles != null && osm != null) {
    240240            for (Role i : roles.roles) {
    241                 if (i.memberExpression != null && i.memberExpression.match(osm) 
     241                if (i.memberExpression != null && i.memberExpression.match(osm)
    242242                        && (i.types == null || i.types.isEmpty() || i.types.contains(TaggingPresetType.forPrimitive(osm)) )) {
    243243                    return i.key;
  • trunk/src/org/openstreetmap/josm/gui/tagging/TaggingPresetItem.java

    r6068 r6070  
    4646        return null;
    4747    }
    48    
     48
    4949}
  • trunk/src/org/openstreetmap/josm/gui/tagging/TaggingPresetSelector.java

    r6068 r6070  
    465465    }
    466466   
    467     public void setClickListener(ActionListener сlickListener) {
    468         this.clickListener = сlickListener;
     467    public void setClickListener(ActionListener clickListener) {
     468        this.clickListener = clickListener;
    469469    }
    470470   
  • trunk/src/org/openstreetmap/josm/gui/tagging/TaggingPresetType.java

    r6068 r6070  
    4747        return null;
    4848    }
    49    
     49
    5050}
  • trunk/src/org/openstreetmap/josm/gui/tagging/ac/AutoCompletingComboBox.java

    r5704 r6070  
    286286
    287287    private static InputContext privateInputContext = InputContext.getInstance();
    288    
     288
    289289    @Override
    290290    public InputContext getInputContext() {
  • trunk/src/org/openstreetmap/josm/gui/tagging/ac/AutoCompletingTextField.java

    r5886 r6070  
    3636
    3737    private Integer maxChars;
    38    
     38
    3939    /**
    4040     * The document model for the editor
     
    4848        @Override
    4949        public void insertString(int offs, String str, AttributeSet a) throws BadLocationException {
    50            
     50
    5151            // If a maximum number of characters is specified, avoid to exceed it
    5252            if (maxChars != null && str != null && getLength() + str.length() > maxChars) {
     
    5858                }
    5959            }
    60            
     60
    6161            if (autoCompletionList == null) {
    6262                super.insertString(offs, str, a);
  • trunk/src/org/openstreetmap/josm/gui/util/FileFilterAllFiles.java

    r5572 r6070  
    1212 */
    1313public class FileFilterAllFiles extends FileFilter {
    14    
     14
    1515    private static FileFilterAllFiles INSTANCE;
    1616
  • trunk/src/org/openstreetmap/josm/gui/util/GuiHelper.java

    r5881 r6070  
    5252        }
    5353    }
    54    
     54
    5555    public static void executeByMainWorkerInEDT(final Runnable task) {
    5656        Main.worker.submit(new Runnable() {
    5757            public void run() {
    58                 runInEDTAndWait(task); 
     58                runInEDTAndWait(task);
    5959            }
    6060        });
     
    8282        }
    8383    }
    84    
     84
    8585    /**
    8686     * returns true if the user wants to cancel, false if they
     
    104104        return dlg.showDialog().getValue() != 2;
    105105    }
    106    
     106
    107107    /**
    108108     * Replies the disabled (grayed) version of the specified image.
     
    125125        return new ImageIcon(getDisabledImage(icon.getImage()));
    126126    }
    127    
     127
    128128    /**
    129129     * Attaches a {@code HierarchyListener} to the specified {@code Component} that
     
    154154        return pane;
    155155    }
    156    
     156
    157157    /**
    158158     * Schedules a new Timer to be run in the future (once or several times).
     
    169169        return timer;
    170170    }
    171    
     171
    172172    /**
    173173     * Return s new BasicStroke object with given thickness and style
     
    177177    public static Stroke getCustomizedStroke(String code) {
    178178        String[] s = code.trim().split("[^\\.0-9]+");
    179        
    180         if (s.length==0) return new BasicStroke(); 
     179
     180        if (s.length==0) return new BasicStroke();
    181181        float w;
    182182        try {
     
    215215        }
    216216    }
    217    
     217
    218218    /**
    219219     * Gets the font used to display JOSM title in about dialog and splash screen.
     
    227227    public static Font getTitleFont() {
    228228        List<String> fonts = Arrays.asList(GraphicsEnvironment.getLocalGraphicsEnvironment().getAvailableFontFamilyNames());
    229         // Helvetica is the preferred choice but is not available by default on Windows 
     229        // Helvetica is the preferred choice but is not available by default on Windows
    230230        // (http://www.microsoft.com/typography/fonts/product.aspx?pid=161)
    231231        if (fonts.contains("Helvetica")) {
  • trunk/src/org/openstreetmap/josm/gui/widgets/JosmTextField.java

    r5887 r6070  
    2121     *      <code>createDefaultModel</code> method
    2222     * @param text  the initial string to display, or <code>null</code>
    23      * @param columns  the number of columns to use to calculate 
     23     * @param columns  the number of columns to use to calculate
    2424     *   the preferred width >= 0; if <code>columns</code>
    2525     *   is set to zero, the preferred width will be whatever
     
    3737     *
    3838     * @param text the text to be displayed, or <code>null</code>
    39      * @param columns  the number of columns to use to calculate 
     39     * @param columns  the number of columns to use to calculate
    4040     *   the preferred width; if columns is set to zero, the
    4141     *   preferred width will be whatever naturally results from
     
    6363     * <code>null</code>.
    6464     *
    65      * @param columns  the number of columns to use to calculate 
     65     * @param columns  the number of columns to use to calculate
    6666     *   the preferred width; if columns is set to zero, the
    6767     *   preferred width will be whatever naturally results from
    6868     *   the component implementation
    69      */ 
     69     */
    7070    public JosmTextField(int columns) {
    7171        this(null, null, columns);
  • trunk/src/org/openstreetmap/josm/gui/widgets/ListPopupMenu.java

    r4459 r6070  
    1313 */
    1414public class ListPopupMenu extends JPopupMenu {
    15    
     15
    1616    private JList[] lists;
    1717
  • trunk/src/org/openstreetmap/josm/gui/widgets/OsmIdTextField.java

    r5778 r6070  
    3030     * Sets the type of primitive object
    3131     * @param type The type of primitive object (
    32      *      {@link OsmPrimitiveType#NODE NODE}, 
    33      *      {@link OsmPrimitiveType#WAY WAY}, 
     32     *      {@link OsmPrimitiveType#NODE NODE},
     33     *      {@link OsmPrimitiveType#WAY WAY},
    3434     *      {@link OsmPrimitiveType#RELATION RELATION})
    3535     */
  • trunk/src/org/openstreetmap/josm/gui/widgets/PopupMenuLauncher.java