Statistics
| Revision:

root / trunk / applications / appgvSIG / src / com / iver / cit / gvsig / AdvancedSymbologyExtension.java @ 12207

History | View | Annotate | Download (5.66 KB)

1
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana
2
 *
3
 * Copyright (C) 2005 IVER T.I. and Generalitat Valenciana.
4
 *
5
 * This program is free software; you can redistribute it and/or
6
 * modify it under the terms of the GNU General Public License
7
 * as published by the Free Software Foundation; either version 2
8
 * of the License, or (at your option) any later version.
9
 *
10
 * This program is distributed in the hope that it will be useful,
11
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13
 * GNU General Public License for more details.
14
 *
15
 * You should have received a copy of the GNU General Public License
16
 * along with this program; if not, write to the Free Software
17
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
18
 *
19
 * For more information, contact:
20
 *
21
 *  Generalitat Valenciana
22
 *   Conselleria d'Infraestructures i Transport
23
 *   Av. Blasco Ib??ez, 50
24
 *   46010 VALENCIA
25
 *   SPAIN
26
 *
27
 *      +34 963862235
28
 *   gvsig@gva.es
29
 *      www.gvsig.gva.es
30
 *
31
 *    or
32
 *
33
 *   IVER T.I. S.A
34
 *   Salamanca 50
35
 *   46005 Valencia
36
 *   Spain
37
 *
38
 *   +34 963163400
39
 *   dac@iver.es
40
 */
41

    
42
/* CVS MESSAGES:
43
*
44
* $Id: AdvancedSymbologyExtension.java 11747 2007-05-22 12:17:41Z jaume $
45
* $Log$
46
* Revision 1.6  2007-05-22 12:17:12  jaume
47
* *** empty log message ***
48
*
49
* Revision 1.5  2007/05/17 09:32:37  jaume
50
* *** empty log message ***
51
*
52
* Revision 1.4  2007/03/21 08:03:03  jaume
53
* refactored to use ISymbol instead of FSymbol
54
*
55
* Revision 1.3  2007/03/13 16:57:35  jaume
56
* Added MultiVariable legend
57
*
58
* Revision 1.2  2007/03/09 11:25:00  jaume
59
* Advanced symbology (start committing)
60
*
61
* Revision 1.1.2.4  2007/02/21 07:35:14  jaume
62
* *** empty log message ***
63
*
64
* Revision 1.1.2.3  2007/02/12 15:14:41  jaume
65
* refactored interval legend and added graduated symbol legend
66
*
67
* Revision 1.1.2.2  2007/02/01 17:47:12  jaume
68
* *** empty log message ***
69
*
70
* Revision 1.1.2.1  2007/02/01 12:12:41  jaume
71
* theme manager window and all its components are now dynamic
72
*
73
*
74
*/
75
package com.iver.cit.gvsig;
76

    
77
import com.iver.andami.PluginServices;
78
import com.iver.andami.plugins.Extension;
79
import com.iver.cit.gvsig.fmap.rendering.styling.AttrInTableLabeling;
80
import com.iver.cit.gvsig.fmap.rendering.styling.DefaultLabelingMethod;
81
import com.iver.cit.gvsig.fmap.rendering.styling.FeatureDependentLabeled;
82
import com.iver.cit.gvsig.fmap.rendering.styling.GeneralLabelingStrategy;
83
import com.iver.cit.gvsig.fmap.rendering.styling.OnSelectionLabeled;
84
import com.iver.cit.gvsig.project.documents.view.legend.gui.Categories;
85
import com.iver.cit.gvsig.project.documents.view.legend.gui.DotDensity;
86
import com.iver.cit.gvsig.project.documents.view.legend.gui.Features;
87
import com.iver.cit.gvsig.project.documents.view.legend.gui.FilePage;
88
import com.iver.cit.gvsig.project.documents.view.legend.gui.General;
89
import com.iver.cit.gvsig.project.documents.view.legend.gui.GraduatedSymbols;
90
import com.iver.cit.gvsig.project.documents.view.legend.gui.LabelingManager;
91
import com.iver.cit.gvsig.project.documents.view.legend.gui.LegendManager;
92
import com.iver.cit.gvsig.project.documents.view.legend.gui.MultipleAttributes;
93
import com.iver.cit.gvsig.project.documents.view.legend.gui.ProportionalSymbols;
94
import com.iver.cit.gvsig.project.documents.view.legend.gui.Quantities;
95
import com.iver.cit.gvsig.project.documents.view.legend.gui.QuantityByCategory;
96
import com.iver.cit.gvsig.project.documents.view.legend.gui.SingleSymbol;
97
import com.iver.cit.gvsig.project.documents.view.legend.gui.ThemeManagerWindow;
98
import com.iver.cit.gvsig.project.documents.view.legend.gui.VectorialInterval;
99
import com.iver.cit.gvsig.project.documents.view.legend.gui.VectorialUniqueValue;
100
/**
101
 * Extension for enable the symbology. It only installs the core symbology.
102
 * @author jaume dominguez faus - jaume.dominguez@iver.es
103
 *
104
 */
105
public class AdvancedSymbologyExtension extends Extension {
106

    
107
        public void initialize() {
108
                // Install required features
109

    
110
                // pages
111
                ThemeManagerWindow.addPage(General.class);
112
                ThemeManagerWindow.addPage(LegendManager.class);
113
                ThemeManagerWindow.addPage(LabelingManager.class);
114
                ThemeManagerWindow.addPage(FilePage.class);
115

    
116

    
117
                // labling strategies
118
                LabelingManager.addLabelingStrategy(
119
                                PluginServices.getText(this, "user_defined_labels"),
120
                                GeneralLabelingStrategy.class);
121
                LabelingManager.addLabelingStrategy(
122
                                PluginServices.getText(this, "label_attributes_defined_in_table"),
123
                                AttrInTableLabeling.class);
124

    
125

    
126
                // labeling methods in the labeling page
127
                LabelingManager.addLabelingMethod(
128
                                PluginServices.getText(this, "label_features_in_the_same_way")+".",
129
                                DefaultLabelingMethod.class);
130
                LabelingManager.addLabelingMethod(
131
                                PluginServices.getText(this, "define_classes_of_features_and_label_each_differently")+".",
132
                                FeatureDependentLabeled.class);
133
                LabelingManager.addLabelingMethod(
134
                                PluginServices.getText(this, "label_only_when_selected")+".",
135
                                OnSelectionLabeled.class);
136

    
137

    
138
                // legends available in the legend page
139
                LegendManager.addLegendPage(Quantities.class);
140
                LegendManager.addLegendPage(Features.class);
141
                LegendManager.addLegendPage(Categories.class);
142
                LegendManager.addLegendPage(MultipleAttributes.class);
143

    
144
                LegendManager.addLegendPage(SingleSymbol.class);
145
                LegendManager.addLegendPage(DotDensity.class);
146
                LegendManager.addLegendPage(GraduatedSymbols.class);
147
                LegendManager.addLegendPage(VectorialInterval.class);
148
                LegendManager.addLegendPage(VectorialUniqueValue.class);
149
                LegendManager.addLegendPage(QuantityByCategory.class);
150
                LegendManager.addLegendPage(ProportionalSymbols.class);
151

    
152
        }
153

    
154
        public void execute(String actionCommand) {
155

    
156
        }
157

    
158
        public boolean isEnabled() {
159
                return true; // or whatever
160
        }
161

    
162
        public boolean isVisible() {
163
                return true; // or whatever
164
        }
165

    
166
}