Statistics
| Revision:

root / trunk / libraries / libFMap / src / com / iver / cit / gvsig / fmap / layers / FLyrVect.java @ 231

History | View | Annotate | Download (5.41 KB)

1
/* Generated by Together */
2

    
3
package com.iver.cit.gvsig.fmap.layers;
4

    
5
import java.awt.Graphics2D;
6
import java.awt.geom.Rectangle2D;
7
import java.awt.image.BufferedImage;
8
import java.util.BitSet;
9
import java.util.HashMap;
10

    
11
import com.iver.cit.gvsig.fmap.ViewPort;
12
import com.iver.cit.gvsig.fmap.XMLEntity;
13
import com.iver.cit.gvsig.fmap.core.FGeometry;
14
import com.iver.cit.gvsig.fmap.drivers.DriverIOException;
15
import com.iver.cit.gvsig.fmap.operations.QueriedPoint;
16
import com.iver.cit.gvsig.fmap.operations.strategies.FeatureVisitor;
17
import com.iver.cit.gvsig.fmap.operations.strategies.Strategy;
18
import com.iver.cit.gvsig.fmap.operations.strategies.StrategyManager;
19
import com.iver.cit.gvsig.fmap.rendering.Legend;
20
import com.iver.cit.gvsig.fmap.rendering.LegendFactory;
21

    
22
public class FLyrVect extends FLyrDefault implements LayerOperations, VectorialOperations, CommonOperations {
23
    /**
24
     * Colecci?n de leyendas de la capa vectorial. Contendr? tantos elementos como tipos de
25
     * features pueda tener la capa vectorial
26
     */
27
    private HashMap legends = new HashMap(1);
28

    
29
    public Legend getLegend(int shapeType) {
30
            Legend l = (Legend) legends.get(new Integer(shapeType));
31
            
32
            //Leyenda por defecto
33
            if (l == null){
34
                    l = LegendFactory.createUniqueSymbolLegend(LegendFactory.DEFAULT_LINE_SYMBOL);
35
                    legends.put(new Integer(shapeType), l);
36
            }
37
            
38
            return l;            
39
    }
40

    
41
    /**
42
     * Las propiedades que hay retornar son las relativas a la selecci?n, ponerle el legend como hijo
43
     */
44
    public XMLEntity getLayerProperties() {
45
            return new XMLEntity();
46
    }
47

    
48
    public void addVectorialListener(VectorialListener listener) {
49
    }
50

    
51
    public void removeVectorialListener(VectorialListener listener) {
52
    }
53

    
54
    /**
55
     * Cuando ocurre un evento de cambio en la selecci?n, ?ste puede ser uno de una gran cantidad de eventos. Con el fin de no propagar todos estos eventos, se realiza la propagaci?n de manera manual al final de la "r?faga" de eventos 
56
     */
57
    public void fireSelectionEvents() {
58
    }
59

    
60
    public VectorialAdapter getSource() {
61
            return source;
62
    }
63

    
64
    public void setSource(VectorialAdapter va) {
65
            source = va;
66
    }
67

    
68
    private BitSet selected ;
69

    
70
    /**
71
     * @supplierCardinality 0..* 
72
     */
73
    private VectorialListener[] listeners;
74

    
75
    /**
76
     * @clientCardinality 0..* 
77
     */
78
    private VectorialAdapter source;
79

    
80
        /**
81
         * @see com.iver.cit.gvsig.fmap.layers.LayerOperations#getFullExtent()
82
         */
83
        public Rectangle2D getFullExtent() throws DriverIOException {
84
                return source.getFullExtent();
85
        }
86

    
87
        /**
88
         * @see com.iver.cit.gvsig.fmap.layers.LayerOperations#draw(java.awt.image.BufferedImage, java.awt.Graphics2D, com.iver.cit.gvsig.fmap.ViewPort)
89
         */
90
        public void draw(BufferedImage image, Graphics2D g, ViewPort viewPort) throws DriverIOException {
91
                Strategy strategy = StrategyManager.getStrategy(this);
92

    
93
                strategy.draw(image, g, viewPort);
94
        }
95

    
96
        /**
97
         * @see com.iver.cit.gvsig.fmap.layers.VectorialOperations#createLabelLayer(int)
98
         */
99
        public FLyrVect createLabelLayer(int fieldId) {
100
                return null;
101
        }
102

    
103
        /**
104
         * @see com.iver.cit.gvsig.fmap.layers.VectorialOperations#removeLabels()
105
         */
106
        public void removeLabels() {
107
        }
108

    
109
        /**
110
         * @see com.iver.cit.gvsig.fmap.layers.VectorialOperations#createIndex()
111
         */
112
        public void createIndex() {
113
        }
114

    
115
        /**
116
         * @see com.iver.cit.gvsig.fmap.layers.VectorialOperations#process(com.iver.cit.gvsig.fmap.operations.strategies.FeatureVisitor, com.iver.cit.gvsig.fmap.operations.selection.VectorialSubSet)
117
         */
118
        public void process(FeatureVisitor visitor, BitSet subset) {
119
        }
120

    
121
        /**
122
         * @see com.iver.cit.gvsig.fmap.layers.CommonOperations#setSelection(com.iver.cit.gvsig.fmap.operations.selection.VectorialSubSet)
123
         */
124
        public void setSelection(BitSet selection) {
125
        }
126

    
127
        /**
128
         * @see com.iver.cit.gvsig.fmap.layers.CommonOperations#isSelected(int)
129
         */
130
        public boolean isSelected(int index) {
131
                return false;
132
        }
133

    
134
        /**
135
         * @see com.iver.cit.gvsig.fmap.layers.CommonOperations#clearSelection()
136
         */
137
        public void clearSelection() {
138
        }
139

    
140
        /**
141
         * @see com.iver.cit.gvsig.fmap.layers.CommonOperations#queryByPoint(com.iver.cit.gvsig.fmap.operations.QueriedPoint, double)
142
         */
143
        public BitSet queryByPoint(QueriedPoint p, double tolerance) {
144
                return null;
145
        }
146

    
147
        /**
148
         * @see com.iver.cit.gvsig.fmap.layers.CommonOperations#queryByRect(java.awt.geom.Rectangle2D)
149
         */
150
        public BitSet queryByRect(Rectangle2D rect) {
151
                return null;
152
        }
153

    
154
        /**
155
         * @see com.iver.cit.gvsig.fmap.layers.CommonOperations#queryByShape(com.iver.cit.gvsig.fmap.core.FGeometry, int)
156
         */
157
        public BitSet queryByShape(FGeometry g, int relationship) {
158
                return null;
159
        }
160

    
161
        /**
162
         * @see com.iver.cit.gvsig.fmap.layers.CommonOperations#selectByPoint(com.iver.cit.gvsig.fmap.operations.QueriedPoint, double)
163
         */
164
        public void selectByPoint(QueriedPoint p, double tolerance) {
165
        }
166

    
167
        /**
168
         * @see com.iver.cit.gvsig.fmap.layers.CommonOperations#selectByRect(java.awt.geom.Rectangle2D)
169
         */
170
        public void selectByRect(Rectangle2D rect) {
171
        }
172

    
173
        /**
174
         * @see com.iver.cit.gvsig.fmap.layers.CommonOperations#selectByShape(com.iver.cit.gvsig.fmap.core.FGeometry, int)
175
         */
176
        public void selectByShape(FGeometry g, int relationship) {
177
        }
178

    
179
        /**
180
         * @see com.iver.cit.gvsig.fmap.layers.CommonOperations#getRecordset()
181
         */
182
        public FRecordset getRecordset() {
183
                return null;
184
        }
185

    
186
        /**
187
         * @see com.iver.cit.gvsig.fmap.layers.CommonOperations#setLegend(int, com.iver.cit.gvsig.fmap.rendering.Legend)
188
         */
189
        public void setLegend(int shapeType, Legend r) {
190
        }
191
}