Changeset 12301 in josm for trunk/src/org
- Timestamp:
- 2017-06-02T17:23:36+02:00 (7 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/gui/dialogs
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/dialogs/DeleteFromRelationConfirmationDialog.java
r11377 r12301 183 183 /** 184 184 * The table model which manages the list of relation-to-child references 185 *186 185 */ 187 186 public static class RelationMemberTableModel extends DefaultTableModel { … … 213 212 } 214 213 214 /** 215 * Sets the data that should be displayed in the list. 216 * @param references A list of references to display 217 */ 215 218 public void populate(Collection<RelationToChildReference> references) { 216 219 data.clear(); … … 222 225 } 223 226 227 /** 228 * Gets the list of children that are currently displayed. 229 * @return The children. 230 */ 224 231 public Set<OsmPrimitive> getObjectsToDelete() { 225 232 Set<OsmPrimitive> ret = new HashSet<>(); … … 230 237 } 231 238 239 /** 240 * Gets the number of elements {@link #getObjectsToDelete()} would return. 241 * @return That number. 242 */ 232 243 public int getNumObjectsToDelete() { 233 244 return getObjectsToDelete().size(); 234 245 } 235 246 247 /** 248 * Gets the set of parent relations 249 * @return All parent relations of the references 250 */ 236 251 public Set<OsmPrimitive> getParentRelations() { 237 252 Set<OsmPrimitive> ret = new HashSet<>(); … … 242 257 } 243 258 259 /** 260 * Gets the number of elements {@link #getParentRelations()} would return. 261 * @return That number. 262 */ 244 263 public int getNumParentRelations() { 245 264 return getParentRelations().size(); -
trunk/src/org/openstreetmap/josm/gui/dialogs/LatLonDialog.java
r12285 r12301 34 34 import org.openstreetmap.josm.tools.WindowGeometry; 35 35 36 /** 37 * A dialog that lets the user add a node at the coordinates he enters. 38 */ 36 39 public class LatLonDialog extends ExtendedDialog { 37 40 private static final Color BG_COLOR_ERROR = new Color(255, 224, 224); 38 41 42 /** 43 * The tabs that define the coordinate mode. 44 */ 39 45 public JTabbedPane tabs; 40 46 private JosmTextField tfLatLon, tfEastNorth; … … 155 161 } 156 162 163 /** 164 * Creates a new {@link LatLonDialog} 165 * @param parent The parent 166 * @param title The title of this dialog 167 * @param help The help text to use 168 */ 157 169 public LatLonDialog(Component parent, String title, String help) { 158 170 super(parent, title, tr("Ok"), tr("Cancel")); … … 164 176 } 165 177 178 /** 179 * Check if lat/lon mode is active 180 * @return <code>true</code> iff the user selects lat/lon coordinates 181 */ 166 182 public boolean isLatLon() { 167 183 return tabs.getModel().getSelectedIndex() == 0; 168 184 } 169 185 186 /** 187 * Sets the coordinate fields to the given coordinates 188 * @param ll The lat/lon coordinates 189 */ 170 190 public void setCoordinates(LatLon ll) { 171 191 LatLon llc = Optional.ofNullable(ll).orElse(LatLon.ZERO); … … 180 200 } 181 201 202 /** 203 * Gets the coordinates that are entered by the user. 204 * @return The coordinates 205 */ 182 206 public LatLon getCoordinates() { 183 207 if (isLatLon()) { … … 189 213 } 190 214 215 /** 216 * Gets the coordinates that are entered in the lat/lon field 217 * @return The lat/lon coordinates 218 */ 191 219 public LatLon getLatLonCoordinates() { 192 220 return latLonCoordinates; 193 221 } 194 222 223 /** 224 * Gets the coordinates that are entered in the east/north field 225 * @return The east/north coordinates 226 */ 195 227 public EastNorth getEastNorthCoordinates() { 196 228 return eastNorthCoordinates; … … 320 352 } 321 353 354 /** 355 * Parses a east/north coordinate string 356 * @param s The coordinates 357 * @return The east/north coordinates or <code>null</code> on error. 358 */ 322 359 public static EastNorth parseEastNorth(String s) { 323 360 String[] en = s.split("[;, ]+"); … … 332 369 } 333 370 371 /** 372 * Gets the text entered in the lat/lon text field. 373 * @return The text the user entered 374 */ 334 375 public String getLatLonText() { 335 376 return tfLatLon.getText(); 336 377 } 337 378 379 /** 380 * Set the text in the lat/lon text field. 381 * @param text The new text 382 */ 338 383 public void setLatLonText(String text) { 339 384 tfLatLon.setText(text); 340 385 } 341 386 387 /** 388 * Gets the text entered in the east/north text field. 389 * @return The text the user entered 390 */ 342 391 public String getEastNorthText() { 343 392 return tfEastNorth.getText(); 344 393 } 345 394 395 /** 396 * Set the text in the east/north text field. 397 * @param text The new text 398 */ 346 399 public void setEastNorthText(String text) { 347 400 tfEastNorth.setText(text); -
trunk/src/org/openstreetmap/josm/gui/dialogs/LayerListPopup.java
r12279 r12301 32 32 public class LayerListPopup extends JPopupMenu { 33 33 34 /** 35 * An action that displays the layer information. 36 * @see Layer#getInfoComponent() 37 */ 34 38 public static final class InfoAction extends AbstractAction { 35 39 private final transient Layer layer; -
trunk/src/org/openstreetmap/josm/gui/dialogs/OsmIdSelectionDialog.java
r11747 r12301 52 52 protected final transient GroupLayout layout = new GroupLayout(panel); 53 53 54 /** 55 * Creates a new OsmIdSelectionDialog 56 * @param parent The parent element that will be used for position and maximum size 57 * @param title The text that will be shown in the window titlebar 58 * @param buttonTexts String Array of the text that will appear on the buttons. The first button is the default one. 59 */ 54 60 public OsmIdSelectionDialog(Component parent, String title, String... buttonTexts) { 55 61 super(parent, title, buttonTexts); 56 62 } 57 63 64 /** 65 * Creates a new OsmIdSelectionDialog 66 * @param parent The parent element that will be used for position and maximum size 67 * @param title The text that will be shown in the window titlebar 68 * @param buttonTexts String Array of the text that will appear on the buttons. The first button is the default one. 69 * @param modal Set it to {@code true} if you want the dialog to be modal 70 */ 58 71 public OsmIdSelectionDialog(Component parent, String title, String[] buttonTexts, boolean modal) { 59 72 super(parent, title, buttonTexts, modal); 60 73 } 61 74 75 /** 76 * Creates a new OsmIdSelectionDialog 77 * @param parent The parent element that will be used for position and maximum size 78 * @param title The text that will be shown in the window titlebar 79 * @param buttonTexts String Array of the text that will appear on the buttons. The first button is the default one. 80 * @param modal Set it to {@code true} if you want the dialog to be modal 81 * @param disposeOnClose whether to call {@link #dispose} when closing the dialog 82 */ 62 83 public OsmIdSelectionDialog(Component parent, String title, String[] buttonTexts, boolean modal, boolean disposeOnClose) { 63 84 super(parent, title, buttonTexts, modal, disposeOnClose); -
trunk/src/org/openstreetmap/josm/gui/dialogs/ValidatorDialog.java
r12282 r12301 529 529 } 530 530 531 /** 532 * A visitor that is used to compute the bounds of an error. 533 */ 531 534 public static class ValidatorBoundingXYVisitor extends BoundingXYVisitor implements ValidatorVisitor { 532 535 @Override … … 560 563 } 561 564 565 /** 566 * Called when the selection was changed to update the list of displayed errors 567 * @param newSelection The new selection 568 */ 562 569 public void updateSelection(Collection<? extends OsmPrimitive> newSelection) { 563 570 if (!Main.pref.getBoolean(ValidatorPreference.PREF_FILTER_BY_SELECTION, false))
Note:
See TracChangeset
for help on using the changeset viewer.