Changeset 2512 in josm for trunk/src


Ignore:
Timestamp:
2009-11-24T10:45:04+01:00 (12 years ago)
Author:
stoecker
Message:

i18n updated, fixed files to reduce problems when applying patches, fix #4017

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

Legend:

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

    r2485 r2512  
    7474     * Replies true if JOSM currently displays a map view. False, if it doesn't, i.e. if
    7575     * it only shows the MOTD panel.
    76      * 
     76     *
    7777     * @return true if JOSM currently displays a map view
    7878     */
     
    128128     */
    129129    public static ToolbarPreferences toolbar;
    130 
    131130
    132131    public UndoRedoHandler undoRedo = new UndoRedoHandler();
     
    336335            CoordinateFormat.setCoordinateFormat(CoordinateFormat.DECIMAL_DEGREES);
    337336        }
    338 
    339337
    340338        Dimension screenDimension = Toolkit.getDefaultToolkit().getScreenSize();
  • trunk/src/org/openstreetmap/josm/actions/AbstractMergeAction.java

    r2343 r2512  
    2525public abstract class AbstractMergeAction extends JosmAction {
    2626
    27 
    2827    /**
    2928     * the list cell renderer used to render layer list entries
    30      * 
     29     *
    3130     */
    3231    static public class LayerListCellRenderer extends DefaultListCellRenderer {
  • trunk/src/org/openstreetmap/josm/actions/AddNodeAction.java

    r2323 r2512  
    8181
    8282}
    83 
  • trunk/src/org/openstreetmap/josm/actions/AutoScaleAction.java

    r2477 r2512  
    9898     * such layer exists, either because the layer list dialog is not yet created
    9999     * or because no layer is selected.
    100      * 
     100     *
    101101     * @return the first selected layer in the layer list dialog
    102102     */
  • trunk/src/org/openstreetmap/josm/actions/CloseChangesetAction.java

    r2323 r2512  
    4949    }
    5050
    51 
    5251    protected void onPostDownloadOpenChangesets(DownloadOpenChangesetsTask task) {
    5352        if (task.isCancelled() || task.getLastException() != null) return;
     
    7574    }
    7675
    77 
    7876    private class DownloadOpenChangesetsTask extends PleaseWaitRunnable {
    7977
     
    8583
    8684        /**
    87          * 
     85         *
    8886         * @param model provides the user id of the current user and accepts the changesets
    8987         * after download
     
    116114         * Fetch the user info from the server. This is necessary if we don't know
    117115         * the users id yet
    118          * 
     116         *
    119117         * @return the user info
    120118         * @throws OsmTransferException thrown in case of any communication exception
  • trunk/src/org/openstreetmap/josm/actions/CombineWayAction.java

    r2381 r2512  
    9090    }
    9191
    92 
    9392    public void combineWays(Collection<Way> ways) {
    9493
     
    219218     * This is a collection of relations referring to at least one out of a set of
    220219     * ways.
    221      * 
     220     *
    222221     *
    223222     */
     
    230229
    231230        /**
    232          * 
     231         *
    233232         * @param ways  a collection of ways
    234233         */
     
    246245        /**
    247246         * build the sets of referring relations from the relations in the dataset <code>ds</code>
    248          * 
     247         *
    249248         * @param ds the data set
    250249         */
     
    273272        /**
    274273         * Replies the set of referring relations
    275          * 
     274         *
    276275         * @return the set of referring relations
    277276         */
     
    286285        /**
    287286         * Replies the set of referring relations for a specific way
    288          * 
     287         *
    289288         * @return the set of referring relations
    290289         */
     
    412411    }
    413412
    414 
    415413    static public class NodeGraph {
    416414        static public List<NodePair> buildNodePairs(Way way, boolean directed) {
     
    480478        private HashMap<Node, List<NodePair>> successors;
    481479        private HashMap<Node, List<NodePair>> predecessors;
    482 
    483480
    484481        protected void rememberSuccessor(NodePair pair) {
     
    612609        /**
    613610         * Tries to find a spanning path starting from node <code>startNode</code>.
    614          * 
     611         *
    615612         * Traverses the path in depth-first order.
    616          * 
     613         *
    617614         * @param startNode the start node
    618615         * @return the spanning path; null, if no path is found
     
    641638         * Tries to find a path through the graph which visits each edge (i.e.
    642639         * the segment of a way) exactly one.
    643          * 
     640         *
    644641         * @return the path; null, if no path was found
    645642         */
  • trunk/src/org/openstreetmap/josm/actions/DownloadAction.java

    r2335 r2512  
    2828public class DownloadAction extends JosmAction {
    2929    private static final Logger logger = Logger.getLogger(DownloadAction.class.getName());
    30  
     30
    3131    public DownloadAction() {
    3232        super(tr("Download from OSM..."), "download", tr("Download map data from the OSM server."),
     
    4141        if (! dialog.isCanceled()) {
    4242            dialog.rememberSettings();
    43             Bounds area = dialog.getSelectedDownloadArea();           
     43            Bounds area = dialog.getSelectedDownloadArea();
    4444            if (dialog.isDownloadOsmData()) {
    4545                DownloadOsmTask task = new DownloadOsmTask();
     
    5252                Main.worker.submit(new PostDownloadHandler(task, future));
    5353            }
    54         } 
    55     }   
     54        }
     55    }
    5656}
  • trunk/src/org/openstreetmap/josm/actions/DownloadReferrersAction.java

    r2434 r2512  
    7474     * Downloads the primitives referring to the primitive given by <code>id</code> and
    7575     * <code>type</code>.
    76      * 
     76     *
    7777     *
    7878     * @param targetLayer  the target layer. Must not be null.
     
    118118        /**
    119119         * constructor
    120          * 
     120         *
    121121         * @param targetLayer  the target layer for the downloaded primitives. Must not be null.
    122122         * @param children the collection of child primitives for which parents are to be downloaded
    123          * 
     123         *
    124124         */
    125125        public DownloadReferrersTask(OsmDataLayer targetLayer, Collection<OsmPrimitive> children) {
     
    142142        /**
    143143         * constructor
    144          * 
     144         *
    145145         * @param targetLayer  the target layer for the downloaded primitives. Must not be null.
    146146         * @param primitives  the collection of children for which parents are to be downloaded. Children
    147147         * are specified by their id and  their type.
    148          * 
     148         *
    149149         */
    150150        public DownloadReferrersTask(OsmDataLayer targetLayer, Map<Long, OsmPrimitiveType> children) {
     
    167167        /**
    168168         * constructor
    169          * 
     169         *
    170170         * @param targetLayer  the target layer. Must not be null.
    171171         * @param id the primitive id. id > 0 required.
     
    174174         * @exception IllegalArgumentException thrown if type == null
    175175         * @exception IllegalArgumentException thrown if targetLayer == null
    176          * 
     176         *
    177177         */
    178178        public DownloadReferrersTask(OsmDataLayer targetLayer, long id, OsmPrimitiveType type) throws IllegalArgumentException {
  • trunk/src/org/openstreetmap/josm/actions/ExtensionFileFilter.java

    r2367 r2512  
    3838     */
    3939    public static ArrayList<FileImporter> importers;
    40    
     40
    4141    public static ArrayList<FileExporter> exporters;
    42    
     42
    4343    // add some file types only if the relevant classes are there;
    4444    // this gives us the option to painlessly drop them from the .jar
     
    4848
    4949        importers = new ArrayList<FileImporter>();
    50        
     50
    5151        String[] importerNames = {
    5252            "org.openstreetmap.josm.io.OsmImporter",
     
    6262                Class klass = Class.forName(classname);
    6363                importers.add((FileImporter)klass.newInstance());
    64             } catch (Exception e) {} 
     64            } catch (Exception e) {}
    6565        }
    6666
     
    7878                Class klass = Class.forName(classname);
    7979                exporters.add((FileExporter)klass.newInstance());
    80             } catch (Exception e) {} 
     80            } catch (Exception e) {}
    8181        }
    8282    }
     
    8585    private final String description;
    8686    private final String defaultExtension;
    87 
    8887
    8988    static protected void sort(List<ExtensionFileFilter> filters) {
     
    105104     * The list is ordered according to their description, an {@see AllFormatsImporter}
    106105     * is append at the end.
    107      * 
     106     *
    108107     * @return an ordered list of {@see ExtensionFileFilter}s for importing.
    109108     */
     
    124123     * The list is ordered according to their description, an {@see AllFormatsImporter}
    125124     * is append at the end.
    126      * 
     125     *
    127126     * @return an ordered list of {@see ExtensionFileFilter}s for exporting.
    128127     */
     
    141140    /**
    142141     * Replies the default {@see ExtensionFileFilter} for a given extension
    143      * 
     142     *
    144143     * @param extension the extension
    145144     * @return the default {@see ExtensionFileFilter} for a given extension
     
    156155    /**
    157156     * Replies the default {@see ExtensionFileFilter} for a given extension
    158      * 
     157     *
    159158     * @param extension the extension
    160159     * @return the default {@see ExtensionFileFilter} for a given extension
     
    172171     * Applies the choosable {@see FileFilter} to a {@see JFileChooser} before using the
    173172     * file chooser for selecting a file for reading.
    174      * 
     173     *
    175174     * @param fileChooser the file chooser
    176175     * @param extension the default extension
     
    186185     * Applies the choosable {@see FileFilter} to a {@see JFileChooser} before using the
    187186     * file chooser for selecting a file for writing.
    188      * 
     187     *
    189188     * @param fileChooser the file chooser
    190189     * @param extension the default extension
  • trunk/src/org/openstreetmap/josm/actions/GpxExportAction.java

    r2343 r2512  
    2424 */
    2525public class GpxExportAction extends DiskAccessAction {
    26 
    2726
    2827    public GpxExportAction() {
     
    6160     * <code>layer</code> must not be null. <code>layer</code> must be an instance of
    6261     * {@see OsmDataLayer} or {@see GpxLayer}.
    63      * 
     62     *
    6463     * @param layer the layer
    6564     * @exception IllegalArgumentException thrown if layer is null
     
    9493    @Override
    9594    protected void updateEnabledState() {
    96         boolean check =           
    97         Main.isDisplayingMapView() 
     95        boolean check =
     96        Main.isDisplayingMapView()
    9897        && Main.map.mapView.getActiveLayer() != null;
    9998        if(!check) {
  • trunk/src/org/openstreetmap/josm/actions/JosmAction.java

    r2305 r2512  
    101101    }
    102102
    103 
    104 
    105103    /**
    106104     * needs to be overridden to be useful
  • trunk/src/org/openstreetmap/josm/actions/MergeNodesAction.java

    r2414 r2512  
    4040/**
    4141 * Merges a collection of nodes into one node.
    42  * 
     42 *
    4343 */
    4444public class MergeNodesAction extends JosmAction {
     
    7777     * The last selected node will become the target node the remaining
    7878     * nodes are merged to.
    79      * 
     79     *
    8080     * @param candidates the collection of candidate nodes
    8181     * @return the selected target node
     
    9292     * Merges the nodes in <code>node</code> onto one of the nodes. Uses the dataset
    9393     * managed by <code>layer</code> as reference.
    94      * 
     94     *
    9595     * @param layer the reference data layer. Must not be null.
    9696     * @param nodes the collection of nodes. Ignored if null.
     
    9898     * @throws IllegalArgumentException thrown if layer is null
    9999     * @throws IllegalArgumentException thrown if targetNode is null
    100      * 
     100     *
    101101     */
    102102    public static Command mergeNodes(OsmDataLayer layer, Collection<Node> nodes, Node targetNode) throws IllegalArgumentException{
     
    115115    /**
    116116     * Fixes the parent ways referring to one of the nodes.
    117      * 
     117     *
    118118     * Replies null, if the ways could not be fixed, i.e. because a way would have to be deleted
    119119     * which is referred to by a relation.
    120      * 
     120     *
    121121     * @param backreferences the backreference data set
    122122     * @param nodesToDelete the collection of nodes to be deleted
  • trunk/src/org/openstreetmap/josm/actions/MergeSelectionAction.java

    r2323 r2512  
    4040    }
    4141
    42 
    4342    public void actionPerformed(ActionEvent e) {
    4443        if (getEditLayer() == null || getEditLayer().data.getSelected().isEmpty())
  • trunk/src/org/openstreetmap/josm/actions/OpenFileAction.java

    r2323 r2512  
    3838                Shortcut.registerShortcut("system:open", tr("File: {0}", tr("Open...")), KeyEvent.VK_O, Shortcut.GROUP_MENU));
    3939        putValue("help", ht("/Action/OpenFile"));
    40        
     40
    4141    }
    4242
  • trunk/src/org/openstreetmap/josm/actions/OpenLocationAction.java

    r2323 r2512  
    4444    /**
    4545     * Restore the current history from the preferences
    46      * 
     46     *
    4747     * @param cbHistory
    4848     */
  • trunk/src/org/openstreetmap/josm/actions/OrthogonalizeAction.java

    r2323 r2512  
    171171            else {
    172172                JOptionPane.showMessageDialog(
    173                     Main.parent, 
     173                    Main.parent,
    174174                    "<html><h3>"+tr(ex.getMessage())+"<br><hr><h3>"+tr("Usage")+tr(USAGE),
    175175                    tr("Selected Elements cannot be orthogonalized"),
     
    196196     *      the mean value of their y-Coordinates.
    197197     *      - The same for vertical segments.
    198      *  5. Rotate back. 
     198     *  5. Rotate back.
    199199     *
    200200     **/
    201     private static void orthogonalize(ArrayList<WayData> wayDataList, ArrayList<Node> headingNodes) 
    202         throws InvalidUserInputException 
     201    private static void orthogonalize(ArrayList<WayData> wayDataList, ArrayList<Node> headingNodes)
     202        throws InvalidUserInputException
    203203    {
    204204        // find average heading
     
    269269            final HashSet<Node> s = new HashSet<Node>(allNodes);
    270270            int s_size = s.size();
    271             for (int dummy = 0; dummy < s_size; ++ dummy) {     
    272                 if (s.isEmpty()) break;                         
     271            for (int dummy = 0; dummy < s_size; ++ dummy) {
     272                if (s.isEmpty()) break;
    273273                final Node dummy_n = s.iterator().next();     // pick arbitrary element of s
    274274
     
    333333            if (headingNodes.contains(n)) { // The heading nodes should not have changed
    334334                final double EPSILON = 1E-6;
    335                 if (Math.abs(dx) > Math.abs(EPSILON * tmp.east()) || 
     335                if (Math.abs(dx) > Math.abs(EPSILON * tmp.east()) ||
    336336                    Math.abs(dy) > Math.abs(EPSILON * tmp.east())) {
    337337                    throw new AssertionError();
    338338                }
    339             } 
     339            }
    340340            else {
    341341                OrthogonalizeAction.rememberMovements.put(n, new EastNorth(dx, dy));
     
    346346        Main.map.repaint();
    347347    }
    348    
    349348
    350349    /**
     
    510509     * Exception: unsuited user input
    511510     */
    512     private static class InvalidUserInputException extends Exception {       
     511    private static class InvalidUserInputException extends Exception {
    513512        InvalidUserInputException(String message) {
    514513            super(message);
  • trunk/src/org/openstreetmap/josm/actions/PasteAction.java

    r2349 r2512  
    7070        double offsetNorth = mPosition.north() - (maxNorth + minNorth)/2.0;
    7171
    72 
    73 
    7472        // Make a copy of pasteBuffer and map from old id to copied data id
    7573        List<PrimitiveData> bufferCopy = new ArrayList<PrimitiveData>();
  • trunk/src/org/openstreetmap/josm/actions/PasteTagsAction.java

    r2323 r2512  
    254254    }
    255255
    256 
    257256    public void actionPerformed(ActionEvent e) {
    258257        if (getCurrentDataSet().getSelected().isEmpty())
  • trunk/src/org/openstreetmap/josm/actions/RenameLayerAction.java

    r2323 r2512  
    3838        this.file = file;
    3939        this.layer = layer;
    40         this.putValue("help", ht("/Action/RenameLayer"));       
     40        this.putValue("help", ht("/Action/RenameLayer"));
    4141    }
    4242
  • trunk/src/org/openstreetmap/josm/actions/SaveActionBase.java

    r2343 r2512  
    130130    }
    131131
    132 
    133132    /**
    134133     * Check the data set if it would be empty on save. It is empty, if it contains
  • trunk/src/org/openstreetmap/josm/actions/SelectAllAction.java

    r2323 r2512  
    2626    /**
    2727     * Refreshes the enabled state
    28      * 
     28     *
    2929     */
    3030    @Override
  • trunk/src/org/openstreetmap/josm/actions/UnGlueAction.java

    r2497 r2512  
    339339    }
    340340
    341 
    342341    /**
    343342     * dupe a single node into as many nodes as there are ways using it, OR
  • trunk/src/org/openstreetmap/josm/actions/UnselectAllAction.java

    r2323 r2512  
    3737                        KeyEvent.VK_ESCAPE, Shortcut.GROUP_DIRECT).getKeyStroke(),
    3838                        tr("Unselect All"));
    39        
     39
    4040        putValue("help", ht("/Action/UnselectAll"));
    4141    }
     
    4848    /**
    4949     * Refreshes the enabled state
    50      * 
     50     *
    5151     */
    5252    @Override
  • trunk/src/org/openstreetmap/josm/actions/UpdateSelectionAction.java

    r2471 r2512  
    148148
    149149        /**
    150          * 
     150         *
    151151         * @param toUpdate a collection of primitives to update from the server
    152152         */
     
    209209            }
    210210        }
    211 
    212211
    213212        @Override
  • trunk/src/org/openstreetmap/josm/actions/UploadAction.java

    r2480 r2512  
    5050import org.xml.sax.SAXException;
    5151
    52 
    5352/**
    5453 * Action that opens a connection to the osm server and uploads all changes.
     
    9493    /**
    9594     * Registers an upload hook. Adds the hook at the first position of the upload hooks.
    96      * 
     95     *
    9796     * @param hook the upload hook. Ignored if null.
    9897     */
     
    106105    /**
    107106     * Unregisters an upload hook. Removes the hook from the list of upload hooks.
    108      * 
     107     *
    109108     * @param hook the upload hook. Ignored if null.
    110109     */
     
    342341    }
    343342
    344 
    345343    /**
    346344     * Handles the case where deleting a node failed because it is still in use in
     
    466464    }
    467465
    468 
    469466    /**
    470467     * error handler for any exception thrown during upload
     
    574571
    575572        /**
    576          * 
     573         *
    577574         * @param layer  the OSM data layer for which data is uploaded
    578575         * @param toUpload the collection of primitives to upload
     
    600597         * Retries to recover the upload operation from an exception which was thrown because
    601598         * an uploaded primitive was already deleted on the server.
    602          * 
     599         *
    603600         * @param e the exception throw by the API
    604601         * @param monitor a progress monitor
  • trunk/src/org/openstreetmap/josm/actions/UploadSelectionAction.java

    r2399 r2512  
    142142     * Uploads the primitives in <code>toUpload</code> to the server. Only
    143143     * uploads primitives which are either new, modified or deleted.
    144      * 
     144     *
    145145     * Also checks whether <code>toUpload</code> has to be extended with
    146146     * deleted parents in order to avoid precondition violations on the server.
    147      * 
     147     *
    148148     * @param layer the data layer from which we upload a subset of primitives
    149149     * @param toUpload the primitives to upload. If null or empty returns immediatelly
     
    178178     * new primitive has to be uploaded as well, even if it isn't included in the
    179179     * list of candidate primitives.
    180      * 
     180     *
    181181     */
    182182    static class UploadHullBuilder implements Visitor {
     
    228228         * Builds the "hull" of primitives to be uploaded given a base collection
    229229         * of osm primitives.
    230          * 
     230         *
    231231         * @param base the base collection. Must not be null.
    232232         * @return the "hull"
     
    252252
    253253        /**
    254          * 
     254         *
    255255         * @param layer the data layer for which a collection of selected primitives is uploaded
    256256         * @param toUpload the collection of primitives to upload
     
    291291         * Replies the collection of deleted OSM primitives for which we have to check whether
    292292         * there are dangling references on the server.
    293          * 
     293         *
    294294         * @return
    295295         */
  • trunk/src/org/openstreetmap/josm/actions/downloadtasks/AbstractDownloadTask.java

    r2322 r2512  
    3030    }
    3131
    32 
    3332    protected void rememberErrorMessage(String message) {
    3433        errorMessages.add(message);
     
    3938    }
    4039
    41 
    4240    public List<Object> getErrorObjects() {
    4341        return errorMessages;
  • trunk/src/org/openstreetmap/josm/actions/downloadtasks/DownloadGpsTask.java

    r2343 r2512  
    2929        return Main.worker.submit(downloadTask);
    3030    }
    31    
     31
    3232    public Future<?> loadUrl(boolean a,java.lang.String b,  ProgressMonitor progressMonitor) {
    3333        return null;
     
    4040        }
    4141    }
    42 
    4342
    4443    class DownloadTask extends PleaseWaitRunnable {
     
    8786        private Layer findMergeLayer() {
    8887            boolean merge = Main.pref.getBoolean("download.gps.mergeWithLocal", false);
    89             if (!Main.isDisplayingMapView())   
     88            if (!Main.isDisplayingMapView())
    9089                return null;
    9190            Layer active = Main.map.mapView.getActiveLayer();
  • trunk/src/org/openstreetmap/josm/actions/downloadtasks/DownloadOsmTaskList.java

    r2381 r2512  
    3838 * a list in the end.
    3939 * @author xeen
    40  * 
     40 *
    4141 */
    4242public class DownloadOsmTaskList {
     
    101101     * Replies the set of ids of all complete, non-new primitives (i.e. those with !
    102102     * primitive.incomplete)
    103      * 
     103     *
    104104     * @return the set of ids of all complete, non-new primitives
    105105     */
     
    127127     * Updates the local state of a set of primitives (given by a set of primitive ids) with the
    128128     * state currently held on the server.
    129      * 
     129     *
    130130     * @param potentiallyDeleted a set of ids to check update from the server
    131131     */
     
    149149     * yes, retrieves the current state on the server and checks whether the primitives are indeed
    150150     * deleted on the server.
    151      * 
     151     *
    152152     * @param potentiallyDeleted a set of primitives (given by their ids)
    153153     */
     
    196196    /**
    197197     * Replies the set of primitive ids which have been downloaded by this task list
    198      * 
     198     *
    199199     * @return the set of primitive ids which have been downloaded by this task list
    200200     */
  • trunk/src/org/openstreetmap/josm/actions/downloadtasks/DownloadTask.java

    r2330 r2512  
    88import org.openstreetmap.josm.gui.progress.ProgressMonitor;
    99
    10 
    1110public interface DownloadTask {
    1211    /**
     
    1615     * Set progressMonitor to {@see NullProgressMonitor#INSTANCE} if progress information is to
    1716     * be discarded.
    18      * 
     17     *
    1918     * You can wait for the asynchronous download task to finish by synchronizing on the returned
    2019     * {@see Future}, but make sure not to freeze up JOSM. Example:
    2120     * <pre>
    2221     *    Future<?> future = task.download(...);
    23      *    // DON'T run this on the Swing EDT or JOSM will freeze 
    24      *    future.get(); // waits for the dowload task to complete 
     22     *    // DON'T run this on the Swing EDT or JOSM will freeze
     23     *    future.get(); // waits for the dowload task to complete
    2524     * </pre>
    26      * 
     25     *
    2726     * The following example uses a pattern which is better suited if a task is launched from
    2827     * the Swing EDT:
     
    4039     *    Main.worker.submit(runAfterTask);
    4140     * </pre>
    42      * 
     41     *
    4342     * @param newLayer true, if the data is to be downloaded into a new layer. If false, the task
    4443     * selects one of the existing layers as download layer, preferably the active layer.
    45      * 
     44     *
    4645     * @param downloadArea the area to download
    4746     * @param progressMonitor the progressMonitor
     
    5655     * Set progressMonitor to {@see NullProgressMonitor#INSTANCE} if progress information is to
    5756     * be discarded.
    58  
     57
    5958     * @param newLayer newLayer true, if the data is to be downloaded into a new layer. If false, the task
    6059     * selects one of the existing layers as download layer, preferably the active layer.
     
    6261     * @param progressMonitor the progressMonitor
    6362     * @return the future representing the asynchronous task
    64      * 
     63     *
    6564     * @see #download(boolean, Bounds, ProgressMonitor)
    6665     */
     
    6968    /**
    7069     * Replies the error objects of the task. Empty list, if no error messages are available.
    71      * 
     70     *
    7271     * Error objects are either {@see String}s with error messages or {@see Exception}s.
    7372     *
     
    7877    /**
    7978     * Cancels the asynchronous download task.
    80      * 
     79     *
    8180     */
    8281    public void cancel();
  • trunk/src/org/openstreetmap/josm/actions/downloadtasks/PostDownloadHandler.java

    r2332 r2512  
    1414import org.openstreetmap.josm.gui.ExceptionDialogUtil;
    1515import org.openstreetmap.josm.tools.ExceptionUtil;
    16 
    1716
    1817public class PostDownloadHandler implements Runnable {
     
    4645        }
    4746    }
    48    
    4947
    5048    /**
     
    5957        this.futures.addAll(futures);
    6058    }
    61    
     59
    6260    public void run() {
    6361        // wait for all downloads task to finish (by waiting for the futures
  • trunk/src/org/openstreetmap/josm/actions/mapmode/DeleteAction.java

    r2343 r2512  
    124124    }
    125125
    126 
    127126    @Override public void actionPerformed(ActionEvent e) {
    128127        super.actionPerformed(e);
     
    165164     * highlights. For now, only the cursor is enabled because highlighting
    166165     * requires WaySegment to be highlightable.
    167      * 
     166     *
    168167     * Normally the mouse event also contains the modifiers. However, when the
    169168     * mouse is not moved and only modifier keys are pressed, no mouse event
     
    171170     * mouseevent. Instead we copy the previous event and only update the
    172171     * modifiers.
    173      * 
     172     *
    174173     * @param MouseEvent
    175174     * @parm int modifiers
     
    286285     * Deletes the relation in the context of the given layer. Also notifies
    287286     * {@see RelationDialogManager} and {@see OsmDataLayer#fireDataChange()} events.
    288      * 
     287     *
    289288     * @param layer the layer in whose context the relation is deleted. Must not be null.
    290289     * @param toDelete  the relation to be deleted. Must  not be null.
  • trunk/src/org/openstreetmap/josm/actions/mapmode/SelectAction.java

    r2402 r2512  
    274274    }
    275275
    276 
    277276    @Override public void mouseMoved(MouseEvent e) {
    278277        // Mac OSX simulates with  ctrl + mouse 1  the second mouse button hence no dragging events get fired.
  • trunk/src/org/openstreetmap/josm/actions/mapmode/ZoomAction.java

    r1814 r2512  
    3939    private final SelectionManager selectionManager;
    4040
    41 
    4241    /**
    4342     * Construct a ZoomAction without a label.
  • trunk/src/org/openstreetmap/josm/actions/search/SearchAction.java

    r2467 r2512  
    3535
    3636    public static final int DEFAULT_SEARCH_HISTORY_SIZE = 10;
    37 
    3837
    3938    public static enum SearchMode {
     
    331330    /**
    332331     * Refreshes the enabled state
    333      * 
     332     *
    334333     */
    335334    @Override
  • trunk/src/org/openstreetmap/josm/actions/upload/RelationUploadOrderHook.java

    r2198 r2512  
    2828 * relations are uploaded before parent relations. It also checks for cyclic
    2929 * dependencies in the list of new relations.
    30  * 
     30 *
    3131 *
    3232 */
     
    3838    /**
    3939     * builds the panel which warns users about a cyclic dependency
    40      * 
     40     *
    4141     * @param dep  the list of relations with a cyclic dependency
    4242     * @return the panel
     
    6868    /**
    6969     * Warns the user if a cyclic dependency is detected
    70      * 
     70     *
    7171     * @param e the cyclic dependency exception
    7272     */
  • trunk/src/org/openstreetmap/josm/command/Command.java

    r2405 r2512  
    2121import org.openstreetmap.josm.gui.layer.Layer;
    2222import org.openstreetmap.josm.gui.layer.OsmDataLayer;
    23 
    2423
    2524/**
     
    151150    abstract public MutableTreeNode description();
    152151
    153 
    154 
    155152}
  • trunk/src/org/openstreetmap/josm/command/ConflictResolveCommand.java

    r2198 r2512  
    1414 * This is the common base class for {@see Command}s which manipulate {@see Conflict}s in
    1515 * addition to {@see OsmPrimitive}s.
    16  * 
     16 *
    1717 * A ConflictResolverCommand can remember a collection of conflicts it resolves. Upon undoing
    1818 * it reconstitutes them.
     
    3737    /**
    3838     * remembers a conflict in the internal list of remembered conflicts
    39      * 
     39     *
    4040     * @param c the remembered conflict
    4141     */
     
    4949     * reconstitutes all remembered conflicts. Add the remembered conflicts to the
    5050     * set of conflicts of the {@see OsmDataLayer} this command was applied to.
    51      * 
     51     *
    5252     */
    5353    protected void reconstituteConflicts() {
  • trunk/src/org/openstreetmap/josm/command/CoordinateConflictResolveCommand.java

    r2181 r2512  
    3030    /**
    3131     * constructor
    32      * 
     32     *
    3333     * @param my  my node
    3434     * @param their  their node
     
    3939        this.decision = decision;
    4040    }
    41 
    4241
    4342    @Override
  • trunk/src/org/openstreetmap/josm/command/DeleteCommand.java

    r2468 r2512  
    5050    /**
    5151     * Constructor. Deletes a collection of primitives in the current edit layer.
    52      * 
     52     *
    5353     * @param data the primitives to delete. Must neither be null nor empty.
    5454     * @throws IllegalArgumentException thrown if data is null or empty
     
    6464    /**
    6565     * Constructor. Deletes a single primitive in the current edit layer.
    66      * 
     66     *
    6767     * @param data  the primitive to delete. Must not be null.
    6868     * @throws IllegalArgumentException thrown if data is null
  • trunk/src/org/openstreetmap/josm/command/DeletedStateConflictResolveCommand.java

    r2181 r2512  
    3030    /**
    3131     * constructor
    32      * 
     32     *
    3333     * @param my  my node
    3434     * @param their  their node
     
    3939        this.decision = decision;
    4040    }
    41 
    4241
    4342    @Override
  • trunk/src/org/openstreetmap/josm/command/MoveCommand.java

    r2495 r2512  
    5454     */
    5555    private List<OldState> oldState = new LinkedList<OldState>();
    56 
    5756
    5857    public MoveCommand(OsmPrimitive osm, double x, double y) {
  • trunk/src/org/openstreetmap/josm/command/PurgePrimitivesCommand.java

    r2414 r2512  
    6565     * constructor
    6666     * @param primitive the primitive to purge
    67      * 
     67     *
    6868     */
    6969    public PurgePrimitivesCommand(OsmPrimitive primitive) {
     
    7575     * @param layer the OSM data layer
    7676     * @param primitive the primitive to purge
    77      * 
     77     *
    7878     */
    7979    public PurgePrimitivesCommand(OsmDataLayer layer, OsmPrimitive primitive) {
     
    8686     * @param layer the OSM data layer
    8787     * @param primitives the primitives to purge
    88      * 
     88     *
    8989     */
    9090    public PurgePrimitivesCommand(OsmDataLayer layer, Collection<OsmPrimitive> primitives) {
     
    9595    /**
    9696     * Replies a collection with the purged primitives
    97      * 
     97     *
    9898     * @return a collection with the purged primitives
    9999     */
     
    235235     * Use to inject a backreference data set used when the command
    236236     * is executed.
    237      * 
     237     *
    238238     * @param ds the backreference data set
    239239     */
  • trunk/src/org/openstreetmap/josm/command/RelationMemberConflictResolverCommand.java

    r2163 r2512  
    5050        this.mergedMembers = mergedMembers;
    5151    }
    52 
    5352
    5453    @Override
  • trunk/src/org/openstreetmap/josm/command/TagConflictResolveCommand.java

    r2070 r2512  
    2727    private static final Logger logger = Logger.getLogger(TagConflictResolveCommand.class.getName());
    2828
    29 
    3029    /** the conflict to resolve */
    3130    private Conflict<OsmPrimitive> conflict;
     
    3433    private final List<TagMergeItem> mergeItems;
    3534
    36 
    3735    /**
    3836     * replies the number of decided conflicts
    39      * 
     37     *
    4038     * @return the number of decided conflicts
    4139     */
     
    5250    /**
    5351     * constructor
    54      * 
     52     *
    5553     * @param my  my primitive
    5654     * @param their  their primitive
     
    6159        this.mergeItems = mergeItems;
    6260    }
    63 
    6461
    6562    @Override
  • trunk/src/org/openstreetmap/josm/command/UndeletePrimitivesCommand.java

    r2410 r2512  
    5555    }
    5656
    57 
    5857    @Override
    5958    public MutableTreeNode description() {
  • trunk/src/org/openstreetmap/josm/command/WayNodesConflictResolverCommand.java

    r2381 r2512  
    3535    private final List<Node> mergedNodeList;
    3636
    37 
    3837    /**
    3938     *
     
    4645        this.mergedNodeList = mergedNodeList;
    4746    }
    48 
    4947
    5048    @Override
  • trunk/src/org/openstreetmap/josm/data/APIDataSet.java

    r2320 r2512  
    2727 * API.
    2828 * The collection is derived from the modified primitives of an {@see DataSet}.
    29  * 
     29 *
    3030 */
    3131public class APIDataSet {
     
    4545    /**
    4646     * initializes the API data set with the modified primitives in <code>ds</code>
    47      * 
     47     *
    4848     * @param ds the data set. Ignored, if null.
    4949     */
     
    7373     * Ensures that primitives are deleted in the following order: Relations, then Ways,
    7474     * then Nodes.
    75      * 
     75     *
    7676     */
    7777    protected void sortDeleted() {
     
    103103     * Ensures that primitives are added in the following order: Nodes, then Ways,
    104104     * then Relations.
    105      * 
     105     *
    106106     */
    107107    protected void sortNew() {
     
    131131    /**
    132132     * initializes the API data set with the modified primitives in <code>ds</code>
    133      * 
     133     *
    134134     * @param ds the data set. Ignored, if null.
    135135     */
     
    141141    /**
    142142     * initializes the API data set with the primitives in <code>primitives</code>
    143      * 
     143     *
    144144     * @param primitives the collection of primitives
    145145     */
     
    164164    /**
    165165     * Replies true if there are no primitives to upload
    166      * 
     166     *
    167167     * @return true if there are no primitives to upload
    168168     */
     
    173173    /**
    174174     * Replies the primitives which should be added to the OSM database
    175      * 
     175     *
    176176     * @return the primitives which should be added to the OSM database
    177177     */
     
    182182    /**
    183183     * Replies the primitives which should be updated in the OSM database
    184      * 
     184     *
    185185     * @return the primitives which should be updated in the OSM database
    186186     */
     
    191191    /**
    192192     * Replies the primitives which should be deleted in the OSM database
    193      * 
     193     *
    194194     * @return the primitives which should be deleted in the OSM database
    195195     */
     
    200200    /**
    201201     * Replies all primitives
    202      * 
     202     *
    203203     * @return all primitives
    204204     */
     
    214214     * Adjusts the upload order for new relations. Child relations are uploaded first,
    215215     * parent relations second.
    216      * 
     216     *
    217217     * This method detects cyclic dependencies in new relation. Relations with cyclic
    218218     * dependencies can't be uploaded.
    219      * 
     219     *
    220220     * @throws CyclicUploadDependencyException thrown, if a cyclic dependency is detected
    221221     */
     
    238238     * Replies the subset of relations in <code>relations</code> which are not referring to any
    239239     * new relation
    240      * 
     240     *
    241241     * @param relations a list of relations
    242242     * @return the subset of relations in <code>relations</code> which are not referring to any
     
    263263     * Utility class to sort a collection of of new relations with their dependencies
    264264     * topologically.
    265      * 
     265     *
    266266     */
    267267    private class RelationUploadDependencyGraph {
  • trunk/src/org/openstreetmap/josm/data/Bounds.java

    r2456 r2512  
    8787     * new bounds shall have an extension in latitude direction of <code>latExtent</code>,
    8888     * and in longitude direction of <code>lonExtent</code>.
    89      * 
     89     *
    9090     * @param center  the center coordinate pair. Must not be null.
    9191     * @param latExtent the latitude extent. > 0 required.
  • trunk/src/org/openstreetmap/josm/data/Preferences.java

    r2372 r2512  
    376376    }
    377377
    378 
    379378    public void load() throws IOException {
    380379        properties.clear();
  • trunk/src/org/openstreetmap/josm/data/ServerSidePreferences.java

    r2334 r2512  
    201201                for (int i = 0; i < 4; ++i) {
    202202                    String token = st.nextToken();
    203                     try {                       
     203                    try {
    204204                        values[i] = Double.parseDouble(token);
    205205                    } catch(NumberFormatException e) {
    206206                        System.err.println(tr("Error: Illegal double value ''{0}'' on line ''{1}'' in bookmark list from server",token,line));
    207                         continue;                   
     207                        continue;
    208208                    }
    209209                }
  • trunk/src/org/openstreetmap/josm/data/UndoRedoHandler.java

    r2348 r2512  
    2727    public final LinkedList<CommandQueueListener> listenerCommands = new LinkedList<CommandQueueListener>();
    2828
    29 
    3029    public UndoRedoHandler() {
    3130        Layer.listeners.add(this);
    3231    }
    33 
    3432
    3533    /**
  • trunk/src/org/openstreetmap/josm/data/conflict/Conflict.java

    r2198 r2512  
    1414 *   {@see OsmPrimitive} from the dataset in another layer or the one retrieved from the server.</li>
    1515 * </ul>
    16  * 
     16 *
    1717 *
    1818 */
  • trunk/src/org/openstreetmap/josm/data/conflict/ConflictCollection.java

    r2381 r2512  
    1919 * <pre>
    2020 *    ConflictCollection conflictCollection = ....
    21  * 
     21 *
    2222 *    for(Conflict c : conflictCollection) {
    2323 *      // do something
     
    6868    /**
    6969     * Adds a conflict to the collection
    70      * 
     70     *
    7171     * @param conflict the conflict
    7272     * @exception IllegalStateException thrown, if this collection already includes a
     
    8383    /**
    8484     * Adds a conflict to the collection of conflicts.
    85      * 
     85     *
    8686     * @param conflict the conflict to to add. Must not be null.
    8787     * @throws IllegalArgumentException thrown, if conflict is null
    8888     * @throws IllegalStateException thrown if this collection already includes a conflict for conflict.getMy()
    89      * 
     89     *
    9090     */
    9191    public void add(Conflict<?> conflict) throws IllegalStateException, IllegalArgumentException {
     
    9898    /**
    9999     * Add the conflicts in <code>otherConflicts</code> to this collection of conflicts
    100      * 
     100     *
    101101     * @param otherConflicts the collection of conflicts. Does nothing is conflicts is null.
    102102     */
     
    112112     * Adds a conflict for the pair of {@see OsmPrimitive}s given by <code>my</code> and
    113113     * <code>their</code>.
    114      * 
     114     *
    115115     * @param my  my primitive
    116116     * @param their their primitive
     
    123123    /**
    124124     * removes a conflict from this collection
    125      * 
     125     *
    126126     * @param conflict the conflict
    127127     */
     
    133133    /**
    134134     * removes the conflict registered for {@see OsmPrimitive} <code>my</code> if any
    135      * 
     135     *
    136136     * @param my  the primitive
    137137     */
     
    149149     * Replies the conflict for the {@see OsmPrimitive} <code>my</code>, null
    150150     * if no such conflict exists.
    151      * 
     151     *
    152152     * @param my  my primitive
    153153     * @return the conflict for the {@see OsmPrimitive} <code>my</code>, null
     
    164164     * Replies the conflict for the {@see OsmPrimitive} <code>their</code>, null
    165165     * if no such conflict exists.
    166      * 
     166     *
    167167     * @param my  my primitive
    168168     * @return the conflict for the {@see OsmPrimitive} <code>their</code>, null
     
    179179    /**
    180180     * Replies true, if this collection includes a conflict for <code>my</code>.
    181      * 
     181     *
    182182     * @param my my primitive
    183183     * @return true, if this collection includes a conflict for <code>my</code>; false, otherwise
     
    189189    /**
    190190     * Replies true, if this collection includes a given conflict
    191      * 
     191     *
    192192     * @param c the conflict
    193193     * @return true, if this collection includes the conflict; false, otherwise
     
    199199    /**
    200200     * Replies true, if this collection includes a conflict for <code>their</code>.
    201      * 
     201     *
    202202     * @param their their primitive
    203203     * @return true, if this collection includes a conflict for <code>their</code>; false, otherwise
     
    209209    /**
    210210     * Removes any conflicts for the {@see OsmPrimitive} <code>my</code>.
    211      * 
     211     *
    212212     * @param my the primitive
    213213     */
     
    223223    /**
    224224     * Removes any conflicts for the {@see OsmPrimitive} <code>their</code>.
    225      * 
     225     *
    226226     * @param their the primitive
    227227     */
     
    237237    /**
    238238     * Replies the conflicts as list.
    239      * 
     239     *
    240240     * @return the list of conflicts
    241241     */
     
    246246    /**
    247247     * Replies the size of the collection
    248      * 
     248     *
    249249     * @return the size of the collection
    250250     */
     
    255255    /**
    256256     * Replies the conflict at position <code>idx</code>
    257      * 
     257     *
    258258     * @param idx  the index
    259259     * @return the conflict at position <code>idx</code>
     
    265265    /**
    266266     * Replies the iterator for this collection.
    267      * 
     267     *
    268268     * @return the iterator
    269269     */
     
    281281     * Replies the set of  {@see OsmPrimitive} which participate in the role
    282282     * of "my" in the conflicts managed by this collection.
    283      * 
     283     *
    284284     * @return the set of  {@see OsmPrimitive} which participate in the role
    285285     * of "my" in the conflicts managed by this collection.
     
    295295     * Replies the set of  {@see OsmPrimitive} which participate in the role
    296296     * of "their" in the conflicts managed by this collection.
    297      * 
     297     *
    298298     * @return the set of  {@see OsmPrimitive} which participate in the role
    299299     * of "their" in the conflicts managed by this collection.
     
    309309    /**
    310310     * Replies true if this collection is empty
    311      * 
     311     *
    312312     * @return true, if this collection is empty; false, otherwise
    313313     */
  • trunk/src/org/openstreetmap/josm/data/coor/CoordinateFormat.java

    r1990 r2512  
    66/**
    77 * An enumeration  of coordinate formats
    8  * 
     8 *
    99 */
    1010public enum CoordinateFormat {
     
    2727    /**
    2828     * Replies the display name of the format
    29      * 
     29     *
    3030     * @return the display name
    3131     */
     
    4343    /**
    4444     * Replies the default coordinate format to be use
    45      * 
     45     *
    4646     * @return the default coordinate format
    4747     */
     
    5252    /**
    5353     * Sets the default coordinate format
    54      * 
     54     *
    5555     * @param format the default coordinate format
    5656     */
  • trunk/src/org/openstreetmap/josm/data/coor/LatLon.java

    r2457 r2512  
    11// License: GPL. Copyright 2007 by Immanuel Scholz and others
    22package org.openstreetmap.josm.data.coor;
    3 
    43
    54import static org.openstreetmap.josm.tools.I18n.tr;
     
    2726    /**
    2827     * Replies true if lat is in the range [-90,90]
    29      * 
     28     *
    3029     * @param lat the latitude
    3130     * @return true if lat is in the range [-90,90]
     
    3736    /**
    3837     * Replies true if lon is in the range [-180,180]
    39      * 
     38     *
    4039     * @param lon the longitude
    4140     * @return true if lon is in the range [-180,180]
  • trunk/src/org/openstreetmap/josm/data/coor/QuadTiling.java

    r2422 r2512  
    11// License: GPL. Copyright 2009 by Dave Hansen, others
    22package org.openstreetmap.josm.data.coor;
    3 
    43
    54public class QuadTiling
  • trunk/src/org/openstreetmap/josm/data/osm/BackreferencedDataSet.java

    r2414 r2512  
    8787     * Replies the set of parent primitives for a given child primitive. Replies
    8888     * an empty set if no parents refer to the child.
    89      * 
     89     *
    9090     * @param child the child primitive
    9191     * @return  the set of parent primitives for a given child primitive.
     
    109109     * Replies true if there is at least one parent referring to child;
    110110     * false otherwise
    111      * 
     111     *
    112112     * @param child the child primitive
    113113     * @return true if there is at least one parent referring to child;
     
    119119    /**
    120120     * Replies a set of all {@see RelationToChildReference}s for a given child primitive.
    121      * 
     121     *
    122122     * @param child the child primitive
    123123     * @return  a set of all {@see RelationToChildReference}s for a given child primitive
     
    138138    /**
    139139     * Replies a set of all {@see RelationToChildReference}s for a collection of child primitives
    140      * 
     140     *
    141141     * @param children the collection of child primitives
    142142     * @return  a set of all {@see RelationToChildReference}s to the children in the collection of child
  • trunk/src/org/openstreetmap/josm/data/osm/Changeset.java

    r2305 r2512  
    3939    private boolean incomplete;
    4040
    41 
    4241    /**
    4342     * Creates a new changeset with id 0.
     
    197196    }
    198197
    199 
    200198    public boolean hasEqualSemanticAttributes(Changeset other) {
    201199        if (other == null)
  • trunk/src/org/openstreetmap/josm/data/osm/DataSet.java

    r2497 r2512  
    5757    /**
    5858     * Replies the API version this dataset was created from. May be null.
    59      * 
     59     *
    6060     * @return the API version this dataset was created from. May be null.
    6161     */
     
    6666    /**
    6767     * Sets the API version this dataset was created from.
    68      * 
     68     *
    6969     * @param version the API version, i.e. "0.5" or "0.6"
    7070     */
     
    8181    /**
    8282     * Replies an unmodifiable collection of nodes in this dataset
    83      * 
     83     *
    8484     * @return an unmodifiable collection of nodes in this dataset
    8585     */
     
    101101    /**
    102102     * Replies an unmodifiable collection of ways in this dataset
    103      * 
     103     *
    104104     * @return an unmodifiable collection of ways in this dataset
    105105     */
     
    119119    /**
    120120     * Replies an unmodifiable collection of relations in this dataset
    121      * 
     121     *
    122122     * @return an unmodifiable collection of relations in this dataset
    123123     */
     
    239239    }
    240240
    241 
    242241    /*---------------------------------------------------
    243242     *   SELECTION HANDLING
     
    254253     * notifies all registered selection change listeners about the current selection of
    255254     * primitives
    256      * 
     255     *
    257256     * @param sel the current selection
    258257     */
     
    266265     * Notifies all registered {@see SelectionChangedListener} about the current selection in
    267266     * this dataset.
    268      * 
     267     *
    269268     */
    270269    public void fireSelectionChanged(){
    271270        notifySelectionChangeListeners(selectedPrimitives);
    272271    }
    273 
    274272
    275273    LinkedHashSet<OsmPrimitive> selectedPrimitives = new LinkedHashSet<OsmPrimitive>();
     
    285283        return sel;
    286284    }
    287 
    288285
    289286    /**
     
    339336    }
    340337
    341 
    342338    public void toggleSelected(Collection<? extends PrimitiveId> osm) {
    343339        boolean changed = false;
     
    457453    }
    458454
    459 
    460455    /*------------------------------------------------------
    461456     * FILTERED / DISABLED HANDLING
     
    508503    }
    509504
    510 
    511505    /**
    512506     * Remove the filtered parameter from every value in the collection.
     
    531525        }
    532526    }
    533 
    534527
    535528    @Override public DataSet clone() {
     
    789782    }
    790783
    791 
    792784    public void addDataSetListener(DataSetListener dsl) {
    793785        listeners.add(dsl);
     
    913905     * Removes all primitives from the dataset and resets the currently selected primitives
    914906     * to the empty collection. Also notifies selection change listeners if necessary.
    915      * 
     907     *
    916908     */
    917909    public void clear() {
     
    926918    }
    927919
    928 
    929920    // TODO Should be completely part of validator
    930921    private Map<OsmPrimitive, List<String>> errors = new HashMap<OsmPrimitive, List<String>>();
     
    941932    /**
    942933     * Replies the list of errors registered for this primitive.
    943      * 
     934     *
    944935     * @param primitive the primitive for which errors are queried
    945936     * @return the list of errors. Never null.
  • trunk/src/org/openstreetmap/josm/data/osm/DataSetMerger.java

    r2497 r2512  
    1717 * A dataset merger which takes a target and a source dataset and merges the source data set
    1818 * onto the target dataset.
    19  * 
     19 *
    2020 */
    2121public class DataSetMerger {
     
    179179    /**
    180180     * Merges the node list of a source way onto its target way.
    181      * 
     181     *
    182182     * @param source the source way
    183183     * @throws IllegalStateException thrown if no target way can be found for the source way
    184184     * @throws IllegalStateException thrown if there isn't a target node for one of the nodes in the source way
    185      * 
     185     *
    186186     */
    187187    private void mergeNodeList(Way source) throws IllegalStateException {
     
    204204        target.setNodes(newNodes);
    205205    }
    206 
    207206
    208207    /**
  • trunk/src/org/openstreetmap/josm/data/osm/DateFormatter.java

    r1169 r2512  
    55import java.util.GregorianCalendar;
    66import java.util.TimeZone;
    7 
    87
    98/**
     
    1615    private GregorianCalendar calendar;
    1716
    18 
    1917    /**
    2018     * Creates a new instance.
     
    2321        calendar = new GregorianCalendar(TimeZone.getTimeZone("UTC"));
    2422    }
    25 
    2623
    2724    /**
  • trunk/src/org/openstreetmap/josm/data/osm/Filter.java

    r2145 r2512  
    3939      applyForChildren = Boolean.parseBoolean(prfs[9]);
    4040
    41    } 
     41   }
    4242
    4343   public String getPrefString(){
    44       return version + ";" + 
     44      return version + ";" +
    4545          text + ";" + mode + ";" + caseSensitive + ";" + regexSearch + ";" +
    46           "legacy" + ";" + enable + ";" + hide + ";" + 
     46          "legacy" + ";" + enable + ";" + hide + ";" +
    4747          inverted + ";" + applyForChildren;
    4848   }
  • trunk/src/org/openstreetmap/josm/data/osm/Hash.java

    r2399 r2512  
    11/*
    22 *  JOSMng - a Java Open Street Map editor, the next generation.
    3  * 
     3 *
    44 *  Copyright (C) 2008 Petr Nejedly <P.Nejedly@sh.cvut.cz>
    55 *
     
    2626 * It supports two type parameters to implement effective foreign key implementation
    2727 * inside (@link Storage}, but for basic use, both type parameters are the same.
    28  * 
     28 *
    2929 * For use cases, see {@link Storage}.
    3030 * @author nenik
    3131 */
    3232public interface Hash<K,T> {
    33    
     33
    3434    /**
    3535     * Get hashcode for given instance, based on some inner state of the
    3636     * instance. The returned hashcode should remain constant over the time,
    3737     * so it should be based on some instance invariant.
    38      * 
     38     *
    3939     * @param k the object to compute hashcode for
    4040     * @return computed hashcode
    4141     */
    4242    public int getHashCode(K k);
    43    
     43
    4444    /**
    4545     * Compare two instances for semantic or lookup equality. For use cases
    4646     * where it compares different types, refer to {@link Storage}.
    47      * 
     47     *
    4848     * @param k the object to compare
    4949     * @param t the object to compare
  • trunk/src/org/openstreetmap/josm/data/osm/Node.java

    r2450 r2512  
    5151    }
    5252
    53 
    5453    protected Node(long id, boolean allowNegative) {
    5554        super(id, allowNegative);
    5655    }
    57 
    5856
    5957    /**
     
    6563    }
    6664
    67 
    6865    /**
    6966     * Create an incomplete Node object
     
    7471
    7572    /**
    76      * 
     73     *
    7774     * @param clone
    7875     * @param clearId If true, set version to 0 and id to new unique value
     
    114111    /**
    115112     * Merges the technical and semantical attributes from <code>other</code> onto this.
    116      * 
     113     *
    117114     * Both this and other must be new, or both must be assigned an OSM ID. If both this and <code>other</code>
    118115     * have an assigend OSM id, the IDs have to be the same.
    119      * 
     116     *
    120117     * @param other the other primitive. Must not be null.
    121118     * @throws IllegalArgumentException thrown if other is null.
  • trunk/src/org/openstreetmap/josm/data/osm/OsmPrimitive.java

    r2485 r2512  
    2323import org.openstreetmap.josm.data.osm.visitor.Visitor;
    2424import org.openstreetmap.josm.gui.mappaint.ElemStyle;
    25 
    2625
    2726/**
     
    9796    }
    9897
    99 
    10098    private static final int FLAG_MODIFIED = 1 << 0;
    10199    private static final int FLAG_VISIBLE  = 1 << 1;
     
    150148        return ret;
    151149    }
    152 
    153150
    154151    /* mappaint data */
     
    496493        return uninteresting;
    497494    }
    498 
    499495
    500496    private static Collection<String> directionKeys = null;
     
    772768    /**
    773769     * Replies true if this primitive has a tag with key <code>key</code>
    774      * 
     770     *
    775771     * @param key the key
    776772     * @return true, if his primitive has a tag with key <code>key</code>
     
    787783    /**
    788784     * Replies true if other isn't null and has the same tags (key/value-pairs) as this.
    789      * 
     785     *
    790786     * @param other the other object primitive
    791787     * @return true if other isn't null and has the same tags (key/value-pairs) as this.
     
    800796
    801797    private Object referrers;
    802 
    803798
    804799    /**
     
    895890        return result;
    896891    }
    897 
    898892
    899893    /**
     
    10301024    }
    10311025
    1032 
    10331026    /**
    10341027     * Replies the name of this primitive. The default implementation replies the value
     
    11461139    }
    11471140}
    1148 
  • trunk/src/org/openstreetmap/josm/data/osm/PrimitiveData.java

    r2405 r2512  
    148148    }
    149149
    150 
    151150    @SuppressWarnings("unchecked")
    152151    static public <T extends PrimitiveData>  List<T> getFilteredList(Collection<T> list, OsmPrimitiveType type) {
     
    174173    }
    175174
    176 
    177 
    178175}
  • trunk/src/org/openstreetmap/josm/data/osm/QuadBuckets.java

    r2454 r2512  
    1212import org.openstreetmap.josm.data.coor.LatLon;
    1313import org.openstreetmap.josm.data.coor.QuadTiling;
    14 
    1514
    1615public class QuadBuckets<T extends OsmPrimitive> implements Collection<T>
  • trunk/src/org/openstreetmap/josm/data/osm/Relation.java

    r2450 r2512  
    283283    }
    284284
    285 
    286285    /**
    287286     * removes all members with member.member == primitive
  • trunk/src/org/openstreetmap/josm/data/osm/Storage.java

    r2399 r2512  
    144144
    145145    public @Override int hashCode() {
    146         int h = 0;
     146        int h = 0;
    147147        for (T t : this) h += hash.getHashCode(t);
    148         return h;
     148        return h;
    149149    }
    150150
     
    259259    }
    260260
    261 
    262 
    263261    private void ensureSpace() {
    264262        if (size > data.length*loadFactor) { // rehash
     
    277275        }
    278276    }
    279 
    280277
    281278    // -------------- factories --------------------
  • trunk/src/org/openstreetmap/josm/data/osm/Tag.java

    r2305 r2512  
    11// License: GPL. For details, see LICENSE file.
    22package org.openstreetmap.josm.data.osm;
    3 
    43
    54/**
  • trunk/src/org/openstreetmap/josm/data/osm/TagCollection.java

    r2381 r2512  
    679679    }
    680680
    681 
    682681    public TagCollection emptyTagsForKeysMissingIn(TagCollection other) {
    683682        TagCollection ret = new TagCollection();
  • trunk/src/org/openstreetmap/josm/data/osm/User.java

    r2471 r2512  
    2727    private static HashMap<Long,User> userMap = new HashMap<Long,User>();
    2828
    29 
    3029    private static long getNextLocalUid() {
    3130        synchronized(User.class) {
     
    3635    /**
    3736     * Creates a local user with the given name
    38      * 
     37     *
    3938     * @param name the name
    4039     */
     
    4746    /**
    4847     * Creates a user known to the OSM server
    49      * 
     48     *
    5049     * @param uid  the user id
    5150     * @param name the name
     
    6463    /**
    6564     * clears the static map of user ids to user objects
    66      * 
     65     *
    6766     */
    6867    public static void clearUserMap() {
     
    7271    /**
    7372     * Returns the user with user id <code>uid</code> or null if this user doesn't exist
    74      * 
     73     *
    7574     * @param uid the user id
    7675     * @return the user; null, if there is no user with  this id
     
    8382     * Returns the list of users with name <code>name</code> or the empty list if
    8483     * no such users exist
    85      * 
     84     *
    8685     * @param name the user name
    8786     * @return the list of users with name <code>name</code> or the empty list if
     
    108107    /**
    109108     * Replies the user name
    110      * 
     109     *
    111110     * @return the user name. Never null, but may be the empty string
    112111     */
     
    118117     * Replies the user id. If this user is known to the OSM server the positive user id
    119118     * from the server is replied. Otherwise, a negative local value is replied.
    120      * 
     119     *
    121120     * A negative local is only unique during an editing session. It is lost when the
    122121     * application is closed and there is no guarantee that a negative local user id is
    123122     * always bound to a user with the same name.
    124      * 
     123     *
    125124     */
    126125    public long getId() {
  • trunk/src/org/openstreetmap/josm/data/osm/Way.java

    r2458 r2512  
    133133    }
    134134
    135 
    136135    @Override public void visit(Visitor visitor) {
    137136        visitor.visit(this);
     
    151150
    152151    /**
    153      * 
     152     *
    154153     * @param original
    155154     * @param clearId
     
    327326    }
    328327
    329 
    330328    public boolean isClosed() {
    331329        if (incomplete) return false;
  • trunk/src/org/openstreetmap/josm/data/osm/history/History.java

    r2448 r2512  
    1717 * Represents the history of an OSM primitive. The history consists
    1818 * of a list of object snapshots with a specific version.
    19  * 
     19 *
    2020 */
    2121public class History{
     
    4242    /**
    4343     * Creates a new history for an OSM primitive
    44      * 
     44     *
    4545     * @param id the id. >0 required.
    4646     * @param type the primitive type. Must not be null.
     
    4848     * @throws IllegalArgumentException thrown if id <= 0
    4949     * @throws IllegalArgumentException if type is null
    50      * 
     50     *
    5151     */
    5252    protected History(long id, OsmPrimitiveType type, List<HistoryOsmPrimitive> versions) {
     
    169169    /**
    170170     * Replies the primitive id for this history.
    171      * 
     171     *
    172172     * @return the primitive id
    173173     */
     
    187187     * Replies the history primitive with version <code>version</code>. null,
    188188     * if no such primitive exists.
    189      * 
     189     *
    190190     * @param version the version
    191191     * @return the history primitive with version <code>version</code>
  • trunk/src/org/openstreetmap/josm/data/osm/history/HistoryDataSet.java

    r2448 r2512  
    1515/**
    1616 * A data set holding histories of OSM primitives.
    17  * 
     17 *
    1818 *
    1919 */
     
    2626    /**
    2727     * Replies the unique instance of the history data set
    28      * 
     28     *
    2929     * @return the unique instance of the history data set
    3030     */
     
    7070     * Replies the history primitive for the primitive with id <code>id</code>
    7171     * and version <code>version</code>. null, if no such primitive exists.
    72      * 
     72     *
    7373     * @param id the id of the primitive. > 0 required.
    7474     * @param type the primitive type. Must not be null.
     
    9898    /**
    9999     * Adds a history primitive to the data set
    100      * 
     100     *
    101101     * @param primitive  the history primitive to add
    102102     */
     
    113113     * Replies the history for a given primitive with id <code>id</code>
    114114     * and type <code>type</code>.
    115      * 
     115     *
    116116     * @param id the id the if of the primitive. > 0 required
    117117     * @param type the type of the primitive. Must not be null.
     
    133133     * Replies the history for a primitive with id <code>id</code>. null, if no
    134134     * such history exists.
    135      * 
     135     *
    136136     * @param pid the primitive id. Must not be null.
    137137     * @return the history for a primitive with id <code>id</code>. null, if no
     
    150150    /**
    151151     * merges the histories from the {@see HistoryDataSet} other in this history data set
    152      * 
     152     *
    153153     * @param other the other history data set. Ignored if null.
    154154     */
  • trunk/src/org/openstreetmap/josm/data/osm/history/HistoryNode.java

    r2243 r2512  
    66import org.openstreetmap.josm.data.coor.LatLon;
    77import org.openstreetmap.josm.data.osm.OsmPrimitiveType;
    8 
    98
    109/**
  • trunk/src/org/openstreetmap/josm/data/osm/history/HistoryOsmPrimitive.java

    r2448 r2512  
    135135     * Sets the tags for this history primitive. Removes all
    136136     * tags if <code>tags</code> is null.
    137      * 
     137     *
    138138     * @param tags the tags. May be null.
    139139     */
  • trunk/src/org/openstreetmap/josm/data/osm/history/HistoryRelation.java

    r2181 r2512  
    2222    /**
    2323     * constructor
    24      * 
     24     *
    2525     * @param id the id (>0 required)
    2626     * @param version the version (> 0 required)
     
    3030     * @param changesetId the changeset id (> 0 required)
    3131     * @param timestamp the timestamp (! null required)
    32      * 
     32     *
    3333     * @throws IllegalArgumentException thrown if preconditions are violated
    3434     */
     
    4040    /**
    4141     * constructor
    42      * 
     42     *
    4343     * @param id the id (>0 required)
    4444     * @param version the version (> 0 required)
     
    4949     * @param timestamp the timestamp (! null required)
    5050     * @param members list of members for this relation
    51      * 
     51     *
    5252     * @throws IllegalArgumentException thrown if preconditions are violated
    5353     */
     
    6262    /**
    6363     * replies an immutable list of members of this relation
    64      * 
     64     *
    6565     * @return an immutable list of members of this relation
    6666     */
     
    7171    /**
    7272     * replies the number of members
    73      * 
     73     *
    7474     * @return the number of members
    75      * 
     75     *
    7676     */
    7777    public int getNumMembers() {
     
    9393    /**
    9494     * replies the type, i.e. {@see OsmPrimitiveType#RELATION}
    95      * 
     95     *
    9696     */
    9797    @Override
     
    102102    /**
    103103     * adds a member to the list of members
    104      * 
     104     *
    105105     * @param member the member (must not be null)
    106106     * @exception IllegalArgumentException thrown, if member is null
  • trunk/src/org/openstreetmap/josm/data/osm/history/HistoryWay.java

    r2181 r2512  
    3939    /**
    4040     * replies the idx-th node id in the list of node ids of this way
    41      * 
     41     *
    4242     * @param idx the index
    4343     * @return the idx-th node id
     
    5252    /**
    5353     * replies an immutable list of the ways node ids
    54      * 
     54     *
    5555     * @return the ways node ids
    5656     */
     
    6161    /**
    6262     * replies the ways type, i.e. {@see OsmPrimitiveType#WAY}
    63      * 
     63     *
    6464     * @return the ways type
    6565     */
     
    7171    /**
    7272     * adds a node id to the list nodes of this way
    73      * 
     73     *
    7474     * @param ref the node id to add
    7575     */
  • trunk/src/org/openstreetmap/josm/data/osm/history/RelationMember.java

    r2181 r2512  
    1818
    1919    /**
    20      * 
     20     *
    2121     * @param role  the role
    2222     * @param primitiveType  the type (must not be null)
    2323     * @param primitiveId the id (>0 required)
    24      * 
     24     *
    2525     * @exception IllegalArgumentException thrown, if primitiveType is null
    2626     * @exception IllegalArgumentException thrown, if primitiveId <= 0
     
    4646    /**
    4747     * replies the type of the referenced OSM primitive
    48      * 
     48     *
    4949     * @return the type of the referenced OSM primitive
    5050     */
     
    5555    /**
    5656     * replies the id of the referenced OSM primitive
    57      * 
     57     *
    5858     * @return the id of the referenced OSM primitive
    5959     */
  • trunk/src/org/openstreetmap/josm/data/osm/visitor/CollectBackReferencesVisitor.java

    r2407 r2512  
    2424    private Collection<OsmPrimitive> data = new HashSet<OsmPrimitive>();
    2525
    26 
    2726    /**
    2827     * @param ds This parameter is ignored
     
    4342        this.indirectRefs = indirectRefs;
    4443    }
    45 
    4644
    4745    /**
  • trunk/src/org/openstreetmap/josm/data/osm/visitor/MapPaintVisitor.java

    r2466 r2512  
    11711171                // g.setColor(new Color(255,255,0,128));
    11721172                // g.drawRect((int)centeredNBounds.getMinX(),
    1173                 //         (int)centeredNBounds.getMinY(),
    1174                 //         (int)centeredNBounds.getWidth(),
    1175                 //         (int)centeredNBounds.getHeight());
     1173                //     (int)centeredNBounds.getMinY(),
     1174                //     (int)centeredNBounds.getWidth(),
     1175                //     (int)centeredNBounds.getHeight());
    11761176
    11771177                if ((pb.width >= nb.getWidth() && pb.height >= nb.getHeight()) && // quick check
     
    16191619        }
    16201620
    1621 
    16221621        //if(profiler)
    16231622        //{
  • trunk/src/org/openstreetmap/josm/data/projection/NTV2Util.java

    r2507 r2512  
    8181    }
    8282
    83 
    8483    /**
    8584     * Get a double from the first 8 bytes of a byte array,
  • trunk/src/org/openstreetmap/josm/data/projection/Puwg.java

    r2511 r2512  
    121121    {
    122122        zone = DEFAULT_ZONE;
    123         if(!args != null)
     123        if(args != null)
    124124        {
    125125            try {
  • trunk/src/org/openstreetmap/josm/data/projection/SwissGrid.java

    r2114 r2512  
    3333            double phiprime_2 = Math.pow(phiprime,2);
    3434
    35 
    3635            double north =
    3736                  200147.07d
     
    4140                -    194.56d    * lambdaprime_2        * phiprime
    4241                +    119.79d                           * Math.pow(phiprime,3);
    43 
    4442
    4543            double east =
  • trunk/src/org/openstreetmap/josm/gui/BookmarkList.java

    r2344 r2512  
    8282        }
    8383    }
    84    
     84
    8585    class BookmarkCellRenderer extends JLabel implements ListCellRenderer {
    8686
    8787        private ImageIcon icon;
    88        
     88
    8989        public BookmarkCellRenderer() {
    9090            setOpaque(true);
     
    9292            setIcon(icon);
    9393        }
    94        
     94
    9595        protected void renderColor(boolean selected) {
    9696            if (selected) {
     
    102102            }
    103103        }
    104        
     104
    105105        protected String buildToolTipText(Bookmark b) {
    106106            Bounds area = b.getArea();
     
    113113            .append("</html>");
    114114            return sb.toString();
    115            
     115
    116116        }
    117117        public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected,
    118118                boolean cellHasFocus) {
    119            
     119
    120120            Bookmark b = (Bookmark) value;
    121121            renderColor(isSelected);
     
    123123            setToolTipText(buildToolTipText(b));
    124124            return this;
    125         }       
     125        }
    126126    }
    127127}
  • trunk/src/org/openstreetmap/josm/gui/ConditionalOptionPaneUtil.java

    r2070 r2512  
    1616import org.openstreetmap.josm.tools.GBC;
    1717
    18 
    1918/**
    2019 * ConditionalOptionPaneUtil provides static utility methods for displaying modal message dialogs
    2120 * which can be enabled/disabled by the user.
    22  * 
     21 *
    2322 * They wrap the methods provided by {@see JOptionPane}. Within JOSM you should use these
    2423 * methods rather than the bare methods from {@see JOptionPane} because the methods provided
    2524 * by ConditionalOptionPaneUtil ensure that a dialog window is always on top and isn't hidden by one of the
    2625 * JOSM windows for detached dialogs, relation editors, history browser and the like.
    27  * 
     26 *
    2827 */
    2928public class ConditionalOptionPaneUtil {
     
    3837     * Replies the preference value for the preference key "message." + <code>prefKey</code>.
    3938     * The default value if the preference key is missing is true.
    40      * 
     39     *
    4140     * @param  the preference key
    4241     * @return prefKey the preference value for the preference key "message." + <code>prefKey</code>
     
    4847    /**
    4948     * sets the value for the preference key "message." + <code>prefKey</code>.
    50      * 
     49     *
    5150     * @param prefKey the key
    5251     * @param enabled the value
     
    6059     * It is always on top even if there are other open windows like detached dialogs,
    6160     * relation editors, history browsers and the like.
    62      * 
     61     *
    6362     * Set <code>optionType</code> to {@see JOptionPane#YES_NO_OPTION} for a dialog with a YES and
    6463     * a NO button.
     
    6665     * Set <code>optionType</code> to {@see JOptionPane#YES_NO_CANCEL_OPTION} for a dialog with a YES,
    6766     * a NO and a CANCEL button
    68      * 
     67     *
    6968     * Replies true, if the selected option is equal to <code>trueOption</code>, otherwise false.
    7069     * Replies true, if the dialog is not displayed because the respective preference option
    7170     * <code>preferenceKey</code> is set to false.
    72      * 
     71     *
    7372     * @param preferenceKey the preference key
    7473     * @param parent  the parent component
     
    7978     * @param options a list of options
    8079     * @param defaultOption the default option
    81      * 
    82      * 
     80     *
     81     *
    8382     * @return the index of the selected option. {@see JOptionPane#CLOSED_OPTION} if the dialog was closed.
    8483     * {@see ConditionalOptionPaneUtil#DIALOG_DISABLED_OPTION} if the dialog is disabled.
    85      * 
     84     *
    8685     */
    8786    static public int showOptionDialog(String preferenceKey, Component parent, Object message, String title, int optionType, int messageType, Object [] options, Object defaultOption) throws HeadlessException {
     
    9897     * It is always on top even if there are other open windows like detached dialogs,
    9998     * relation editors, history browsers and the like.
    100      * 
     99     *
    101100     * Set <code>optionType</code> to {@see JOptionPane#YES_NO_OPTION} for a dialog with a YES and
    102101     * a NO button.
     
    104103     * Set <code>optionType</code> to {@see JOptionPane#YES_NO_CANCEL_OPTION} for a dialog with a YES,
    105104     * a NO and a CANCEL button
    106      * 
     105     *
    107106     * Replies true, if the selected option is equal to <code>trueOption</code>, otherwise false.
    108107     * Replies true, if the dialog is not displayed because the respective preference option
    109108     * <code>preferenceKey</code> is set to false.
    110      * 
     109     *
    111110     * @param preferenceKey the preference key
    112111     * @param parent  the parent component
     
    116115     * @param messageType the message type
    117116     * @param trueOption  if this option is selected the method replies true
    118      * 
    119      * 
     117     *
     118     *
    120119     * @return true, if the selected option is equal to <code>trueOption</code>, otherwise false.
    121      * 
     120     *
    122121     * @see JOptionPane#INFORMATION_MESSAGE
    123122     * @see JOptionPane#WARNING_MESSAGE
     
    137136     * is always on top even if there are other open windows like detached dialogs,
    138137     * relation editors, history browsers and the like.
    139      * 
     138     *
    140139     * If there is a preference with key <code>preferenceKey</code> and value <code>false</code>
    141140     * the dialog is not show.
    142      * 
     141     *
    143142     * @param preferenceKey the preference key
    144143     * @param parent  the parent component
     
    146145     * @param title the title
    147146     * @param messageType the message type
    148      * 
     147     *
    149148     * @see JOptionPane#INFORMATION_MESSAGE
    150149     * @see JOptionPane#WARNING_MESSAGE
  • trunk/src/org/openstreetmap/josm/gui/DefaultNameFormatter.java

    r2476 r2512  
    3030    /**
    3131     * Replies the unique instance of this formatter
    32      * 
     32     *
    3333     * @return the unique instance of this formatter
    3434     */
     
    5252     *   <li>by the default tags in {@see #DEFAULT_NAMING_TAGS_FOR_RELATIONS}
    5353     * </ul>
    54      * 
     54     *
    5555     * @return the list of naming tags used in relations
    5656     */
     
    6464    }
    6565
    66 
    6766    /**
    6867     * Decorates the name of primitive with its id, if the preference
    6968     * <tt>osm-primitives.showid</tt> is set.
    70      * 
     69     *
    7170     * @param name  the name without the id
    7271     * @param primitive the primitive
     
    8281    /**
    8382     * Formats a name for a node
    84      * 
     83     *
    8584     * @param node the node
    8685     * @return the name
     
    107106    /**
    108107     * Formats a name for a way
    109      * 
     108     *
    110109     * @param way the way
    111110     * @return the name
     
    145144    /**
    146145     * Formats a name for a relation
    147      * 
     146     *
    148147     * @param relation the relation
    149148     * @return the name
     
    193192    /**
    194193     * Formats a name for a changeset
    195      * 
     194     *
    196195     * @param changeset the changeset
    197196     * @return the name
  • trunk/src/org/openstreetmap/josm/gui/ExceptionDialogUtil.java

    r2480 r2512  
    2323/**
    2424 * This utility class provides static methods which explain various exceptions to the user.
    25  * 
     25 *
    2626 */
    2727public class ExceptionDialogUtil {
     
    8080    /**
    8181     * Explains an exception with a generic message dialog
    82      * 
     82     *
    8383     * @param e the exception
    8484     */
     
    9898     * This is most likely happening when user tries to access the OSM API from within an
    9999     * applet which wasn't loaded from the API server.
    100      * 
     100     *
    101101     * @param e the exception
    102102     */
     
    116116     * This is most likely because there's not connection to the Internet or because
    117117     * the remote server is not reachable.
    118      * 
     118     *
    119119     * @param e the exception
    120120     */
     
    134134     * This is most likely happening when the communication with the remote server is
    135135     * interrupted for any reason.
    136      * 
     136     *
    137137     * @param e the exception
    138138     */
     
    150150    /**
    151151     * Explains a {@see InvocationTargetException }
    152      * 
     152     *
    153153     * @param e the exception
    154154     */
     
    167167     * Explains a {@see OsmApiException} which was thrown because of an internal server
    168168     * error in the OSM API server.
    169      * 
     169     *
    170170     * @param e the exception
    171171     */
     
    184184     * Explains a {@see OsmApiException} which was thrown because of a bad
    185185     * request
    186      * 
     186     *
    187187     * @param e the exception
    188188     */
     
    200200     * Explains a {@see OsmApiException} which was thrown because a resource wasn't found
    201201     * on the server
    202      * 
     202     *
    203203     * @param e the exception
    204204     */
     
    215215    /**
    216216     * Explains a {@see OsmApiException} which was thrown because of a conflict
    217      * 
     217     *
    218218     * @param e the exception
    219219     */
     
    232232     * This is most likely happening when there is an error in the API URL or when
    233233     * local DNS services are not working.
    234      * 
     234     *
    235235     * @param e the exception
    236236     */
     
    249249     * Replies the first nested exception of type <code>nestedClass</code> (including
    250250     * the root exception <code>e</code>) or null, if no such exception is found.
    251      * 
     251     *
    252252     * @param <T>
    253253     * @param e the root exception
     
    270270    /**
    271271     * Explains an {@see OsmTransferException} to the user.
    272      * 
     272     *
    273273     * @param e the {@see OsmTransferException}
    274274     */
     
    350350    /**
    351351     * Explains an {@see Exception} to the user.
    352      * 
     352     *
    353353     * @param e the {@see Exception}
    354354     */
  • trunk/src/org/openstreetmap/josm/gui/ExtendedDialog.java

    r2374 r2512  
    2828import org.openstreetmap.josm.tools.ImageProvider;
    2929import org.openstreetmap.josm.tools.WindowGeometry;
    30 
    3130
    3231public class ExtendedDialog extends JDialog {
     
    7372     *   <li><code>setRememberWindowGeometry</code></li>
    7473     * </ul>
    75      * 
     74     *
    7675     * When done, call <code>showDialog</code> to display it. You can receive
    7776     * the user's choice using <code>getValue</code>. Have a look at this function
    7877     * for possible return values.
    79      * 
     78     *
    8079     * @param parent       The parent element that will be used for position and maximum size
    8180     * @param title        The text that will be shown in the window titlebar
     
    110109     * Allows decorating the buttons with tooltips. Expects an String[] with translated
    111110     * tooltip texts.
    112      * 
     111     *
    113112     * @param toolTipTexts the tool tip texts. Ignored, if null.
    114113     */
     
    119118    /**
    120119     * Sets the content that will be displayed in the message dialog.
    121      * 
     120     *
    122121     * Note that depending on your other settings more UI elements may appear.
    123122     * The content is played on top of the other elements though.
    124      * 
     123     *
    125124     * @param content Any element that can be displayed in the message dialog
    126125     */
     
    131130    /**
    132131     * Sets the content that will be displayed in the message dialog.
    133      * 
     132     *
    134133     * Note that depending on your other settings more UI elements may appear.
    135134     * The content is played on top of the other elements though.
    136      * 
     135     *
    137136     * @param content Any element that can be displayed in the message dialog
    138137     * @param placeContentInScrollPane if  true, places  the content in a JScrollPane
    139      * 
     138     *
    140139     */
    141140    public void setContent(Component content, boolean placeContentInScrollPane) {
     
    147146     * Sets the message that will be displayed. The String will be automatically
    148147     * wrapped if it is too long.
    149      * 
     148     *
    150149     * Note that depending on your other settings more UI elements may appear.
    151150     * The content is played on top of the other elements though.
    152      * 
     151     *
    153152     * @param message The text that should be shown to the user
    154153     */
     
    333332     * Set the pref to <code>null</code> or to an empty string to disable again.
    334333     * By default, it's disabled.
    335      * 
     334     *
    336335     * Note: If you want to set the width of this dialog directly use the usual
    337336     * setSize, setPreferredSize, setMaxSize, setMinSize
    338      * 
     337     *
    339338     * @param pref  The preference to save the dimension to
    340339     * @param wg    The default window geometry that should be used if no
    341340     *              existing preference is found (only takes effect if
    342341     *              <code>pref</code> is not null or empty
    343      * 
     342     *
    344343     */
    345344    public void setRememberWindowGeometry(String pref, WindowGeometry wg) {
     
    426425     *  the button row)</li>
    427426     * </ul>
    428      * 
     427     *
    429428     * @param helpTopic the help topic
    430429     * @param showHelpButton true, if the dialog displays a help button
     
    434433        this.showHelpButton = showHelpButton;
    435434    }
    436 
    437435
    438436    class HelpAction extends AbstractAction {
  • trunk/src/org/openstreetmap/josm/gui/FileDrop.java

    r2047 r2512  
    6363    private transient java.awt.dnd.DropTargetListener dropListener;
    6464
    65 
    6665    /** Discover if the running JVM is modern enough to have drag and drop. */
    6766    private static Boolean supportsDnD;
     
    6968    // Default border color
    7069    private static java.awt.Color defaultBorderColor = new java.awt.Color( 0f, 0f, 1f, 0.25f );
    71 
    7270
    7371    /* Constructor for JOSM file drop */
     
    108106    }   // end constructor
    109107
    110 
    111 
    112 
    113108    /**
    114109     * Constructor with a default border and the option to recursively set drop targets.
     
    132127    }   // end constructor
    133128
    134 
    135129    /**
    136130     * Constructor with a default border and debugging optionally turned on.
     
    156150            listener );
    157151    }   // end constructor
    158 
    159 
    160152
    161153    /**
     
    188180    }   // end constructor
    189181
    190 
    191 
    192 
    193182    /**
    194183     * Constructor with a specified border
     
    210199            listener );
    211200    }   // end constructor
    212 
    213 
    214 
    215201
    216202    /**
     
    238224    }   // end constructor
    239225
    240 
    241 
    242226    /**
    243227     * Constructor with a specified border and debugging optionally turned on.
     
    265249            listener );
    266250    }   // end constructor
    267 
    268 
    269 
    270 
    271251
    272252    /**
     
    446426    }   // end constructor
    447427
    448 
    449428    private static boolean supportsDnD()
    450429    {   // Static Boolean
     
    464443    }   // end supportsDnD
    465444
    466 
    467445    // BEGIN 2007-09-12 Nathan Blomquist -- Linux (KDE/Gnome) support added.
    468446    private static String ZERO_CHAR_STRING = "" + (char)0;
     
    493471    }
    494472    // END 2007-09-12 Nathan Blomquist -- Linux (KDE/Gnome) support added.
    495 
    496473
    497474    private void makeDropTarget( final java.io.PrintStream out, final java.awt.Component c, boolean recursive )
     
    541518    }   // end dropListener
    542519
    543 
    544 
    545520    /** Determine if the dragged data is a file list. */
    546521    private boolean isDragOk( final java.io.PrintStream out, final java.awt.dnd.DropTargetDragEvent evt )
     
    578553    }   // end isDragOk
    579554
    580 
    581555    /** Outputs <tt>message</tt> to <tt>out</tt> if it's not null. */
    582556    private static void log( java.io.PrintStream out, String message )
     
    587561    }   // end log
    588562
    589 
    590 
    591 
    592563    /**
    593564     * Removes the drag-and-drop hooks from the component and optionally
     
    603574    {   return remove( null, c, true );
    604575    }   // end remove
    605 
    606 
    607576
    608577    /**
     
    633602    }   // end remove
    634603
    635 
    636 
    637 
    638604    /* ********  I N N E R   I N T E R F A C E   L I S T E N E R  ******** */
    639 
    640605
    641606    /**
     
    664629        public abstract void filesDropped( java.io.File[] files );
    665630
    666 
    667631    }   // end inner-interface Listener
    668632
    669 
    670633    /* ********  I N N E R   C L A S S  ******** */
    671 
    672634
    673635    /**
     
    678640     *
    679641     * <p>I'm releasing this code into the Public Domain. Enjoy.</p>
    680      * 
     642     *
    681643     * @author  Robert Harder
    682644     * @author  rob@iharder.net
     
    714676    }   // end inner class Event
    715677
    716 
    717 
    718678    /* ********  I N N E R   C L A S S  ******** */
    719 
    720679
    721680    /**
     
    756715     *
    757716     * <p>I'm releasing this code into the Public Domain. Enjoy.</p>
    758      * 
     717     *
    759718     * @author  Robert Harder
    760719     * @author  rob@iharder.net
     
    770729         */
    771730        public final static String MIME_TYPE = "application/x-net.iharder.dnd.TransferableObject";
    772 
    773731
    774732        /**
     
    784742            new java.awt.datatransfer.DataFlavor( FileDrop.TransferableObject.class, MIME_TYPE );
    785743
    786 
    787744        private Fetcher fetcher;
    788745        private Object data;
    789746
    790747        private java.awt.datatransfer.DataFlavor customFlavor;
    791 
    792 
    793748
    794749        /**
     
    807762        }   // end constructor
    808763
    809 
    810 
    811764        /**
    812765         * Creates a new {@link TransferableObject} that will return the
     
    822775        {   this.fetcher = fetcher;
    823776        }   // end constructor
    824 
    825 
    826777
    827778        /**
     
    855806        }   // end getCustomDataFlavor
    856807
    857 
    858808        /* ********  T R A N S F E R A B L E   M E T H O D S  ******** */
    859 
    860809
    861810        /**
     
    884833        }   // end getTransferDataFlavors
    885834
    886 
    887 
    888835        /**
    889836         * Returns the data encapsulated in this {@link TransferableObject}.
     
    912859        }   // end getTransferData
    913860
    914 
    915 
    916 
    917861        /**
    918862         * Returns <tt>true</tt> if <var>flavor</var> is one of the supported
     
    936880            return false;
    937881        }   // end isDataFlavorSupported
    938 
    939882
    940883        /* ********  I N N E R   I N T E R F A C E   F E T C H E R  ******** */
     
    965908        }   // end inner interface Fetcher
    966909
    967 
    968 
    969910    }   // end class TransferableObject
    970911
    971 
    972 
    973 
    974 
    975912}   // end class FileDrop
  • trunk/src/org/openstreetmap/josm/gui/HelpAwareOptionPane.java

    r2387 r2512  
    3636
    3737        /**
    38          * 
     38         *
    3939         * @param text  the button text
    4040         * @param icon  the icon to display. Can be null
     
    6969    /**
    7070     * Creates the list buttons to be displayed in the option pane dialog.
    71      * 
     71     *
    7272     * @param options the option. If null, just creates an OK button and a help button
    7373     * @param helpTopic the help topic. The context sensitive help of all buttons is equal
     
    100100    /**
    101101     * Creates the help button
    102      * 
     102     *
    103103     * @param helpTopic the help topic
    104104     * @return the help button
     
    125125     * user clicks on the "Help" button the option dialog remains open and JOSM launches the help
    126126     * browser.
    127      * 
     127     *
    128128     * <code>helpTopic</code> is the trailing part of a JOSM online help URL, i.e. the part after the leading
    129129     * <code>http://josm.openstreetmap.de/wiki/Help</code>. It should start with a leading '/' and it
    130130     * may include an anchor after a '#'.
    131      * 
     131     *
    132132     * <strong>Examples</strong>
    133133     * <ul>
     
    137137     *
    138138     * In addition, the option buttons display JOSM icons, similar to ExtendedDialog.
    139      * 
     139     *
    140140     * @param parentComponent the parent component
    141141     * @param msg the message
     
    244244
    245245    /**
    246      * 
     246     *
    247247     * @param parentComponent
    248248     * @param msg
  • trunk/src/org/openstreetmap/josm/gui/JMultilineLabel.java

    r2154 r2512  
    1414 * required to print it in one line. Additionally the maximum width of the text
    1515 * can be set using <code>setMaxWidth</code>.
    16  * 
     16 *
    1717 * Note that this won't work if JMultilineLabel is put into a JScrollBox or
    1818 * similar as the bounds will never change. Instead scrollbars will be displayed.
     
    2828     * Supports both newline characters (<code>\n</code>) as well as the HTML
    2929     * <code>&lt;br&gt;</code> to insert new lines.
    30      * 
     30     *
    3131     * Use setMaxWidth to limit the width of the label.
    3232     * @param text
     
    4545     * Set the maximum width. Use this method instead of setMaximumSize because
    4646     * this saves a little bit of overhead and is actually taken into account.
    47      * 
     47     *
    4848     * @param width
    4949     */
  • trunk/src/org/openstreetmap/josm/gui/MapStatus.java

    r2402 r2512  
    183183                    boolean middleMouseDown = (ms.modifiers & MouseEvent.BUTTON2_DOWN_MASK) != 0;
    184184
    185 
    186185                    // Popup Information
    187186                    // display them if the middle mouse button is pressed and
  • trunk/src/org/openstreetmap/josm/gui/MapView.java

    r2450 r2512  
    5050import org.openstreetmap.josm.gui.layer.markerlayer.PlayHeadMarker;
    5151import org.openstreetmap.josm.tools.AudioPlayer;
    52 
    5352
    5453/**
     
    151150    /**
    152151     * Adds a GPX layer. A GPX layer is added below the lowest data layer.
    153      * 
     152     *
    154153     * @param layer the GPX layer
    155154     */
     
    214213    /**
    215214     * Replies true if the active layer is drawable.
    216      * 
     215     *
    217216     * @return true if the active layer is drawable, false otherwise
    218217     */
     
    223222    /**
    224223     * Replies true if the active layer is visible.
    225      * 
     224     *
    226225     * @return true if the active layer is visible, false otherwise
    227226     */
     
    244243     *   <li>otherwise, the top most layer of any type becomes active</li>
    245244     * </ul>
    246      * 
     245     *
    247246     * @return the next active data layer
    248247     */
     
    304303     * Moves the layer to the given new position. No event is fired, but repaints
    305304     * according to the new Z-Order of the layers.
    306      * 
     305     *
    307306     * @param layer     The layer to move
    308307     * @param pos       The new position of the layer
     
    324323    }
    325324
    326 
    327325    public int getLayerPos(Layer layer) {
    328326        int curLayerPos = layers.indexOf(layer);
     
    335333     * Creates a list of the visible layers in Z-Order, the layer with the lowest Z-Order
    336334     * first, layer with the highest Z-Order last.
    337      * 
     335     *
    338336     * @return a list of the visible in Z-Order, the layer with the lowest Z-Order
    339337     * first, layer with the highest Z-Order last.
     
    483481    /**
    484482     * Replies an unmodifiable list of layers of a certain type.
    485      * 
     483     *
    486484     * Example:
    487485     * <pre>
    488486     *     List<WMSLayer> wmsLayers = getLayersOfType(WMSLayer.class);
    489487     * </pre>
    490      * 
     488     *
    491489     * @return an unmodifiable list of layers of a certain type.
    492490     */
     
    503501    /**
    504502     * Replies the number of layers managed by this mav view
    505      * 
     503     *
    506504     * @return the number of layers managed by this mav view
    507505     */
     
    512510    /**
    513511     * Replies true if there is at least one layer in this map view
    514      * 
     512     *
    515513     * @return true if there is at least one layer in this map view
    516514     */
     
    522520     * Sets the active layer to <code>layer</code>. If <code>layer</code> is an instance
    523521     * of {@see OsmDataLayer} also sets {@see #editLayer} to <code>layer</code>.
    524      * 
     522     *
    525523     * @param layer the layer to be activate; must be one of the layers in the list of layers
    526524     * @exception IllegalArgumentException thrown if layer is not in the lis of layers
     
    559557    /**
    560558     * Replies the currently active layer
    561      * 
     559     *
    562560     * @return the currently active layer (may be null)
    563561     */
     
    568566    /**
    569567     * Replies the current edit layer, if any
    570      * 
     568     *
    571569     * @return the current edit layer. May be null.
    572570     */
     
    586584    /**
    587585     * replies true if the list of layers managed by this map view contain layer
    588      * 
     586     *
    589587     * @param layer the layer
    590588     * @return true if the list of layers managed by this map view contain layer
  • trunk/src/org/openstreetmap/josm/gui/MultiSplitLayout.java

    r2227 r2512  
    182182    public boolean getFloatingDividers() { return floatingDividers; }
    183183
    184 
    185184    /**
    186185     * If true, Leaf node bounds match the corresponding component's
     
    197196        firePCS("floatingDividers", oldFloatingDividers, floatingDividers);
    198197    }
    199 
    200198
    201199    /**
     
    241239        return null;
    242240    }
    243 
    244241
    245242    private Dimension preferredComponentSize(Node node) {
     
    335332    }
    336333
    337 
    338334    private Rectangle boundsWithYandHeight(Rectangle bounds, double y, double height) {
    339335        Rectangle r = new Rectangle();
     
    347343        return r;
    348344    }
    349 
    350345
    351346    private void minimizeSplitBounds(Split split, Rectangle bounds) {
     
    364359        split.setBounds(splitBounds);
    365360    }
    366 
    367361
    368362    private void layoutShrink(Split split, Rectangle bounds) {
     
    483477    }
    484478
    485 
    486479    private void layoutGrow(Split split, Rectangle bounds) {
    487480        Rectangle splitBounds = split.getBounds();
     
    574567    }
    575568
    576 
    577569    /* Second pass of the layout algorithm: branch to layoutGrow/Shrink
    578570     * as needed.
     
    604596        }
    605597    }
    606 
    607598
    608599    /* First pass of the layout algorithm.
     
    782773    }
    783774
    784 
    785775    private Divider dividerAt(Node root, int x, int y) {
    786776        if (root instanceof Divider) {
     
    853843    }
    854844
    855 
    856845    /**
    857846     * Base class for the nodes that model a MultiSplitLayout.
     
    10721061        }
    10731062    }
    1074 
    10751063
    10761064    /**
     
    11331121    }
    11341122
    1135 
    11361123    /**
    11371124     * Models a single vertical/horiztonal divider.
     
    11631150        }
    11641151    }
    1165 
    11661152
    11671153    private static void throwParseException(StreamTokenizer st, String msg) throws Exception {
     
    13291315    }
    13301316
    1331 
    13321317    private static void printModel(String indent, Node root) {
    13331318        if (root instanceof Split) {
  • trunk/src/org/openstreetmap/josm/gui/MultiSplitPane.java

    r2224 r2512  
    351351    }
    352352
    353 
    354353    private class InputHandler extends MouseInputAdapter implements KeyListener {
    355354
  • trunk/src/org/openstreetmap/josm/gui/OsmPrimitivRenderer.java

    r2070 r2512  
    7272     * build the tool tip text for an {@see OsmPrimitive}. It consist of the formatted
    7373     * key/value pairs for this primitive.
    74      * 
     74     *
    7575     * @param primitive
    7676     * @return the tool tip text
  • trunk/src/org/openstreetmap/josm/gui/PleaseWaitDialog.java

    r2319 r2512  
    108108     * Appends a log message to the progress dialog. If the log area isn't visible yet
    109109     * it becomes visible. The height of the progress dialog is slightly increased too.
    110      * 
     110     *
    111111     * @param message the message to append to the log. Ignore if null or white space only.
    112112     */
     
    126126    /**
    127127     * Sets whether the cancel button is enabled or not
    128      * 
     128     *
    129129     * @param enabled true, if the cancel button is enabled; false otherwise
    130130     */
     
    136136     * Installs a callback for the cancel button. If callback is null, all action listeners
    137137     * are removed from the cancel button.
    138      * 
     138     *
    139139     * @param callback the cancel callback
    140140     */
  • trunk/src/org/openstreetmap/josm/gui/PleaseWaitRunnable.java

    r2322 r2512  
    3939    /**
    4040     * Create the runnable object with a given message for the user.
    41      * 
     41     *
    4242     * @param title message for the user
    4343     * @param ignoreException If true, exception will be propagated to calling code. If false then
  • trunk/src/org/openstreetmap/josm/gui/QuadStateCheckBox.java

    r1169 r2512  
    186186    }
    187187}
    188 
  • trunk/src/org/openstreetmap/josm/gui/ScrollViewport.java

    r2391 r2512  
    6767    private JViewport vp = new JViewport();
    6868    private JComponent component = null;
    69    
     69
    7070    private List<JButton> buttons = new ArrayList<JButton>();
    7171
     
    8585    public ScrollViewport(int direction) {
    8686        setLayout(new BorderLayout());
    87        
     87
    8888        JButton button;
    8989
     
    137137
    138138        showOrHideButtons();
    139        
     139
    140140        timer.setRepeats(true);
    141141        timer.setInitialDelay(400);
     
    203203     */
    204204    public void showOrHideButtons() {
    205         boolean needButtons = vp.getViewSize().height > vp.getViewRect().height || 
     205        boolean needButtons = vp.getViewSize().height > vp.getViewRect().height ||
    206206                              vp.getViewSize().width > vp.getViewRect().width;
    207207        for (JButton b : buttons) {
     
    209209        }
    210210    }
    211    
     211
    212212    public Rectangle getViewRect() {
    213213        return vp.getViewRect();
  • trunk/src/org/openstreetmap/josm/gui/SelectionManager.java

    r2381 r2512  
    156156        int buttonPressed = e.getModifiersEx() & (MouseEvent.BUTTON1_DOWN_MASK | MouseEvent.BUTTON3_DOWN_MASK);
    157157
    158 
    159158        if (buttonPressed != 0) {
    160159            if (mousePosStart == null) {
     
    197196        }
    198197    }
    199 
    200198
    201199    /**
  • trunk/src/org/openstreetmap/josm/gui/actionsupport/DeleteFromRelationConfirmationDialog.java

    r2308 r2512  
    5151 * This dialog is used to get a user confirmation that a collection of primitives can be removed
    5252 * from their parent relations.
    53  * 
     53 *
    5454 */
    5555public class DeleteFromRelationConfirmationDialog extends JDialog implements TableModelListener {
     
    5959    /**
    6060     * Replies the unique instance of this dialog
    61      * 
     61     *
    6262     * @return
    6363     */
     
    151151    /**
    152152     * Replies the data model used in this dialog
    153      * 
     153     *
    154154     * @return the data model
    155155     */
     
    160160    /**
    161161     * Replies true if the dialog was canceled
    162      * 
     162     *
    163163     * @return true if the dialog was canceled
    164164     */
  • trunk/src/org/openstreetmap/josm/gui/conflict/pair/ComparePairType.java

    r2181 r2512  
    3838    /**
    3939     * replies the display name
    40      * 
     40     *
    4141     * @return the display name
    4242     */
     
    4848     * replies true, if <code>role</code> is participating in this comparison
    4949     * pair
    50      * 
     50     *
    5151     * @param role  the list role
    5252     * @return true, if <code>role</code> is participating in this comparison
     
    6363     * replies the pair of {@see ListRole}s participating in this comparison
    6464     * pair
    65      * 
     65     *
    6666     * @return  the pair of list roles
    6767     */
     
    7373     * replies the opposite role of <code>role</code> participating in this comparison
    7474     * pair
    75      * 
     75     *
    7676     * @param role one of the two roles in this pair
    7777     * @return the opposite role
  • trunk/src/org/openstreetmap/josm/gui/conflict/pair/ConflictResolver.java

    r1954 r2512  
    3434/**
    3535 * An UI component for resolving conflicts between two {@see OsmPrimitive}s.
    36  * 
     36 *
    3737 * This component emits {@see PropertyChangeEvent}s for three properties:
    3838 * <ul>
     
    4444 *   their primitive</li>
    4545 * </ul>
    46  * 
     46 *
    4747 */
    4848public class ConflictResolver extends JPanel implements PropertyChangeListener  {
     
    6464     */
    6565    static public final String THEIR_PRIMITIVE_PROP = ConflictResolver.class.getName() + ".theirPrimitive";
    66 
    6766
    6867    private static final Logger logger = Logger.getLogger(ConflictResolver.class.getName());
     
    131130    /**
    132131     * Sets the {@see OsmPrimitive} in the role "my"
    133      * 
     132     *
    134133     * @param my the primitive in the role "my"
    135134     */
     
    144143    /**
    145144     * Sets the {@see OsmPrimitive} in the role "their".
    146      * 
     145     *
    147146     * @param their the primitive in the role "their"
    148147     */
     
    209208    /**
    210209     * populates the conflict resolver with the conflicts between my and their
    211      * 
     210     *
    212211     * @param my   my primitive (i.e. the primitive in the local dataset)
    213212     * @param their their primitive (i.e. the primitive in the server dataset)
    214      * 
     213     *
    215214     */
    216215    public void populate(OsmPrimitive my, OsmPrimitive their) {
     
    250249     * Builds the resolution command(s) for the resolved conflicts in this
    251250     * ConflictResolver
    252      * 
     251     *
    253252     * @return the resolution command
    254253     */
     
    282281    /**
    283282     * Updates the state of the property {@see #RESOLVED_COMPLETELY_PROP}
    284      * 
     283     *
    285284     */
    286285    protected void updateResolvedCompletely() {
     
    319318    /**
    320319     * Replies true all differences in this conflicts are resolved
    321      * 
     320     *
    322321     * @return true all differences in this conflicts are resolved
    323322     */
  • trunk/src/org/openstreetmap/josm/gui/conflict/pair/ListMergeModel.java

    r2181 r2512  
    3131 *   <li>the list of <em>merged</em> entries</li>
    3232 * </ol>
    33  * 
     33 *
    3434 * A ListMergeModel is a factory for three {@see TableModel}s and three {@see ListSelectionModel}s:
    3535 * <ol>
     
    4242 * decisions. {@see PropertyChangeListener}s can register for property value changes of
    4343 * {@see #PROP_FROZEN}.
    44  * 
     44 *
    4545 * ListMergeModel is an abstract class. Three methods have to be implemented by subclasses:
    4646 * <ul>
     
    7474    private final ComparePairListModel comparePairListModel;
    7575
    76 
    77 
    7876    /**
    7977     * Creates a clone of an entry of type T suitable to be included in the
    8078     * list of merged entries
    81      * 
     79     *
    8280     * @param entry the entry
    8381     * @return the cloned entry
     
    8886     * checks whether two entries are equal. This is not necessarily the same as
    8987     * e1.equals(e2).
    90      * 
     88     *
    9189     * @param e1  the first entry
    9290     * @param e2  the second entry
     
    9795    /**
    9896     * Handles method dispatches from {@see TableModel#setValueAt(Object, int, int)}.
    99      * 
     97     *
    10098     * @param model the table model
    10199     * @param value  the value to be set
    102100     * @param row  the row index
    103101     * @param col the column index
    104      * 
     102     *
    105103     * @see TableModel#setValueAt(Object, int, int)
    106104     */
    107105    protected abstract void setValueAt(DefaultTableModel model, Object value, int row, int col);
    108 
    109 
    110106
    111107    protected void buildMyEntriesTableModel() {
     
    246242     * list of merged nodes. Inserts the nodes at the top of the list of merged
    247243     * nodes.
    248      * 
     244     *
    249245     * @param rows the indices
    250246     */
     
    257253     * list of merged nodes. Inserts the nodes at the top of the list of merged
    258254     * nodes.
    259      * 
     255     *
    260256     * @param rows the indices
    261257     */
     
    268264     * list of merged nodes. Inserts the nodes at the end of the list of merged
    269265     * nodes.
    270      * 
     266     *
    271267     * @param source the list of nodes to copy from
    272268     * @param rows the indices
     
    290286     * list of merged nodes. Inserts the nodes at the end of the list of merged
    291287     * nodes.
    292      * 
     288     *
    293289     * @param rows the indices
    294290     */
     
    301297     * list of merged nodes. Inserts the nodes at the end of the list of merged
    302298     * nodes.
    303      * 
     299     *
    304300     * @param rows the indices
    305301     */
     
    311307     * Copies the nodes given by indices in rows from the list of  nodes <code>source</code> to the
    312308     * list of merged nodes. Inserts the nodes before row given by current.
    313      * 
     309     *
    314310     * @param source the list of nodes to copy from
    315311     * @param rows the indices
    316312     * @param current the row index before which the nodes are inserted
    317313     * @exception IllegalArgumentException thrown, if current < 0 or >= #nodes in list of merged nodes
    318      * 
     314     *
    319315     */
    320316    protected void copyBeforeCurrent(ListRole source, int [] rows, int current) {
     
    336332     * Copies the nodes given by indices in rows from the list of my nodes to the
    337333     * list of merged nodes. Inserts the nodes before row given by current.
    338      * 
     334     *
    339335     * @param rows the indices
    340336     * @param current the row index before which the nodes are inserted
    341337     * @exception IllegalArgumentException thrown, if current < 0 or >= #nodes in list of merged nodes
    342      * 
     338     *
    343339     */
    344340    public void copyMyBeforeCurrent(int [] rows, int current) {
     
    349345     * Copies the nodes given by indices in rows from the list of their nodes to the
    350346     * list of merged nodes. Inserts the nodes before row given by current.
    351      * 
     347     *
    352348     * @param rows the indices
    353349     * @param current the row index before which the nodes are inserted
    354350     * @exception IllegalArgumentException thrown, if current < 0 or >= #nodes in list of merged nodes
    355      * 
     351     *
    356352     */
    357353    public void copyTheirBeforeCurrent(int [] rows, int current) {
     
    362358     * Copies the nodes given by indices in rows from the list of  nodes <code>source</code> to the
    363359     * list of merged nodes. Inserts the nodes after the row given by current.
    364      * 
     360     *
    365361     * @param source the list of nodes to copy from
    366362     * @param rows the indices
    367363     * @param current the row index after which the nodes are inserted
    368364     * @exception IllegalArgumentException thrown, if current < 0 or >= #nodes in list of merged nodes
    369      * 
     365     *
    370366     */
    371367    protected void copyAfterCurrent(ListRole source, int [] rows, int current) {
     
    393389     * Copies the nodes given by indices in rows from the list of my nodes to the
    394390     * list of merged nodes. Inserts the nodes after the row given by current.
    395      * 
     391     *
    396392     * @param rows the indices
    397393     * @param current the row index after which the nodes are inserted
    398394     * @exception IllegalArgumentException thrown, if current < 0 or >= #nodes in list of merged nodes
    399      * 
     395     *
    400396     */
    401397    public void copyMyAfterCurrent(int [] rows, int current) {
     
    406402     * Copies the nodes given by indices in rows from the list of my nodes to the
    407403     * list of merged nodes. Inserts the nodes after the row given by current.
    408      * 
     404     *
    409405     * @param rows the indices
    410406     * @param current the row index after which the nodes are inserted
    411407     * @exception IllegalArgumentException thrown, if current < 0 or >= #nodes in list of merged nodes
    412      * 
     408     *
    413409     */
    414410    public void copyTheirAfterCurrent(int [] rows, int current) {
     
    419415     * Moves the nodes given by indices in rows  up by one position in the list
    420416     * of merged nodes.
    421      * 
    422      * @param rows the indices
    423      * 
     417     *
     418     * @param rows the indices
     419     *
    424420     */
    425421    public void moveUpMerged(int [] rows) {
     
    446442     * Moves the nodes given by indices in rows down by one position in the list
    447443     * of merged nodes.
    448      * 
     444     *
    449445     * @param rows the indices
    450446     */
     
    473469     * Removes the nodes given by indices in rows from the list
    474470     * of merged nodes.
    475      * 
     471     *
    476472     * @param rows the indices
    477473     */
     
    490486    }
    491487
    492 
    493488    /**
    494489     * Replies true if the list of my entries and the list of their
    495490     * entries are equal
    496      * 
     491     *
    497492     * @return true, if the lists are equal; false otherwise
    498493     */
     
    508503    }
    509504
    510 
    511505    /**
    512506     * This an adapter between a {@see JTable} and one of the three entry lists
    513507     * in the role {@see ListRole} managed by the {@see ListMergeModel}.
    514      * 
     508     *
    515509     * From the point of view of the {@see JTable} it is a {@see TableModel}.
    516510     *
     
    524518
    525519        /**
    526          * 
     520         *
    527521         * @param role the role
    528522         */
     
    562556         * replies true if the {@see ListRole} of this {@see EntriesTableModel}
    563557         * participates in the current {@see ComparePairType}
    564          * 
     558         *
    565559         * @return true, if the if the {@see ListRole} of this {@see EntriesTableModel}
    566560         * participates in the current {@see ComparePairType}
    567          * 
     561         *
    568562         * @see ComparePairListModel#getSelectedComparePair()
    569563         */
     
    577571         * replies true if the entry at <code>row</code> is equal to the entry at the
    578572         * same position in the opposite list of the current {@see ComparePairType}.
    579          * 
     573         *
    580574         * @param row  the row number
    581575         * @return true if the entry at <code>row</code> is equal to the entry at the
     
    601595         * replies true if the entry at the current position is present in the opposite list
    602596         * of the current {@see ComparePairType}.
    603          * 
     597         *
    604598         * @param row the current row
    605599         * @return true if the entry at the current position is present in the opposite list
     
    629623        /**
    630624         * replies the opposite list of entries with respect to the current {@see ComparePairType}
    631          * 
     625         *
    632626         * @return the opposite list of entries
    633627         */
     
    645639     * This is the selection model to be used in a {@see JTable} which displays
    646640     * an entry list managed by {@see ListMergeModel}.
    647      * 
     641     *
    648642     * The model ensures that only rows displaying an entry in the entry list
    649643     * can be selected. "Empty" rows can't be selected.
    650      * 
     644     *
    651645     * @see ListMergeModel#getMySelectionModel()
    652646     * @see ListMergeModel#getMergedSelectionModel()
  • trunk/src/org/openstreetmap/josm/gui/conflict/pair/ListMerger.java

    r2181 r2512  
    7878    private  JLabel lblTheirVersion;
    7979
    80 
    8180    private  JLabel lblFrozenState;
    8281
     
    105104
    106105        myEntriesTable.getSelectionModel().addListSelectionListener(copyEndLeftAction);
    107 
    108106
    109107        theirEntriesTable.getSelectionModel().addListSelectionListener(copyStartRightAction);
     
    385383        add(buildFrozeStateControlPanel(), gc);
    386384
    387 
    388385        wireActionsToSelectionModels();
    389386    }
     
    518515    }
    519516
    520 
    521517    class CopyStartRightAction extends AbstractAction implements ListSelectionListener {
    522518
     
    540536        }
    541537    }
    542 
    543538
    544539    class CopyEndRightAction extends AbstractAction implements ListSelectionListener {
     
    593588    }
    594589
    595 
    596590    class CopyAfterCurrentRightAction extends AbstractAction implements ListSelectionListener {
    597591
     
    622616        }
    623617    }
    624 
    625618
    626619    class MoveUpMergedAction extends AbstractAction implements ListSelectionListener {
     
    807800    }
    808801
    809 
    810802    public void update(Observable o, Object arg) {
    811803        lblMyVersion.setText(
     
    839831            observable = new Observable();
    840832        }
    841 
    842833
    843834        /**
     
    947938            });
    948939
    949 
    950940            observable.addObserver(
    951941                    new Observer() {
  • trunk/src/org/openstreetmap/josm/gui/conflict/pair/nodes/NodeListMergeModel.java

    r2273 r2512  
    1818
    1919    private static final Logger logger = Logger.getLogger(NodeListMergeModel.class.getName());
    20 
    2120
    2221    /**
     
    7372    }
    7473
    75 
    7674    @Override
    7775    public boolean isEqualEntry(Node e1, Node e2) {
  • trunk/src/org/openstreetmap/josm/gui/conflict/pair/nodes/NodeListMerger.java

    r1954 r2512  
    1212/**
    1313 * A UI component for resolving conflicts in the node lists of two {@see Way}s.
    14  * 
     14 *
    1515 */
    1616public class NodeListMerger extends ListMerger<Node> {
    1717    private static final Logger logger = Logger.getLogger(NodeListMerger.class.getName());
    18 
    1918
    2019    public NodeListMerger() {
     
    6463    }
    6564
    66 
    6765    public void populate(Way my, Way their) {
    6866        ((NodeListMergeModel)model).populate(my, their);
  • trunk/src/org/openstreetmap/josm/gui/conflict/pair/nodes/NodeListTableCellRenderer.java

    r2285 r2512  
    2424/**
    2525 * This is the {@see TableCellRenderer} used in the node tables of {@see NodeListMerger}.
    26  * 
     26 *
    2727 */
    2828public  class NodeListTableCellRenderer extends JLabel implements TableCellRenderer {
     
    5454     * build the tool tip text for an {@see OsmPrimitive}. It consist of the formatted
    5555     * key/value pairs for this primitive.
    56      * 
     56     *
    5757     * @param primitive
    5858     * @return the tool tip text
  • trunk/src/org/openstreetmap/josm/gui/conflict/pair/properties/OperationCancelledException.java

    r1954 r2512  
    2424    }
    2525
    26 
    2726}
  • trunk/src/org/openstreetmap/josm/gui/conflict/pair/properties/PropertiesMergeModel.java

    r2273 r2512  
    180180    }
    181181
    182 
    183182    /**
    184183     * replies the coordinates of my {@see OsmPrimitive}. null, if my primitive hasn't
     
    253252        return null;
    254253    }
    255 
    256254
    257255    /**
  • trunk/src/org/openstreetmap/josm/gui/conflict/pair/properties/PropertiesMerger.java

    r2070 r2512  
    2828 * This class represents a UI component for resolving conflicts in some properties
    2929 * of {@see OsmPrimitive}.
    30  * 
     30 *
    3131 */
    3232public class PropertiesMerger extends JPanel implements Observer {
     
    127127        add(btnKeepMyCoordinates, gc);
    128128
    129 
    130129        gc.gridx = 3;
    131130        gc.gridy = 1;
     
    202201        btnKeepMyDeletedState.setName("button.keepmydeletedstate");
    203202        add(btnKeepMyDeletedState, gc);
    204 
    205203
    206204        gc.gridx = 3;
  • trunk/src/org/openstreetmap/josm/gui/conflict/pair/relation/RelationMemberTableCellEditor.java

    r1954 r2512  
    1818 */
    1919public class RelationMemberTableCellEditor extends AbstractCellEditor implements TableCellEditor{
    20 
    2120
    2221    private final JTextField editor;
     
    4241    }
    4342
    44 
    4543    public Object getCellEditorValue() {
    4644        return editor.getText();
  • trunk/src/org/openstreetmap/josm/gui/conflict/pair/relation/RelationMemberTableCellRenderer.java

    r2070 r2512  
    6565        rowNumberBorder = BorderFactory.createEmptyBorder(0,4,0,0);
    6666    }
    67 
    6867
    6968    public String buildToolTipText(OsmPrimitive primitive) {
     
    109108        setToolTipText(null);
    110109    }
    111 
    112110
    113111    protected void renderBackground(ListMergeModel<Node>.EntriesTableModel model, RelationMember member, int row, int col, boolean isSelected) {
     
    188186    }
    189187
    190 
    191188    public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus,
    192189            int row, int column) {
  • trunk/src/org/openstreetmap/josm/gui/conflict/pair/tags/MergedTableCellRenderer.java

    r1954 r2512  
    1515    public final static Color BGCOLOR_SELECTED = new Color(143,170,255);
    1616
    17    
    1817    protected void setBackgroundColor(TagMergeItem item, boolean isSelected) {
    1918        if (isSelected) {
     
    2423            setBackground(BGCOLOR_MINE);
    2524        } else if (MergeDecisionType.KEEP_THEIR.equals(item.getMergeDecision())) {
    26             setBackground(BGCOLOR_THEIR); 
     25            setBackground(BGCOLOR_THEIR);
    2726        } else if (MergeDecisionType.UNDECIDED.equals(item.getMergeDecision())) {
    2827            setBackground(BGCOLOR_UNDECIDED);
    29         }       
     28        }
    3029    }
    31    
    32    
     30
    3331    @Override
    3432    protected void renderKey(TagMergeItem item, boolean isSelected) {
     
    6765                setToolTipText(item.getTheirTagValue());
    6866            } else {
    69                 // should not happen 
     67                // should not happen
    7068            }
    7169        }
  • trunk/src/org/openstreetmap/josm/gui/conflict/pair/tags/MineTableCellRenderer.java

    r2017 r2512  
    1414    public final static Color BGCOLOR_THEIR = Color.white;
    1515    public final static Color BGCOLOR_SELECTED = new Color(143,170,255);
    16    
     16
    1717    protected void setBackgroundColor(TagMergeItem item, boolean isSelected) {
    1818        if (isSelected)  {
     
    2020            return;
    2121        }
    22        
     22
    2323        if (MergeDecisionType.KEEP_MINE.equals(item.getMergeDecision())) {
    2424            setBackground(BGCOLOR_MINE);
    2525        } else if (MergeDecisionType.KEEP_THEIR.equals(item.getMergeDecision())) {
    26             setBackground(BGCOLOR_THEIR); 
     26            setBackground(BGCOLOR_THEIR);
    2727        } else if (MergeDecisionType.UNDECIDED.equals(item.getMergeDecision())) {
    2828            setBackground(BGCOLOR_UNDECIDED);
    29         }       
     29        }
    3030    }
    31    
     31
    3232    protected void setTextColor(TagMergeItem item) {
    3333        if (MergeDecisionType.KEEP_MINE.equals(item.getMergeDecision())) {
    3434            setForeground(Color.black);
    3535        } else if (MergeDecisionType.KEEP_THEIR.equals(item.getMergeDecision())) {
    36             setForeground(Color.LIGHT_GRAY); 
     36            setForeground(Color.LIGHT_GRAY);
    3737        } else if (MergeDecisionType.UNDECIDED.equals(item.getMergeDecision())) {
    3838            setForeground(Color.black);
    39         }               
     39        }
    4040    }
    41    
     41
    4242    @Override
    4343    protected void renderKey(TagMergeItem item, boolean isSelected) {
     
    4848            setToolTipText(tr("My dataset does not include a tag with key {0}", item.getKey()));
    4949        } else {
    50             setText(item.getKey());   
     50            setText(item.getKey());
    5151            setToolTipText(item.getKey());
    5252        }
     
    6161            setToolTipText(tr("My dataset does not include a tag with key {0}", item.getKey()));
    6262        } else {
    63             setText(item.getMyTagValue());