Statistics
| Revision:

root / branches / v10 / libraries / libFMap / src / com / iver / cit / gvsig / fmap / layers / order / OrderManager.java @ 28454

History | View | Annotate | Download (2.2 KB)

1
package com.iver.cit.gvsig.fmap.layers.order;
2

    
3
import com.iver.cit.gvsig.fmap.layers.FLayer;
4
import com.iver.cit.gvsig.fmap.layers.FLayers;
5
import com.iver.utiles.IPersistance;
6
import com.iver.utiles.extensionPoints.IExtensionBuilder;
7

    
8
/**
9
 * <p>The classes implementing this interface will decide the right position
10
 * to add a new layer (FLayer) to a layer collection (FLayers) according with
11
 * its own criterion.</p>
12
 * <p>Some order managers may study the existing layers in the collection and
13
 * the new layer's type in order to apply its criterion.</p>
14
 * <p>For example, an OrderManager
15
 * may decide that VectorLayers should be placed over Raster Layers.
16
 * Another OrderManager may decide that a new layer is placed just
17
 * over the existing layers (this had always been the default gvSIG
18
 * behaviour).</p>
19
 * 
20
 * @author Cesar Martinez Izquierdo <cesar.martinez@iver.es>
21
 *
22
 */
23
public interface OrderManager extends IPersistance, Cloneable, IExtensionBuilder {
24

    
25
        /**
26
         * <p>Gets the proposed position for the newLayer in the target layer
27
         * collection. The OrderManager will study the arrangement of the
28
         * target layer collection and will decide the right position for
29
         * the new layer, according to its own criterion.</p>
30
         * 
31
         * @param target The target collection to which <code>newLayer</code>
32
         * will be added
33
         * @param newLayer The layer to be inserted in the layer collection
34
         * 
35
         * @return The proposed position for the new layer
36
         */
37
        public int getPosition(FLayers target, FLayer newLayer);
38

    
39
        /**
40
         * <p>Gets the name. The name should identify the
41
         * policy followed by this OrderManager to sort the layers.</p>
42
         * 
43
         * @return The name of the OrderManager
44
         */
45
        public String getName();
46

    
47
        /**
48
         * <p>Gets the description. The description should be enough to get
49
         * an idea of the policy and features of this OrderManager.</p>
50
         * 
51
         * @return The description of the OrderManager
52
         */
53
        public String getDescription();
54

    
55
        /**
56
         * <p>Gets the code used to register this OrderManager
57
         * in the ExtensionPoint.</p>
58
         * 
59
         * @return The code used to register this orderManager in the
60
         * ExtensionPoint. 
61
         */
62
        public String getCode();
63

    
64
        public Object clone();
65
}