root / branches / v2_0_0_prep / libraries / libFMap_mapcontext / src / org / gvsig / fmap / mapcontext / MapContextManager.java @ 30011
History | View | Annotate | Download (5.83 KB)
1 |
/* gvSIG. Geographic Information System of the Valencian Government
|
---|---|
2 |
*
|
3 |
* Copyright (C) 2007-2008 Infrastructures and Transports Department
|
4 |
* of the Valencian Gobernment (CIT)
|
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 2
|
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 |
*/
|
22 |
|
23 |
/*
|
24 |
* AUTHORS (In addition to CIT):
|
25 |
* 2009 {DiSiD Technologies} {Create Manager to register MapContextDrawer implementation}
|
26 |
*/
|
27 |
package org.gvsig.fmap.mapcontext; |
28 |
|
29 |
import java.awt.Color; |
30 |
import java.awt.Font; |
31 |
|
32 |
import org.gvsig.fmap.mapcontext.layers.vectorial.GraphicLayer; |
33 |
import org.gvsig.fmap.mapcontext.rendering.legend.ILegend; |
34 |
import org.gvsig.fmap.mapcontext.rendering.legend.IVectorLegend; |
35 |
import org.gvsig.fmap.mapcontext.rendering.legend.driver.ILegendReader; |
36 |
import org.gvsig.fmap.mapcontext.rendering.legend.driver.ILegendWriter; |
37 |
import org.gvsig.fmap.mapcontext.rendering.symbols.IMultiLayerSymbol; |
38 |
import org.gvsig.fmap.mapcontext.rendering.symbols.ISymbol; |
39 |
import org.gvsig.fmap.mapcontext.rendering.symbols.IWarningSymbol; |
40 |
|
41 |
/**
|
42 |
* Manager of the MapContext library.
|
43 |
*
|
44 |
* Holds the default implementation of the {@link MapContextDrawer}.
|
45 |
*
|
46 |
* @author <a href="mailto:cordinyana@gvsig.org">C?sar Ordi?ana</a>
|
47 |
*/
|
48 |
public interface MapContextManager { |
49 |
|
50 |
int getDefaultCartographicSupportMeasureUnit();
|
51 |
|
52 |
void setDefaultCartographicSupportMeasureUnit(
|
53 |
int defaultCartographicSupportMeasureUnit);
|
54 |
|
55 |
int getDefaultCartographicSupportReferenceSystem();
|
56 |
|
57 |
void setDefaultCartographicSupportReferenceSystem(
|
58 |
int defaultCartographicSupportReferenceSystem);
|
59 |
|
60 |
Color getDefaultSymbolColor();
|
61 |
|
62 |
void setDefaultSymbolColor(Color defaultSymbolColor); |
63 |
|
64 |
void resetDefaultSymbolColor();
|
65 |
|
66 |
Color getDefaultSymbolFillColor();
|
67 |
|
68 |
void setDefaultSymbolFillColor(Color defaultSymbolFillColor); |
69 |
|
70 |
void resetDefaultSymbolFillColor();
|
71 |
|
72 |
boolean isDefaultSymbolFillColorAleatory();
|
73 |
|
74 |
void setDefaultSymbolFillColorAleatory(
|
75 |
boolean defaultSymbolFillColorAleatory);
|
76 |
|
77 |
void resetDefaultSymbolFillColorAleatory();
|
78 |
|
79 |
Font getDefaultSymbolFont();
|
80 |
|
81 |
void setDefaultSymbolFont(Font defaultSymbolFont); |
82 |
|
83 |
void resetDefaultSymbolFont();
|
84 |
|
85 |
String getSymbolLibraryPath();
|
86 |
|
87 |
void setSymbolLibraryPath(String symbolLibraryPath); |
88 |
|
89 |
void resetSymbolLibraryPath();
|
90 |
|
91 |
/**
|
92 |
* Sets the class to use as the default implementation for the
|
93 |
* {@link MapContextDrawer}.
|
94 |
*
|
95 |
* @param drawerClazz
|
96 |
* the {@link MapContextDrawer} class to use
|
97 |
* @throws MapContextException
|
98 |
* if there is any error setting the class
|
99 |
*/
|
100 |
void setDefaultMapContextDrawer(Class drawerClazz) |
101 |
throws MapContextException;
|
102 |
|
103 |
void validateMapContextDrawer(Class drawerClazz) throws MapContextException; |
104 |
|
105 |
/**
|
106 |
* Creates a new instance of the default {@link MapContextDrawer}
|
107 |
* implementation.
|
108 |
*
|
109 |
* @return the new {@link MapContextDrawer} instance
|
110 |
* @throws MapContextException
|
111 |
* if there is an error creating the new object instance
|
112 |
*/
|
113 |
MapContextDrawer createDefaultMapContextDrawerInstance() |
114 |
throws MapContextException;
|
115 |
|
116 |
/**
|
117 |
* Creates a new instance of the provided {@link MapContextDrawer}
|
118 |
* implementation.
|
119 |
*
|
120 |
* @param drawerClazz
|
121 |
* the {@link MapContextDrawer} implementation class
|
122 |
* @return the new {@link MapContextDrawer} instance
|
123 |
* @throws MapContextException
|
124 |
* if there is an error creating the new object instance
|
125 |
*/
|
126 |
MapContextDrawer createMapContextDrawerInstance(Class drawerClazz)
|
127 |
throws MapContextException;
|
128 |
|
129 |
GraphicLayer createGraphicsLayer(); |
130 |
|
131 |
void registerLegend(String legendName, Class legendClass) |
132 |
throws MapContextRuntimeException;
|
133 |
|
134 |
ILegend createLegend(String legendName) throws MapContextRuntimeException; |
135 |
|
136 |
void setDefaultVectorLegend(String legendName); |
137 |
|
138 |
IVectorLegend createDefaultVectorLegend(int shapeType)
|
139 |
throws MapContextRuntimeException;
|
140 |
|
141 |
void registerLegendWriter(String legendName, String format, |
142 |
Class writerClass) throws MapContextRuntimeException; |
143 |
|
144 |
void registerLegendReader(String format, Class readerClass) |
145 |
throws MapContextRuntimeException;
|
146 |
|
147 |
ILegendWriter createLegendWriter(String legendName, String format) |
148 |
throws MapContextException;
|
149 |
|
150 |
ILegendReader createLegendReader(String format)
|
151 |
throws MapContextRuntimeException;
|
152 |
|
153 |
ISymbol createSymbol(String symbolName) throws MapContextRuntimeException; |
154 |
|
155 |
ISymbol createSymbol(int shapeType) throws MapContextRuntimeException; |
156 |
|
157 |
ISymbol createSymbol(String symbolName, Color color) |
158 |
throws MapContextRuntimeException;
|
159 |
|
160 |
ISymbol createSymbol(int shapeType, Color color) |
161 |
throws MapContextRuntimeException;
|
162 |
|
163 |
IMultiLayerSymbol createMultiLayerSymbol(String symbolName)
|
164 |
throws MapContextRuntimeException;
|
165 |
|
166 |
IMultiLayerSymbol createMultiLayerSymbol(int shapeType)
|
167 |
throws MapContextRuntimeException;
|
168 |
|
169 |
void registerSymbol(String symbolName, Class symbolClass) |
170 |
throws MapContextRuntimeException;
|
171 |
|
172 |
void registerSymbol(String symbolName, int[] shapeTypes, Class symbolClass) |
173 |
throws MapContextException;
|
174 |
|
175 |
void registerMultiLayerSymbol(String symbolName, Class symbolClass) |
176 |
throws MapContextRuntimeException;
|
177 |
|
178 |
void registerMultiLayerSymbol(String symbolName, int[] shapeTypes, |
179 |
Class symbolClass) throws MapContextRuntimeException; |
180 |
|
181 |
IWarningSymbol getWarningSymbol(String message, String symbolDesc, |
182 |
int symbolDrawExceptionType) throws MapContextRuntimeException; |
183 |
} |