Statistics
| Revision:

svn-gvsig-desktop / trunk / org.gvsig.desktop / org.gvsig.desktop.compat.cdc / org.gvsig.fmap.mapcontext / org.gvsig.fmap.mapcontext.api / src / main / java / org / gvsig / fmap / mapcontext / rendering / symbols / IMultiLayerSymbol.java @ 41398

History | View | Annotate | Download (2.79 KB)

1
/**
2
 * gvSIG. Desktop Geographic Information System.
3
 *
4
 * Copyright (C) 2007-2013 gvSIG Association.
5
 *
6
 * This program is free software; you can redistribute it and/or
7
 * modify it under the terms of the GNU General Public License
8
 * as published by the Free Software Foundation; either version 3
9
 * of the License, or (at your option) any later version.
10
 *
11
 * This program is distributed in the hope that it will be useful,
12
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
 * GNU General Public License for more details.
15
 *
16
 * You should have received a copy of the GNU General Public License
17
 * along with this program; if not, write to the Free Software
18
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19
 * MA  02110-1301, USA.
20
 *
21
 * For any additional information, do not hesitate to contact us
22
 * at info AT gvsig.com, or visit our website www.gvsig.com.
23
 */
24
package org.gvsig.fmap.mapcontext.rendering.symbols;
25

    
26

    
27
/**
28
 * Allows to create multi layer symbols using the composition of
29
 * several symbols of the same type.Depending on the type of the symbols that are
30
 * used to compose the final symbol, the user will have MultiLayerMarkerSymbol,
31
 * MultiLayerLineSymbol,...
32
 *
33
 */
34

    
35
public interface IMultiLayerSymbol extends ISymbol {
36

    
37
        /**
38
         * Establishes a concret symbol for a layer
39
         *
40
         * @param index, index of the layer
41
         * @param layer, symbol to be "applied" to the layer
42
         * @throws IndexOutOfBoundsException
43
         */
44
        public abstract void setLayer(int index, ISymbol layer)
45
        throws IndexOutOfBoundsException;
46
        /**
47
         * Changes the position of two layers in a multilayersymbol
48
         * @param index1, index of the layer
49
         * @param index2, index of the layer
50
         */
51
        public abstract void swapLayers(int index1, int index2);
52
        /**
53
         * Obtains  the symbol that "contains" a layer whose index is the argument of the method.
54
         * @param layerIndex
55
         * @return
56
         */
57
        public abstract ISymbol getLayer(int layerIndex);
58
        /**
59
         * Returns the number of layers
60
         * @return int
61
         */
62
        public abstract int getLayerCount();
63

    
64
        /**
65
         * Stacks a new symbol to the symbol list. The symbol is appended to the
66
         * list and, in terms of use, it will be the last symbol to be processed.
67
         * @param ISymbol newLayer
68
         */
69
        public abstract void addLayer(ISymbol newLayer);
70
        /**
71
         * Stacks a new symbol to the symbol list. The symbol is appended to the
72
         * list in the specified position.
73
         * @param ISymbol newLayer
74
         */
75
        public abstract void addLayer(ISymbol newLayer, int layerIndex)
76
        throws IndexOutOfBoundsException;
77

    
78
        /**
79
         * TODO maybe push it up to ISymbol
80
         * @param layer
81
         * @return true if this symbol contains the removed one
82
         */
83
        public abstract boolean removeLayer(ISymbol layer);
84

    
85
}