Statistics
| Revision:

svn-gvsig-desktop / trunk / libraries / libFMap / src / com / iver / cit / gvsig / fmap / layers / FLyrVect.java @ 244

History | View | Annotate | Download (5.49 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.Cancellable;
16
import com.iver.cit.gvsig.fmap.operations.QueriedPoint;
17
import com.iver.cit.gvsig.fmap.operations.strategies.FeatureVisitor;
18
import com.iver.cit.gvsig.fmap.operations.strategies.Strategy;
19
import com.iver.cit.gvsig.fmap.operations.strategies.StrategyManager;
20
import com.iver.cit.gvsig.fmap.rendering.Legend;
21
import com.iver.cit.gvsig.fmap.rendering.LegendFactory;
22

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

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

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

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

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

    
55
    /**
56
     * 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 
57
     */
58
    public void fireSelectionEvents() {
59
    }
60

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

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

    
69
    private BitSet selected ;
70

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

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

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

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

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

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

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

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

    
116
        /**
117
         * @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)
118
         */
119
        public void process(FeatureVisitor visitor, BitSet subset) {
120
        }
121

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

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

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

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

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

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

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

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

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

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

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