Changeset 2512 in josm for trunk/src/org


Ignore:
Timestamp:
2009-11-24T10:45:04+01:00 (15 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());   
     63            setText(item.getMyTagValue());
    6464            setToolTipText(item.getMyTagValue());
    65         }       
     65        }
    6666    }
    6767
  • trunk/src/org/openstreetmap/josm/gui/conflict/pair/tags/TagMergeColumnModel.java

    r1954 r2512  
    1111
    1212    protected void createColumns(TableCellRenderer renderer) {
    13        
     13
    1414        TableColumn col = null;
    15        
    16         // column 0 - Key   
     15
     16        // column 0 - Key
    1717        col = new TableColumn(0);
    1818        col.setHeaderValue(tr("Key"));
     
    2020        col.setCellRenderer(renderer);
    2121        addColumn(col);
    22        
    23         // column 1 - Value   
     22
     23        // column 1 - Value
    2424        col = new TableColumn(1);
    2525        col.setHeaderValue(tr("Value"));
  • trunk/src/org/openstreetmap/josm/gui/conflict/pair/tags/TagMergeModel.java

    r1954 r2512  
    1717/**
    1818 * This is the {@see TableModel} used in the tables of the {@see TagMerger}.
    19  * 
     19 *
    2020 * The model can {@see #populate(OsmPrimitive, OsmPrimitive)} itself from the conflicts
    2121 * in the tag sets of two {@see OsmPrimitive}s. Internally, it keeps a list of {@see TagMergeItem}s.
    22  * 
     22 *
    2323 *  {@see #decide(int, MergeDecisionType)} and {@see #decide(int[], MergeDecisionType)} can be used
    2424 *  to remember a merge decision for a specific row in the model.
    25  * 
     25 *
    2626 *  The model notifies {@see PropertyChangeListener}s about updates of the number of
    2727 *  undecided tags (see {@see #PROP_NUM_UNDECIDED_TAGS}).
    28  * 
     28 *
    2929 */
    3030public class TagMergeModel extends DefaultTableModel {
     
    4040
    4141    private int numUndecidedTags = 0;
    42 
    4342
    4443    public TagMergeModel() {
     
    8180     * refreshes the number of undecided tag conflicts after an update in the list of
    8281     * {@see TagMergeItem}s. Notifies {@see PropertyChangeListener} if necessary.
    83      * 
     82     *
    8483     */
    8584    protected void refreshNumUndecidedTags() {
     
    9998     * Populate the model with conflicts between the tag sets of the two
    10099     * {@see OsmPrimitive} <code>my</code> and <code>their</code>.
    101      * 
     100     *
    102101     * @param my  my primitive (i.e. the primitive from the local dataset)
    103102     * @param their their primitive (i.e. the primitive from the server dataset)
    104      * 
     103     *
    105104     */
    106105    public void populate(OsmPrimitive my, OsmPrimitive their) {
     
    124123    /**
    125124     * add a {@see TagMergeItem} to the model
    126      * 
     125     *
    127126     * @param item the item
    128127     */
     
    143142     * set the merge decision of the {@see TagMergeItem} in row <code>row</code>
    144143     * to <code>decision</code>.
    145      * 
     144     *
    146145     * @param row  the row
    147146     * @param decision the decision
     
    156155     * set the merge decision of all {@see TagMergeItem} given by indices in <code>rows</code>
    157156     * to <code>decision</code>.
    158      * 
     157     *
    159158     * @param row  the array of row indices
    160159     * @param decision the decision
     
    175174        return tagMergeItems == null ? 0 : tagMergeItems.size();
    176175    }
    177 
    178176
    179177    @Override
  • trunk/src/org/openstreetmap/josm/gui/conflict/pair/tags/TagMergeTableCellRenderer.java

    r2181 r2512  
    1414
    1515    protected  abstract void renderKey(TagMergeItem item, boolean isSelected );
    16    
     16
    1717    protected abstract void renderValue(TagMergeItem item, boolean isSelected);
    18    
     18
    1919    protected void reset() {
    2020        setOpaque(true);
     
    2222        setForeground(Color.black);
    2323    }
    24    
     24
    2525    public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row,
    2626            int col) {
    27        
    28         reset();       
     27
     28        reset();
    2929        TagMergeItem item = (TagMergeItem)value;
    3030        switch(col) {
    31         case 0: 
     31        case 0:
    3232            renderKey(item, isSelected);
    3333            break;
     
    3636            break;
    3737        default:
    38             // should not happen, but just in case 
     38            // should not happen, but just in case
    3939            throw new IllegalArgumentException(tr("Parameter 'col' must be 0 or 1. Got {0}.", col));
    4040        }
    4141        return this;
    4242    }
    43    
     43
    4444}
  • trunk/src/org/openstreetmap/josm/gui/conflict/pair/tags/TagMerger.java

    r1954 r2512  
    4444    /**
    4545     * embeds table in a new {@see JScrollPane} and returns th scroll pane
    46      * 
     46     *
    4747     * @param table the table
    4848     * @return the scroll pane embedding the table
     
    5959    /**
    6060     * builds the table for my tag set (table already embedded in a scroll pane)
    61      * 
     61     *
    6262     * @return the table (embedded in a scroll pane)
    6363     */
     
    7575    /**
    7676     * builds the table for their tag set (table already embedded in a scroll pane)
    77      * 
     77     *
    7878     * @return the table (embedded in a scroll pane)
    7979     */
     
    9191    /**
    9292     * builds the table for the merged tag set (table already embedded in a scroll pane)
    93      * 
     93     *
    9494     * @return the table (embedded in a scroll pane)
    9595     */
     
    208208        theirTable.getSelectionModel().addListSelectionListener(keepTheirAction);
    209209
    210 
    211210        DoubleClickAdapter dblClickAdapter = new DoubleClickAdapter();
    212211        mineTable.addMouseListener(dblClickAdapter);
    213212        theirTable.addMouseListener(dblClickAdapter);
    214 
    215213
    216214        gc.gridx = 2;
     
    237235    /**
    238236     * replies the model used by this tag merger
    239      * 
     237     *
    240238     * @return the model
    241239     */
     
    307305     * the registerd Adjustables is updated the adjustment of
    308306     * the other registered Adjustables is adjusted too.
    309      * 
     307     *
    310308     */
    311309    class AdjustmentSynchronizer implements AdjustmentListener {
     
    336334    /**
    337335     * Handler for double clicks on entries in the three tag tables.
    338      * 
     336     *
    339337     */
    340338    class DoubleClickAdapter extends MouseAdapter {
     
    368366     * Sets the currently selected tags in the table of merged tags to state
    369367     * {@see MergeDecisionType#UNDECIDED}
    370      * 
     368     *
    371369     */
    372370    class UndecideAction extends AbstractAction implements ListSelectionListener  {
  • trunk/src/org/openstreetmap/josm/gui/conflict/pair/tags/TheirTableCellRenderer.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    
     30
    3231    protected void setTextColor(TagMergeItem item) {
    3332        if (MergeDecisionType.KEEP_THEIR.equals(item.getMergeDecision())) {
    3433            setForeground(Color.black);
    3534        } else if (MergeDecisionType.KEEP_MINE.equals(item.getMergeDecision())) {
    36             setForeground(Color.LIGHT_GRAY); 
     35            setForeground(Color.LIGHT_GRAY);
    3736        } else if (MergeDecisionType.UNDECIDED.equals(item.getMergeDecision())) {
    3837            setForeground(Color.black);
    39         }               
     38        }
    4039    }
    41    
     40
    4241    @Override
    4342    protected void renderKey(TagMergeItem item, boolean isSelected) {
     
    4847            setToolTipText(tr("Their dataset does not include a tag with key {0}", item.getKey()));
    4948        } else {
    50             setText(item.getKey());   
     49            setText(item.getKey());
    5150            setToolTipText(item.getKey());
    5251        }
     
    6160            setToolTipText(tr("Their dataset does not include a tag with key {0}", item.getKey()));
    6261        } else {
    63             setText(item.getTheirTagValue());   
     62            setText(item.getTheirTagValue());
    6463            setToolTipText(item.getTheirTagValue());
    65         }       
     64        }
    6665    }
    6766}
  • trunk/src/org/openstreetmap/josm/gui/conflict/tags/CombinePrimitiveResolverDialog.java

    r2326 r2512  
    4343 * This dialog helps to resolve conflicts occurring when ways are combined or
    4444 * nodes are merged.
    45  * 
     45 *
    4646 * There is a singleton instance of this dialog which can be retrieved using
    4747 * {@see #getInstance()}.
    48  * 
     48 *
    4949 * The dialog uses two models: one  for resolving tag conflicts, the other
    5050 * for resolving conflicts in relation memberships. For both models there are accessors,
    5151 * i.e {@see #getTagConflictResolverModel()} and {@see #getRelationMemberConflictResolverModel()}.
    52  * 
     52 *
    5353 * Models have to be <strong>populated</strong> before the dialog is launched. Example:
    5454 * <pre>
     
    5858 *    dialog.prepareDefaultDecisions();
    5959 * </pre>
    60  * 
     60 *
    6161 * You should also set the target primitive which other primitives (ways or nodes) are
    6262 * merged to, see {@see #setTargetPrimitive(OsmPrimitive)}.
    63  * 
     63 *
    6464 * After the dialog is closed use {@see #isCancelled()} to check whether the user canceled
    6565 * the dialog. If it wasn't canceled you may build a collection of {@see Command} objects
    6666 * which reflect the conflict resolution decisions the user made in the dialog:
    6767 * see {@see #buildResolutionCommands()}
    68  * 
     68 *
    6969 *
    7070 */
     
    7676    /**
    7777     * Replies the unique instance of the dialog
    78      * 
     78     *
    7979     * @return the unique instance of the dialog
    8080     */
     
    9292    private JPanel pnlButtons;
    9393    private OsmPrimitive targetPrimitive;
    94    
     94
    9595    /** the private help action */
    9696    private ContextSensitiveHelpAction helpAction;
     
    101101     * Replies the target primitive the collection of primitives is merged
    102102     * or combined to.
    103      * 
     103     *
    104104     * @return the target primitive
    105105     */
     
    111111     * Sets the primitive the collection of primitives is merged or combined
    112112     * to.
    113      * 
     113     *
    114114     * @param primitive the target primitive
    115115     */
     
    118118        updateTitle();
    119119        if (primitive instanceof Way) {
    120             pnlRelationMemberConflictResolver.initForWayCombining();           
     120            pnlRelationMemberConflictResolver.initForWayCombining();
    121121        } else if (primitive instanceof Node) {
    122122            pnlRelationMemberConflictResolver.initForNodeMerging();
     
    343343    }
    344344
    345 
    346345    class CancelAction extends AbstractAction {
    347346
  • trunk/src/org/openstreetmap/josm/gui/conflict/tags/MultiValueCellEditor.java

    r2008 r2512  
    2525 * proposed tag values. The editor also allows to select all proposed valued or
    2626 * to remove the tag.
    27  * 
     27 *
    2828 * The editor responds intercepts some keys and interprets them as navigation keys. It
    2929 * forwards navigation events to {@see NavigationListener}s registred with this editor.
    3030 * You should register the parent table using this editor as {@see NavigationListener}.
    31  * 
     31 *
    3232 * {@see KeyEvent#VK_ENTER} and {@see KeyEvent#VK_TAB} trigger a {@see NavigationListener#gotoNextDecision()}.
    3333 */
    3434public class MultiValueCellEditor extends AbstractCellEditor implements TableCellEditor{
    35 
    3635
    3736    public static interface NavigationListener {
     
    142141    }
    143142
    144 
    145143    /**
    146144     * The cell renderer used in the combo box
     
    191189    }
    192190}
    193 
  • trunk/src/org/openstreetmap/josm/gui/conflict/tags/MultiValueCellRenderer.java

    r2220 r2512  
    2020/**
    2121 * This is a {@see TableCellRenderer} for {@see MultiValueResolutionDecision}s.
    22  * 
     22 *
    2323 */
    2424public class MultiValueCellRenderer extends JLabel implements TableCellRenderer {
  • trunk/src/org/openstreetmap/josm/gui/conflict/tags/MultiValueResolutionDecision.java

    r2181 r2512  
    1717/**
    1818 * Represents a decision for a conflict due to multiple possible value for a tag.
    19  * 
     19 *
    2020 *
    2121 */
     
    4141     * Creates a new decision for the tag collection <code>tags</code>.
    4242     * All tags must have the same key.
    43      * 
     43     *
    4444     * @param tags the tags. Must not be null.
    4545     * @exception IllegalArgumentException  thrown if tags is null
     
    9090    /**
    9191     * Apply the decision to keep exactly one value
    92      * 
     92     *
    9393     * @param value  the value to keep
    9494     * @throws IllegalArgumentException thrown if value is null
     
    106106    /**
    107107     * sets a new value for this
    108      * 
     108     *
    109109     * @param value the new vlaue
    110110     */
     
    120120    /**
    121121     * marks this as undecided
    122      * 
     122     *
    123123     */
    124124    public void undecide() {
     
    128128    /**
    129129     * Replies the chosen value
    130      * 
     130     *
    131131     * @return the chosen value
    132132     * @throws IllegalStateException thrown if this resolution is not yet decided
     
    145145    /**
    146146     * Replies the list of possible, non empty values
    147      * 
     147     *
    148148     * @return the list of possible, non empty values
    149149     */
     
    158158    /**
    159159     * Replies the key of the tag to be resolved by this resolution
    160      * 
     160     *
    161161     * @return the key of the tag to be resolved by this resolution
    162162     */
     
    167167    /**
    168168     * Replies true if the empty value is a possible value in this resolution
    169      * 
     169     *
    170170     * @return true if the empty value is a possible value in this resolution
    171171     */
     
    176176    /**
    177177     * Replies true, if this resolution has more than 1 possible non-empty values
    178      * 
     178     *
    179179     * @return true, if this resolution has more than 1 possible non-empty values
    180180     */
     
    185185    /**
    186186     * Replies  true if this resolution is decided
    187      * 
     187     *
    188188     * @return true if this resolution is decided
    189189     */
     
    194194    /**
    195195     * Replies the type of the resolution
    196      * 
     196     *
    197197     * @return the type of the resolution
    198198     */
     
    203203    /**
    204204     * Applies the resolution to an {@see OsmPrimitive}
    205      * 
     205     *
    206206     * @param primitive the primitive
    207207     * @throws IllegalStateException thrown if this resolution is not resolved yet
    208      * 
     208     *
    209209     */
    210210    public void applyTo(OsmPrimitive primitive) throws IllegalStateException{
     
    223223    /**
    224224     * Applies this resolution to a collection of primitives
    225      * 
     225     *
    226226     * @param primtives the collection of primitives
    227227     * @throws IllegalStateException thrown if this resolution is not resolved yet
     
    239239    /**
    240240     * Builds a change command for applying this resolution to a primitive
    241      * 
     241     *
    242242     * @param primitive  the primitive
    243243     * @return the change command
     
    258258    /**
    259259     * Builds a change command for applying this resolution to a collection of primitives
    260      * 
     260     *
    261261     * @param primitives  the collection of primitives
    262262     * @return the change command
     
    278278     * Replies a tag representing the current resolution. Null, if this resolution is not resolved
    279279     * yet.
    280      * 
     280     *
    281281     * @return a tag representing the current resolution. Null, if this resolution is not resolved
    282282     * yet
  • trunk/src/org/openstreetmap/josm/gui/conflict/tags/PasteTagsConflictResolverDialog.java

    r2220 r2512  
    136136    /**
    137137     * Initializes the conflict resolver for a specific type of primitives
    138      * 
     138     *
    139139     * @param type the type of primitives
    140140     * @param tc the tags belonging to this type of primitives
     
    151151    /**
    152152     * Populates the conflict resolver with one tag collection
    153      * 
     153     *
    154154     * @param tagsForAllPrimitives  the tag collection
    155155     * @param sourceStatistics histogram of tag source, number of primitives of each type in the source
     
    195195    /**
    196196     * Populate the tag conflict resolver with tags for each type of primitives
    197      * 
     197     *
    198198     * @param tagsForNodes the tags belonging to nodes in the paste source
    199199     * @param tagsForWays the tags belonging to way in the paste source
  • trunk/src/org/openstreetmap/josm/gui/conflict/tags/RelationMemberConflictDecisionEditor.java

    r2326 r2512  
    3737    private RelationMemberConflictDecisionType originalValue;
    3838
    39 
    4039    public void addCellEditorListener(CellEditorListener l) {
    4140        tableCellEditorSupport.addCellEditorListener(l);
  • trunk/src/org/openstreetmap/josm/gui/conflict/tags/RelationMemberConflictDecisionRenderer.java

    r2326 r2512  
    1616public class RelationMemberConflictDecisionRenderer extends JLabel implements TableCellRenderer, ListCellRenderer{
    1717
    18     private JComboBox cbDecisionTypes; 
    19    
     18    private JComboBox cbDecisionTypes;
     19
    2020    protected void resetTableRenderer() {
    2121        setOpaque(true);
  • trunk/src/org/openstreetmap/josm/gui/conflict/tags/RelationMemberConflictDecisionType.java

    r2326 r2512  
    2525    UNDECIDED;
    2626
    27 
    2827    static public void prepareLabel(RelationMemberConflictDecisionType decision, JLabel label) {
    2928        switch(decision) {
  • trunk/src/org/openstreetmap/josm/gui/conflict/tags/RelationMemberConflictResolver.java

    r2326 r2512  
    5050    protected void build() {
    5151        setLayout(new GridBagLayout());
    52         JPanel pnl = new JPanel();       
     52        JPanel pnl = new JPanel();
    5353        pnl.setLayout(new BorderLayout());
    5454        pnl.add(lblHeader = new JMultilineLabel(""));
     
    6060        add(pnl, gc);
    6161        model = new RelationMemberConflictResolverModel();
    62        
     62
    6363        gc.gridy = 1;
    6464        gc.weighty = 1.0;
     
    8989                    public void focusGained(FocusEvent e) {
    9090                        tfRole.selectAll();
    91                     }                   
     91                    }
    9292                }
    9393        );
     
    104104                        + "to all modified relations.</html>"));
    105105        pnl.add(cbTagRelations);
    106         pnl.add(new JLabel(trc("tag", "Key:")));       
     106        pnl.add(new JLabel(trc("tag", "Key:")));
    107107        pnl.add(tfKey = new AutoCompletingTextField(10));
    108108        tfKey.setToolTipText(tr("<html>Enter a tag key, i.e. <strong><tt>fixme</tt></strong></html>"));
     
    119119        build();
    120120    }
    121    
     121
    122122    public void initForWayCombining() {
    123123       lblHeader.setText(tr("<html>The combined ways are members in one ore more relations. "
    124124                + "Please decide whether your want to <strong>keep</strong> these memberships "
    125                 + "for the combined way or whether you want to <strong>remove</strong> them.<br>" 
     125                + "for the combined way or whether you want to <strong>remove</strong> them.<br>"
    126126                + "The default is to <strong>keep</strong> them: the combined way will take the place of the original way in the membership."
    127127                        + "</html>"));
     
    132132        lblHeader.setText(tr("<html>The merged nodes are members in one ore more relations. "
    133133                 + "Please decide whether your want to <strong>keep</strong> these memberships "
    134                  + "for the target node or whether you want to <strong>remove</strong> them.<br>" 
     134                 + "for the target node or whether you want to <strong>remove</strong> them.<br>"
    135135                 + "The default is to <strong>keep</strong> them: the target node will take the place of the original node in the membership."
    136136                         + "</html>"));
  • trunk/src/org/openstreetmap/josm/gui/conflict/tags/RelationMemberConflictResolverModel.java

    r2326 r2512  
    2222/**
    2323 * This model manages a list of conflicting relation members.
    24  * 
     24 *
    2525 * It can be used as {@see TableModel}.
    2626 *
     
    3939    private PropertyChangeSupport support;
    4040
    41 
    4241    /**
    4342     * Replies the current number of conflicts
    44      * 
     43     *
    4544     * @return the current number of conflicts
    4645     */
     
    5251     * Updates the current number of conflicts from list of decisions and emits
    5352     * a property change event if necessary.
    54      * 
     53     *
    5554     */
    5655    protected void updateNumConflicts() {
     
    120119     * Populates the model with the members of the relation <code>relation</code>
    121120     * referring to <code>primitive</code>.
    122      * 
     121     *
    123122     * @param relation the parent relation
    124123     * @param primitive the child primitive
     
    135134     * Populates the model with the relation members belonging to one of the relations in <code>relations</code>
    136135     * and referring to one of the primitives in <code>memberPrimitives</code>.
    137      * 
     136     *
    138137     * @param relations  the parent relations. Empty list assumed if null.
    139138     * @param memberPrimitives the child primitives. Empty list assumed if null.
     
    155154     * Populates the model with the relation members represented as a collection of
    156155     * {@see RelationToChildReference}s.
    157      * 
     156     *
    158157     * @param references the references. Empty list assumed if null.
    159158     */
     
    175174    /**
    176175     * Replies the decision at position <code>row</code>
    177      * 
     176     *
    178177     * @param row
    179178     * @return the decision at position <code>row</code>
     
    185184    /**
    186185     * Replies the number of decisions managed by this model
    187      * 
     186     *
    188187     * @return the number of decisions managed by this model
    189188     */
     
    195194     * Refreshes the model state. Invoke this method to trigger necessary change
    196195     * events after an update of the model data.
    197      * 
     196     *
    198197     */
    199198    public void refresh() {
     
    204203    /**
    205204     * Apply a role to all member managed by this model.
    206      * 
     205     *
    207206     * @param role the role. Empty string assumed if null.
    208207     */
     
    256255    /**
    257256     * Builds a collection of commands executing the decisions made in this model.
    258      * 
     257     *
    259258     * @param newPrimitive the primitive which members shall refer to if the
    260259     * decision is {@see RelationMemberConflictDecisionType#REPLACE}
     
    295294     * Replies the set of relations which have to be modified according
    296295     * to the decisions managed by this model.
    297      * 
     296     *
    298297     * @param newPrimitive the primitive which members shall refer to if the
    299298     * decision is {@see RelationMemberConflictDecisionType#REPLACE}
    300      * 
     299     *
    301300     * @return the set of relations which have to be modified according
    302301     * to the decisions managed by this model
  • trunk/src/org/openstreetmap/josm/gui/conflict/tags/RelationMemberConflictResolverTable.java

    r2326 r2512  
    3838        getActionMap().put("selectNextColumnCell", selectNextColumnCellAction);
    3939        getActionMap().put("selectPreviousColumnCell", selectPreviousColumnCellAction);
    40        
     40
    4141        setRowHeight((int)new JComboBox().getPreferredSize().getHeight());
    4242    }
  • trunk/src/org/openstreetmap/josm/gui/conflict/tags/TagConflictResolutionUtil.java

    r2220 r2512  
    1111/**
    1212 * Collection of utility methods for tag conflict resolution
    13  * 
     13 *
    1414 */
    1515public class TagConflictResolutionUtil {
     
    1818    private TagConflictResolutionUtil() {}
    1919
    20 
    2120    /**
    2221     * Normalizes the tags in the tag collection <code>tc</code> before resolving tag conflicts.
    23      * 
     22     *
    2423     *  Removes irrelevant tags like "created_by".
    25      * 
     24     *
    2625     *  For tags which are not present on at least one of the merged nodes, the empty value ""
    2726     *  is added to the list of values for this tag, but only if there are at least two
    2827     *  primitives with tags.
    29      * 
     28     *
    3029     * @param tc the tag collection
    3130     * @param merged the collection of merged  primitives
     
    5958    /**
    6059     * Combines tags from TIGER data
    61      * 
     60     *
    6261     * @param tc the tag collection
    6362     */
     
    7574     * will offer an option for removing the tag and not only options for selecting
    7675     * one of the current values of the tag.
    77      * 
     76     *
    7877     * @param tc the tag collection
    7978     */
  • trunk/src/org/openstreetmap/josm/gui/conflict/tags/TagConflictResolver.java

    r2220 r2512  
    2121 * This is a UI widget for resolving tag conflicts, i.e. differences of the tag values
    2222 * of multiple {@see OsmPrimitive}s.
    23  * 
     23 *
    2424 *
    2525 */
     
    6161    /**
    6262     * Remembers the current settings in the global preferences
    63      * 
     63     *
    6464     */
    6565    public void rememberPreferences() {
     
    8080    /**
    8181     * Replies the model used by this dialog
    82      * 
     82     *
    8383     * @return the model
    8484     */
  • trunk/src/org/openstreetmap/josm/gui/conflict/tags/TagConflictResolverModel.java

    r2220 r2512  
    7777    /**
    7878     * initializes the model from the current tags
    79      * 
     79     *
    8080     */
    8181    protected void rebuild() {
     
    105105    /**
    106106     * Populates the model with the tags for which conflicts are to be resolved.
    107      * 
     107     *
    108108     * @param tags  the tag collection with the tags. Must not be null.
    109109     * @param keysWithConflicts the set of tag keys with conflicts
     
    158158    /**
    159159     * Replies true if each {@see MultiValueResolutionDecision} is decided.
    160      * 
     160     *
    161161     * @return true if each {@see MultiValueResolutionDecision} is decided; false
    162162     * otherwise
     
    188188    /**
    189189     * Sets whether all tags or only tags with conflicts are displayed
    190      * 
     190     *
    191191     * @param showTagsWithConflictsOnly if true, only tags with conflicts are displayed
    192192     */
     
    198198    /**
    199199     * Prepare the default decisions for the current model
    200      * 
     200     *
    201201     */
    202202    public void prepareDefaultTagDecisions() {
  • trunk/src/org/openstreetmap/josm/gui/dialogs/ConflictDialog.java

    r2301 r2512  
    7777    private OsmDataLayer layer = null;
    7878
    79 
    8079    /**
    8180     * builds the GUI
     
    153152    }
    154153
    155 
    156154    /**
    157155     * refreshes the view of this dialog
     
    204202    }
    205203
    206 
    207204    /**
    208205     * replies the conflict collection currently held by this dialog; may be null
  • trunk/src/org/openstreetmap/josm/gui/dialogs/ConflictResolutionDialog.java

    r2308 r2512  
    9898    }
    9999
    100 
    101100    @Override
    102101    public void setVisible(boolean isVisible) {
     
    153152    }
    154153
    155 
    156154    public ConflictResolutionDialog(Component parent) {
    157155        super(JOptionPane.getFrameForComponent(parent), true /* modal */);
     
    174172        }
    175173
    176 
    177174        public void actionPerformed(ActionEvent arg0) {
    178175            setVisible(false);
     
    198195    /**
    199196     * Action for applying resolved differences in a conflict
    200      * 
     197     *
    201198     */
    202199    class ApplyResolutionAction extends AbstractAction implements PropertyChangeListener {
  • trunk/src/org/openstreetmap/josm/gui/dialogs/FilterDialog.java

    r2145 r2512  
    111111              });
    112112        pnl.add(upButton);
    113        
     113
    114114        downButton = new SideButton(marktr("Down"), "down", "SelectionList", tr("Move filter down."),
    115115              new ActionListener(){
     
    149149               };
    150150           }
    151         };   
     151        };
    152152
    153153        filters.addTableModelListener(this);
  • trunk/src/org/openstreetmap/josm/gui/dialogs/HistoryDialog.java

    r2448 r2512  
    5252 * two actions for (1) (re)loading the history of the selected primitives and (2)
    5353 * for launching a history browser for each selected primitive.
    54  * 
     54 *
    5555 */
    5656public class HistoryDialog extends ToggleDialog implements HistoryDataSetListener {
  • trunk/src/org/openstreetmap/josm/gui/dialogs/LayerListDialog.java

    r2434 r2512  
    256256    }
    257257
    258 
    259258    private enum DeleteDecision {
    260259        deleteCurrent,
  • trunk/src/org/openstreetmap/josm/gui/dialogs/PropertiesDialog.java

    r2493 r2512  
    572572        Main.contentPane.getActionMap().put("properties:add", addAction);
    573573
    574 
    575574        // -- edit action
    576575        //
     
    886885    }
    887886
    888 
    889887    class AddAction extends AbstractAction {
    890888        public AddAction() {
  • trunk/src/org/openstreetmap/josm/gui/dialogs/RelationListDialog.java

    r2506 r2512  
    162162     * Otherwise it is initialized with the list of non-deleted and visible relations
    163163     * in the layer's dataset.
    164      * 
     164     *
    165165     * @param layer the layer. May be null.
    166166     */
     
    475475    /**
    476476     * The action for downloading members of all selected relations
    477      * 
     477     *
    478478     */
    479479    class DownloadMembersAction extends AbstractAction implements ListSelectionListener{
     
    557557         * Add all relations in <code>addedPrimitives</code> to the model for the
    558558         * relation list dialog
    559          * 
     559         *
    560560         * @param addedPrimitives the collection of added primitives. May include nodes,
    561561         * ways, and relations.
     
    584584        /**
    585585         * Removes all relations in <code>removedPrimitives</code> from the model
    586          * 
     586         *
    587587         * @param removedPrimitives the removed primitives. May include nodes, ways,
    588588         *   and relations
     
    622622         * Replies the list of selected, non-new relations. Empty list,
    623623         * if there are no selected, non-new relations.
    624          * 
     624         *
    625625         * @return the list of selected, non-new relations.
    626626         */
     
    642642         * Replies the list of selected relations. Empty list,
    643643         * if there are no selected relations.
    644          * 
     644         *
    645645         * @return the list of selected, non-new relations.
    646646         */
     
    658658        /**
    659659         * Sets the selected relations.
    660          * 
     660         *
    661661         * @return sel the list of selected relations
    662662         */
     
    712712    public void layerRemoved(Layer a) {/* irrelevant in this context */}
    713713    public void layerAdded(Layer a) {/* irrelevant in this context */}
    714 
    715714
    716715    /* ---------------------------------------------------------------------------------- */
  • trunk/src/org/openstreetmap/josm/gui/dialogs/ToggleDialog.java

    r2475 r2512  
    278278
    279279    }
    280 
    281280
    282281    /**
  • trunk/src/org/openstreetmap/josm/gui/dialogs/UserListDialog.java

    r2291 r2512  
    237237     * Action for selecting the primitives contributed by the currently selected
    238238     * users.
    239      * 
     239     *
    240240     */
    241241    private static class UserInfo implements Comparable<UserInfo> {
  • trunk/src/org/openstreetmap/josm/gui/dialogs/relation/ChildRelationBrowser.java

    r2433 r2512  
    435435    }
    436436
    437 
    438437    /**
    439438     * The asynchronous task for downloading a set of relations
  • trunk/src/org/openstreetmap/josm/gui/dialogs/relation/GenericRelationEditor.java

    r2494 r2512  
    118118        super(layer, relation, selectedMembers);
    119119
    120 
    121120        // initialize the autocompletion infrastructure
    122121        //
     
    324323        });
    325324
    326 
    327325        JPanel pnl3 = new JPanel();
    328326        pnl3.setLayout(new BorderLayout());
     
    411409        memberTable.getSelectionModel().addListSelectionListener(removeSelectedAction);
    412410        pnl.add(new JButton(removeSelectedAction), gc);
    413 
    414411
    415412        // ------
     
    756753            }
    757754
    758 
    759755        }
    760756
  • trunk/src/org/openstreetmap/josm/gui/dialogs/relation/MemberTableCellRenderer.java

    r2070 r2512  
    1515/**
    1616 * This is the {@see TableCellRenderer} used in the tables of {@see RelationMemberMerger}.
    17  * 
     17 *
    1818 */
    1919public abstract class MemberTableCellRenderer extends JLabel implements TableCellRenderer {
  • trunk/src/org/openstreetmap/josm/gui/dialogs/relation/MemberTableLinkedCellRenderer.java

    r2394 r2512  
    1313import org.openstreetmap.josm.tools.ImageProvider;
    1414import org.openstreetmap.josm.gui.dialogs.relation.WayConnectionType.Direction;
    15 
    1615
    1716public class MemberTableLinkedCellRenderer extends MemberTableCellRenderer {
     
    5453        int y2 = 0;
    5554
    56 
    5755        if (value.linkPrev) {
    5856            g.setColor(Color.black);
     
    6664                g.drawImage(corners,xoff+xloop-2,y1-3,xoff+xloop+1,y1, 2,0,5,3, new Color(0,0,0,0), null);
    6765                g.drawLine(xoff+3,y1-3,xoff+xloop-3,y1-3);
    68             } 
     66            }
    6967            else {
    7068                g.setColor(Color.red);
     
    8684                g.drawImage(corners,xoff+xloop-2,y2+1,xoff+xloop+1,y2+4, 2,2,5,5, new Color(0,0,0,0), null);
    8785                g.drawLine(xoff+3-1,y2+3,xoff+xloop-3,y2+3);
    88             } 
     86            }
    8987            else {
    9088                g.setColor(Color.red);
     
    118116        } else if (value.direction == Direction.ROUNDABOUT_RIGHT) {
    119117            g.drawImage(roundabout_right, xoff-6, 1, null);
    120         }       
     118        }
    121119    }
    122120}
  • trunk/src/org/openstreetmap/josm/gui/dialogs/relation/MemberTableMemberCellRenderer.java

    r1990 r2512  
    2323    /**
    2424     * Load the image icon for an OSM primitive of type node
    25      * 
     25     *
    2626     * @return the icon; null, if not found
    2727     */
  • trunk/src/org/openstreetmap/josm/gui/dialogs/relation/MemberTableModel.java

    r2494 r2512  
    406406        return ret;
    407407    }
    408 
    409408
    410409    /**
  • trunk/src/org/openstreetmap/josm/gui/dialogs/relation/ParentRelationLoadingTask.java

    r2434 r2512  
    2626/**
    2727 * This is an asynchronous task for loading the parents of a given relation.
    28  * 
     28 *
    2929 * Typical usage:
    3030 * <pre>
     
    6262    /**
    6363     * Creates a new task for asynchronously downloading the parents of a child relation.
    64      * 
     64     *
    6565     * @param child the child relation. Must not be null. Must have an id > 0.
    6666     * @param layer  the OSM data layer. Must not be null.
    6767     * @param full if true, parent relations are fully downloaded (i.e. with their members)
    6868     * @param monitor the progress monitor to be used
    69      * 
     69     *
    7070     * @exception IllegalArgumentException thrown if child is null
    7171     * @exception IllegalArgumentException thrown if layer is null
     
    8888    /**
    8989     * Set a continuation which is called upon the job finished.
    90      * 
     90     *
    9191     * @param continuation the continuation
    9292     */
     
    9797    /**
    9898     * Replies true if this has been cancelled by the user.
    99      * 
     99     *
    100100     * @return true if this has been cancelled by the user.
    101101     */
     
    106106    /**
    107107     * Replies true if an exception has been caught during the execution of this task.
    108      * 
     108     *
    109109     * @return true if an exception has been caught during the execution of this task.
    110110     */
     
    112112        return lastException != null;
    113113    }
    114 
    115114
    116115    protected OsmDataLayer getLayer() {
  • trunk/src/org/openstreetmap/josm/gui/dialogs/relation/ReferringRelationsBrowserModel.java

    r2381 r2512  
    8787    }
    8888
    89 
    9089    public boolean canReload() {
    9190        return relation != null && !relation.isNew();
  • trunk/src/org/openstreetmap/josm/gui/dialogs/relation/RelationDialogManager.java

    r2070 r2512  
    1616import org.openstreetmap.josm.gui.layer.Layer.LayerChangeListener;
    1717
    18 
    1918/**
    2019 * RelationDialogManager keeps track of the open relation editors.
     
    2827    /**
    2928     * Replies the singleton {@see RelationDialogManager}
    30      * 
     29     *
    3130     * @return the singleton {@see RelationDialogManager}
    3231     */
     
    106105     * Register the relation editor for a relation managed by a
    107106     * {@see OsmDataLayer}.
    108      * 
     107     *
    109108     * @param layer the layer
    110109     * @param relation the relation
     
    137136    /**
    138137     * Closes the editor open for a specific layer and a specific relation.
    139      * 
     138     *
    140139     * @param layer  the layer
    141140     * @param relation the relation
     
    152151     * Replies true if there is an open relation editor for the relation managed
    153152     * by the given layer. Replies false if relation is null.
    154      * 
     153     *
    155154     * @param layer  the layer
    156155     * @param relation  the relation. May be null.
     
    168167     * Replies the editor for the relation managed by layer. Null, if no such editor
    169168     * is currently open. Returns null, if relation is null.
    170      * 
     169     *
    171170     * @param layer the layer
    172171     * @param relation the relation
    173172     * @return the editor for the relation managed by layer. Null, if no such editor
    174173     * is currently open.
    175      * 
     174     *
    176175     * @see #isOpenInEditor(OsmDataLayer, Relation)
    177176     */
     
    184183    /**
    185184     * called when a layer is removed
    186      * 
     185     *
    187186     */
    188187    public void layerRemoved(Layer oldLayer) {
     
    228227    /**
    229228     * Positions an {@see RelationEditor} centered on the screen
    230      * 
     229     *
    231230     * @param editor the editor
    232231     */
     
    244243     * Replies true, if there is another open {@see RelationEditor} whose
    245244     * upper left corner is close to <code>p</code>.
    246      * 
     245     *
    247246     * @param p  the reference point to check
    248247     * @return true, if there is another open {@see RelationEditor} whose
     
    262261     * Positions a {@see RelationEditor} close to the center of the screen, in such
    263262     * a way, that it doesn't entirely cover another {@see RelationEditor}
    264      * 
     263     *
    265264     * @param editor
    266265     */
     
    284283     * method tries to reposition <code>editor</code> by moving it slightly down and
    285284     * slightly to the right.
    286      * 
     285     *
    287286     * @param editor the editor
    288287     */
  • trunk/src/org/openstreetmap/josm/gui/dialogs/relation/RelationEditor.java

    r2273 r2512  
    2424     * {@see #getEditor(OsmDataLayer, Relation, Collection)} will create an instance of
    2525     * this class.
    26      * 
     26     *
    2727     * @param clazz the class
    2828     */
     
    5555     * specific editor has been registered for the type of relation, then
    5656     * a generic editor will be returned.
    57      * 
     57     *
    5858     * Editors can be registered by adding their class to the static list "editors"
    5959     * in the RelationEditor class. When it comes to editing a relation, all
     
    9191    /**
    9292     * Creates a new relation editor
    93      * 
     93     *
    9494     * @param layer  the {@see OsmDataLayer} in whose context a relation is edited. Must not be null.
    9595     * @param relation the relation. Can be null if a new relation is to be edited.
     
    125125    /**
    126126     * Replies the currently edited relation
    127      * 
     127     *
    128128     * @return the currently edited relation
    129129     */
     
    135135     * Sets the currently edited relation. Creates a snapshot of the current
    136136     * state of the relation. See {@see #getRelationSnapshot()}
    137      * 
     137     *
    138138     * @param relation the relation
    139139     */
     
    147147     * Replies the {@see OsmDataLayer} in whose context this relation editor is
    148148     * open
    149      * 
     149     *
    150150     * @return the {@see OsmDataLayer} in whose context this relation editor is
    151151     * open
     
    157157    /**
    158158     * Replies the state of the edited relation when the editor has been launched
    159      * 
     159     *
    160160     * @return the state of the edited relation when the editor has been launched
    161161     */
     
    166166    /**
    167167     * Replies true if the currently edited relation has been changed elsewhere.
    168      * 
     168     *
    169169     * In this case a relation editor can't apply updates to the relation directly. Rather,
    170170     * it has to create a conflict.
    171      * 
     171     *
    172172     * @return true if the currently edited relation has been changed elsewhere.
    173173     */
  • trunk/src/org/openstreetmap/josm/gui/dialogs/relation/RelationNodeMap.java

    r2421 r2512  
    2727 *
    2828 * @author Christiaan Welvaart <cjw@time4t.net>
    29  * 
     29 *
    3030 */
    3131public class RelationNodeMap {
  • trunk/src/org/openstreetmap/josm/gui/dialogs/relation/RelationTree.java

    r2433 r2512  
    3131/**
    3232 * This is a {@se JTree} rendering the hierarchical structure of {@see Relation}s.
    33  * 
     33 *
    3434 * @see RelationTreeModel
    3535 */
     
    6565    /**
    6666     * replies the parent dialog this tree is embedded in.
    67      * 
     67     *
    6868     * @return the parent dialog; null, if there is no parent dialog
    6969     */
  • trunk/src/org/openstreetmap/josm/gui/dialogs/relation/RelationTreeCellRenderer.java

    r1990 r2512  
    4242    /**
    4343     * renders the textual value. Uses the relations names as value
    44      * 
     44     *
    4545     * @param relation the relation
    4646     */
     
    5151    /**
    5252     * renders the background
    53      * 
     53     *
    5454     * @param selected true, if the current node is selected
    5555     */
  • trunk/src/org/openstreetmap/josm/gui/dialogs/relation/RunnableAction.java

    r1762 r2512  
    77public abstract class RunnableAction extends AbstractAction implements Runnable {
    88
    9         public RunnableAction() {
    10         }
     9    public RunnableAction() {
     10    }
    1111
    12         public abstract void run();
     12    public abstract void run();
    1313
    14         public void actionPerformed(ActionEvent arg0) {
    15                 run();
    16         }
     14    public void actionPerformed(ActionEvent arg0) {
     15        run();
     16    }
    1717}
  • trunk/src/org/openstreetmap/josm/gui/dialogs/relation/SelectionTableCellRenderer.java

    r2070 r2512  
    2020/**
    2121 * This is the {@see TableCellRenderer} used in the tables of {@see RelationMemberMerger}.
    22  * 
     22 *
    2323 */
    2424public  class SelectionTableCellRenderer extends JLabel implements TableCellRenderer {
    2525    public final static Color BGCOLOR_SELECTED = new Color(143,170,255);
    2626    public final static Color BGCOLOR_DOUBLE_ENTRY = new Color(255,234,213);
    27 
    2827
    2928    private HashMap<OsmPrimitiveType, ImageIcon>  icons;
     
    3736    /**
    3837     * Load the image icon for an OSM primitive of type node
    39      * 
     38     *
    4039     * @return the icon; null, if not found
    4140     */
  • trunk/src/org/openstreetmap/josm/gui/dialogs/relation/SelectionTableModel.java

    r2181 r2512  
    2525    /**
    2626     * constructor
    27      * 
     27     *
    2828     * @param layer  the data layer. Must not be null.
    2929     * @exception IllegalArgumentException thrown if layer is null
     
    3838        populateSelectedPrimitives(layer);
    3939    }
    40 
    4140
    4241    public void unregister() {
     
    9897     * populates the model with the primitives currently selected in
    9998     * <code>layer</code>
    100      * 
     99     *
    101100     * @param layer  the data layer
    102101     */
  • trunk/src/org/openstreetmap/josm/gui/dialogs/relation/WayConnectionType.java

    r2394 r2512  
    1515    public final boolean linkNext;
    1616
    17     /** 
    18      * direction is FORWARD if the first node of this way is connected to the previous way 
    19      * and / or the last node of this way is connected to the next way. 
     17    /**
     18     * direction is FORWARD if the first node of this way is connected to the previous way
     19     * and / or the last node of this way is connected to the next way.
    2020     * direction is BACKWARD if it is the other way around.
    2121     * direction has a ROUNDABOUT value, if it is tagged as such and it is somehow
     
    2525     */
    2626    public final Direction direction;
    27    
     27
    2828    public enum Direction {
    2929        FORWARD, BACKWARD, ROUNDABOUT_LEFT, ROUNDABOUT_RIGHT, NONE;
    30        
     30
    3131        public boolean isRoundabout() {
    3232            return this == ROUNDABOUT_RIGHT || this == ROUNDABOUT_LEFT;
    33         }   
     33        }
    3434    };
    3535
     
    3838
    3939    public boolean isRoundabout = false;
    40    
     40
    4141    public WayConnectionType(boolean linkPrev, boolean linkNext, Direction direction) {
    4242        this.linkPrev = linkPrev;
     
    5555        invalid = true;
    5656    }
    57    
     57
    5858    public boolean isValid() {
    59         return !invalid;   
     59        return !invalid;
    6060    }
    6161
  • trunk/src/org/openstreetmap/josm/gui/download/BookmarkSelection.java

    r2387 r2512  
    4343    /** the list of bookmarks */
    4444    private BookmarkList bookmarks;
    45    
     45
    4646    /** the parent download GUI */
    4747    private DownloadDialog parent;
    48    
     48
    4949    /** displays information about the current download area */
    5050    private JMultilineLabel lblCurrentDownloadArea;
    5151    /** the add action */
    5252    private AddAction actAdd;
    53    
     53
    5454    /**
    55      * Creates the panel with the action buttons on the left 
    56      * 
     55     * Creates the panel with the action buttons on the left
     56     *
    5757     * @return the panel with the action buttons on the left
    5858     */
     
    7878        return pnl;
    7979    }
    80    
     80
    8181    protected JPanel buildDownloadAreaAddPanel() {
    8282        JPanel pnl = new JPanel();
    8383        pnl.setLayout(new GridBagLayout());
    84        
     84
    8585        GridBagConstraints  gc = new GridBagConstraints();
    8686        gc.anchor = GridBagConstraints.NORTHWEST;
     
    8989        gc.weighty = 1.0;
    9090        gc.insets = new Insets(5,5,5,5);
    91        
     91
    9292        pnl.add(lblCurrentDownloadArea = new JMultilineLabel(""), gc);
    93        
     93
    9494        gc.anchor = GridBagConstraints.NORTHEAST;
    9595        gc.fill = GridBagConstraints.HORIZONTAL;
     
    100100        return pnl;
    101101    }
    102  
     102
    103103    public void addGui(final DownloadDialog gui) {
    104104        JPanel dlg = new JPanel(new GridBagLayout());
    105105        gui.addDownloadAreaSelector(dlg, tr("Bookmarks"));
    106106        GridBagConstraints gc = new GridBagConstraints();
    107      
    108        
     107
    109108        bookmarks = new BookmarkList();
    110109        bookmarks.getSelectionModel().addListSelectionListener(new ListSelectionListener() {
     
    117116        });
    118117        bookmarks.addMouseListener(new DoubleClickAdapter());
    119        
     118
    120119        gc.fill = GridBagConstraints.HORIZONTAL;
    121120        gc.weightx = 1.0;
    122         gc.weighty = 0.0;       
     121        gc.weighty = 0.0;
    123122        gc.gridwidth = 2;
    124123        dlg.add(buildDownloadAreaAddPanel(),gc);
    125                
     124
    126125        gc.gridwidth = 1;
    127126        gc.gridx = 0;
     
    129128        gc.fill = GridBagConstraints.VERTICAL;
    130129        gc.weightx = 0.0;
    131         gc.weighty = 1.0;       
     130        gc.weighty = 1.0;
    132131        dlg.add(buildButtonPanel(),gc);
    133132
     
    137136        gc.fill = GridBagConstraints.BOTH;
    138137        gc.weightx = 1.0;
    139         gc.weighty = 1.0;   
     138        gc.weighty = 1.0;
    140139        gc.gridx = 1;
    141         dlg.add(new JScrollPane(bookmarks), gc);       
    142        
     140        dlg.add(new JScrollPane(bookmarks), gc);
     141
    143142        this.parent = gui;
    144143    }
    145    
     144
    146145    protected void updateDownloadAreaLabel() {
    147146        if (currentArea == null) {
     
    154153                    currentArea.getMax().lonToString(CoordinateFormat.DECIMAL_DEGREES)
    155154                    )
    156             );                   
    157         }
    158     }
    159    
     155            );
     156        }
     157    }
     158
    160159    /**
    161      * Sets the current download area 
    162      * 
    163      * @param area the download area. 
     160     * Sets the current download area
     161     *
     162     * @param area the download area.
    164163     */
    165164    public void setDownloadArea(Bounds area) {
     
    170169        actAdd.setEnabled(area != null);
    171170    }
    172    
     171
    173172    /**
    174173     * The action to add a new bookmark for the current download area.
     
    181180            putValue(SHORT_DESCRIPTION, tr("Add a bookmark for the currently selected download area"));
    182181        }
    183        
     182
    184183        public void actionPerformed(ActionEvent e) {
    185184            if (currentArea == null) {
     
    203202                ((DefaultListModel)bookmarks.getModel()).addElement(b);
    204203                bookmarks.save();
    205             }           
    206         }
    207     }
    208    
     204            }
     205        }
     206    }
     207
    209208    class RemoveAction extends AbstractAction implements ListSelectionListener{
    210209        public RemoveAction() {
     
    214213            updateEnabledState();
    215214        }
    216        
     215
    217216        public void actionPerformed(ActionEvent e) {
    218217            Object[] sels = bookmarks.getSelectedValues();
     
    230229        public void valueChanged(ListSelectionEvent e) {
    231230            updateEnabledState();
    232         }       
    233     }
    234    
     231        }
     232    }
     233
    235234    class RenameAction extends AbstractAction implements ListSelectionListener{
    236235        public RenameAction() {
     
    240239            updateEnabledState();
    241240        }
    242        
     241
    243242        public void actionPerformed(ActionEvent e) {
    244243            Object[] sels = bookmarks.getSelectedValues();
     
    247246            }
    248247            Bookmark b = (Bookmark)sels[0];
    249             Object value = 
     248            Object value =
    250249                    JOptionPane.showInputDialog(
    251250                    Main.parent,tr("Please enter a name for the bookmarked download area."),
     
    257256                    );
    258257            if (value != null) {
    259                 b.setName(value.toString());           
     258                b.setName(value.toString());
    260259                bookmarks.save();
    261260                bookmarks.repaint();
     
    267266        public void valueChanged(ListSelectionEvent e) {
    268267            updateEnabledState();
    269         }       
    270     }
    271    
     268        }
     269    }
     270
    272271    class DoubleClickAdapter extends MouseAdapter {
    273272        @Override
    274273        public void mouseClicked(MouseEvent e) {
    275             if (!(SwingUtilities.isLeftMouseButton(e) && e.getClickCount() == 2)) 
     274            if (!(SwingUtilities.isLeftMouseButton(e) && e.getClickCount() == 2))
    276275                return;
    277276            int idx = bookmarks.locationToIndex(e.getPoint());
     
    279278                return;
    280279            Bookmark b = (Bookmark)bookmarks.getModel().getElementAt(idx);
    281             parent.startDownload(b.getArea());           
    282         }       
    283     }   
     280            parent.startDownload(b.getArea());
     281        }
     282    }
    284283}
  • trunk/src/org/openstreetmap/josm/gui/download/BoundingBoxSelection.java

    r2483 r2512  
    5555    private DownloadDialog parent;
    5656
    57 
    5857    protected void registerBoundingBoxBuilder() {
    5958        BoundingBoxBuilder bboxbuilder = new BoundingBoxBuilder();
     
    148147    }
    149148
    150 
    151149    public void setDownloadArea(Bounds area) {
    152150        updateBboxFields(area);
     
    207205    }
    208206
    209 
    210207    class LatValueChecker extends FocusAdapter implements ActionListener{
    211208        private JTextField tfLatValue;
  • trunk/src/org/openstreetmap/josm/gui/download/DownloadDialog.java

    r2347 r2512  
    4848
    4949/**
    50  * 
     50 *
    5151 */
    5252public class DownloadDialog extends JDialog  {
    5353    static private final Logger logger = Logger.getLogger(DownloadDialog.class.getName());
    54    
     54
    5555    /** the unique instance of the download dialog */
    5656    static private DownloadDialog instance;
    57        
     57
    5858    /**
    5959     * Replies the unique instance of the download dialog
    60      * 
     60     *
    6161     * @return the unique instance of the download dialog
    6262     */
     
    6565            instance = new DownloadDialog(Main.parent);
    6666        return instance;
    67     }   
     67    }
    6868
    6969    private final List<DownloadSelection> downloadSelections = new ArrayList<DownloadSelection>();
     
    8080    private SideButton btnDownload;
    8181
    82    
    8382    public JPanel buildMainPanel() {
    84         JPanel pnl = new JPanel(); 
     83        JPanel pnl = new JPanel();
    8584        pnl.setLayout(new GridBagLayout());
    8685        pnl.setBorder(BorderFactory.createEmptyBorder(10,10,10,10));
     
    9493        cbDownloadGpxData.setToolTipText(tr("Select to download GPS traces in the selected download area."));
    9594        pnl.add(cbDownloadGpxData,  GBC.eol().insets(20,0,0,0));
    96        
     95
    9796        // predefined download selections
    9897        downloadSelections.add(new SlippyMapChooser());
     
    111110            s.addGui(this);
    112111        }
    113    
     112
    114113        cbNewLayer = new JCheckBox(tr("Download as new layer"));
    115114        cbNewLayer.setToolTipText(tr("<html>Select to download data into a new data layer.<br>"
     
    131130        return pnl;
    132131    }
    133    
     132
    134133    protected JPanel buildButtonPanel() {
    135134        JPanel pnl = new JPanel();
    136135        pnl.setLayout(new FlowLayout());
    137        
     136
    138137        // -- download button
    139138        pnl.add(btnDownload = new SideButton(actDownload = new DownloadAction()));
     
    142141        btnDownload.getActionMap().put("download",actDownload);
    143142
    144         // -- cancel button         
     143        // -- cancel button
    145144        SideButton btnCancel;
    146145        CancelAction actCancel = new CancelAction();
     
    150149        btnCancel.getActionMap().put("enter",actCancel);
    151150
    152         // -- cancel on ESC 
     151        // -- cancel on ESC
    153152        getRootPane().getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE,0), "cancel");
    154153        getRootPane().getActionMap().put("cancel", actCancel);
    155154
    156         // -- help button 
     155        // -- help button
    157156        SideButton btnHelp;
    158157        pnl.add(btnHelp = new SideButton(new ContextSensitiveHelpAction(ht("/Dialog/DownloadDialog"))));
     
    160159        btnHelp.getInputMap().put(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER,0), "enter");
    161160        btnHelp.getActionMap().put("enter",btnHelp.getAction());
    162        
    163         return pnl;       
    164     }
    165    
     161
     162        return pnl;
     163    }
     164
    166165    public DownloadDialog(Component parent) {
    167166        super(JOptionPane.getFrameForComponent(parent),tr("Download"), true /* modal */);
     
    169168        getContentPane().add(buildMainPanel(), BorderLayout.CENTER);
    170169        getContentPane().add(buildButtonPanel(), BorderLayout.SOUTH);
    171        
     170
    172171        getRootPane().getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(
    173172                KeyStroke.getKeyStroke(KeyEvent.VK_V, InputEvent.CTRL_MASK), "checkClipboardContents");
     
    182181        restoreSettings();
    183182    }
    184    
    185183
    186184    private void checkClipboardContents() {
     
    224222     * @param eventSource - the DownloadSelection object that fired this notification.
    225223     */
    226     public void boundingBoxChanged(Bounds b, DownloadSelection eventSource) {       
     224    public void boundingBoxChanged(Bounds b, DownloadSelection eventSource) {
    227225        this.currentBounds = b;
    228226        for (DownloadSelection s : downloadSelections) {
     
    233231        updateSizeCheck();
    234232    }
    235    
    236     /**
    237      * Invoked by 
     233
     234    /**
     235     * Invoked by
    238236     * @param b
    239237     */
     
    242240        actDownload.run();
    243241    }
    244    
     242
    245243    /**
    246244     * Replies true if the user selected to download OSM data
    247      * 
     245     *
    248246     * @return true if the user selected to download OSM data
    249247     */
     
    251249        return cbDownloadOsmData.isSelected();
    252250    }
    253    
     251
    254252    /**
    255253     * Replies true if the user selected to download GPX data
    256      * 
     254     *
    257255     * @return true if the user selected to download GPX data
    258256     */
     
    260258        return cbDownloadGpxData.isSelected();
    261259    }
    262    
    263     /**
    264      * Replies true if the user requires to download into a new layer 
    265      * 
    266      * @return true if the user requires to download into a new layer 
     260
     261    /**
     262     * Replies true if the user requires to download into a new layer
     263     *
     264     * @return true if the user requires to download into a new layer
    267265     */
    268266    public boolean isNewLayerRequired() {
    269267        return cbNewLayer.isSelected();
    270268    }
    271    
     269
    272270    /**
    273271     * Adds a new download area selector to the download dialog
    274      * 
    275      * @param selector the download are selector 
     272     *
     273     * @param selector the download are selector
    276274     * @param displayName the display name of the selector
    277275     */
     
    279277        tpDownloadAreaSelectors.add(displayName, selector);
    280278    }
    281    
    282     /**
    283      * Remembers the current settings in the download dialog 
    284      * 
     279
     280    /**
     281     * Remembers the current settings in the download dialog
     282     *
    285283     */
    286284    public void rememberSettings() {
     
    293291        }
    294292    }
    295    
     293
    296294    public void restoreSettings() {
    297295        cbDownloadOsmData.setSelected(Main.pref.getBoolean("download.osm", true));
     
    303301        }
    304302        tpDownloadAreaSelectors.setSelectedIndex(idx);
    305        
     303
    306304        if (Main.map != null) {
    307305            MapView mv = Main.map.mapView;
    308306            currentBounds = new Bounds(
    309307                    mv.getLatLon(0, mv.getHeight()),
    310                     mv.getLatLon(mv.getWidth(), 0)                   
     308                    mv.getLatLon(mv.getWidth(), 0)
    311309                    );
    312310            boundingBoxChanged(currentBounds,null);
     
    323321        }
    324322    }
    325    
     323
    326324    /**
    327325     * Replies the currently selected download area. May be null, if no download area is selected
     
    331329        return currentBounds;
    332330    }
    333    
     331
    334332    @Override
    335333    public void setVisible(boolean visible) {
     
    350348    /**
    351349     * Replies true if the dialog was canceled
    352      * 
     350     *
    353351     * @return true if the dialog was canceled
    354352     */
     
    360358        this.canceled = canceled;
    361359    }
    362    
     360
    363361    class CancelAction extends AbstractAction {
    364362        public CancelAction() {
    365363            putValue(NAME, tr("Cancel"));
    366364            putValue(SMALL_ICON, ImageProvider.get("cancel"));
    367             putValue(SHORT_DESCRIPTION, tr("Click to close the dialog and to abort downloading"));           
    368         }
    369        
     365            putValue(SHORT_DESCRIPTION, tr("Click to close the dialog and to abort downloading"));
     366        }
     367
    370368        public void run() {
    371369            setCanceled(true);
    372             setVisible(false);   
    373         }
    374        
     370            setVisible(false);
     371        }
     372
    375373        public void actionPerformed(ActionEvent e) {
    376374            run();
    377         }       
     375        }
    378376    }
    379377
     
    382380            putValue(NAME, tr("Download"));
    383381            putValue(SMALL_ICON, ImageProvider.get("download"));
    384             putValue(SHORT_DESCRIPTION, tr("Click do download the currently selected area"));           
    385         }
    386        
     382            putValue(SHORT_DESCRIPTION, tr("Click do download the currently selected area"));
     383        }
     384
    387385        public void run() {
    388386            if (currentBounds == null) {
     
    398396                JOptionPane.showMessageDialog(
    399397                        DownloadDialog.this,
    400                         tr("<html>Neither <strong>{0}</strong> nor <strong>{1}</strong> is enabled.<br>" 
     398                        tr("<html>Neither <strong>{0}</strong> nor <strong>{1}</strong> is enabled.<br>"
    401399                                + "Please chose to either download OSM data, or GPX data, or both.</html>",
    402400                        cbDownloadOsmData.getText(),
     
    409407            }
    410408            setCanceled(false);
    411             setVisible(false); 
    412         }
    413        
     409            setVisible(false);
     410        }
     411
    414412        public void actionPerformed(ActionEvent e) {
    415413            run();
    416         }       
    417     }
    418    
     414        }
     415    }
     416
    419417    class WindowEventHandler extends WindowAdapter {
    420418        @Override
     
    426424        public void windowActivated(WindowEvent e) {
    427425            btnDownload.requestFocusInWindow();
    428         }       
     426        }
    429427    }
    430428}
  • trunk/src/org/openstreetmap/josm/gui/download/DownloadSelection.java

    r2344 r2512  
    33
    44import org.openstreetmap.josm.data.Bounds;
    5 
    65
    76public interface DownloadSelection  {
     
    1211    void addGui(DownloadDialog gui);
    1312
    14    
    1513    /**
    1614     * Sets the current download area. The area may be null to clear
    1715     * the current download area.
    18      * 
     16     *
    1917     * @param are the current download area
    2018     */
    2119    public void setDownloadArea(Bounds area);
    2220}
    23 
  • trunk/src/org/openstreetmap/josm/gui/download/PlaceSelection.java

    r2362 r2512  
    6666    private JTable tblSearchResults;
    6767    private DownloadDialog parent;
    68  
     68
    6969    protected JPanel buildSearchPanel() {
    7070        JPanel panel = new JPanel();
    7171        panel.setLayout(new GridBagLayout());
    7272        GridBagConstraints gc = new GridBagConstraints();
    73        
    74         // the label for the search field 
     73
     74        // the label for the search field
    7575        //
    7676        gc.gridwidth = 2;
     
    7979        gc.insets = new Insets(5, 5, 0, 5);
    8080        panel.add(new JLabel(tr("Enter a place name to search for:")), gc);
    81        
     81
    8282        // the search expression field
    8383        //
     
    104104        gc.weightx = 0.0;
    105105        panel.add(btnSearch,  gc);
    106    
    107         return panel;   
     106
     107        return panel;
    108108    }
    109109
     
    125125        scrollPane.setPreferredSize(new Dimension(200,200));
    126126        panel.add(scrollPane, BorderLayout.CENTER);
    127        
     127
    128128        gui.addDownloadAreaSelector(panel, tr("Areas around places"));
    129129
    130         scrollPane.setPreferredSize(scrollPane.getPreferredSize());       
     130        scrollPane.setPreferredSize(scrollPane.getPreferredSize());
    131131        tblSearchResults.getSelectionModel().setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
    132132        tblSearchResults.getSelectionModel().addListSelectionListener(new ListSelectionHandler());
     
    139139                }
    140140            }
    141         });       
     141        });
    142142        parent = gui;
    143143    }
     
    146146       tblSearchResults.clearSelection();
    147147    }
    148        
     148
    149149    /**
    150150     * Data storage for search results.
     
    160160        public int osmId;
    161161        public OsmPrimitiveType type;
    162        
     162
    163163        public Bounds getDownloadArea() {
    164164            double size = 180.0 / Math.pow(2, zoom);
    165165            Bounds b = new Bounds(
    166                     new LatLon(lat - size / 2, lon - size), 
     166                    new LatLon(lat - size / 2, lon - size),
    167167                    new LatLon(lat + size / 2, lon+ size)
    168168                    );
     
    170170        }
    171171    }
    172    
    173    
     172
    174173    /**
    175174     * A very primitive parser for the name finder's output.
     
    185184        /**
    186185         * Detect starting elements.
    187          * 
     186         *
    188187         */
    189188        @Override
     
    245244            }
    246245        }
    247        
     246
    248247        public List<SearchResult> getResult() {
    249248            return data;
    250249        }
    251250    }
    252    
     251
    253252    class SearchAction extends AbstractAction implements DocumentListener {
    254253
     
    259258            updateEnabledState();
    260259        }
    261        
     260
    262261        public void actionPerformed(ActionEvent e) {
    263262            if (!isEnabled() || cbSearchExpression.getText().trim().length() == 0)
     
    268267            Main.worker.submit(task);
    269268        }
    270        
     269
    271270        protected void updateEnabledState() {
    272271            setEnabled(cbSearchExpression.getText().trim().length() > 0);
     
    285284        }
    286285    }
    287    
    288    
     286
    289287    class NameQueryTask extends PleaseWaitRunnable {
    290        
     288
    291289        private String searchExpression;
    292290        private HttpURLConnection connection;
     
    294292        private boolean canceled = false;
    295293        private Exception lastException;
    296        
     294
    297295        public NameQueryTask(String searchExpression) {
    298296            super(tr("Querying name server"),false /* don't ignore exceptions */);
    299297            this.searchExpression = searchExpression;
    300298        }
    301        
    302        
     299
    303300        @Override
    304301        protected void cancel() {
     
    306303            synchronized (this) {
    307304                if (connection != null) {
    308                     connection.disconnect();                   
    309                 }               
    310             }           
     305                    connection.disconnect();
     306                }
     307            }
    311308        }
    312309
    313310        @Override
    314311        protected void finish() {
    315             if (canceled) 
     312            if (canceled)
    316313                return;
    317314            if (lastException != null) {
     
    319316                return;
    320317            }
    321             model.setData(this.data);           
    322         }
    323 
    324         @Override
    325         protected void realRun() throws SAXException, IOException, OsmTransferException {           
     318            model.setData(this.data);
     319        }
     320
     321        @Override
     322        protected void realRun() throws SAXException, IOException, OsmTransferException {
    326323            try {
    327324                getProgressMonitor().indeterminateSubTask(tr("Querying name server ..."));
     
    339336            } catch(Exception e) {
    340337                if (canceled) {
    341                     // ignore exception 
     338                    // ignore exception
    342339                    return;
    343340                }
     
    346343        }
    347344    }
    348    
     345
    349346    class NamedResultTableModel extends DefaultTableModel {
    350347        private ArrayList<SearchResult> data;
    351348        private ListSelectionModel selectionModel;
    352        
     349
    353350        public NamedResultTableModel(ListSelectionModel selectionModel) {
    354351            data = new ArrayList<SearchResult>();
     
    366363            return data.get(row);
    367364        }
    368        
     365
    369366        public void setData(List<SearchResult> data) {
    370367            if (data == null) {
     
    377374        @Override
    378375        public boolean isCellEditable(int row, int column) {
    379             return false; 
    380         }
    381        
     376            return false;
     377        }
     378
    382379        public SearchResult getSelectedSearchResult() {
    383380            if (selectionModel.getMinSelectionIndex() < 0) {
     
    387384        }
    388385    }
    389    
     386
    390387    class NamedResultTableColumnModel extends DefaultTableColumnModel {
    391388        protected void createColumns() {
     
    400397            col.setCellRenderer(renderer);
    401398            addColumn(col);
    402            
     399
    403400            // column 1 - Version
    404401            col = new TableColumn(1);
     
    408405            col.setCellRenderer(renderer);
    409406            addColumn(col);
    410            
     407
    411408            // column 2 - Near
    412409            col = new TableColumn(2);
     
    416413            col.setCellRenderer(renderer);
    417414            addColumn(col);
    418            
    419415
    420416            // column 3 - Zoom
     
    431427        }
    432428    }
    433    
     429
    434430    class ListSelectionHandler implements ListSelectionListener {
    435431        public void valueChanged(ListSelectionEvent lse) {
     
    445441        }
    446442    }
    447    
     443
    448444    class NamedResultCellRenderer extends JLabel implements TableCellRenderer {
    449        
     445
    450446        public NamedResultCellRenderer() {
    451447            setOpaque(true);
    452448            setBorder(BorderFactory.createEmptyBorder(2,2,2,2));
    453449        }
    454        
     450
    455451        protected void reset() {
    456452            setText("");
    457453            setIcon(null);
    458454        }
    459        
     455
    460456        protected void renderColor(boolean selected) {
    461457            if (selected) {
     
    464460            } else {
    465461                setForeground(UIManager.getColor("Table.foreground"));
    466                 setBackground(UIManager.getColor("Table.background"));               
    467             }
    468         }
    469        
     462                setBackground(UIManager.getColor("Table.background"));
     463            }
     464        }
     465
    470466        protected String lineWrapDescription(String description) {
    471467            StringBuffer ret = new StringBuffer();
     
    488484            return ret.toString();
    489485        }
    490        
     486
    491487        public Component getTableCellRendererComponent(JTable table, Object value,
    492488                boolean isSelected, boolean hasFocus, int row, int column) {
    493            
     489
    494490            reset();
    495491            renderColor(isSelected);
    496            
     492
    497493            if (value == null) return this;
    498494            SearchResult sr = (SearchResult) value;
  • trunk/src/org/openstreetmap/josm/gui/download/SizeButton.java

    r1390 r2512  
    11// License: GPL. Copyright 2007 by Tim Haussmann
    22package org.openstreetmap.josm.gui.download;
    3 
    43
    54import java.awt.Graphics;
     
    98
    109import org.openstreetmap.josm.tools.ImageProvider;
    11 
    1210
    1311/**
     
    2220    private ImageIcon shrinkImage;
    2321    private boolean isEnlarged = false;
    24 
    2522
    2623    public SizeButton(){
  • trunk/src/org/openstreetmap/josm/gui/download/SlippyMapChooser.java

    r2332 r2512  
    122122        String labelText = tr("<b>Zoom:</b> Mousewheel, double click or Ctrl + Up/Down "
    123123                + "<b>Move map:</b> Hold right mousebutton and move mouse or use cursor keys. <b>Select:</b> Hold left mousebutton and draw a frame.");
    124         slipyyMapTabPanel.add(new JLabel("<html>" + labelText + "</html>"), BorderLayout.SOUTH);       
     124        slipyyMapTabPanel.add(new JLabel("<html>" + labelText + "</html>"), BorderLayout.SOUTH);
    125125        iGui.addDownloadAreaSelector(slipyyMapTabPanel, tr("Slippy map"));
    126126        new OsmMapControl(this, slipyyMapTabPanel, iSizeButton, iSourceButton);
     
    169169        if (area == null)
    170170            return;
    171        
     171
    172172        // test if a bounding box has been set set
    173173        if (area.getMin().lat() == 0.0 && area.getMin().lon() == 0.0 && area.getMax().lat() == 0.0 && area.getMax().lon() == 0.0)
     
    224224        Bounds b = new Bounds(
    225225                new LatLon(
    226                         Math.min(l2.getLat(), l1.getLat()), 
     226                        Math.min(l2.getLat(), l1.getLat()),
    227227                        Math.min(l1.getLon(), l2.getLon())
    228228                        ),
    229229                new LatLon(
    230                         Math.max(l2.getLat(), l1.getLat()), 
     230                        Math.max(l2.getLat(), l1.getLat()),
    231231                        Math.max(l1.getLon(), l2.getLon()))
    232232                );
  • trunk/src/org/openstreetmap/josm/gui/help/ContextSensitiveHelpAction.java

    r2326 r2512  
    1313 * This is the standard help action to be used with help buttons for
    1414 * context sensitive help
    15  * 
     15 *
    1616 */
    1717public class ContextSensitiveHelpAction extends AbstractAction {
     
    2121
    2222    /**
    23      * Sets the help topic 
    24      * 
     23     * Sets the help topic
     24     *
    2525     * @param relativeHelpTopic the relative help topic
    2626     */
     
    3030        this.helpTopic = relativeHelpTopic;
    3131    }
    32    
     32
    3333    /**
    3434     * Creates a help topic for the root help topic
    35      * 
     35     *
    3636     */
    3737    public ContextSensitiveHelpAction() {
    3838        this(ht("/"));
    3939    }
    40    
     40
    4141    /**
    42      * 
     42     *
    4343     * @param helpTopic
    4444     */
  • trunk/src/org/openstreetmap/josm/gui/help/HelpApplication.java

    r2358 r2512  
    3131 * The JOSM help browser wrapped in its own application. It is listening to commands
    3232 * on standard in.
    33  * 
     33 *
    3434 */
    3535public class HelpApplication {
     
    5757        new Thread(commandProcessor).start();
    5858    }
    59 
    6059
    6160    static public void main(String argArray[]) {
  • trunk/src/org/openstreetmap/josm/gui/help/HelpBrowser.java

    r2448 r2512  
    5757    /**
    5858     * Replies the unique instance of the help browser
    59      * 
     59     *
    6060     * @return the unique instance of the help browser
    6161     */
     
    7070     * Launches the internal help browser and directs it to the help page for
    7171     * <code>helpTopic</code>.
    72      * 
     72     *
    7373     * @param helpTopic the help topic
    7474     */
     
    9494    /**
    9595     * Builds the style sheet used in the internal help browser
    96      * 
     96     *
    9797     * @return the style sheet
    9898     */
     
    172172    /**
    173173     * Replies the current URL
    174      * 
     174     *
    175175     * @return the current URL
    176176     */
    177 
    178177
    179178    public String getUrl() {
     
    183182    /**
    184183     * Displays a warning page when a help topic doesn't exist yet.
    185      * 
     184     *
    186185     * @param relativeHelpTopic the help topic
    187186     */
     
    204203    /**
    205204     * Displays a error page if a help topic couldn't be loaded because of network or IO error.
    206      * 
     205     *
    207206     * @param relativeHelpTopic the help topic
    208207     * @param e the exception
     
    227226    /**
    228227     * Loads a help topic given by a relative help topic name (i.e. "/Action/New")
    229      * 
     228     *
    230229     * First tries to load the language specific help topic. If it is missing, tries to
    231230     * load the topic in english.
    232      * 
     231     *
    233232     * @param relativeHelpTopic the relative help topic
    234233     */
     
    265264     * Loads a help topic given by an absolute help topic name, i.e.
    266265     * "/De:Help/Action/New"
    267      * 
     266     *
    268267     * @param absoluteHelpTopic the absolute help topic name
    269268     */
     
    289288    /**
    290289     * Opens an URL and displays the content.
    291      * 
     290     *
    292291     *  If the URL is the locator of an absolute help topic, help content is loaded from
    293292     *  the JOSM wiki. Otherwise, the help browser loads the page from the given URL
    294      * 
     293     *
    295294     * @param url the url
    296295     */
     
    333332     * Loads and displays the help information for a help topic given
    334333     * by a relative help topic name, i.e. "/Action/New"
    335      * 
     334     *
    336335     * @param relativeHelpTopic the relative help topic
    337336     */
     
    455454        /**
    456455         * Scrolls the help browser to the element with id <code>id</code>
    457          * 
     456         *
    458457         * @param id the id
    459458         * @return true, if an element with this id was found and scrolling was successful; false, otherwise
     
    485484         * <a href="#thisIsALocalFragment">. If so, replies the fragment, i.e.
    486485         * "thisIsALocalFragment".
    487          * 
     486         *
    488487         * Otherwise, replies null
    489          * 
     488         *
    490489         * @param e the hyperlink event
    491490         * @return the local fragment
  • trunk/src/org/openstreetmap/josm/gui/help/HelpBrowserCommandProcessor.java

    r2317 r2512  
    1313/**
    1414 * Listens to commands on an input stream and delegates them to the help browser.
    15  * 
     15 *
    1616 *
    1717 */
     
    2323
    2424    /**
    25      * 
     25     *
    2626     * @param browser the controlled help browser
    2727     */
     
    3232    /**
    3333     * Show the help page for help topic <code>helpTopic</code>.
    34      * 
     34     *
    3535     * @param helpTopic the help topic
    3636     */
     
    8383    }
    8484}
    85 
  • trunk/src/org/openstreetmap/josm/gui/help/HelpBrowserProxy.java

    r2308 r2512  
    1515/**
    1616 * This is the proxy class for the help browser running in its own process.
    17  * 
     17 *
    1818 *
    1919 */
     
    2525    /**
    2626     * replies the unique instance of the proxy
    27      * 
     27     *
    2828     * @return the unique instance of the proxy
    2929     */
     
    4242    /**
    4343     * launches the help browser in its own process
    44      * 
     44     *
    4545     */
    4646    protected void launch() {
     
    7878     * Direct the help browser to the help page for help topic
    7979     * <code>relativeHelpTopic</code>
    80      * 
     80     *
    8181     * @param relativeHelpTopic the help topic
    8282     */
  • trunk/src/org/openstreetmap/josm/gui/help/HelpContentReader.java

    r2308 r2512  
    1414 * Reads help content from the JOSM Wiki and prepares it for rendering in the internal
    1515 * help browser.
    16  * 
     16 *
    1717 * The help content has to be <strong>filtered</strong> because only the main content <tt>&lt;div&gt;</tt>
    1818 * of a Wiki help page is displayed in the internal help browser.
    19  * 
     19 *
    2020 * It also has to be <strong>transformed</strong> because the internal help browser required slightly
    2121 * different HTML than what is provided by the Wiki.
    22  * 
     22 *
    2323 * @see WikiReader
    2424 */
     
    3030    /**
    3131     * constructor
    32      * 
     32     *
    3333     * @param baseUrl the base url of the JOSM help wiki, i.e. http://josm.openstreetmap.org
    3434     */
     
    3939    /**
    4040     * Fetches the content of a help topic from the JOSM wiki.
    41      * 
     41     *
    4242     * @param helpTopicUrl  the absolute help topic URL
    4343     * @return the content, filtered and transformed for being displayed in the internal help browser
     
    8181     * Reads help content from the input stream and prepares it to be rendered later
    8282     * in the internal help browser.
    83      * 
     83     *
    8484     * Throws a {@see MissingHelpContentException} if the content read from the stream
    8585     * most likely represents a stub help page.
    86      * 
     86     *
    8787     * @param in the input stream
    8888     * @return the content
  • trunk/src/org/openstreetmap/josm/gui/help/HelpContentReaderException.java

    r2308 r2512  
    2828     * Replies the HTTP response code related to the wiki access exception.
    2929     * If no HTTP response code is available, 0 is replied.
    30      * 
     30     *
    3131     * @return the http response code
    3232     */
     
    3737    /**
    3838     * Sets the HTTP response code
    39      * 
     39     *
    4040     * @param responseCode the response code
    4141     */
     
    4444    }
    4545
    46 
    4746}
  • trunk/src/org/openstreetmap/josm/gui/help/HelpUtil.java

    r2389 r2512  
    1919    /**
    2020     * Replies the base wiki URL.
    21      * 
     21     *
    2222     * @return the base wiki URL
    2323     */
     
    2828    /**
    2929     * Replies the base wiki URL for help pages
    30      * 
     30     *
    3131     * @return the base wiki URL for help pages
    3232     */
     
    3737    /**
    3838     * Replies the URL on the wiki for an absolute help topic. The URL is encoded in UTF-8.
    39      * 
     39     *
    4040     * @param absoluteHelpTopic the absolute help topic
    4141     * @return the url
     
    5353    /**
    5454     * Replies the URL to the edit page for the absolute help topic.
    55      * 
     55     *
    5656     * @param absoluteHelpTopic the absolute help topic
    5757     * @return the URL to the edit page
     
    6666     * Extracts the relative help topic from an URL. Replies null, if
    6767     * no relative help topic is found.
    68      * 
     68     *
    6969     * @param url the url
    7070     * @return the relative help topic in the URL, i.e. "/Action/New"
     
    8282     * Extracts the absolute help topic from an URL. Replies null, if
    8383     * no absolute help topic is found.
    84      * 
     84     *
    8585     * @param url the url
    8686     * @return the absolute help topic in the URL, i.e. "/De:Help/Action/New"
     
    106106     *   <li>/De:Help if the current locale is a locale with language "de"</li>
    107107     * </ul>
    108      * 
     108     *
    109109     * @return the help topic prefix
    110110     * @see #getHelpTopicPrefix(Locale)
     
    120120     *   <li>/De:Help if the  locale is a locale with language "de"</li>
    121121     * </ul>
    122      * 
     122     *
    123123     * @param locale the locale. {@see Locale#ENGLISH} assumed, if null.
    124124     * @return the help topic prefix
     
    137137    /**
    138138     * Replies the absolute, localized help topic for the given topic.
    139      * 
     139     *
    140140     * Example: for a topic "/Dialog/RelationEditor" and the locale "de", this method
    141141     * replies "/De:Help/Dialog/RelationEditor"
    142      * 
     142     *
    143143     * @param topic the relative help topic. Home help topic assumed, if null.
    144144     * @param locale the locale. {@see Locale#ENGLISH} assumed, if null.
     
    164164     * Replies the absolute, localized help topic for the given topic and the
    165165     * current locale.
    166      * 
     166     *
    167167     * @param topic the relative help topic. Home help topic assumed, if null.
    168168     * @return the absolute, localized help topic
     
    176176    /**
    177177     * Replies the context specific help topic configured for <code>context</code>.
    178      * 
     178     *
    179179     * @return the help topic. null, if no context specific help topic is found
    180180     */
     
    208208     * Replies the global help action, if available. Otherwise, creates an instance
    209209     * of {@see HelpAction}.
    210      * 
     210     *
    211211     * @return
    212212     */
     
    221221    /**
    222222     * Makes a component aware of context sensitive help.
    223      * 
     223     *
    224224     * A relative help topic doesn't start with /Help and doesn't include a locale
    225225     * code. Example: /Dialog/RelationEditor is a relative help topic, /De:Help/Dialog/RelationEditor
    226226     * is not.
    227      * 
     227     *
    228228     * @param component the component  the component
    229229     * @param topic the help topic. Set to the default help topic if null.
     
    241241     * This is a simple marker method for help topic literals. If you declare a help
    242242     * topic literal in the source you should enclose it in ht(...).
    243      * 
     243     *
    244244     *  <strong>Example</strong>
    245245     *  <pre>
     
    248248     *     putValue("help", ht("/Dialog/RelationEditor"));
    249249     *  </pre>
    250      * 
    251      * 
     250     *
     251     *
    252252     * @param helpTopic
    253253     */
  • trunk/src/org/openstreetmap/josm/gui/history/AdjustmentSynchronizer.java

    r2181 r2512  
    1515
    1616import javax.swing.JCheckBox;
    17 
    1817
    1918/**
     
    3635        observable = new Observable();
    3736    }
    38 
    3937
    4038    /**
  • trunk/src/org/openstreetmap/josm/gui/history/CoordinateInfoViewer.java

    r2245 r2512  
    8787
    8888    /**
    89      * 
     89     *
    9090     * @param model the model. Must not be null.
    9191     * @throws IllegalArgumentException thrown if model is null
     
    131131    /**
    132132     * Sets the model for this viewer
    133      * 
     133     *
    134134     * @param model the model.
    135135     */
     
    147147     * A UI widgets which displays the Lan/Lon-coordinates of a
    148148     * {@see HistoryNode}.
    149      * 
     149     *
    150150     */
    151151    private static class LatLonViewer extends JPanel implements Observer{
     
    210210            lblLon.setBorder(BorderFactory.createEmptyBorder(2,2,2,2));
    211211
    212 
    213212            // fill the remaining space
    214213            gc.gridx = 0;
     
    222221
    223222        /**
    224          * 
     223         *
    225224         * @param model a model
    226225         * @param role the role for this viewer.
  • trunk/src/org/openstreetmap/josm/gui/history/HistoryBrowser.java

    r2416 r2512  
    3030    private CoordinateInfoViewer coordinateInfoViewer;
    3131    private JTabbedPane tpViewers;
    32 
    3332
    3433    /**
  • trunk/src/org/openstreetmap/josm/gui/history/HistoryBrowserDialog.java

    r2448 r2512  
    3030 * This is non-modal dialog, always showing on top, which displays history information
    3131 * about a given {@see OsmPrimitive}.
    32  * 
     32 *
    3333 */
    3434public class HistoryBrowserDialog extends JDialog implements HistoryDataSetListener{
     
    4040    /**
    4141     * displays the title for this dialog
    42      * 
     42     *
    4343     * @param h the current history
    4444     */
     
    5858    /**
    5959     * builds the GUI
    60      * 
     60     *
    6161     */
    6262    protected void build() {
     
    8888    /**
    8989     * constructor
    90      * 
     90     *
    9191     * @param history  the history to be displayed
    9292     */
  • trunk/src/org/openstreetmap/josm/gui/history/HistoryBrowserDialogManager.java

    r2448 r2512  
    8888    /**
    8989     * Hides and destroys all currently visible history browser dialogs
    90      * 
     90     *
    9191     */
    9292    public void hideAll() {
  • trunk/src/org/openstreetmap/josm/gui/history/HistoryBrowserModel.java

    r2497 r2512  
    103103    /**
    104104     * Creates a new history browser model for a given history.
    105      * 
     105     *
    106106     * @param history the history. Must not be null.
    107107     * @throws IllegalArgumentException thrown if history is null
     
    117117     * Replies the current edit layer; null, if there isn't a current edit layer
    118118     * of type {@see OsmDataLayer}.
    119      * 
     119     *
    120120     * @return the current edit layer
    121121     */
     
    258258     * Sets the {@see HistoryOsmPrimitive} which plays the role of a reference point
    259259     * in time (see {@see PointInTimeType}).
    260      * 
     260     *
    261261     * @param reference the reference history primitive. Must not be null.
    262262     * @throws IllegalArgumentException thrown if reference is null
    263263     * @throws IllegalStateException thrown if this model isn't a assigned a history yet
    264264     * @throws IllegalArgumentException if reference isn't an history primitive for the history managed by this mode
    265      * 
     265     *
    266266     * @see #setHistory(History)
    267267     * @see PointInTimeType
     
    289289     * Sets the {@see HistoryOsmPrimitive} which plays the role of the current point
    290290     * in time (see {@see PointInTimeType}).
    291      * 
     291     *
    292292     * @param reference the reference history primitive. Must not be null.
    293293     * @throws IllegalArgumentException thrown if reference is null
    294294     * @throws IllegalStateException thrown if this model isn't a assigned a history yet
    295295     * @throws IllegalArgumentException if reference isn't an history primitive for the history managed by this mode
    296      * 
     296     *
    297297     * @see #setHistory(History)
    298298     * @see PointInTimeType
     
    357357     * representing the version currently edited in the current data
    358358     * layer.
    359      * 
     359     *
    360360     * @param primitive the primitive to check
    361361     * @return true if <code>primitive</code> is the latest primitive
     
    452452        }
    453453    }
    454 
    455454
    456455    /**
     
    767766     * Removes this model as listener for data change and layer change
    768767     * events.
    769      * 
     768     *
    770769     */
    771770    public void unlinkAsListener() {
     
    875874    /**
    876875     * Creates a {@see HistoryOsmPrimitive} from a {@see OsmPrimitive}
    877      * 
     876     *
    878877     */
    879878    class HistoryPrimitiveBuilder extends AbstractVisitor {
  • trunk/src/org/openstreetmap/josm/gui/history/HistoryLoadTask.java

    r2448 r2512  
    2828 *
    2929 * It provides a fluent API for configuration.
    30  * 
     30 *
    3131 * Sample usage:
    32  * 
     32 *
    3333 * <pre>
    3434 *   HistoryLoadTask task  = new HistoryLoadTask()
     
    3737 *      .add(37234, OsmPrimitveType.RELATION)
    3838 *      .add(aHistoryItem);
    39  * 
     39 *
    4040 *   Main.worker.execute(task);
    41  * 
     41 *
    4242 * </pre>
    4343 */
     
    5656    /**
    5757     * Adds an object whose history is to be loaded.
    58      * 
     58     *
    5959     * @param id the object id
    6060     * @param type the object type
     
    7373    /**
    7474     * Adds an object whose history is to be loaded.
    75      * 
     75     *
    7676     * @param pid  the primitive id. Must not be null. Id > 0 required.
    7777     * @return this task
     
    8888    /**
    8989     * Adds an object to be loaded, the object is specified by a history item.
    90      * 
     90     *
    9191     * @param primitive the history item
    9292     * @return this task
     
    102102    /**
    103103     * Adds an object to be loaded, the object is specified by an already loaded object history.
    104      * 
     104     *
    105105     * @param history the history. Must not be null.
    106106     * @return this task
     
    116116    /**
    117117     * Adds an object to be loaded, the object is specified by an OSM primitive.
    118      * 
     118     *
    119119     * @param primitive the OSM primitive. Must not be null. primitive.getId() > 0 required.
    120120     * @return this task
     
    133133    /**
    134134     * Adds a collection of objects to loaded, specified by a collection of OSM primitives.
    135      * 
     135     *
    136136     * @param primitive the OSM primitive. Must not be null. primitive.getId() > 0 required.
    137137     * @return this task
  • trunk/src/org/openstreetmap/josm/gui/history/NodeListTableCellRenderer.java

    r1709 r2512  
    1616/**
    1717 * The {@see TableCellRenderer} for a list of nodes in [@see HistoryBrower}
    18  * 
     18 *
    1919 *
    2020 */
  • trunk/src/org/openstreetmap/josm/gui/history/NodeListTableColumnModel.java

    r1709 r2512  
    99/**
    1010 * The {@see TableColumnModel} for the table with the list of nodes.
    11  * 
     11 *
    1212 *
    1313 */
  • trunk/src/org/openstreetmap/josm/gui/history/NodeListViewer.java

    r2448 r2512  
    3232 * NodeListViewer is a UI component which displays the node list of two
    3333 * version of a {@see OsmPrimitive} in a {@see History}.
    34  * 
     34 *
    3535 * <ul>
    3636 *   <li>on the left, it displays the node list for the version at {@see PointInTimeType#REFERENCE_POINT_IN_TIME}</li>
     
    168168        }
    169169    }
    170 
    171170
    172171    class NodeListPopupMenu extends JPopupMenu {
  • trunk/src/org/openstreetmap/josm/gui/history/PointInTimeType.java

    r1750 r2512  
    11// License: GPL. For details, see LICENSE file.
    22package org.openstreetmap.josm.gui.history;
    3 
    43
    54/**
  • trunk/src/org/openstreetmap/josm/gui/history/RelationMemberListTableCellRenderer.java

    r2017 r2512  
    1717import org.openstreetmap.josm.tools.ImageProvider;
    1818
    19 
    2019/**
    2120 * The {@see TableCellRenderer} for a list of relation members in {@see HistoryBrower}
    22  * 
     21 *
    2322 *
    2423 */
     
    3938        icons.put(OsmPrimitiveType.RELATION, ImageProvider.get("data", "relation"));
    4039    }
    41 
    4240
    4341    protected void renderIcon(RelationMember member) {
     
    9492    }
    9593
    96 
    9794    public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus,
    9895            int row, int column) {
  • trunk/src/org/openstreetmap/josm/gui/history/RelationMemberListViewer.java

    r2017 r2512  
    1313 * RelationMemberListViewer is a UI component which displays the  list of relation members of two
    1414 * version of a {@see Relation} in a {@see History}.
    15  * 
     15 *
    1616 * <ul>
    1717 *   <li>on the left, it displays the list of relation members for the version at {@see PointInTimeType#REFERENCE_POINT_IN_TIME}</li>
  • trunk/src/org/openstreetmap/josm/gui/history/RelationMemberTableColumnModel.java

    r2017 r2512  
    99/**
    1010 * The {@see TableColumnModel} for the table with the list of relation members.
    11  * 
     11 *
    1212 */
    1313public class RelationMemberTableColumnModel extends DefaultTableColumnModel {
  • trunk/src/org/openstreetmap/josm/gui/history/TagTableCellRenderer.java

    r2448 r2512  
    1616/**
    1717 * The {@see TableCellRenderer} for a list of tagsin {@see HistoryBrower}
    18  * 
     18 *
    1919 */
    2020public class TagTableCellRenderer extends JLabel implements TableCellRenderer {
  • trunk/src/org/openstreetmap/josm/gui/history/TagTableColumnModel.java

    r2017 r2512  
    99/**
    1010 * The {@see TableColumnModel} for the table with the list of tags
    11  * 
     11 *
    1212 */
    1313public class TagTableColumnModel extends DefaultTableColumnModel{
  • trunk/src/org/openstreetmap/josm/gui/history/VersionInfoPanel.java

    r2448 r2512  
    2828 * VersionInfoPanel is an UI component which displays the basic properties of a version
    2929 * of a {@see OsmPrimitive}.
    30  * 
     30 *
    3131 */
    3232public class VersionInfoPanel extends JPanel implements Observer{
     
    110110    /**
    111111     * constructor
    112      * 
     112     *
    113113     * @param model  the model (must not be null)
    114114     * @param pointInTimeType the point in time this panel visualizes (must not be null)
  • trunk/src/org/openstreetmap/josm/gui/history/VersionTable.java

    r2044 r2512  
    2424/**
    2525 * VersionTable shows a list of version in a {@see History} of an {@see OsmPrimitive}.
    26  * 
     26 *
    2727 *
    2828 */
  • trunk/src/org/openstreetmap/josm/gui/history/VersionTableCellRenderer.java

    r2448 r2512  
    2424/**
    2525 * The {@see TableCellRenderer} for a list of versions in {@see HistoryBrower}
    26  * 
     26 *
    2727 */
    2828public class VersionTableCellRenderer extends JLabel implements TableCellRenderer {
  • trunk/src/org/openstreetmap/josm/gui/history/VersionTableColumnModel.java

    r2017 r2512  
    99/**
    1010 * The {@see TableColumnModel} for the table with the list of versions
    11  * 
     11 *
    1212 */
    1313public class VersionTableColumnModel extends DefaultTableColumnModel {
  • trunk/src/org/openstreetmap/josm/gui/io/AbstractIOTask.java

    r2025 r2512  
    44/**
    55 * This is an abstract task for uploading or saving a data layer.
    6  * 
     6 *
    77 */
    88public abstract class AbstractIOTask implements Runnable {
     
    2323    /**
    2424     * Replies true if the task has been cancelled
    25      * 
     25     *
    2626     * @return true if the task has been cancelled
    2727     */
     
    3232    /**
    3333     * Set whether this task has been cancelled
    34      * 
     34     *
    3535     * @param cancelled true, if the task has been cancelled; false otherwise
    3636     */
     
    4141    /**
    4242     * Replies true if the task has been failed
    43      * 
     43     *
    4444     * @return true if the task has been failed
    4545     */
     
    5050    /**
    5151     * Sets whether the task has been failed
    52      * 
     52     *
    5353     * @param failed whether the task has been failed
    5454     */
     
    5959    /**
    6060     * Replies the last exception caught
    61      * 
     61     *
    6262     * @return the last exception caught; null, if no exception was caught
    6363     */
     
    6868    /**
    6969     * Sets the last exception caught
    70      * 
     70     *
    7171     * @param lastException the last exception
    7272     */
     
    7878     * Replies true if this  task was successful, i.e. if it wasn't
    7979     * cancelled and didn't fail
    80      * 
     80     *
    8181     * @return true if this  task was successful
    8282     */
  • trunk/src/org/openstreetmap/josm/gui/io/ChangesetCellRenderer.java

    r2115 r2512  
    1818/**
    1919 * A {@see ListCellRenderer} for the list of changesets in the upload dialog.
    20  * 
     20 *
    2121 *
    2222 */
  • trunk/src/org/openstreetmap/josm/gui/io/CloseChangesetDialog.java

    r2191 r2512  
    143143    /**
    144144     * Sets whether this dialog is canceled
    145      * 
     145     *
    146146     * @param canceled true, if this dialog is canceld
    147147     */
     
    152152    /**
    153153     * Sets the collection of changesets to be displayed
    154      * 
     154     *
    155155     * @param changesets the collection of changesets. Assumes an empty collection if null
    156156     */
     
    168168     * Replies a collection with the changesets the user selected.
    169169     * Never null, but may be empty.
    170      * 
     170     *
    171171     * @return a collection with the changesets the user selected.
    172172     */
  • trunk/src/org/openstreetmap/josm/gui/io/CloseChangesetTask.java

    r2115 r2512  
    1919/**
    2020 * A task for closing a collection of changesets.
    21  * 
     21 *
    2222 */
    2323public class CloseChangesetTask extends PleaseWaitRunnable {
     
    3131     * are still open and if they have an id > 0. Other changesets in the collection
    3232     * are ignored.
    33      * 
     33     *
    3434     * @param changesets  the collection of changesets. Empty collection assumes, if null.
    3535     */
  • trunk/src/org/openstreetmap/josm/gui/io/DownloadOpenChangesetsTask.java

    r2289 r2512  
    3636
    3737    /**
    38      * 
     38     *
    3939     * @param model provides the user id of the current user and accepts the changesets
    4040     * after download
     
    7979     * Fetch the user info from the server. This is necessary if we don't know
    8080     * the users id yet
    81      * 
     81     *
    8282     * @return the user info
    8383     * @throws OsmTransferException thrown in case of any communication exception
  • trunk/src/org/openstreetmap/josm/gui/io/FilenameCellEditor.java

    r2025 r2512  
    2828 * This is a {@see TableCellEditor} for filenames. It provides a text input field and
    2929 * a button for launchinig a {@see JFileChooser}.
    30  * 
     30 *
    3131 *
    3232 */
     
    4848        gc.weighty = 1.0;
    4949        add(tfFileName = new JTextField(), gc);
    50 
    5150
    5251        gc.gridx = 1;
     
    7170        build();
    7271    }
    73 
    7472
    7573    public void addCellEditorListener(CellEditorListener l) {
  • trunk/src/org/openstreetmap/josm/gui/io/SaveLayerInfo.java

    r2181 r2512  
    1010 * SaveLayerInfo represents the information, user preferences and save/upload states of
    1111 * a layer which might be uploaded/saved.
    12  * 
     12 *
    1313 */
    1414class SaveLayerInfo implements Comparable<SaveLayerInfo> {
     
    2323
    2424    /**
    25      * 
     25     *
    2626     * @param layer the layer. Must not be null.
    2727     * @throws IllegalArgumentException thrown if layer is null
     
    3838    /**
    3939     * Replies the layer this info objects holds information for
    40      * 
     40     *
    4141     * @return the layer this info objects holds information for
    4242     */
     
    4747    /**
    4848     * Replies true if this layer should be saved to a file; false, otherwise
    49      * 
     49     *
    5050     * @return true if this layers should be saved to a file; false, otherwise
    5151     */
     
    5656    /**
    5757     * Sets whether this layer should be saved to a file
    58      * 
     58     *
    5959     * @param doSaveToFile true to save; false, to skip saving
    6060     */
     
    6565    /**
    6666     * Replies true if this layer should be uploaded to the server; false, otherwise
    67      * 
     67     *
    6868     * @return true if this layer should be uploaded to the server; false, otherwise
    6969     */
     
    7474    /**
    7575     * Sets whether this layer should be uploaded to a file
    76      * 
     76     *
    7777     * @param doSaveToFile true to upload; false, to skip uploading
    7878     */
     
    8484    /**
    8585     * Replies true if this layer should be uploaded to the server and saved to file.
    86      * 
     86     *
    8787     * @return true if this layer should be uploaded to the server and saved to file
    8888     */
     
    9393    /**
    9494     * Replies the name of the layer
    95      * 
     95     *
    9696     * @return the name of the layer
    9797     */
     
    102102    /**
    103103     * Replies the file this layer should be saved to, if {@see #isDoSaveToFile()} is true
    104      * 
     104     *
    105105     * @return the file this layer should be saved to, if {@see #isDoSaveToFile()} is true
    106106     */
     
    111111    /**
    112112     * Sets the file this layer should be saved to, if {@see #isDoSaveToFile()} is true
    113      * 
     113     *
    114114     * @param file the file
    115115     */
     
    147147     *   <li>{@see UploadOrSaveState#FAILED} if uploading {@see #getLayer() has failed</li>
    148148     * </ul>
    149      * 
     149     *
    150150     * @return the upload state
    151151     */
     
    156156    /**
    157157     * Sets the upload state for {@see #getLayer()}
    158      * 
     158     *
    159159     * @param uploadState the upload state
    160160     */
     
    170170     *   <li>{@see UploadOrSaveState#FAILED} if saving {@see #getLayer() has failed</li>
    171171     * </ul>
    172      * 
     172     *
    173173     * @return the save state
    174174     */
     
    179179    /**
    180180     * Sets the save state for {@see #getLayer()}
    181      * 
     181     *
    182182     * @param saveState save the upload state
    183183     */
     
    188188    /**
    189189     * Resets the upload and save state
    190      * 
     190     *
    191191     * @see #setUploadState(UploadOrSaveState)
    192192     * @see #setSaveState(UploadOrSaveState)
  • trunk/src/org/openstreetmap/josm/gui/io/SaveLayerInfoCellRenderer.java

    r2196 r2512  
    2020 * This is a {@see TableCellRenderer} for rendering the various fields of a
    2121 * {@see SaveLayerInfo} in the table {@see SaveLayersTable}.
    22  * 
     22 *
    2323 *
    2424 */
  • trunk/src/org/openstreetmap/josm/gui/io/SaveLayerTask.java

    r2181 r2512  
    1111 * SaveLayerTask saves the data managed by an {@see OsmDataLayer} to the
    1212 * {@see OsmDataLayer#getAssociatedFile()}.
    13  * 
     13 *
    1414 * <pre>
    1515 *     ExecutorService executorService = ...
     
    2929
    3030    /**
    31      * 
     31     *
    3232     * @param layerInfo information about the layer to be saved to save. Must not be null.
    3333     * @param monitor the monitor. Set to {@see NullProgressMonitor#INSTANCE} if null
  • trunk/src/org/openstreetmap/josm/gui/io/SaveLayersDialog.java

    r2196 r2512  
    8484    /**
    8585     * builds the button row
    86      * 
     86     *
    8787     * @return the panel with the button row
    8888     */
     
    377377     * This is the asynchronous task which uploads modified layers to the server and
    378378     * saves them to files, if requested by the user.
    379      * 
     379     *
    380380     */
    381381    protected class SaveAndUploadTask implements Runnable {
  • trunk/src/org/openstreetmap/josm/gui/io/SaveLayersModel.java

    r2025 r2512  
    153153    }
    154154
    155 
    156155    public void setUploadState(OsmDataLayer layer, UploadOrSaveState state) {
    157156        SaveLayerInfo info = getSaveLayerInfo(layer);
  • trunk/src/org/openstreetmap/josm/gui/io/SaveLayersTableColumnModel.java

    r2051 r2512  
    88import javax.swing.table.TableCellRenderer;
    99import javax.swing.table.TableColumn;
    10 
    1110
    1211class SaveLayersTableColumnModel extends DefaultTableColumnModel {
  • trunk/src/org/openstreetmap/josm/gui/io/UploadDialog.java

    r2480 r2512  
    7777    /**
    7878     * Replies the unique instance of the upload dialog
    79      * 
     79     *
    8080     * @return the unique instance of the upload dialog
    8181     */
     
    113113    /**
    114114     * builds the panel with the lists of primitives
    115      * 
     115     *
    116116     * @return the panel with the lists of primitives
    117117     */
     
    126126    /**
    127127     * builds the content panel for the upload dialog
    128      * 
     128     *
    129129     * @return the content panel
    130130     */
     
    168168    /**
    169169     * builds the panel with the OK and CANCEL buttons
    170      * 
     170     *
    171171     * @return
    172172     */
     
    243243    /**
    244244     * sets the collection of primitives which will be uploaded
    245      * 
     245     *
    246246     * @param add  the collection of primitives to add
    247247     * @param update the collection of primitives to update
     
    312312    /**
    313313     * Replies the current changeset
    314      * 
     314     *
    315315     * @return the current changeset
    316316     */
     
    329329     * changesets. If it is closed, removes it from the list of open
    330330     * changesets.
    331      * 
     331     *
    332332     * @param cs the changeset
    333333     */
     
    339339     * Removes <code>cs</code> from the list of open changesets in the upload
    340340     * dialog
    341      * 
     341     *
    342342     * @param cs the changeset. Ignored if null.
    343343     */
     
    350350     * Replies true if the changeset is to be closed after the
    351351     * next upload
    352      * 
     352     *
    353353     * @return true if the changeset is to be closed after the
    354354     * next upload; false, otherwise
     
    360360    /**
    361361     * Replies the default value for "created_by"
    362      * 
     362     *
    363363     * @return the default value for "created_by"
    364364     */
     
    370370    /**
    371371     * Replies the current value for the upload comment
    372      * 
     372     *
    373373     * @return the current value for the upload comment
    374374     */
     
    386386    /**
    387387     * Replies true, if the dialog was canceled
    388      * 
     388     *
    389389     * @return true, if the dialog was canceled
    390390     */
     
    395395    /**
    396396     * Sets whether the dialog was canceld
    397      * 
     397     *
    398398     * @param canceled true, if the dialog is canceled
    399399     */
     
    421421     * This change listener is triggered when current tab in the tabbed pane in
    422422     * the lower half of the dialog is changed.
    423      * 
     423     *
    424424     * It's main purpose is to keep the content in the text field for the changeset
    425425     * comment in sync with the changeset tag "comment".
     
    518518            putValue(SHORT_DESCRIPTION, tr("Cancel the upload and resume editing"));
    519519        }
    520 
    521520
    522521        public void actionPerformed(ActionEvent e) {
     
    613612         * build the panel with the widgets for controlling whether an atomic upload
    614613         * should be used or not
    615          * 
     614         *
    616615         * @return the panel
    617616         */
     
    798797        /**
    799798         * Replies the current upload comment
    800          * 
     799         *
    801800         * @return
    802801         */
     
    807806        /**
    808807         * Replies the current upload comment
    809          * 
     808         *
    810809         * @return
    811810         */
     
    881880        /**
    882881         * Remove a changeset from the list of open changeset
    883          * 
     882         *
    884883         * @param cs the changeset to be removed. Ignored if null.
    885884         */
     
    908907        /**
    909908         * Sets whether a new changeset is to be used
    910          * 
     909         *
    911910         */
    912911        public void setUseNewChangeset() {
     
    927926         * Replies true if the selected changeset should be closed after the
    928927         * next upload
    929          * 
     928         *
    930929         * @return true if the selected changeset should be closed after the
    931930         * next upload
     
    994993        /**
    995994         * Refreshes the list of open changesets
    996          * 
     995         *
    997996         */
    998997        class RefreshAction extends AbstractAction {
  • trunk/src/org/openstreetmap/josm/gui/io/UploadLayerTask.java

    r2402 r2512  
    2323/**
    2424 * UploadLayerTask uploads the data managed by an {@see OsmDataLayer} asynchronously.
    25  * 
     25 *
    2626 * <pre>
    2727 *     ExecutorService executorService = ...
     
    4646
    4747    /**
    48      * 
     48     *
    4949     * @param layer the layer. Must not be null.
    5050     * @param monitor  a progress monitor. If monitor is null, uses {@see NullProgressMonitor#INSTANCE}
     
    7777     * Retries to recover the upload operation from an exception which was thrown because
    7878     * an uploaded primitive was already deleted on the server.
    79      * 
     79     *
    8080     * @param e the exception throw by the API
    8181     * @param monitor a progress monitor
  • trunk/src/org/openstreetmap/josm/gui/io/UploadSelectionDialog.java

    r2250 r2512  
    4747/**
    4848 * This dialog can be used to select individual object for uploading.
    49  * 
     49 *
    5050 *
    5151 */
  • trunk/src/org/openstreetmap/josm/gui/layer/GeoImageLayer.java

    r2450 r2512  
    103103            volatile Image scaledImage;
    104104
    105 
    106105            public Entry(File file, int width, int height, int maxSize, ImageLoadedListener listener) {
    107106                this.file = file;
     
    222221            }
    223222        }
    224 
    225223
    226224        public synchronized boolean imageUpdate(Image img, int infoflags, int x, int y, int width, int height) {
     
    322320                gpxSubTask.finishTask();
    323321            }
    324 
    325322
    326323            if (gps.isEmpty())
  • trunk/src/org/openstreetmap/josm/gui/layer/GpxLayer.java

    r2450 r2512  
    665665            } // end for trk
    666666        } // end if lines
    667 
    668667
    669668        /****************************************************************
  • trunk/src/org/openstreetmap/josm/gui/layer/Layer.java

    r2450 r2512  
    6666    /**
    6767     * The visibility state of the layer.
    68      * 
     68     *
    6969     */
    7070    private boolean visible = true;
     
    7272    /**
    7373     * The layer should be handled as a background layer in automatic handling
    74      * 
     74     *
    7575     */
    7676    private boolean background = false;
     
    7878    /**
    7979     * The name of this layer.
    80      * 
     80     *
    8181     */
    8282    private  String name;
     
    145145    public void setAssociatedFile(File file) { associatedFile = file; }
    146146
    147 
    148147    /**
    149148     * Replies the name of the layer
    150      * 
     149     *
    151150     * @return the name of the layer
    152151     */
     
    174173    /**
    175174     * Replies true if this layer is a background layer
    176      * 
     175     *
    177176     * @return true if this layer is a background layer
    178177     */
     
    183182    /**
    184183     * Sets whether this layer is a background layer
    185      * 
     184     *
    186185     * @param background true, if this layer is a background layer
    187186     */
     
    193192     * Sets the visibility of this layer. Emits property change event for
    194193     * property {@see #VISIBLE_PROP}.
    195      * 
     194     *
    196195     * @param visible true, if the layer is visible; false, otherwise.
    197196     */
     
    221220    /**
    222221     * Adds a {@see PropertyChangeListener}
    223      * 
     222     *
    224223     * @param listener the listener
    225224     */
     
    230229    /**
    231230     * Removes a {@see PropertyChangeListener}
    232      * 
     231     *
    233232     * @param listener the listener
    234233     */
     
    239238    /**
    240239     * fires a property change for the property {@see #VISIBLE_PROP}
    241      * 
     240     *
    242241     * @param oldValue the old value
    243242     * @param newValue the new value
     
    249248    /**
    250249     * The action to save a layer
    251      * 
     250     *
    252251     */
    253252    public static class LayerSaveAction extends AbstractAction {
  • trunk/src/org/openstreetmap/josm/gui/layer/OsmDataLayer.java

    r2500 r2512  
    324324    /**
    325325     * Warns the user about the number of detected conflicts
    326      * 
     326     *
    327327     * @param numNewConflicts the number of detected conflicts
    328328     * @param numPurgedPrimitives the number of automatically purged objects
     
    389389     * from the local dataset because they've been deleted on the
    390390     * server.
    391      * 
     391     *
    392392     * @return the purge command. <code>null</code> if no primitives have to
    393393     * be purged
     
    665665     * Replies true if the data managed by this layer needs to be uploaded to
    666666     * the server because it contains at least one modified primitive.
    667      * 
     667     *
    668668     * @return true if the data managed by this layer needs to be uploaded to
    669669     * the server because it contains at least one modified primitive; false,
     
    679679     * if the data managed by this layer has been modified since the last
    680680     * save operation to the file.
    681      * 
     681     *
    682682     * @return true if the data managed by this layer needs to be saved to
    683683     * a file
     
    689689    /**
    690690     * Initializes the layer after a successful load of OSM data from a file
    691      * 
     691     *
    692692     */
    693693    public void onPostLoadFromFile() {
     
    703703    /**
    704704     * Initializes the layer after a successful save of OSM data to a file
    705      * 
     705     *
    706706     */
    707707    public void onPostSaveToFile() {
     
    712712    /**
    713713     * Initializes the layer after a successful upload to the server
    714      * 
     714     *
    715715     */
    716716    public void onPostUploadToServer() {
  • trunk/src/org/openstreetmap/josm/gui/layer/markerlayer/MarkerLayer.java

    r2450 r2512  
    446446    }
    447447
    448 
    449448    public final  class ShowHideMarkerText extends AbstractAction {
    450449        private final Layer layer;
  • trunk/src/org/openstreetmap/josm/gui/mappaint/ElemStyle.java

    r1924 r2512  
    4545    }
    4646}
    47 
    48 
    49 
  • trunk/src/org/openstreetmap/josm/gui/mappaint/IconElemStyle.java

    r2392 r2512  
    2525        annotate = true;
    2626    }
    27    
     27
    2828    public ImageIcon getDisabledIcon() {
    2929        if (disabledIcon != null)
  • trunk/src/org/openstreetmap/josm/gui/preferences/AdvancedPreference.java

    r2017 r2512  
    215215    }
    216216
    217 
    218217    private void editPreference(final PreferenceDialog gui, final JTable list) {
    219218        if (list.getSelectedRowCount() != 1) {
  • trunk/src/org/openstreetmap/josm/gui/preferences/ColorPreference.java

    r2221 r2512  
    4949    }
    5050
    51 
    5251    private DefaultTableModel tableModel;
    5352    private JTable colors;
  • trunk/src/org/openstreetmap/josm/gui/preferences/PreferenceSetting.java

    r1180 r2512  
    11// License: GPL. Copyright 2007 by Immanuel Scholz and others
    22package org.openstreetmap.josm.gui.preferences;
    3 
    43
    54public interface PreferenceSetting {
  • trunk/src/org/openstreetmap/josm/gui/preferences/StyleSourceEditor.java

    r2400 r2512  
    7979    private String availableStylesUrl;
    8080
    81 
    8281    /**
    83      * 
     82     *
    8483     * @param stylesPreferencesKey the preferences key with the list of active style sources (filenames and URLs)
    8584     * @param iconsPreferenceKey the preference key with the list of icon sources (can be null)
     
    145144        tblActiveStyles.getActionMap().put("delete", removeActiveStylesAction);
    146145        JButton delete = new JButton(removeActiveStylesAction);
    147 
    148146
    149147        ActivateStylesAction activateStylesAction = new ActivateStylesAction();
     
    270268        }
    271269    }
    272 
    273270
    274271    class ActiveStylesModel extends AbstractTableModel {
     
    839836            add(tfFileName = new JTextField(), gc);
    840837
    841 
    842838            gc.gridx = 1;
    843839            gc.gridy = 0;
     
    862858        }
    863859
    864 
    865860        public void addCellEditorListener(CellEditorListener l) {
    866861            if (!listeners.contains(l)) {
     
    925920            return this;
    926921        }
    927 
    928922
    929923        class LaunchFileChooserAction extends AbstractAction {
  • trunk/src/org/openstreetmap/josm/gui/preferences/ToolbarPreferences.java

    r2316 r2512  
    424424    }
    425425
    426 
    427426    private void loadAction(DefaultMutableTreeNode node, MenuElement menu) {
    428427        Object userObject = null;
  • trunk/src/org/openstreetmap/josm/gui/progress/AbstractProgressMonitor.java

    r2337 r2512  
    66import java.util.LinkedList;
    77import java.util.Queue;
    8 
    98
    109public abstract class AbstractProgressMonitor implements ProgressMonitor {
  • trunk/src/org/openstreetmap/josm/gui/progress/NullProgressMonitor.java

    r2319 r2512  
    11// License: GPL. For details, see LICENSE file.
    22package org.openstreetmap.josm.gui.progress;
    3 
    43
    54public class NullProgressMonitor implements ProgressMonitor {
  • trunk/src/org/openstreetmap/josm/gui/progress/PleaseWaitProgressMonitor.java

    r2338 r2512  
    1717import org.openstreetmap.josm.gui.PleaseWaitDialog;
    1818import static org.openstreetmap.josm.tools.I18n.tr;
    19 
    2019
    2120public class PleaseWaitProgressMonitor extends AbstractProgressMonitor {
  • trunk/src/org/openstreetmap/josm/gui/progress/ProgressMonitor.java

    r2336 r2512  
    120120    void removeCancelListener(CancelListener listener);
    121121
    122 
    123122    /**
    124123     * Appends a message to the log managed by the progress monitor.
    125      * 
     124     *
    126125     * @param message the log message. Ignored if null or white space only.
    127126     */
  • trunk/src/org/openstreetmap/josm/gui/progress/ProgressRenderer.java

    r2025 r2512  
    55 * Swing components can implement this interface and use a {@see SwingRenderingProgressMonitor}
    66 * to render progress information.
    7  * 
     7 *
    88 */
    99public interface ProgressRenderer {
  • trunk/src/org/openstreetmap/josm/gui/progress/SwingRenderingProgressMonitor.java

    r2338 r2512  
    1717
    1818    /**
    19      * 
     19     *
    2020     * @param delegate the delegate which renders the progress information. Must not be null.
    2121     * @throws IllegalArgumentException thrown if delegate is null
    22      * 
     22     *
    2323     */
    2424    public SwingRenderingProgressMonitor(ProgressRenderer delegate) {
  • trunk/src/org/openstreetmap/josm/gui/tagging/AutoCompletingTextField.java

    r2088 r2512  
    2626 * AutoCompletingTextField is an text field with autocompletion behaviour. It
    2727 * can be used as table cell editor in {@see JTable}s.
    28  * 
     28 *
    2929 * Autocompletion is controlled by a list of {@see AutoCompletionListItem}s
    3030 * managed in a {@see AutoCompletionList}.
    31  * 
     31 *
    3232 *
    3333 */
     
    4343        /**
    4444         * inserts a string at a specific position
    45          * 
     45         *
    4646         */
    4747        @Override
     
    110110    /**
    111111     * creates the default document model for this editor
    112      * 
     112     *
    113113     */
    114114    @Override
     
    160160
    161161    /**
    162      * 
     162     *
    163163     * @return the auto completion list; may be null, if no auto completion list is set
    164164     */
     
    228228    }
    229229
    230 
    231230    public boolean shouldSelectCell(EventObject anEvent) {
    232231        return true;
  • trunk/src/org/openstreetmap/josm/gui/tagging/TagCellEditor.java

    r2048 r2512  
    1616/**
    1717 * This is the table cell editor for the tag editor dialog.
    18  * 
     18 *
    1919 */
    2020@SuppressWarnings("serial")
     
    4949     * values from the the current JOSM data set. Keys already present in the
    5050     * current tag model are removed from the auto completion list.
    51      * 
     51     *
    5252     * @param model  the tag editor model
    5353     * @param currentTag  the current tag
     
    7878    }
    7979
    80 
    8180    /**
    8281     * initializes the auto completion list when the cell editor starts to edit
     
    8483     * set of standard values for a given key and the set of values present in the
    8584     * current data set for the given key.
    86      * 
     85     *
    8786     * @param forKey the key
    8887     */
     
    9998        }
    10099    }
    101 
    102100
    103101    /**
     
    163161    /**
    164162     * replies the {@link AutoCompletionList} this table cell editor synchronizes with
    165      * 
     163     *
    166164     * @return the auto completion list
    167165     */
     
    195193    /**
    196194     * sets the tag editor model
    197      * 
     195     *
    198196     * @param tagEditorModel  the tag editor model
    199197     */
  • trunk/src/org/openstreetmap/josm/gui/tagging/TagCellRenderer.java

    r2040 r2512  
    1717import javax.swing.table.TableCellRenderer;
    1818
    19 
    2019/**
    2120 * This is the table cell renderer for cells for the table of tags
    2221 * in the tag editor dialog.
    23  * 
     22 *
    2423 *
    2524 */
     
    4948     * renders the name of a tag in the second column of
    5049     * the table
    51      * 
     50     *
    5251     * @param tag  the tag
    5352     */
     
    5958     * renders the value of a a tag in the third column of
    6059     * the table
    61      * 
     60     *
    6261     * @param tag  the  tag
    6362     */
     
    7271        }
    7372    }
    74 
    75 
    7673
    7774    /**
     
    9390     * displays the tag which is suggested by the currently selected
    9491     * preset.
    95      * 
     92     *
    9693     * @param tagModel the tag model
    9794     * @param model the tag editor model
     
    10198    }
    10299
    103 
    104100    /**
    105101     * replies the cell renderer component for a specific cell
    106      * 
     102     *
    107103     * @param table  the table
    108104     * @param value the value to be rendered
     
    111107     * @param rowIndex the row index
    112108     * @param vColIndex the column index
    113      * 
     109     *
    114110     * @return the renderer component
    115111     */
     
    125121            renderBackgroundColor(getModel(table).get(rowIndex), getModel(table));
    126122        }
    127 
    128123
    129124        switch(vColIndex) {
  • trunk/src/org/openstreetmap/josm/gui/tagging/TagEditorModel.java

    r2502 r2512  
    2323import org.openstreetmap.josm.data.osm.Tagged;
    2424
    25 
    2625/**
    2726 * TagEditorModel is a table model.
     
    118117    }
    119118
    120 
    121119    public void prepend(TagModel tag) {
    122120        if (tag == null)
     
    126124        fireTableDataChanged();
    127125    }
    128 
    129126
    130127    /**
     
    154151    }
    155152
    156 
    157153    /**
    158154     * replies the tag with name <code>name</code>; null, if no such tag exists
     
    174170    }
    175171
    176 
    177 
    178172    @Override public boolean isCellEditable(int row, int col) {
    179173        // all cells are editable
    180174        return true;
    181175    }
    182 
    183176
    184177    /**
     
    220213    /**
    221214     * Deletes all tags with name <code>name</code>
    222      * 
     215     *
    223216     * @param name the name. Ignored if null.
    224217     */
     
    257250    }
    258251
    259 
    260252    /**
    261253     * creates a new tag and appends it to the model
     
    372364        return false;
    373365    }
    374 
    375366
    376367    protected Command createUpdateTagCommand(Collection<OsmPrimitive> primitives, TagModel tag) {
  • trunk/src/org/openstreetmap/josm/gui/tagging/TagEditorPanel.java

    r2156 r2512  
    3030 * a new tag and one for deleting the currently selected tags.
    3131 *
    32  * 
     32 *
    3333 */
    3434public class TagEditorPanel extends JPanel {
     
    4141    private AutoCompletionList acList;
    4242
    43 
    4443    /**
    4544     * builds the panel with the table for editing tags
    46      * 
     45     *
    4746     * @return the panel
    4847     */
     
    6059    /**
    6160     * builds the panel with the button row
    62      * 
     61     *
    6362     * @return the panel
    6463     */
     
    119118    /**
    120119     * Replies the tag editor model used by this panel.
    121      * 
     120     *
    122121     * @return the tag editor model used by this panel
    123122     */
     
    152151    /**
    153152     * The action for deleting the currently selected tags
    154      * 
     153     *
    155154     *
    156155     */
  • trunk/src/org/openstreetmap/josm/gui/tagging/TagModel.java

    r2040 r2512  
    66
    77public class TagModel {
    8        
    9         /** the name of the tag */
    10         private String name = null;
    11        
    12         /** the list of values */
    13         private ArrayList<String> values = null;
    14        
    15         /**
    16          * constructor
    17          */
    18         public TagModel() {
    19                 values = new ArrayList<String>();
    20                 setName("");
    21                 setValue("");
    22         }
    23        
    24         /**
    25          * constructor
    26          * @param name the tag name
    27          */
    28         public TagModel(String name) {
    29                 this();
    30                 setName(name);
    31         }
    32        
    33         /**
    34          * constructor
    35          *
    36          * @param name the tag name
    37          * @param value the tag value
    38          */
    39         public TagModel(String name, String value) {
    40                 this();
    41                 setName(name);
    42                 setValue(value);
    43         }
    44        
    45         /**
    46          * sets the name. Converts name to "" if null.
    47          * @param name the tag name
    48          */
    49         public void setName(String name) {
    50                 name = (name == null) ? "" : name;
    51                 this.name = name;
    52         }
    53        
    54         /**
    55          * @return the tag name
    56          */
    57         public String getName(){
    58                 return name;
    59         }
    60        
    61         /**
    62          * removes all values from the list of values
    63          */
    64         public void clearValues() {
    65                 this.values.clear();
    66         }
    67        
    68         /**
    69          * sets a unique value for this tag. Converts value to "", if null.
    70          * @param value the value.
    71          */
    72         public void setValue(String value) {
    73                 value = (value == null) ? "" : value;
    74                 clearValues();
    75                 this.values.add(value);
    76         }
    77        
    78         /**
    79          *
    80          * @param value the value to be checked; converted to "" if null
    81          * @return true, if the values of this tag include <code>value</code>; false otherwise
    82          */
    83         public boolean hasValue(String value) {
    84                 value = (value == null) ? "" : value;
    85                 return values.contains(value);
    86         }
    87        
    88         public void addValue(String value) {
    89                 value = (value == null) ? "" : value;
    90                 if (hasValue(value)) {
    91                         return;
    92                 }
    93                 values.add(value);
    94         }
    95        
    96        
    97         /**
    98          * removes a value from the list of values. Converts value to "" if null
    99          * @param value the value
    100          */
    101         public void removeValue(String value){
    102                 value = (value == null) ? "" : value;
    103                 values.remove(value);
    104         }       
    105        
    106         public List<String> getValues() {
    107                 return values;
    108         }
    109        
    110         public String getValue() {
    111                 if (getValueCount() == 0) {
    112                         return "";
    113                 } else if (getValueCount() == 1) {
    114                         return values.get(0);
    115                 } else {
    116                         StringBuilder sb = new StringBuilder();                 
    117                         for (int i =0; i < values.size(); i++) {
    118                                 sb.append(values.get(i));
    119                                 if (i + 1 < values.size()) {
    120                                         sb.append(";");
    121                                 }
    122                         }
    123                         return sb.toString();
    124                 }
    125         }
    126        
    127         public int getValueCount() {
    128                 return values.size();
    129         }
     8
     9    /** the name of the tag */
     10    private String name = null;
     11
     12    /** the list of values */
     13    private ArrayList<String> values = null;
     14
     15    /**
     16     * constructor
     17     */
     18    public TagModel() {
     19        values = new ArrayList<String>();
     20        setName("");
     21        setValue("");
     22    }
     23
     24    /**
     25     * constructor
     26     * @param name the tag name
     27     */
     28    public TagModel(String name) {
     29        this();
     30        setName(name);
     31    }
     32
     33    /**
     34     * constructor
     35     *
     36     * @param name the tag name
     37     * @param value the tag value
     38     */
     39    public TagModel(String name, String value) {
     40        this();
     41        setName(name);
     42        setValue(value);
     43    }
     44
     45    /**
     46     * sets the name. Converts name to "" if null.
     47     * @param name the tag name
     48     */
     49    public void setName(String name) {
     50        name = (name == null) ? "" : name;
     51        this.name = name;
     52    }
     53
     54    /**
     55     * @return the tag name
     56     */
     57    public String getName(){
     58        return name;
     59    }
     60
     61    /**
     62     * removes all values from the list of values
     63     */
     64    public void clearValues() {
     65        this.values.clear();
     66    }
     67
     68    /**
     69     * sets a unique value for this tag. Converts value to "", if null.
     70     * @param value the value.
     71     */
     72    public void setValue(String value) {
     73        value = (value == null) ? "" : value;
     74        clearValues();
     75        this.values.add(value);
     76    }
     77
     78    /**
     79     *
     80     * @param value the value to be checked; converted to "" if null
     81     * @return true, if the values of this tag include <code>value</code>; false otherwise
     82     */
     83    public boolean hasValue(String value) {
     84        value = (value == null) ? "" : value;
     85        return values.contains(value);
     86    }
     87
     88    public void addValue(String value) {
     89        value = (value == null) ? "" : value;
     90        if (hasValue(value)) {
     91            return;
     92        }
     93        values.add(value);
     94    }
     95
     96    /**
     97     * removes a value from the list of values. Converts value to "" if null
     98     * @param value the value
     99     */
     100    public void removeValue(String value){
     101        value = (value == null) ? "" : value;
     102        values.remove(value);
     103    }
     104
     105    public List<String> getValues() {
     106        return values;
     107    }
     108
     109    public String getValue() {
     110        if (getValueCount() == 0) {
     111            return "";
     112        } else if (getValueCount() == 1) {
     113            return values.get(0);
     114        } else {
     115            StringBuilder sb = new StringBuilder();
     116            for (int i =0; i < values.size(); i++) {
     117                sb.append(values.get(i));
     118                if (i + 1 < values.size()) {
     119                    sb.append(";");
     120                }
     121            }
     122            return sb.toString();
     123        }
     124    }
     125
     126    public int getValueCount() {
     127        return values.size();
     128    }
    130129}
  • trunk/src/org/openstreetmap/josm/gui/tagging/TagTable.java

    r2048 r2512  
    6060            TagCellRenderer renderer = new TagCellRenderer();
    6161
    62 
    6362            // column 0 - tag key
    6463            col = new TableColumn(0);
     
    120119    }
    121120
    122 
    123121    /**
    124122     * Action to be run when the user navigates to the previous cell in the table,
     
    134132                getCellEditor().stopCellEditing();
    135133            }
    136 
    137134
    138135            if (col <= 0 && row <= 0) {
     
    206203            getColumnModel().getSelectionModel().addListSelectionListener(this);
    207204        }
    208 
    209 
    210205
    211206        @Override
     
    270265    }
    271266
    272 
    273267    /** the delete action */
    274268    private RunnableAction deleteAction = null;
     
    364358    }
    365359
    366 
    367360    /**
    368361     * @param autoCompletionList
     
    414407        // tblTagEditor.editCellAt(row, col);
    415408        // if (tblTagEditor.getEditorComponent() != null) {
    416         //      tblTagEditor.getEditorComponent().requestFocusInWindow();
     409        //  tblTagEditor.getEditorComponent().requestFocusInWindow();
    417410        // }
    418411
  • trunk/src/org/openstreetmap/josm/gui/tagging/TaggingPreset.java

    r2302 r2512  
    151151
    152152        private JComponent value;
    153 
    154153
    155154        @Override public boolean addToPanel(JPanel p, Collection<OsmPrimitive> sel) {
  • trunk/src/org/openstreetmap/josm/gui/tagging/TaggingPresetSeparator.java

    r2017 r2512  
    11// License: GPL. Copyright 2007 by Immanuel Scholz and others
    22package org.openstreetmap.josm.gui.tagging;
    3 
    43
    54public class TaggingPresetSeparator extends TaggingPreset {
  • trunk/src/org/openstreetmap/josm/gui/tagging/ac/AutoCompletionCache.java

    r2381 r2512  
    6767    }
    6868
    69 
    7069    /** the cached tags give by a tag key and a list of values for this tag*/
    7170    private HashMap<String, Set<String>> tagCache;
     
    7473    /**  the layer this cache is built for */
    7574    private OsmDataLayer layer;
    76 
    7775
    7876    /**
  • trunk/src/org/openstreetmap/josm/gui/tagging/ac/AutoCompletionItemPritority.java

    r2048 r2512  
    1212    IS_IN_STANDARD,
    1313
    14 
    1514    /**
    1615     * indicates that this is an arbitrary value from the data set, i.e.
  • trunk/src/org/openstreetmap/josm/gui/tagging/ac/AutoCompletionList.java

    r2156 r2512  
    1313/**
    1414 * AutoCompletionList manages a list of {@see AutoCompletionListItem}s.
    15  * 
     15 *
    1616 * The list is sorted, items with higher priority first, then according to lexicographic order
    1717 * on the value of the {@see AutoCompletionListItem}.
    18  * 
     18 *
    1919 * AutoCompletionList maintains two views on the list of {@see AutoCompletionListItem}s.
    2020 * <ol>
     
    2222 *   <li>a filtered view, which includes only items which match a current filter expression</li>
    2323 * </ol>
    24  * 
     24 *
    2525 * AutoCompletionList is an {@link AbstractTableModel} which serves the list of filtered
    2626 * items to a {@link JTable}.
    27  * 
     27 *
    2828 */
    2929public class AutoCompletionList extends AbstractTableModel {
     
    4747    }
    4848
    49 
    5049    /**
    5150     * applies a filter expression to the list of {@see AutoCompletionListItem}s.
    52      * 
     51     *
    5352     * The matching criterion is a case insensitive substring match.
    54      * 
     53     *
    5554     * @param filter  the filter expression; must not be null
    56      * 
     55     *
    5756     * @exception IllegalArgumentException thrown, if filter is null
    5857     */
     
    6665    /**
    6766     * clears the current filter
    68      * 
     67     *
    6968     */
    7069    public void clearFilter() {
     
    8079    }
    8180
    82 
    8381    /**
    8482     * adds an AutoCompletionListItem to the list. Only adds the item if it
    8583     * is not null and if not in the list yet.
    86      * 
     84     *
    8785     * @param item the item
    8886     */
     
    9593    }
    9694
    97 
    9895    /**
    9996     * adds another AutoCompletionList to this list. An item is only
    10097     * added it is not null and if it does not exist in the list yet.
    101      * 
     98     *
    10299     * @param other another auto completion list; must not be null
    103100     * @exception IllegalArgumentException thrown, if other is null
     
    113110    }
    114111
    115 
    116112    /**
    117113     * adds a list of AutoCompletionListItem to this list. Only items which
    118114     * are not null and which do not exist yet in the list are added.
    119      * 
     115     *
    120116     * @param other a list of AutoCompletionListItem; must not be null
    121117     * @exception IllegalArgumentException thrown, if other is null
     
    134130     * adds a list of strings to this list. Only strings which
    135131     * are not null and which do not exist yet in the list are added.
    136      * 
     132     *
    137133     * @param value a list of strings to add
    138134     * @param priority the priority to use
     
    171167     * checks whether a specific item is already in the list. Matches for the
    172168     * the value <strong>and</strong> the priority of the item
    173      * 
     169     *
    174170     * @param item the item to check
    175171     * @return true, if item is in the list; false, otherwise
     
    184180     * checks whether an item with the given value is already in the list. Ignores
    185181     * priority of the items.
    186      * 
     182     *
    187183     * @param value the value of an auto completion item
    188184     * @return true, if value is in the list; false, otherwise
     
    246242    /**
    247243     * replies the number of filtered items
    248      * 
     244     *
    249245     * @return the number of filtered items
    250246     */
     
    257253     * @param idx the index; must be in the range 0<= idx < {@see #getFilteredSize()}
    258254     * @return the item
    259      * 
     255     *
    260256     * @exception IndexOutOfBoundsException thrown, if idx is out of bounds
    261257     */
     
    266262    }
    267263
    268 
    269264    /**
    270265     * removes all elements from the auto completion list
    271      * 
     266     *
    272267     */
    273268    public void clear() {
     
    277272    }
    278273
    279 
    280274    public int getColumnCount() {
    281275        return 1;
  • trunk/src/org/openstreetmap/josm/gui/tagging/ac/AutoCompletionListItem.java

    r2048 r2512  
    44/**
    55 * Represents an entry in the list of auto completion values.
    6  * 
     6 *
    77 *  An AutoCompletionListItem has a <em>priority</em> and a <em>value</em>.
    8  * 
     8 *
    99 *  The priority helps to sort the auto completion items according to their importance. For instance,
    1010 *  in an auto completion list for tag names, standard tag names would be assigned a higher
     
    1313 *
    1414 * The value is a string which will be displayed in the auto completion list.
    15  * 
     15 *
    1616 */
    1717public class AutoCompletionListItem implements Comparable<AutoCompletionListItem>{
     
    3636
    3737    /**
    38      * 
     38     *
    3939     * @return the priority
    4040     */
     
    5252
    5353    /**
    54      * 
     54     *
    5555     * @return the value
    5656     */
     
    112112    }
    113113
    114 
    115114    public int compareTo(AutoCompletionListItem other) {
    116115        int ret = this.priority.compareTo(other.priority);
  • trunk/src/org/openstreetmap/josm/gui/widgets/AutoCompleteComboBox.java

    r2281 r2512  
    1818 */
    1919public class AutoCompleteComboBox extends JComboBox {
    20 
    2120
    2221    private boolean autocompleteEnabled = true;
  • trunk/src/org/openstreetmap/josm/io/BoundingBoxDownloader.java

    r2327 r2512  
    1212import org.openstreetmap.josm.gui.progress.ProgressMonitor;
    1313import org.xml.sax.SAXException;
    14 
    1514
    1615public class BoundingBoxDownloader extends OsmServerReader {
     
    4140        try {
    4241            progressMonitor.indeterminateSubTask(tr("Contacting OSM Server..."));
    43             String url = "trackpoints?bbox="+lon1+","+lat1+","+lon2+","+lat2+"&page=";           
     42            String url = "trackpoints?bbox="+lon1+","+lat1+","+lon2+","+lat2+"&page=";
    4443
    4544            boolean done = false;
  • trunk/src/org/openstreetmap/josm/io/CacheFiles.java

    r2016 r2512  
    175175    }
    176176
    177 
    178177    /**
    179178     * Sets the amount of time data is stored before it gets expired
  • trunk/src/org/openstreetmap/josm/io/Capabilities.java

    r1691 r2512  
    3232     * replies the value of configuration item in the capabilities as
    3333     * double value
    34      * 
     34     *
    3535     * @param element  the name of the element
    3636     * @param attribute the name of the attribute
  • trunk/src/org/openstreetmap/josm/io/CredentialsManager.java

    r2015 r2512  
    55
    66/**
    7  * Manages how username and password are stored. In addition all 
     7 * Manages how username and password are stored. In addition all
    88 * username/password-related user interaction is encapsulated here.
    99 */
    1010public interface CredentialsManager {
    1111    enum Key {
    12         OSM_SERVER_URL("url"), 
    13         USERNAME("username"), 
     12        OSM_SERVER_URL("url"),
     13        USERNAME("username"),
    1414        PASSWORD("password");
    1515        final private String pname;
     
    2121        }
    2222    };
    23    
     23
    2424    /**
    2525     * Should throw or return non-null, possibly empty String.
  • trunk/src/org/openstreetmap/josm/io/GpxReader.java

    r2359 r2512  
    182182
    183183        @Override public void characters(char[] ch, int start, int length) {
    184             /** 
     184            /**
    185185             * Remove illegal characters generated by the Nokia Sports Tracker device.
    186              * Don't do this crude substitution for all files, since it would destroy 
     186             * Don't do this crude substitution for all files, since it would destroy
    187187             * certain unicode characters.
    188188             */
  • trunk/src/org/openstreetmap/josm/io/MultiFetchServerObjectReader.java

    r2498 r2512  
    5656    static private int MAX_IDS_PER_REQUEST = 200;
    5757
    58 
    5958    private HashSet<Long> nodes;
    6059    private HashSet<Long> ways;
     
    254253        return pkg;
    255254    }
    256 
    257255
    258256    /**
  • trunk/src/org/openstreetmap/josm/io/MultiPartFormOutputStream.java

    r1169 r2512  
    1414      list of conditions and the following disclaimer in the documentation and/or other
    1515      materials provided with the distribution.
    16 
    1716
    1817Neither the name of Sun Microsystems, Inc. or the names of contributors may be used to
     
    4342import java.net.URL;
    4443import java.net.URLConnection;
    45 
    4644
    4745/**
  • trunk/src/org/openstreetmap/josm/io/OsmApi.java

    r2480 r2512  
    296296    }
    297297
    298 
    299298    /**
    300299     * Creates a new changeset based on the keys in <code>changeset</code>. If this
    301300     * method succeeds, changeset.getId() replies the id the server assigned to the new
    302301     * changeset
    303      * 
     302     *
    304303     * The changeset must not be null, but its key/value-pairs may be empty.
    305      * 
     304     *
    306305     * @param changeset the changeset toe be created. Must not be null.
    307306     * @param progressMonitor the progress monitor
     
    335334     * @param changeset the changeset to update. Must not be null.
    336335     * @param monitor the progress monitor. If null, uses the {@see NullProgressMonitor#INSTANCE}.
    337      * 
     336     *
    338337     * @throws OsmTransferException if something goes wrong.
    339338     * @throws IllegalArgumentException if changeset is null
    340339     * @throws IllegalArgumentException if changeset.getId() <= 0
    341      * 
     340     *
    342341     */
    343342    public void updateChangeset(Changeset changeset, ProgressMonitor monitor) throws OsmTransferException {
     
    368367    }
    369368
    370 
    371369    /**
    372370     * Closes a changeset on the server. Sets changeset.setOpen(false) if this operation
     
    375373     * @param changeset the changeset to be closed. Must not be null. changeset.getId() > 0 required.
    376374     * @param monitor the progress monitor. If null, uses {@see NullProgressMonitor#INSTANCE}
    377      * 
     375     *
    378376     * @throws OsmTransferException if something goes wrong.
    379377     * @throws IllegalArgumentException thrown if changeset is null
     
    455453    /**
    456454     * Replies the max. number of retries in case of 5XX errors on the server
    457      * 
     455     *
    458456     * @return the max number of retries
    459457     */
     
    603601    }
    604602
    605 
    606603    /**
    607604     * Ensures that the current changeset can be used for uploading data
    608      * 
     605     *
    609606     * @throws OsmTransferException thrown if the current changeset can't be used for
    610607     * uploading data
     
    618615    /**
    619616     * Replies the changeset data uploads are currently directed to
    620      * 
     617     *
    621618     * @return the changeset data uploads are currently directed to
    622619     */
     
    629626     * can be null. If it isn't null it must have been created, i.e. id > 0 is required. Furthermore,
    630627     * it must be open.
    631      * 
     628     *
    632629     * @param changeset the changeset
    633630     * @throws IllegalArgumentException thrown if changeset.getId() <= 0
  • trunk/src/org/openstreetmap/josm/io/OsmApiException.java

    r2240 r2512  
    7878    /**
    7979     * Replies a message suitable to be displayed in a message dialog
    80      * 
     80     *
    8181     * @return a message which is suitable to be displayed in a message dialog
    8282     */
  • trunk/src/org/openstreetmap/josm/io/OsmApiPrimitiveGoneException.java

    r2198 r2512  
    1111 * Represents an exception thrown by the OSM API if JOSM tries to update or delete a primitive
    1212 * which is already deleted on the server.
    13  * 
     13 *
    1414 */
    1515public class OsmApiPrimitiveGoneException extends OsmApiException{
     
    2222    /** the id of the primitive */
    2323    private long id;
    24 
    2524
    2625    public OsmApiPrimitiveGoneException(String errorHeader, String errorBody) {
     
    3736    /**
    3837     * Replies true if we know what primitive this exception was thrown for
    39      * 
     38     *
    4039     * @return true if we know what primitive this exception was thrown for
    4140     */
     
    4746     * Replies the type of the primitive this exception was thrown for. null,
    4847     * if the type is not known.
    49      * 
     48     *
    5049     * @return the type of the primitive this exception was thrown for
    5150     */
     
    5756     * Replies the id of the primitive this exception was thrown for. 0, if
    5857     * the id is not known.
    59      * 
     58     *
    6059     * @return the id of the primitive this exception was thrown for
    6160     */
  • trunk/src/org/openstreetmap/josm/io/OsmChangesetParser.java

    r2181 r2512  
    203203    /**
    204204     * Parse the given input source and return the list of changesets
    205      * 
     205     *
    206206     * @param source the source input stream
    207207     * @param progressMonitor  the progress monitor
    208      * 
     208     *
    209209     * @return the list of changesets
    210210     * @throws IllegalDataException thrown if the an error was found while parsing the data from the source
  • trunk/src/org/openstreetmap/josm/io/OsmConnection.java

    r2322 r2512  
    132132    /**
    133133     * Replies true if this connection is canceled
    134      * 
     134     *
    135135     * @return true if this connection is canceled
    136136     * @return
  • trunk/src/org/openstreetmap/josm/io/OsmReader.java

    r2498 r2512  
    5050    /**
    5151     * Replies the parsed data set
    52      * 
     52     *
    5353     * @return the parsed data set
    5454     */
     
    6060     * longs too, but in contrast to internal ids negative values are used
    6161     * to identify primitives unknown to the OSM server
    62      * 
     62     *
    6363     * The keys are strings composed as follows
    6464     * <ul>
     
    6969     */
    7070    private Map<String, OsmPrimitive> externalIdMap = new HashMap<String, OsmPrimitive>();
    71 
    7271
    7372    /**
     
    171170        private OsmPrimitiveData current;
    172171        private String generator;
    173 
    174172
    175173        @Override public void startElement(String namespaceURI, String localName, String qName, Attributes atts) throws SAXException {
     
    410408    }
    411409
    412 
    413410    /**
    414411     * Processes the ways after parsing. Rebuilds the list of nodes of each way and
    415412     * adds the way to the dataset
    416      * 
     413     *
    417414     * @throws IllegalDataException thrown if a data integrity problem is detected
    418415     */
     
    460457     * Processes the parsed nodes after parsing. Just adds them to
    461458     * the dataset
    462      * 
     459     *
    463460     */
    464461    protected void processNodesAfterParsing() {
     
    472469    /**
    473470     * Completes the parsed relations with its members.
    474      * 
     471     *
    475472     * @throws IllegalDataException thrown if a data integrity problem is detected, i.e. if a
    476473     * relation member refers to a local primitive which wasn't available in the data
    477      * 
     474     *
    478475     */
    479476    private void processRelationsAfterParsing() throws IllegalDataException {
     
    545542    /**
    546543     * Parse the given input source and return the dataset.
    547      * 
     544     *
    548545     * @param source the source input stream
    549546     * @param progressMonitor  the progress monitor
    550      * 
     547     *
    551548     * @return the dataset with the parsed data
    552549     * @throws IllegalDataException thrown if the an error was found while parsing the data from the source
  • trunk/src/org/openstreetmap/josm/io/OsmServerChangesetReader.java

    r2181 r2512  
    6969    /**
    7070     * Reads teh changeset with id <code>id</code> from the server
    71      * 
     71     *
    7272     * @param id  the changeset id. id > 0 required.
    7373     * @param monitor the progress monitor. Set to {@see NullProgressMonitor#INSTANCE} if null
     
    105105    /**
    106106     * not implemented yet
    107      * 
     107     *
    108108     * @param id
    109109     * @param monitor
  • trunk/src/org/openstreetmap/josm/io/OsmServerReader.java

    r2181 r2512  
    135135     * Returns true if this reader is adding authentication credentials to the read
    136136     * request sent to the server.
    137      * 
     137     *
    138138     * @return true if this reader is adding authentication credentials to the read
    139139     * request sent to the server
     
    146146     * Sets whether this reader adds authentication credentials to the read
    147147     * request sent to the server.
    148      * 
     148     *
    149149     * @param doAuthenticate  true if  this reader adds authentication credentials to the read
    150150     * request sent to the server
  • trunk/src/org/openstreetmap/josm/io/OsmServerWriter.java

    r2273 r2512  
    6464    /**
    6565     * Uploads the changes individually. Invokes one API call per uploaded primitmive.
    66      * 
     66     *
    6767     * @param primitives the collection of primitives to upload
    6868     * @param progressMonitor the progress monitor
     
    106106    /**
    107107     * Upload all changes in one diff upload
    108      * 
     108     *
    109109     * @param primitives the collection of primitives to upload
    110110     * @param progressMonitor  the progress monitor
     
    193193    /**
    194194     * Replies the collection of successfully processed primitives
    195      * 
     195     *
    196196     * @return the collection of successfully processed primitives
    197197     */
  • trunk/src/org/openstreetmap/josm/plugins/PluginInformation.java

    r2358 r2512  
    274274    }
    275275}
    276 
  • trunk/src/org/openstreetmap/josm/plugins/PluginSelection.java

    r2372 r2512  
    300300            if (!name_lc.contains(lc_bit) &&
    301301                !description_lc.contains(lc_bit) &&
    302                 !remoteversion_lc.contains(lc_bit) && 
     302                !remoteversion_lc.contains(lc_bit) &&
    303303                !localversion_lc.contains(lc_bit)) {
    304304                canHas = false;
  • trunk/src/org/openstreetmap/josm/tools/CopyList.java

    r1862 r2512  
    9898    }
    9999
    100 
    101100    // speed optimizations:
    102101    public @Override boolean add(E element) {
  • trunk/src/org/openstreetmap/josm/tools/DateParser.java

    r1169 r2512  
    44import java.text.ParseException;
    55import java.util.Date;
    6 
    76
    87/**
  • trunk/src/org/openstreetmap/josm/tools/DateUtils.java

    r1724 r2512  
    2929import javax.xml.datatype.DatatypeFactory;
    3030import javax.xml.datatype.XMLGregorianCalendar;
    31 
    3231
    3332/**
  • trunk/src/org/openstreetmap/josm/tools/ExceptionUtil.java

    r2480 r2512  
    4646     * Explains a precondition exception when a child relation could not be deleted because
    4747     * it is still referred to by an undeleted parent relation.
    48      * 
     48     *
    4949     * @param e the exception
    5050     * @param childRelation the child relation
     
    142142     * Explains an exception thrown during upload because the changeset which data is
    143143     * uploaded to is already closed.
    144      * 
     144     *
    145145     * @param e the exception
    146146     */
     
    160160    /**
    161161     * Explains an exception with a generic message dialog
    162      * 
     162     *
    163163     * @param e the exception
    164164     */
     
    176176     * This is most likely happening when user tries to access the OSM API from within an
    177177     * applet which wasn't loaded from the API server.
    178      * 
     178     *
    179179     * @param e the exception
    180180     */
     
    199199     * This is most likely because there's not connection to the Internet or because
    200200     * the remote server is not reachable.
    201      * 
     201     *
    202202     * @param e the exception
    203203     */
     
    215215     * This is most likely happening when the communication with the remote server is
    216216     * interrupted for any reason.
    217      * 
     217     *
    218218     * @param e the exception
    219219     */
     
    232232     * Explains a {@see OsmApiException} which was thrown because of an internal server
    233233     * error in the OSM API server..
    234      * 
     234     *
    235235     * @param e the exception
    236236     */
     
    247247     * Explains a {@see OsmApiException} which was thrown because of a bad
    248248     * request
    249      * 
     249     *
    250250     * @param e the exception
    251251     */
     
    267267    /**
    268268     * Explains a {@see OsmApiException} which was thrown because a resource wasn't found.
    269      * 
     269     *
    270270     * @param e the exception
    271271     */
     
    286286     * This is most likely happening when there is an error in the API URL or when
    287287     * local DNS services are not working.
    288      * 
     288     *
    289289     * @param e the exception
    290290     */
     
    309309     * Replies the first nested exception of type <code>nestedClass</code> (including
    310310     * the root exception <code>e</code>) or null, if no such exception is found.
    311      * 
     311     *
    312312     * @param <T>
    313313     * @param e the root exception
     
    330330    /**
    331331     * Explains an {@see OsmTransferException} to the user.
    332      * 
     332     *
    333333     * @param e the {@see OsmTransferException}
    334334     */
     
    383383    /**
    384384     * Explains an {@see Exception} to the user.
    385      * 
     385     *
    386386     * @param e the {@see Exception}
    387387     */
  • trunk/src/org/openstreetmap/josm/tools/FallbackDateParser.java

    r1169 r2512  
    77import java.util.Date;
    88import java.util.List;
    9 
    109
    1110/**
     
    3433    };
    3534
    36 
    3735    private List<DateFormat> dateParsers;
    3836    private int activeDateParser;
    39 
    4037
    4138    /**
     
    5249        activeDateParser = -1;
    5350    }
    54 
    5551
    5652    /**
  • trunk/src/org/openstreetmap/josm/tools/I18n.java

    r2358 r2512  
    135135     * Sets the default locale (see {@see Locale#setDefault(Locale)} to the local
    136136     * given by <code>localName</code>.
    137      * 
     137     *
    138138     * Ignored if localName is null. If the locale with name <code>localName</code>
    139139     * isn't found the default local is set to <tt>en</tt> (english).
    140      * 
     140     *
    141141     * @param localeName the locale name. Ignored if null.
    142142     */
  • trunk/src/org/openstreetmap/josm/tools/ImageProvider.java

    r2181 r2512  
    6161    /**
    6262     * Return an image from the specified location.
    63      * 
     63     *
    6464     * @param subdir The position of the directory, e.g. "layer"
    6565     * @param name The icons name (without the ending of ".png")
     
    277277    /**
    278278     * Creates a rotated version of the input image.
    279      * 
     279     *
    280280     * @param c The component to get properties useful for painting, e.g. the foreground or
    281281     * background color.
     
    283283     * @param rotatedAngle the rotated angle, in degree, clockwise. It could be any double but we
    284284     * will mod it with 360 before using it.
    285      * 
     285     *
    286286     * @return the image after rotating.
    287287     */
  • trunk/src/org/openstreetmap/josm/tools/LanguageInfo.java

    r2308 r2512  
    1111     * prefix has the form 'Xy:' where 'Xy' is a ISO 639 language code in title
    1212     * case.
    13      * 
     13     *
    1414     * @param locale  the locale
    1515     * @return the wiki language prefix
     
    3030    /**
    3131     * Replies the wiki language prefix for the current locale.
    32      * 
     32     *
    3333     * @return the wiki language prefix
    3434     * @see Locale#getDefault()
     
    4141    /**
    4242     * Replies the JOSM locale code for the default locale.
    43      * 
     43     *
    4444     * @return the JOSM locale code for the default locale
    4545     * @see #getJOSMLocaleCode(Locale)
     
    5151    /**
    5252     * Replies the local code used by JOSM for a given locale.
    53      * 
     53     *
    5454     * In most cases JOSM uses the 2-character ISO 639 language code ({@see Locale#getLanguage()}
    5555     * to identify the locale of a localized resource, but in some cases it may use the
    5656     * programmatic name for locales, as replied by {@see Locale#toString()}.
    57      * 
     57     *
    5858     * @param locale the locale. Replies "en" if null.
    5959     * @return the JOSM code for the given locale
     
    7171    }
    7272
    73 
    7473    static public String getLanguageCodeXML()
    7574    {
  • trunk/src/org/openstreetmap/josm/tools/OsmUrlToBounds.java

    r2327 r2512  
    88
    99public class OsmUrlToBounds {
    10    
     10
    1111    public static Bounds parse(String url) {
    1212        int i = url.indexOf('?');
  • trunk/src/org/openstreetmap/josm/tools/PresetTextComparator.java

    r1677 r2512  
    1111    }
    1212
    13 
    1413}
  • trunk/src/org/openstreetmap/josm/tools/PrimaryDateParser.java

    r1169 r2512  
    99import javax.xml.datatype.DatatypeConfigurationException;
    1010import javax.xml.datatype.DatatypeFactory;
    11 
    1211
    1312/**
     
    2322    private Calendar calendar;
    2423
    25 
    2624    /**
    2725     * Creates a new instance.
     
    4139    }
    4240
    43 
    4441    private boolean isDateInShortStandardFormat(String date) {
    4542        char[] dateChars;
     
    109106    }
    110107
    111 
    112108    private boolean isDateInLongStandardFormat(String date) {
    113109        char[] dateChars;
     
    184180        return true;
    185181    }
    186 
    187182
    188183    private Date parseShortStandardDate(String date) {
     
    211206        return calendar.getTime();
    212207    }
    213 
    214208
    215209    private Date parseLongStandardDate(String date) {
     
    241235        return calendar.getTime();
    242236    }
    243 
    244237
    245238    /**
  • trunk/src/org/openstreetmap/josm/tools/UrlLabel.java

    r2318 r2512  
    5151     * Sets the URL to be visited if the user clicks on this URL label. If null, the
    5252     * label turns into a normal label without hyperlink.
    53      * 
     53     *
    5454     * @param url the url. Can be null.
    5555     */
     
    6161    /**
    6262     * Sets the text part of the URL label. Defaults to the empty string if description is null.
    63      * 
     63     *
    6464     * @param description the description
    6565     */
  • trunk/src/org/openstreetmap/josm/tools/WikiReader.java

    r2308 r2512  
    1414/**
    1515 * Read a trac-wiki page.
    16  * 
     16 *
    1717 * @author imi
    1818 */
     
    3131    /**
    3232     * Read the page specified by the url and return the content.
    33      * 
     33     *
    3434     * If the url is within the baseurl path, parse it as an trac wikipage and replace relative
    3535     * pathes etc..
    36      * 
     36     *
    3737     * @return
    3838     * @throws IOException Throws, if the page could not be loaded.
  • trunk/src/org/openstreetmap/josm/tools/WindowGeometry.java

    r2384 r2512  
    2020 * This is a helper class for persisting the geometry of a JOSM window to the preference store
    2121 * and for restoring it from the preference store.
    22  * 
     22 *
    2323 */
    2424public class WindowGeometry {
     
    2727     * Replies a window geometry object for a window with a specific size which is
    2828     * centered on screen
    29      * 
     29     *
    3030     * @param extent  the size
    3131     * @return the geometry object
     
    4242     * Replies a window geometry object for a window which a specific size which is centered
    4343     * relative to a parent window
    44      * 
     44     *
    4545     * @param parent the parent window
    4646     * @param extent the size
     
    6060    /**
    6161     * Exception thrown by the WindowGeometry class if something goes wrong
    62      * 
     62     *
    6363     */
    6464    static public class WindowGeometryException extends Exception {
     
    7878
    7979    /**
    80      * 
     80     *
    8181     * @param topLeft the top left point
    8282     * @param extent the extent
     
    8989    /**
    9090     * Creates a window geometry from the position and the size of a window.
    91      * 
     91     *
    9292     * @param window the window
    9393     */
     
    134134     * Creates a window geometry from the values kept in the preference store under the
    135135     * key <code>preferenceKey</code>
    136      * 
     136     *
    137137     * @param preferenceKey the preference key
    138138     * @throws WindowGeometryException thrown if no such key exist or if the preference value has
     
    147147     * key <code>preferenceKey</code>. Falls back to the <code>defaultGeometry</code> if
    148148     * something goes wrong.
    149      * 
     149     *
    150150     * @param preferenceKey the preference key
    151151     * @param defaultGeometry the default geometry
    152      * 
     152     *
    153153     */
    154154    public WindowGeometry(String preferenceKey, WindowGeometry defaultGeometry) {
     
    163163    /**
    164164     * Remembers a window geometry under a specific preference key
    165      * 
     165     *
    166166     * @param preferenceKey the preference key
    167167     */
     
    177177    /**
    178178     * Replies the top left point for the geometry
    179      * 
     179     *
    180180     * @return  the top left point for the geometry
    181181     */
     
    186186    /**
    187187     * Replies the size spezified by the geometry
    188      * 
     188     *
    189189     * @return the size spezified by the geometry
    190190     */
     
    195195    /**
    196196     * Applies this geometry to a window
    197      * 
     197     *
    198198     * @param window the window
    199199     */
     
    206206     * Applies this geometry to a window. Makes sure that the window is not placed outside
    207207     * of the coordinate range of the current screen.
    208      * 
     208     *
    209209     * @param window the window
    210210     */
Note: See TracChangeset for help on using the changeset viewer.