Ignore:
Timestamp:
2010-10-08T23:54:18+02:00 (14 years ago)
Author:
guggis
Message:

cosmetics (documentation etc.)
fixing unit tests

Location:
applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions
Files:
24 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/CreateOrEditTurnRestrictionAction.java

    r23254 r23510  
    77import java.util.logging.Logger;
    88
    9 import javax.swing.ActionMap;
    10 import javax.swing.InputMap;
    11 import javax.swing.JComponent;
    129import javax.swing.KeyStroke;
    1310
     
    3027public class CreateOrEditTurnRestrictionAction extends JosmAction {
    3128    static private final Logger logger = Logger.getLogger(CreateOrEditTurnRestrictionAction.class.getName());
    32 
    33     /**
    34      * Installs the global key stroke with which creating/editing a turn restriction
    35      * is triggered.
    36      *
    37      * @param keyStroke the key stroke
    38      */
    39     static public void install(KeyStroke keyStroke){
    40         InputMap im = Main.contentPane.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW);
    41         Object actionMapKey = im.get(keyStroke);
    42         if (actionMapKey != null && !actionMapKey.toString().equals("turnrestrictions:create-or-edit")) {
    43             System.out.println(tr("Warning: turnrestrictions plugin replaces already existing action ''{0}'' behind shortcut ''{1}'' by action ''{2}''", actionMapKey.toString(), keyStroke.toString(), "turnrestrictions:create-or-edit"));
    44         }
    45         KeyStroke[] keys = im.keys();
    46         if (keys != null){
    47             for(KeyStroke ks: im.keys()){
    48                 if (im.get(ks).equals("turnrestrictions:create-or-edit")) {
    49                     im.remove(ks);
    50                 }
    51             }
    52         }
    53         im.put(keyStroke, "turnrestrictions:create-or-edit");
    54         ActionMap am = Main.contentPane.getActionMap();
    55         am.put("turnrestrictions:create-or-edit", getInstance());
    56     }
    57 
     29 
    5830    /**
    5931     * Installs  global key stroke configured in the preferences.
     
    6840            key = KeyStroke.getKeyStroke("shift ctrl T");
    6941        }
    70         install(key);
     42        Main.registerActionShortcut(getInstance(), key);
    7143    }
    7244
  • applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/TurnRestrictionBuilder.java

    r23192 r23510  
    1616 * TurnRestrictionBuilder creates a turn restriction and initializes it with
    1717 * objects from a selection of OSM primitives, i.e. the current selection
    18  * in a {@see OsmDataLayer}.
     18 * in a {@link OsmDataLayer}.
    1919 *
    2020 */
  • applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/dnd/PrimitiveIdListTransferHandler.java

    r23192 r23510  
    1111
    1212/**
    13  * PrimitiveIdListTransferHandler is a transfer handler for components which
    14  * provide and/or accept a list of {@see PrimitiveId} via copy/paste or
    15  * drag-and-drop.
     13 * <p>PrimitiveIdListTransferHandler is a transfer handler for components which
     14 * provide and/or accept a list of {@link PrimitiveId} via copy/paste or
     15 * drag-and-drop.</p>
    1616 *
    17  * It creates a {@see Transferable} by retrieving the list of primitive IDs
    18  * from a {@see PrimitiveIdListProvider}.
     17 * <p>It creates a {@link Transferable} by retrieving the list of primitive IDs
     18 * from a {@link PrimitiveIdListProvider}.</p>
    1919 *
    2020 */
     
    2424   
    2525    /**
    26      * Replies true if {@code transferFlavors} includes the data flavor {@see PrimitiveIdTransferable#PRIMITIVE_ID_LIST_FLAVOR}.
     26     * Replies true if {@code transferFlavors} includes the data flavor {@link PrimitiveIdTransferable#PRIMITIVE_ID_LIST_FLAVOR}.
    2727
    2828     * @param transferFlavors an array of transferFlavors
    29      * @return true if {@code transferFlavors} includes the data flavor {@see PrimitiveIdTransferable#PRIMITIVE_ID_LIST_FLAVOR}.
     29     * @return true if {@code transferFlavors} includes the data flavor {@link PrimitiveIdTransferable#PRIMITIVE_ID_LIST_FLAVOR}.
    3030     */
    3131    public static boolean isSupportedFlavor(DataFlavor[] transferFlavors) {
     
    4646        this.provider = provider;
    4747    }
    48 
    49    
    5048   
    5149    protected Transferable createTransferable(JComponent c) {
  • applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/dnd/PrimitiveIdTransferable.java

    r23192 r23510  
    1313
    1414/**
    15  * To be used for Drag-and-Drop of a set of {@see PrimitiveId}s between
     15 * To be used for Drag-and-Drop of a set of {@link PrimitiveId}s between
    1616 * two components.
    1717 *
     
    2424   
    2525    /**
    26      * this transferable supports two flavors: (1) {@see #PRIMITIVE_ID_LIST_FLAVOR} and
    27      * (2) {@see DataFlavor#stringFlavor}.
     26     * this transferable supports two flavors: (1) {@link #PRIMITIVE_ID_LIST_FLAVOR} and
     27     * (2) {@link DataFlavor#stringFlavor}.
    2828     *
    29      * See also {@see #getPrimitiveIds()} and {@see #getAsString()}
     29     * See also {@link #getPrimitiveIds()} and {@link #getAsString()}
    3030     */
    3131    static public final DataFlavor[] SUPPORTED_FLAVORS = new DataFlavor[] {
     
    3838   
    3939    /**
    40      * Creates a transferable from a collection of {@see PrimitiveId}s
     40     * Creates a transferable from a collection of {@link PrimitiveId}s
    4141     *
    4242     * @param ids
     
    5050   
    5151    /**
    52      * If flavor is {@see #PRIMITIVE_ID_SET_FLAVOR}, replies a the list of
    53      * transferred {@see PrimitiveId}s
     52     * <p>If flavor is {@link #PRIMITIVE_ID_SET_FLAVOR}, replies a the list of
     53     * transferred {@link PrimitiveId}s</p>
    5454     *
    55      * If flavor is {@see DataFlavor#stringFlavor}, replies a string representation
    56      * of the list of transferred {@see PrimitiveId}s
     55     * <p>If flavor is {@link DataFlavor#stringFlavor}, replies a string representation
     56     * of the list of transferred {@link PrimitiveId}s</p>
    5757     */
    5858    public Object getTransferData(DataFlavor flavor)
  • applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/editor/BasicEditorPanel.java

    r23192 r23510  
    156156    /**
    157157     * Initializes the set of icons used from the preference key
    158      * {@see PreferenceKeys#ROAD_SIGNS}.
     158     * {@link PreferenceKeys#ROAD_SIGNS}.
    159159     *
    160160     * @param prefs the JOSM preferences
  • applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/editor/ExceptValueModel.java

    r23192 r23510  
    4444    private boolean isStandard = true;
    4545    private final Set<String> vehicleExceptions = new HashSet<String>();
    46    
    4746   
    4847    protected void parseValue(String value) {
  • applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/editor/JosmSelectionListModel.java

    r23192 r23510  
    33import java.util.ArrayList;
    44import java.util.Collection;
    5 import java.util.Collections;
    6 import java.util.Comparator;
    7 import java.util.HashMap;
    85import java.util.HashSet;
    96import java.util.List;
     
    1714import org.openstreetmap.josm.data.SelectionChangedListener;
    1815import org.openstreetmap.josm.data.osm.OsmPrimitive;
    19 import org.openstreetmap.josm.data.osm.OsmPrimitiveType;
    2016import org.openstreetmap.josm.data.osm.PrimitiveId;
    2117import org.openstreetmap.josm.data.osm.event.AbstractDatasetChangedEvent;
     
    2824import org.openstreetmap.josm.data.osm.event.TagsChangedEvent;
    2925import org.openstreetmap.josm.data.osm.event.WayNodesChangedEvent;
    30 import org.openstreetmap.josm.gui.DefaultNameFormatter;
    3126import org.openstreetmap.josm.gui.MapView.EditLayerChangeListener;
    3227import org.openstreetmap.josm.gui.layer.OsmDataLayer;
  • applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/editor/JosmSelectionPanel.java

    r23192 r23510  
    2222import javax.swing.TransferHandler;
    2323
    24 import org.openstreetmap.josm.data.osm.DataSet;
    2524import org.openstreetmap.josm.data.osm.event.DatasetEventManager;
     25import org.openstreetmap.josm.data.osm.event.DatasetEventManager.FireMode;
    2626import org.openstreetmap.josm.data.osm.event.SelectionEventManager;
    27 import org.openstreetmap.josm.data.osm.event.DatasetEventManager.FireMode;
    2827import org.openstreetmap.josm.gui.MapView;
    2928import org.openstreetmap.josm.gui.OsmPrimitivRenderer;
  • applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/editor/RelationMemberColumnModel.java

    r23192 r23510  
    1010
    1111/**
    12  * RelationMemberColumnModel is the column model for the table of relation members
    13  * displayed in the {@see AdvancedEditorPanel}.
     12 * <strong>RelationMemberColumnModel</strong> is the column model for the table of relation members
     13 * displayed in the {@link AdvancedEditorPanel}.
    1414 */
    1515public class RelationMemberColumnModel extends DefaultTableColumnModel{
  • applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/editor/RelationMemberEditorModel.java

    r23192 r23510  
    3232   
    3333    /**
    34      * Creates a new model in the context of an {@see OsmDataLayer}. Internally allocates
    35      * a row and a column selection model, see {@see #getRowSelectionModel()} and
    36      * {@see #getColSelectionModel()}.
     34     * Creates a new model in the context of an {@link OsmDataLayer}. Internally allocates
     35     * a row and a column selection model, see {@link #getRowSelectionModel()} and
     36     * {@link #getColSelectionModel()}.
    3737     *
    3838     * @param layer the data layer. Must not be null.
     
    4747
    4848    /**
    49      *  Creates a new model in the context of an {@see OsmDataLayer}
     49     *  Creates a new model in the context of an {@link OsmDataLayer}
    5050     * 
    5151     * @param layer layer the data layer. Must not be null.
     
    8484   
    8585    /**
    86      * Replies the set of {@see OsmPrimitive}s with the role {@code role}. If no
     86     * Replies the set of {@link OsmPrimitive}s with the role {@code role}. If no
    8787     * such primitives exists, the empty set is returned.
    8888     *
    89      * @return the set of {@see OsmPrimitive}s with the role {@code role}
     89     * @return the set of {@link OsmPrimitive}s with the role {@code role}
    9090     */
    9191    protected Set<OsmPrimitive> getPrimitivesWithRole(String role) {
     
    103103   
    104104    /**
    105      * Replies the list of {@see RelationMemberModel}s with the role {@code role}. If no
     105     * Replies the list of {@link RelationMemberModel}s with the role {@code role}. If no
    106106     * such primitives exists, the empty set is returned.
    107107     *
    108      * @return the set of {@see RelationMemberModel}s with the role {@code role}
     108     * @return the set of {@link RelationMemberModel}s with the role {@code role}
    109109     */
    110110    protected List<RelationMemberModel> getRelationMembersWithRole(String role) {
     
    138138       
    139139    /**
    140      * Replies the set of {@see OsmPrimitive}s with the role 'from'. If no
     140     * Replies the set of {@link OsmPrimitive}s with the role 'from'. If no
    141141     * such primitives exists, the empty set is returned.
    142142     *
    143      * @return the set of {@see OsmPrimitive}s with the role 'from'
     143     * @return the set of {@link OsmPrimitive}s with the role 'from'
    144144     */
    145145    public Set<OsmPrimitive> getFromPrimitives() {
     
    148148   
    149149    /**
    150      * Replies the set of {@see OsmPrimitive}s with the role 'to'. If no
     150     * Replies the set of {@link OsmPrimitive}s with the role 'to'. If no
    151151     * such primitives exists, the empty set is returned.
    152152     *
    153      * @return the set of {@see OsmPrimitive}s with the role 'from'
     153     * @return the set of {@link OsmPrimitive}s with the role 'from'
    154154     */
    155155    public Set<OsmPrimitive> getToPrimitives() {
     
    175175     *
    176176     * null vias are skipped. A via must belong to the dataset of the layer in whose context
    177      * this editor is working, otherwise an {@see IllegalArgumentException} is thrown.
     177     * this editor is working, otherwise an {@link IllegalArgumentException} is thrown.
    178178     *
    179179     * @param vias the vias.
     
    262262   
    263263    /**
    264      * Replies the set of {@see OsmPrimitive}s referred to by members in
     264     * Replies the set of {@link OsmPrimitive}s referred to by members in
    265265     * this model.
    266266     *
    267      * @return the set of {@see OsmPrimitive}s referred to by members in
     267     * @return the set of {@link OsmPrimitive}s referred to by members in
    268268     * this model.
    269269     */
     
    404404   
    405405    /**
    406      * Inserts a list of new relation members with the empty role for the primitives
     406     * <p>Inserts a list of new relation members with the empty role for the primitives
    407407     * with id in {@code ids}. Inserts the new primitives at the position of the first
    408      * selected row. If no row is selected, at the end of the list. 
    409      *
    410      * null values are skipped. If there is an id for which there is no primitive in the context
    411      *  layer, if the primitive is deleted or invisible, an {@see IllegalArgumentException}
    412      *  is thrown and nothing is inserted. 
     408     * selected row. If no row is selected, at the end of the list.</p>
     409     *
     410     * <p> null values are skipped. If there is an id for which there is no primitive in the context
     411     *  layer, if the primitive is deleted or invisible, an {@link IllegalArgumentException}
     412     *  is thrown and nothing is inserted.</p>
    413413     *
    414414     * @param ids the list of ids. Ignored if null.
  • applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/editor/RelationMemberModel.java

    r23192 r23510  
    1010/**
    1111 * RelationMemberModel is a mutable relation member. In contrast to
    12  * {@see RelationMember} it doesn't keep references to the referred
     12 * {@link RelationMember} it doesn't keep references to the referred
    1313 * primitive. Internally, it only keeps their the unique id.
    1414 *
  • applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/editor/RelationMemberTable.java

    r23192 r23510  
    33import static org.openstreetmap.josm.tools.I18n.tr;
    44
    5 import java.awt.MenuItem;
    65import java.awt.Toolkit;
    76import java.awt.datatransfer.Clipboard;
     
    2221
    2322import javax.swing.AbstractAction;
    24 import javax.swing.Action;
    2523import javax.swing.JComponent;
    2624import javax.swing.JMenuItem;
     
    286284       
    287285        /**
    288          * Replies true if {@code transferFlavors} includes the data flavor {@see PrimitiveIdTransferable#PRIMITIVE_ID_LIST_FLAVOR}.
     286         * Replies true if {@code transferFlavors} includes the data flavor {@link PrimitiveIdTransferable#PRIMITIVE_ID_LIST_FLAVOR}.
    289287
    290288         * @param transferFlavors an array of transferFlavors
  • applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/editor/TurnRestrictionComboBox.java

    r23192 r23510  
    44
    55import org.openstreetmap.josm.data.Preferences;
    6 import org.openstreetmap.josm.plugins.turnrestrictions.preferences.PreferenceKeys;
    76/**
    87 * A combo box for selecting a turn restriction type.
     
    3231    /**
    3332     * Initializes the set of icons used from the preference key
    34      * {@see PreferenceKeys#ROAD_SIGNS}.
     33     * {@link PreferenceKeys#ROAD_SIGNS}.
    3534     *
    3635     * @param prefs the JOSM preferences
  • applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/editor/TurnRestrictionEditor.java

    r23192 r23510  
    6161   
    6262    /** the property name for the current turn restriction
    63      * @see #setRelation(Relation)
    64      * @see #getRelation()
     63     * @link #setRelation(Relation)
     64     * @link #getRelation()
    6565     */
    6666    static public final String TURN_RESTRICION_PROP = RelationEditor.class.getName() + ".turnRestriction";
    6767
    6868    /** the property name for the current relation snapshot
    69      * @see #getRelationSnapshot()
     69     * @link #getRelationSnapshot()
    7070     */
    7171    static public final String TURN_RESTRICION_SNAPSHOT_PROP = RelationEditor.class.getName() + ".turnRestrictionSnapshot";
     
    213213    *
    214214    * @param owner the component relative to which the dialog is displayed
    215     * @param layer  the {@see OsmDataLayer} in whose context a relation is edited. Must not be null.
     215    * @param layer  the {@link OsmDataLayer} in whose context a relation is edited. Must not be null.
    216216    * @throws IllegalArgumentException thrown if layer is null
    217217    */
     
    224224     *
    225225     * @param owner the component relative to which the dialog is displayed
    226      * @param layer  the {@see OsmDataLayer} in whose context a relation is edited. Must not be null.
     226     * @param layer  the {@link OsmDataLayer} in whose context a relation is edited. Must not be null.
    227227     * @param turnRestriction the relation. Can be null if a new relation is to be edited.
    228228     * @throws IllegalArgumentException thrown if layer is null
     
    246246
    247247    /**
    248      * Sets the currently edited turn restriction. Creates a snapshot of the current
    249      * state of the turn restriction. See {@see #getTurnRestrictionSnapshot()}
    250      *
    251      * {@code turnRestriction} can be null if a new restriction is created. A turn
     248     * <p>Sets the currently edited turn restriction. Creates a snapshot of the current
     249     * state of the turn restriction. See {@link #getTurnRestrictionSnapshot()}</p>
     250     *
     251     * <p>{@code turnRestriction} can be null if a new restriction is created. A turn
    252252     * restriction which isn't assigned to a data set is allowed too. If {@code turnRestriction}
    253      * is already assigned to a dataset, the dataset of {@see #getLayer()} is required, otherwise
    254      * a {@see IllegalArgumentException} is thrown.
     253     * is already assigned to a dataset, the dataset of {@link #getLayer()} is required, otherwise
     254     * a {@link IllegalArgumentException} is thrown.</p>
    255255     *
    256256     * @param turnRestriction the turn restriction
    257257     * @throws IllegalArgumentException thrown if {@code turnRestriction} belongs to a different dataset than
    258      * that owned by the layer {@see #getLayer()}
     258     * that owned by the layer {@link #getLayer()}
    259259     */
    260260    protected void setTurnRestriction(Relation turnRestriction) {     
     
    287287   
    288288    /**
    289      * Replies the {@see OsmDataLayer} in whose context this relation editor is
     289     * Replies the {@link OsmDataLayer} in whose context this relation editor is
    290290     * open
    291291     *
    292      * @return the {@see OsmDataLayer} in whose context this relation editor is
     292     * @return the {@link OsmDataLayer} in whose context this relation editor is
    293293     * open
    294294     */
     
    317317   
    318318    /**
    319      * Replies true if the currently edited turn restriction has been changed elsewhere.
    320      *
    321      * In this case a turn restriction editor can't apply updates to the turn restriction
    322      * directly. Rather, it has to create a conflict.
     319     * <p>Replies true if the currently edited turn restriction has been changed elsewhere.</p>
     320     *
     321     * <p>In this case a turn restriction editor can't apply updates to the turn restriction
     322     * directly. Rather, it has to create a conflict.</p>
    323323     *
    324324     * @return true if the currently edited turn restriction has been changed elsewhere.
     
    469469       
    470470        /**
    471          * Asks the user how to proceed if a turn restriction refers to deleted or invisible
    472          * primitives.
     471         * <p>Asks the user how to proceed if a turn restriction refers to deleted or invisible
     472         * primitives.</p>
    473473         *
    474          * If this method returns true the respective members should be removed and the turn
     474         * <p>If this method returns true the respective members should be removed and the turn
    475475         * restriction should be saved anyway. If it replies false, the turn restriction must not
    476          * be saved.  
     476         * be saved. </p>
    477477         *
    478478         * @param deletedMembers the list of members referring to deleted or invisible primitives 
     
    866866   
    867867    /**
    868      * Listens to changes of the preference {@see PreferenceKeys#ROAD_SIGNS}
    869      * and refreshes the set of road icons.
     868     * <p>Listens to changes of the preference {@link PreferenceKeys#ROAD_SIGNS}
     869     * and refreshes the set of road icons.</p>
    870870     *
    871      * Listens to changes of the preference {@see PreferenceKeys#SHOW_VIAS_IN_BASIC_EDITOR}
    872      * and toggles the visibility af the list of via-objects in the Basic
    873      * Editor. 
     871     * <p>Listens to changes of the preference {@link PreferenceKeys#SHOW_VIAS_IN_BASIC_EDITOR}
     872     * and toggles the visibility of the list of via-objects in the Basic
     873     * Editor.</p>
    874874     *
    875875     */
  • applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/editor/TurnRestrictionEditorManager.java

    r23192 r23510  
    2929
    3030    /**
    31      * Replies the singleton {@see TurnRestrictionEditorManager}
    32      *
    33      * @return the singleton {@see TurnRestrictionEditorManager}
     31     * Replies the singleton {@link TurnRestrictionEditorManager}
     32     *
     33     * @return the singleton {@link TurnRestrictionEditorManager}
    3434     */
    3535    static public TurnRestrictionEditorManager getInstance() {
     
    4343    /**
    4444     * Helper class for keeping the context of a turn restriction editor. A turn
    45      * restriction editor is open for turn restriction in a  {@see OsmDataLayer}
     45     * restriction editor is open for turn restriction in a  {@link OsmDataLayer}
    4646     */
    4747    static private class DialogContext {
     
    107107    /**
    108108     * Register the editor for a turn restriction managed by a
    109      * {@see OsmDataLayer}.
     109     * {@link OsmDataLayer}.
    110110     *
    111111     * @param layer the layer
     
    177177     * is currently open.
    178178     *
    179      * @see #isOpenInEditor(OsmDataLayer, Relation)
     179     * @link #isOpenInEditor(OsmDataLayer, Relation)
    180180     */
    181181    public TurnRestrictionEditor getEditorForRelation(OsmDataLayer layer, Relation relation) {
     
    201201
    202202    /**
    203      * Positions an {@see TurnRestrictionEditor} centered on the screen
     203     * Positions an {@link TurnRestrictionEditor} centered on the screen
    204204     *
    205205     * @param editor the editor
     
    216216
    217217    /**
    218      * Replies true, if there is another open {@see TurnRestrictionEditor} whose
     218     * Replies true, if there is another open {@link TurnRestrictionEditor} whose
    219219     * upper left corner is close to <code>p</code>.
    220220     *
    221221     * @param p  the reference point to check
    222      * @return true, if there is another open {@see TurnRestrictionEditor} whose
     222     * @return true, if there is another open {@link TurnRestrictionEditor} whose
    223223     * upper left corner is close to <code>p</code>.
    224224     */
     
    234234
    235235    /**
    236      * Positions a {@see TurnRestrictionEditor} close to the center of the screen, in such
    237      * a way, that it doesn't entirely cover another {@see TurnRestrictionEditor}
     236     * Positions a {@link TurnRestrictionEditor} close to the center of the screen, in such
     237     * a way, that it doesn't entirely cover another {@link TurnRestrictionEditor}
    238238     *
    239239     * @param editor
     
    254254
    255255    /**
    256      * Positions a {@see TurnRestrictionEditor} on the screen. Tries to center it on the
     256     * Positions a {@link TurnRestrictionEditor} on the screen. Tries to center it on the
    257257     * screen. If it hides another instance of an editor at the same position this
    258258     * method tries to reposition <code>editor</code> by moving it slightly down and
  • applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/editor/TurnRestrictionEditorModel.java

    r23192 r23510  
    7171   
    7272    /**
    73      * Creates a model in the context of a {@see OsmDataLayer}
     73     * Creates a model in the context of a {@link OsmDataLayer}
    7474     *
    7575     * @param layer the layer. Must not be null.
     
    9797     * @exception IllegalArgumentException thrown if role is null
    9898     */
    99     public void setTurnRestrictionLeg(TurnRestrictionLegRole role, Way way) {
     99    public void setTurnRestrictionLeg(TurnRestrictionLegRole role, Way way) throws IllegalArgumentException{
    100100        CheckParameterUtil.ensureParameterNotNull(role, "role");
    101101        switch(role){
     
    136136   
    137137    /**
    138      * "Officially" a turn restriction should have exactly one member with
    139      * role {@see TurnRestrictionLegRole#FROM} and one member with role {@see TurnRestrictionLegRole#TO},
    140      * both referring to an OSM {@see Way}. In order to deals with turn restrictions where these
     138     * <p>"Officially" a turn restriction should have exactly one member with
     139     * role {@link TurnRestrictionLegRole#FROM FROM} and one member with role {@link TurnRestrictionLegRole#TO TO},
     140     * both referring to an OSM {@link Way}. In order to deals with turn restrictions where these
    141141     * integrity constraints are violated, this model also supports relation with multiple or no
    142      * 'from' or 'to' members.
    143      *
    144      * Replies the turn restriction legs with role {@code role}. If no leg with this
     142     * 'from' or 'to' members.</p>
     143     *
     144     * <p>Replies the turn restriction legs with role {@code role}. If no leg with this
    145145     * role exists, an empty set is returned. If multiple legs exists, the set of referred
    146      * primitives is returned. 
     146     * primitives is returned.</p> 
    147147     *
    148148     * @param role the role. Must not be null.
     
    260260   
    261261    /**
    262      * Sets the list of vias for the edited turn restriction.
    263      *
    264      * If {@code vias} is null, all vias are removed. All primitives
     262     * <p>Sets the list of vias for the edited turn restriction.</p>
     263     *
     264     * <p>If {@code vias} is null, all vias are removed. All primitives
    265265     * in {@code vias} must be assigned to a dataset and the dataset
    266      * must be equal to the dataset of this editor model, see {@see #getDataSet()}
    267      *
    268      * null values in {@see vias} are skipped.
     266     * must be equal to the dataset of this editor model, see {@link #getDataSet()}</p>
     267     *
     268     * <p>null values in {@link vias} are skipped.</p>
    269269     *
    270270     * @param vias the list of vias
     
    285285   
    286286    /**
    287      * Registers this model with global event sources like {@see DatasetEventManager}
     287     * Registers this model with global event sources like {@link DatasetEventManager}
    288288     */
    289289    public void registerAsEventListener(){
     
    292292   
    293293    /**
    294      * Removes this model as listener from global event sources like  {@see DatasetEventManager}
     294     * Removes this model as listener from global event sources like  {@link DatasetEventManager}
    295295     */
    296296    public void unregisterAsEventListener() {
  • applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/editor/TurnRestrictionSelectionPopupPanel.java

    r23192 r23510  
    4444
    4545/**
    46  * TurnRestrictionSelectionPopupPanel is displayed in a {@see Popup} to select whether
     46 * TurnRestrictionSelectionPopupPanel is displayed in a {@link Popup} to select whether
    4747 * the user wants to create a new turn restriction or whether he wants to edit one
    4848 * of a list of turn restrictions.
     
    5959    private JTable tblTurnRestrictions;
    6060    private OsmDataLayer layer;
    61    
    62    
    6361   
    6462    /**
  • applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/editor/TurnRestrictionTypeRenderer.java

    r23192 r23510  
    5555    /**
    5656     * Initializes the set of icons used from the preference key
    57      * {@see PreferenceKeys#ROAD_SIGNS}.
     57     * {@link PreferenceKeys#ROAD_SIGNS}.
    5858     *
    5959     * @param prefs the JOSM preferences
  • applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/editor/ViaList.java

    r23192 r23510  
    3939
    4040/**
    41  * ViaList is a JList which displays the 'via' members of a turn restriction.
     41 * <p>ViaList is a JList which displays the 'via' members of a turn restriction.</p>
    4242 *
    43  * A ViaList is connected to a {@see TurnRestrictionEditorModel} through its
    44  * {@code ViaListModel}.
     43 * <p>A ViaList is connected to a {@link TurnRestrictionEditorModel} through its
     44 * {@link ViaListModel}.</p>
    4545 *
    4646 */
  • applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/list/TurnRestrictionCellRenderer.java

    r23192 r23510  
    3737 *
    3838 * It can be used a cell renderer in lists of turn restrictions and as cell renderer in
    39  * {@see JTable}s displaying turn restrictions.
     39 * {@link JTable}s displaying turn restrictions.
    4040 *
    4141 */
     
    217217    /**
    218218     * Initializes the set of icons used from the preference key
    219      * {@see PreferenceKeys#ROAD_SIGNS}.
     219     * {@link PreferenceKeys#ROAD_SIGNS}.
    220220     *
    221221     * @param prefs the JOSM preferences
  • applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/list/TurnRestrictionsInDatasetListModel.java

    r23192 r23510  
    2424
    2525/**
    26  * This is the list model for the list of turn restrictions in the current data set.
     26 * <p>This is the list model for the list of turn restrictions in the current data set.</p>
    2727 *
    28  * The model is a {@see EditLayerChangeListener}. It initializes itself from the data set of
    29  * the current edit layer.
     28 * <p>The model is a {@link EditLayerChangeListener}. It initializes itself from the data set of
     29 * the current edit layer.</p>
    3030 *
    31  * The model is a {@see DataSetListener}. It updates itself to reflect the list of turn
    32  * restrictions in the current data set.
     31 * <p>The model is a {@link DataSetListener}. It updates itself to reflect the list of turn
     32 * restrictions in the current data set.</p>
    3333 *
    3434 */
  • applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/list/TurnRestrictionsListDialog.java

    r23192 r23510  
    444444   
    445445    /**
    446      * Listens the changes of the preference {@see PreferenceKeys#ROAD_SIGNS}
     446     * Listens the changes of the preference {@link PreferenceKeys#ROAD_SIGNS}
    447447     * and refreshes the set of road icons
    448448     *
  • applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/preferences/PreferenceKeys.java

    r23192 r23510  
    11package org.openstreetmap.josm.plugins.turnrestrictions.preferences;
    22
    3 import javax.swing.KeyStroke;
    43
    54/**
     
    3433    /**
    3534     * The shortcut which triggers creating a new or editing and existing turn
    36      * restriction. The value must be parseable by {@see KeyStroke#getKeyStroke(String)}.
     35     * restriction. The value must be parseable by {@link KeyStroke#getKeyStroke(String)}.
    3736     * If missing, the default value "ctrl shift T" is assumed.
    3837     */
  • applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/preferences/ShortcutPreferencePanel.java

    r23192 r23510  
    2727import javax.swing.UIManager;
    2828
     29import org.openstreetmap.josm.Main;
    2930import org.openstreetmap.josm.data.Preferences;
    3031import org.openstreetmap.josm.gui.widgets.HtmlPanel;
     
    131132        KeyStroke ks = KeyStroke.getKeyStroke(code, modifiers);
    132133       
    133         pref.put(PreferenceKeys.EDIT_SHORTCUT, ks.toString());      
    134         CreateOrEditTurnRestrictionAction.install(ks);
     134        pref.put(PreferenceKeys.EDIT_SHORTCUT, ks.toString());     
     135        Main.registerActionShortcut(CreateOrEditTurnRestrictionAction.getInstance(), ks);
    135136    }
    136137   
Note: See TracChangeset for help on using the changeset viewer.