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

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

Location:
trunk/src/org/openstreetmap/josm/gui
Files:
160 edited

Legend:

Unmodified
Added
Removed
  • 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;
Note: See TracChangeset for help on using the changeset viewer.