Changeset 23510 in osm for applications/editors/josm/plugins/turnrestrictions/src/org
- Timestamp:
- 2010-10-08T23:54:18+02:00 (14 years ago)
- 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 7 7 import java.util.logging.Logger; 8 8 9 import javax.swing.ActionMap;10 import javax.swing.InputMap;11 import javax.swing.JComponent;12 9 import javax.swing.KeyStroke; 13 10 … … 30 27 public class CreateOrEditTurnRestrictionAction extends JosmAction { 31 28 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 58 30 /** 59 31 * Installs global key stroke configured in the preferences. … … 68 40 key = KeyStroke.getKeyStroke("shift ctrl T"); 69 41 } 70 install(key);42 Main.registerActionShortcut(getInstance(), key); 71 43 } 72 44 -
applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/TurnRestrictionBuilder.java
r23192 r23510 16 16 * TurnRestrictionBuilder creates a turn restriction and initializes it with 17 17 * objects from a selection of OSM primitives, i.e. the current selection 18 * in a {@ seeOsmDataLayer}.18 * in a {@link OsmDataLayer}. 19 19 * 20 20 */ -
applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/dnd/PrimitiveIdListTransferHandler.java
r23192 r23510 11 11 12 12 /** 13 * PrimitiveIdListTransferHandler is a transfer handler for components which14 * provide and/or accept a list of {@ seePrimitiveId} via copy/paste or15 * 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> 16 16 * 17 * It creates a {@seeTransferable} by retrieving the list of primitive IDs18 * from a {@ see PrimitiveIdListProvider}.17 * <p>It creates a {@link Transferable} by retrieving the list of primitive IDs 18 * from a {@link PrimitiveIdListProvider}.</p> 19 19 * 20 20 */ … … 24 24 25 25 /** 26 * Replies true if {@code transferFlavors} includes the data flavor {@ seePrimitiveIdTransferable#PRIMITIVE_ID_LIST_FLAVOR}.26 * Replies true if {@code transferFlavors} includes the data flavor {@link PrimitiveIdTransferable#PRIMITIVE_ID_LIST_FLAVOR}. 27 27 28 28 * @param transferFlavors an array of transferFlavors 29 * @return true if {@code transferFlavors} includes the data flavor {@ seePrimitiveIdTransferable#PRIMITIVE_ID_LIST_FLAVOR}.29 * @return true if {@code transferFlavors} includes the data flavor {@link PrimitiveIdTransferable#PRIMITIVE_ID_LIST_FLAVOR}. 30 30 */ 31 31 public static boolean isSupportedFlavor(DataFlavor[] transferFlavors) { … … 46 46 this.provider = provider; 47 47 } 48 49 50 48 51 49 protected Transferable createTransferable(JComponent c) { -
applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/dnd/PrimitiveIdTransferable.java
r23192 r23510 13 13 14 14 /** 15 * To be used for Drag-and-Drop of a set of {@ seePrimitiveId}s between15 * To be used for Drag-and-Drop of a set of {@link PrimitiveId}s between 16 16 * two components. 17 17 * … … 24 24 25 25 /** 26 * this transferable supports two flavors: (1) {@ see#PRIMITIVE_ID_LIST_FLAVOR} and27 * (2) {@ seeDataFlavor#stringFlavor}.26 * this transferable supports two flavors: (1) {@link #PRIMITIVE_ID_LIST_FLAVOR} and 27 * (2) {@link DataFlavor#stringFlavor}. 28 28 * 29 * See also {@ see #getPrimitiveIds()} and {@see#getAsString()}29 * See also {@link #getPrimitiveIds()} and {@link #getAsString()} 30 30 */ 31 31 static public final DataFlavor[] SUPPORTED_FLAVORS = new DataFlavor[] { … … 38 38 39 39 /** 40 * Creates a transferable from a collection of {@ seePrimitiveId}s40 * Creates a transferable from a collection of {@link PrimitiveId}s 41 41 * 42 42 * @param ids … … 50 50 51 51 /** 52 * If flavor is {@see#PRIMITIVE_ID_SET_FLAVOR}, replies a the list of53 * transferred {@ see PrimitiveId}s52 * <p>If flavor is {@link #PRIMITIVE_ID_SET_FLAVOR}, replies a the list of 53 * transferred {@link PrimitiveId}s</p> 54 54 * 55 * If flavor is {@seeDataFlavor#stringFlavor}, replies a string representation56 * of the list of transferred {@ see PrimitiveId}s55 * <p>If flavor is {@link DataFlavor#stringFlavor}, replies a string representation 56 * of the list of transferred {@link PrimitiveId}s</p> 57 57 */ 58 58 public Object getTransferData(DataFlavor flavor) -
applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/editor/BasicEditorPanel.java
r23192 r23510 156 156 /** 157 157 * Initializes the set of icons used from the preference key 158 * {@ seePreferenceKeys#ROAD_SIGNS}.158 * {@link PreferenceKeys#ROAD_SIGNS}. 159 159 * 160 160 * @param prefs the JOSM preferences -
applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/editor/ExceptValueModel.java
r23192 r23510 44 44 private boolean isStandard = true; 45 45 private final Set<String> vehicleExceptions = new HashSet<String>(); 46 47 46 48 47 protected void parseValue(String value) { -
applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/editor/JosmSelectionListModel.java
r23192 r23510 3 3 import java.util.ArrayList; 4 4 import java.util.Collection; 5 import java.util.Collections;6 import java.util.Comparator;7 import java.util.HashMap;8 5 import java.util.HashSet; 9 6 import java.util.List; … … 17 14 import org.openstreetmap.josm.data.SelectionChangedListener; 18 15 import org.openstreetmap.josm.data.osm.OsmPrimitive; 19 import org.openstreetmap.josm.data.osm.OsmPrimitiveType;20 16 import org.openstreetmap.josm.data.osm.PrimitiveId; 21 17 import org.openstreetmap.josm.data.osm.event.AbstractDatasetChangedEvent; … … 28 24 import org.openstreetmap.josm.data.osm.event.TagsChangedEvent; 29 25 import org.openstreetmap.josm.data.osm.event.WayNodesChangedEvent; 30 import org.openstreetmap.josm.gui.DefaultNameFormatter;31 26 import org.openstreetmap.josm.gui.MapView.EditLayerChangeListener; 32 27 import org.openstreetmap.josm.gui.layer.OsmDataLayer; -
applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/editor/JosmSelectionPanel.java
r23192 r23510 22 22 import javax.swing.TransferHandler; 23 23 24 import org.openstreetmap.josm.data.osm.DataSet;25 24 import org.openstreetmap.josm.data.osm.event.DatasetEventManager; 25 import org.openstreetmap.josm.data.osm.event.DatasetEventManager.FireMode; 26 26 import org.openstreetmap.josm.data.osm.event.SelectionEventManager; 27 import org.openstreetmap.josm.data.osm.event.DatasetEventManager.FireMode;28 27 import org.openstreetmap.josm.gui.MapView; 29 28 import org.openstreetmap.josm.gui.OsmPrimitivRenderer; -
applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/editor/RelationMemberColumnModel.java
r23192 r23510 10 10 11 11 /** 12 * RelationMemberColumnModelis the column model for the table of relation members13 * displayed in the {@ seeAdvancedEditorPanel}.12 * <strong>RelationMemberColumnModel</strong> is the column model for the table of relation members 13 * displayed in the {@link AdvancedEditorPanel}. 14 14 */ 15 15 public class RelationMemberColumnModel extends DefaultTableColumnModel{ -
applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/editor/RelationMemberEditorModel.java
r23192 r23510 32 32 33 33 /** 34 * Creates a new model in the context of an {@ seeOsmDataLayer}. Internally allocates35 * a row and a column selection model, see {@ see#getRowSelectionModel()} and36 * {@ 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()}. 37 37 * 38 38 * @param layer the data layer. Must not be null. … … 47 47 48 48 /** 49 * Creates a new model in the context of an {@ seeOsmDataLayer}49 * Creates a new model in the context of an {@link OsmDataLayer} 50 50 * 51 51 * @param layer layer the data layer. Must not be null. … … 84 84 85 85 /** 86 * Replies the set of {@ seeOsmPrimitive}s with the role {@code role}. If no86 * Replies the set of {@link OsmPrimitive}s with the role {@code role}. If no 87 87 * such primitives exists, the empty set is returned. 88 88 * 89 * @return the set of {@ seeOsmPrimitive}s with the role {@code role}89 * @return the set of {@link OsmPrimitive}s with the role {@code role} 90 90 */ 91 91 protected Set<OsmPrimitive> getPrimitivesWithRole(String role) { … … 103 103 104 104 /** 105 * Replies the list of {@ seeRelationMemberModel}s with the role {@code role}. If no105 * Replies the list of {@link RelationMemberModel}s with the role {@code role}. If no 106 106 * such primitives exists, the empty set is returned. 107 107 * 108 * @return the set of {@ seeRelationMemberModel}s with the role {@code role}108 * @return the set of {@link RelationMemberModel}s with the role {@code role} 109 109 */ 110 110 protected List<RelationMemberModel> getRelationMembersWithRole(String role) { … … 138 138 139 139 /** 140 * Replies the set of {@ seeOsmPrimitive}s with the role 'from'. If no140 * Replies the set of {@link OsmPrimitive}s with the role 'from'. If no 141 141 * such primitives exists, the empty set is returned. 142 142 * 143 * @return the set of {@ seeOsmPrimitive}s with the role 'from'143 * @return the set of {@link OsmPrimitive}s with the role 'from' 144 144 */ 145 145 public Set<OsmPrimitive> getFromPrimitives() { … … 148 148 149 149 /** 150 * Replies the set of {@ seeOsmPrimitive}s with the role 'to'. If no150 * Replies the set of {@link OsmPrimitive}s with the role 'to'. If no 151 151 * such primitives exists, the empty set is returned. 152 152 * 153 * @return the set of {@ seeOsmPrimitive}s with the role 'from'153 * @return the set of {@link OsmPrimitive}s with the role 'from' 154 154 */ 155 155 public Set<OsmPrimitive> getToPrimitives() { … … 175 175 * 176 176 * null vias are skipped. A via must belong to the dataset of the layer in whose context 177 * this editor is working, otherwise an {@ seeIllegalArgumentException} is thrown.177 * this editor is working, otherwise an {@link IllegalArgumentException} is thrown. 178 178 * 179 179 * @param vias the vias. … … 262 262 263 263 /** 264 * Replies the set of {@ seeOsmPrimitive}s referred to by members in264 * Replies the set of {@link OsmPrimitive}s referred to by members in 265 265 * this model. 266 266 * 267 * @return the set of {@ seeOsmPrimitive}s referred to by members in267 * @return the set of {@link OsmPrimitive}s referred to by members in 268 268 * this model. 269 269 */ … … 404 404 405 405 /** 406 * Inserts a list of new relation members with the empty role for the primitives406 * <p>Inserts a list of new relation members with the empty role for the primitives 407 407 * 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 context411 * layer, if the primitive is deleted or invisible, an {@ seeIllegalArgumentException}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> 413 413 * 414 414 * @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 10 10 /** 11 11 * RelationMemberModel is a mutable relation member. In contrast to 12 * {@ seeRelationMember} it doesn't keep references to the referred12 * {@link RelationMember} it doesn't keep references to the referred 13 13 * primitive. Internally, it only keeps their the unique id. 14 14 * -
applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/editor/RelationMemberTable.java
r23192 r23510 3 3 import static org.openstreetmap.josm.tools.I18n.tr; 4 4 5 import java.awt.MenuItem;6 5 import java.awt.Toolkit; 7 6 import java.awt.datatransfer.Clipboard; … … 22 21 23 22 import javax.swing.AbstractAction; 24 import javax.swing.Action;25 23 import javax.swing.JComponent; 26 24 import javax.swing.JMenuItem; … … 286 284 287 285 /** 288 * Replies true if {@code transferFlavors} includes the data flavor {@ seePrimitiveIdTransferable#PRIMITIVE_ID_LIST_FLAVOR}.286 * Replies true if {@code transferFlavors} includes the data flavor {@link PrimitiveIdTransferable#PRIMITIVE_ID_LIST_FLAVOR}. 289 287 290 288 * @param transferFlavors an array of transferFlavors -
applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/editor/TurnRestrictionComboBox.java
r23192 r23510 4 4 5 5 import org.openstreetmap.josm.data.Preferences; 6 import org.openstreetmap.josm.plugins.turnrestrictions.preferences.PreferenceKeys;7 6 /** 8 7 * A combo box for selecting a turn restriction type. … … 32 31 /** 33 32 * Initializes the set of icons used from the preference key 34 * {@ seePreferenceKeys#ROAD_SIGNS}.33 * {@link PreferenceKeys#ROAD_SIGNS}. 35 34 * 36 35 * @param prefs the JOSM preferences -
applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/editor/TurnRestrictionEditor.java
r23192 r23510 61 61 62 62 /** the property name for the current turn restriction 63 * @ see#setRelation(Relation)64 * @ see#getRelation()63 * @link #setRelation(Relation) 64 * @link #getRelation() 65 65 */ 66 66 static public final String TURN_RESTRICION_PROP = RelationEditor.class.getName() + ".turnRestriction"; 67 67 68 68 /** the property name for the current relation snapshot 69 * @ see#getRelationSnapshot()69 * @link #getRelationSnapshot() 70 70 */ 71 71 static public final String TURN_RESTRICION_SNAPSHOT_PROP = RelationEditor.class.getName() + ".turnRestrictionSnapshot"; … … 213 213 * 214 214 * @param owner the component relative to which the dialog is displayed 215 * @param layer the {@ seeOsmDataLayer} 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. 216 216 * @throws IllegalArgumentException thrown if layer is null 217 217 */ … … 224 224 * 225 225 * @param owner the component relative to which the dialog is displayed 226 * @param layer the {@ seeOsmDataLayer} 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. 227 227 * @param turnRestriction the relation. Can be null if a new relation is to be edited. 228 228 * @throws IllegalArgumentException thrown if layer is null … … 246 246 247 247 /** 248 * Sets the currently edited turn restriction. Creates a snapshot of the current249 * state of the turn restriction. See {@ see #getTurnRestrictionSnapshot()}250 * 251 * {@code turnRestriction} can be null if a new restriction is created. A turn248 * <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 252 252 * 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, otherwise254 * 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> 255 255 * 256 256 * @param turnRestriction the turn restriction 257 257 * @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()} 259 259 */ 260 260 protected void setTurnRestriction(Relation turnRestriction) { … … 287 287 288 288 /** 289 * Replies the {@ seeOsmDataLayer} in whose context this relation editor is289 * Replies the {@link OsmDataLayer} in whose context this relation editor is 290 290 * open 291 291 * 292 * @return the {@ seeOsmDataLayer} in whose context this relation editor is292 * @return the {@link OsmDataLayer} in whose context this relation editor is 293 293 * open 294 294 */ … … 317 317 318 318 /** 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 restriction322 * 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> 323 323 * 324 324 * @return true if the currently edited turn restriction has been changed elsewhere. … … 469 469 470 470 /** 471 * Asks the user how to proceed if a turn restriction refers to deleted or invisible472 * primitives. 471 * <p>Asks the user how to proceed if a turn restriction refers to deleted or invisible 472 * primitives.</p> 473 473 * 474 * If this method returns true the respective members should be removed and the turn474 * <p>If this method returns true the respective members should be removed and the turn 475 475 * restriction should be saved anyway. If it replies false, the turn restriction must not 476 * be saved. 476 * be saved. </p> 477 477 * 478 478 * @param deletedMembers the list of members referring to deleted or invisible primitives … … 866 866 867 867 /** 868 * Listens to changes of the preference {@seePreferenceKeys#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> 870 870 * 871 * Listens to changes of the preference {@seePreferenceKeys#SHOW_VIAS_IN_BASIC_EDITOR}872 * and toggles the visibility af the list of via-objects in the Basic873 * 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> 874 874 * 875 875 */ -
applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/editor/TurnRestrictionEditorManager.java
r23192 r23510 29 29 30 30 /** 31 * Replies the singleton {@ seeTurnRestrictionEditorManager}32 * 33 * @return the singleton {@ seeTurnRestrictionEditorManager}31 * Replies the singleton {@link TurnRestrictionEditorManager} 32 * 33 * @return the singleton {@link TurnRestrictionEditorManager} 34 34 */ 35 35 static public TurnRestrictionEditorManager getInstance() { … … 43 43 /** 44 44 * Helper class for keeping the context of a turn restriction editor. A turn 45 * restriction editor is open for turn restriction in a {@ seeOsmDataLayer}45 * restriction editor is open for turn restriction in a {@link OsmDataLayer} 46 46 */ 47 47 static private class DialogContext { … … 107 107 /** 108 108 * Register the editor for a turn restriction managed by a 109 * {@ seeOsmDataLayer}.109 * {@link OsmDataLayer}. 110 110 * 111 111 * @param layer the layer … … 177 177 * is currently open. 178 178 * 179 * @ see#isOpenInEditor(OsmDataLayer, Relation)179 * @link #isOpenInEditor(OsmDataLayer, Relation) 180 180 */ 181 181 public TurnRestrictionEditor getEditorForRelation(OsmDataLayer layer, Relation relation) { … … 201 201 202 202 /** 203 * Positions an {@ seeTurnRestrictionEditor} centered on the screen203 * Positions an {@link TurnRestrictionEditor} centered on the screen 204 204 * 205 205 * @param editor the editor … … 216 216 217 217 /** 218 * Replies true, if there is another open {@ seeTurnRestrictionEditor} whose218 * Replies true, if there is another open {@link TurnRestrictionEditor} whose 219 219 * upper left corner is close to <code>p</code>. 220 220 * 221 221 * @param p the reference point to check 222 * @return true, if there is another open {@ seeTurnRestrictionEditor} whose222 * @return true, if there is another open {@link TurnRestrictionEditor} whose 223 223 * upper left corner is close to <code>p</code>. 224 224 */ … … 234 234 235 235 /** 236 * Positions a {@ seeTurnRestrictionEditor} close to the center of the screen, in such237 * a way, that it doesn't entirely cover another {@ seeTurnRestrictionEditor}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} 238 238 * 239 239 * @param editor … … 254 254 255 255 /** 256 * Positions a {@ seeTurnRestrictionEditor} on the screen. Tries to center it on the256 * Positions a {@link TurnRestrictionEditor} on the screen. Tries to center it on the 257 257 * screen. If it hides another instance of an editor at the same position this 258 258 * 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 71 71 72 72 /** 73 * Creates a model in the context of a {@ seeOsmDataLayer}73 * Creates a model in the context of a {@link OsmDataLayer} 74 74 * 75 75 * @param layer the layer. Must not be null. … … 97 97 * @exception IllegalArgumentException thrown if role is null 98 98 */ 99 public void setTurnRestrictionLeg(TurnRestrictionLegRole role, Way way) {99 public void setTurnRestrictionLeg(TurnRestrictionLegRole role, Way way) throws IllegalArgumentException{ 100 100 CheckParameterUtil.ensureParameterNotNull(role, "role"); 101 101 switch(role){ … … 136 136 137 137 /** 138 * "Officially" a turn restriction should have exactly one member with139 * role {@ see TurnRestrictionLegRole#FROM} and one member with role {@see TurnRestrictionLegRole#TO},140 * both referring to an OSM {@ seeWay}. In order to deals with turn restrictions where these138 * <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 141 141 * 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 this142 * 'from' or 'to' members.</p> 143 * 144 * <p>Replies the turn restriction legs with role {@code role}. If no leg with this 145 145 * role exists, an empty set is returned. If multiple legs exists, the set of referred 146 * primitives is returned. 146 * primitives is returned.</p> 147 147 * 148 148 * @param role the role. Must not be null. … … 260 260 261 261 /** 262 * Sets the list of vias for the edited turn restriction.263 * 264 * If {@code vias} is null, all vias are removed. All primitives262 * <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 265 265 * 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> 269 269 * 270 270 * @param vias the list of vias … … 285 285 286 286 /** 287 * Registers this model with global event sources like {@ seeDatasetEventManager}287 * Registers this model with global event sources like {@link DatasetEventManager} 288 288 */ 289 289 public void registerAsEventListener(){ … … 292 292 293 293 /** 294 * Removes this model as listener from global event sources like {@ seeDatasetEventManager}294 * Removes this model as listener from global event sources like {@link DatasetEventManager} 295 295 */ 296 296 public void unregisterAsEventListener() { -
applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/editor/TurnRestrictionSelectionPopupPanel.java
r23192 r23510 44 44 45 45 /** 46 * TurnRestrictionSelectionPopupPanel is displayed in a {@ seePopup} to select whether46 * TurnRestrictionSelectionPopupPanel is displayed in a {@link Popup} to select whether 47 47 * the user wants to create a new turn restriction or whether he wants to edit one 48 48 * of a list of turn restrictions. … … 59 59 private JTable tblTurnRestrictions; 60 60 private OsmDataLayer layer; 61 62 63 61 64 62 /** -
applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/editor/TurnRestrictionTypeRenderer.java
r23192 r23510 55 55 /** 56 56 * Initializes the set of icons used from the preference key 57 * {@ seePreferenceKeys#ROAD_SIGNS}.57 * {@link PreferenceKeys#ROAD_SIGNS}. 58 58 * 59 59 * @param prefs the JOSM preferences -
applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/editor/ViaList.java
r23192 r23510 39 39 40 40 /** 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> 42 42 * 43 * A ViaList is connected to a {@seeTurnRestrictionEditorModel} through its44 * {@ code ViaListModel}.43 * <p>A ViaList is connected to a {@link TurnRestrictionEditorModel} through its 44 * {@link ViaListModel}.</p> 45 45 * 46 46 */ -
applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/list/TurnRestrictionCellRenderer.java
r23192 r23510 37 37 * 38 38 * It can be used a cell renderer in lists of turn restrictions and as cell renderer in 39 * {@ seeJTable}s displaying turn restrictions.39 * {@link JTable}s displaying turn restrictions. 40 40 * 41 41 */ … … 217 217 /** 218 218 * Initializes the set of icons used from the preference key 219 * {@ seePreferenceKeys#ROAD_SIGNS}.219 * {@link PreferenceKeys#ROAD_SIGNS}. 220 220 * 221 221 * @param prefs the JOSM preferences -
applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/list/TurnRestrictionsInDatasetListModel.java
r23192 r23510 24 24 25 25 /** 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> 27 27 * 28 * The model is a {@seeEditLayerChangeListener}. It initializes itself from the data set of29 * 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> 30 30 * 31 * The model is a {@seeDataSetListener}. It updates itself to reflect the list of turn32 * 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> 33 33 * 34 34 */ -
applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/list/TurnRestrictionsListDialog.java
r23192 r23510 444 444 445 445 /** 446 * Listens the changes of the preference {@ seePreferenceKeys#ROAD_SIGNS}446 * Listens the changes of the preference {@link PreferenceKeys#ROAD_SIGNS} 447 447 * and refreshes the set of road icons 448 448 * -
applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/preferences/PreferenceKeys.java
r23192 r23510 1 1 package org.openstreetmap.josm.plugins.turnrestrictions.preferences; 2 2 3 import javax.swing.KeyStroke;4 3 5 4 /** … … 34 33 /** 35 34 * The shortcut which triggers creating a new or editing and existing turn 36 * restriction. The value must be parseable by {@ seeKeyStroke#getKeyStroke(String)}.35 * restriction. The value must be parseable by {@link KeyStroke#getKeyStroke(String)}. 37 36 * If missing, the default value "ctrl shift T" is assumed. 38 37 */ -
applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/preferences/ShortcutPreferencePanel.java
r23192 r23510 27 27 import javax.swing.UIManager; 28 28 29 import org.openstreetmap.josm.Main; 29 30 import org.openstreetmap.josm.data.Preferences; 30 31 import org.openstreetmap.josm.gui.widgets.HtmlPanel; … … 131 132 KeyStroke ks = KeyStroke.getKeyStroke(code, modifiers); 132 133 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); 135 136 } 136 137
Note:
See TracChangeset
for help on using the changeset viewer.