Changeset 12114 in josm
- Timestamp:
- 2017-05-11T01:43:38+02:00 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/layer/Layer.java
r12025 r12114 110 110 } 111 111 112 /** 113 * The visibility property for this layer. May be <code>true</code> (visible) or <code>false</code> (hidden). 114 */ 112 115 public static final String VISIBLE_PROP = Layer.class.getName() + ".visible"; 116 /** 117 * The opacity of this layer. A number between 0 and 1 118 */ 113 119 public static final String OPACITY_PROP = Layer.class.getName() + ".opacity"; 120 /** 121 * The name property of the layer. 122 * You can listen to name changes by listening to changes to this property. 123 */ 114 124 public static final String NAME_PROP = Layer.class.getName() + ".name"; 125 /** 126 * Property that defines the filter state. 127 * This is currently not used. 128 */ 115 129 public static final String FILTER_STATE_PROP = Layer.class.getName() + ".filterstate"; 116 130 … … 241 255 public abstract boolean isMergable(Layer other); 242 256 257 /** 258 * Visits the content bounds of this layer. The behavior of this method depends on the layer, 259 * but each implementation should attempt to cover the relevant content of the layer in this method. 260 * @param v The visitor that gets notified about the contents of this layer. 261 */ 243 262 public abstract void visitBoundingBox(BoundingXYVisitor v); 244 263 264 /** 265 * Gets the layer information to display to the user. 266 * This is used if the user requests information about this layer. 267 * It should display a description of the layer content. 268 * @return Either a String or a {@link Component} describing the layer. 269 */ 245 270 public abstract Object getInfoComponent(); 246 271 … … 281 306 } 282 307 308 /** 309 * Gets the associated file for this layer. 310 * @return The file or <code>null</code> if it is unset. 311 * @see #setAssociatedFile(File) 312 */ 283 313 public File getAssociatedFile() { 284 314 return associatedFile; 285 315 } 286 316 317 /** 318 * Sets the associated file for this layer. 319 * 320 * The associated file might be the one that the user opened. 321 * @param file The file, may be <code>null</code> 322 */ 287 323 public void setAssociatedFile(File file) { 288 324 associatedFile = file; … … 503 539 private final transient Layer layer; 504 540 541 /** 542 * Create a new action that saves the layer 543 * @param layer The layer to save. 544 */ 505 545 public LayerSaveAction(Layer layer) { 506 546 putValue(SMALL_ICON, ImageProvider.get("save")); … … 517 557 } 518 558 559 /** 560 * Action to save the layer in a new file 561 */ 519 562 public static class LayerSaveAsAction extends AbstractAction { 520 563 private final transient Layer layer; 521 564 565 /** 566 * Create a new save as action 567 * @param layer The layer that should be saved. 568 */ 522 569 public LayerSaveAsAction(Layer layer) { 523 570 putValue(SMALL_ICON, ImageProvider.get("save_as")); … … 534 581 } 535 582 583 /** 584 * Action that exports the layer as gpx file 585 */ 536 586 public static class LayerGpxExportAction extends AbstractAction { 537 587 private final transient Layer layer; 538 588 589 /** 590 * Create a new gpx export action for the given layer. 591 * @param layer The layer 592 */ 539 593 public LayerGpxExportAction(Layer layer) { 540 594 putValue(SMALL_ICON, ImageProvider.get("exportgpx"));
Note:
See TracChangeset
for help on using the changeset viewer.