Ignore:
Timestamp:
2005-10-27T00:38:03+02:00 (19 years ago)
Author:
imi
Message:
  • added commands to support undo later
  • added Edit-Layer concept
  • painting of deleted objects
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/org/openstreetmap/josm/gui/layer/Layer.java

    r22 r23  
    55import javax.swing.Icon;
    66
     7import org.openstreetmap.josm.data.Bounds;
     8import org.openstreetmap.josm.data.projection.Projection;
    79import org.openstreetmap.josm.gui.MapView;
    810
     
    3234         */
    3335        public final String name;
    34        
     36
    3537        /**
    3638         * Create the layer and fill in the necessary components.
     
    5254
    5355        /**
    54          * @return <code>true</code>, if the map data can be edited.
     56         * @return A small tooltip hint about some statistics for this layer.
    5557         */
    56         public boolean isEditable() {
    57                 return false;
    58         }
     58        abstract public String getToolTipText();
     59
     60        /**
     61         * Merges the given layer into this layer. Throws if the layer types are
     62         * incompatible.
     63         * @param from The layer that get merged into this one. After the merge,
     64         *              the other layer is not usable anymore and passing to one others
     65         *              mergeFrom should be one of the last things to do with a layer.
     66         */
     67        abstract public void mergeFrom(Layer from);
     68       
     69        /**
     70         * @param other The other layer that is tested to be mergable with this.
     71         * @return Whether the other layer can be merged into this layer.
     72         */
     73        abstract public boolean isMergable(Layer other);
     74       
     75        /**
     76         * @return The bounding rectangle this layer occupies on screen when looking
     77         *              at lat/lon values or <code>null</code>, if infinite area or unknown
     78         *              area is occupied.
     79         */
     80        abstract public Bounds getBoundsLatLon();
     81       
     82        /**
     83         * @return The bounding rectangle this layer occupies on screen when looking
     84         *              at x/y values or <code>null</code>, if infinite area or unknown
     85         *              area is occupied.
     86         */
     87        abstract public Bounds getBoundsXY();
     88
     89        /**
     90         * Initialize the internal dataset with the given projection.
     91         */
     92        abstract public void init(Projection projection);
    5993}
Note: See TracChangeset for help on using the changeset viewer.