Revision 28434
branches/v2_0_0_prep/extensions/extCatalog/src/org/gvsig/catalog/gui/SearchDialog.java | ||
---|---|---|
43 | 43 |
import java.awt.Frame; |
44 | 44 |
import java.awt.geom.Rectangle2D; |
45 | 45 |
|
46 |
import javax.swing.Icon; |
|
47 |
import javax.swing.ImageIcon; |
|
46 | 48 |
import javax.swing.JDialog; |
47 | 49 |
|
48 | 50 |
import org.gvsig.catalog.CatalogClient; |
... | ... | |
121 | 123 |
if (isMinimized){ |
122 | 124 |
frame.setSize(frame.getWidth(),495); |
123 | 125 |
getLowerPanel().setVisible(true); |
124 |
getUpperPanel().setUpIcon();
|
|
126 |
getUpperPanel().setIcon(getUpIcon());
|
|
125 | 127 |
}else{ |
126 | 128 |
frame.setSize(frame.getWidth(),165); |
127 | 129 |
getLowerPanel().setVisible(false); |
128 |
getUpperPanel().setDownIcon();
|
|
130 |
getUpperPanel().setIcon(getDownIcon());
|
|
129 | 131 |
} |
130 | 132 |
isMinimized = !isMinimized; |
131 | 133 |
} |
134 |
|
|
135 |
/* |
|
136 |
* (non-Javadoc) |
|
137 |
* @see org.gvsig.catalog.ui.search.SearchDialogPanel#getUpIcon() |
|
138 |
*/ |
|
139 |
protected Icon getUpIcon(){ |
|
140 |
return PluginServices.getIconTheme().get("catalog-up"); |
|
141 |
} |
|
142 |
|
|
143 |
/* |
|
144 |
* (non-Javadoc) |
|
145 |
* @see org.gvsig.catalog.ui.search.SearchDialogPanel#getDownIcon() |
|
146 |
*/ |
|
147 |
protected Icon getDownIcon(){ |
|
148 |
return PluginServices.getIconTheme().get("catalog-down"); |
|
149 |
} |
|
150 |
|
|
132 | 151 |
/** |
133 | 152 |
* Return button action |
134 | 153 |
*/ |
branches/v2_0_0_prep/extensions/extCatalog/src/org/gvsig/catalog/gui/ConnectDialog.java | ||
---|---|---|
42 | 42 |
|
43 | 43 |
import java.awt.Frame; |
44 | 44 |
|
45 |
import javax.swing.Icon; |
|
45 | 46 |
import javax.swing.JDialog; |
46 | 47 |
|
47 | 48 |
import org.gvsig.catalog.drivers.ICatalogServiceDriver; |
... | ... | |
166 | 167 |
public Object getWindowProfile(){ |
167 | 168 |
return WindowInfo.DIALOG_PROFILE; |
168 | 169 |
} |
170 |
|
|
171 |
/* (non-Javadoc) |
|
172 |
* @see org.gvsig.catalog.ui.serverconnect.ServerConnectDialogPanel#getPropertiesIcon() |
|
173 |
*/ |
|
174 |
protected Icon getPropertiesIcon() { |
|
175 |
return PluginServices.getIconTheme().get("catalog-properties"); |
|
176 |
} |
|
169 | 177 |
} |
branches/v2_0_0_prep/extensions/extCatalog/src/org/gvsig/catalog/CatalogClientExtension.java | ||
---|---|---|
75 | 75 |
private static final Logger logger = LoggerFactory.getLogger(CatalogClientExtension.class); |
76 | 76 |
public static final String CATALOGLAYERS = "CatalogLayers"; |
77 | 77 |
private CatalogLibrary catalogLibrary = null; |
78 |
|
|
78 |
|
|
79 | 79 |
/* (non-Javadoc) |
80 |
* @see com.iver.andami.plugins.Extension#inicializar()
|
|
81 |
*/
|
|
82 |
public void initialize() {
|
|
83 |
catalogLibrary = new CatalogDataStoreLibrary();
|
|
84 |
catalogLibrary.initialize();
|
|
85 |
|
|
86 |
ExtensionPointManager extensionPointManager = ToolsLocator
|
|
80 |
* @see com.iver.andami.plugins.Extension#inicializar()
|
|
81 |
*/
|
|
82 |
public void initialize() {
|
|
83 |
catalogLibrary = new CatalogDataStoreLibrary();
|
|
84 |
catalogLibrary.initialize();
|
|
85 |
|
|
86 |
ExtensionPointManager extensionPointManager = ToolsLocator
|
|
87 | 87 |
.getExtensionPointManager(); |
88 | 88 |
extensionPointManager.add(CATALOGLAYERS, "List of possible layers that can be loaded from a catalog"); |
89 |
registerIcons();
|
|
90 |
}
|
|
91 |
|
|
92 |
private void registerIcons(){
|
|
93 |
PluginServices.getIconTheme().registerDefault(
|
|
89 |
registerIcons();
|
|
90 |
}
|
|
91 |
|
|
92 |
private void registerIcons(){
|
|
93 |
PluginServices.getIconTheme().registerDefault(
|
|
94 | 94 |
"catalog-search", |
95 | 95 |
this.getClass().getClassLoader().getResource("images/SearchButton.png") |
96 |
); |
|
97 |
} |
|
98 |
|
|
99 |
/* |
|
100 |
* (non-Javadoc) |
|
101 |
* @see com.iver.andami.plugins.Extension#postInitialize() |
|
102 |
*/ |
|
103 |
public void postInitialize(){ |
|
104 |
catalogLibrary.postInitialize(); |
|
105 |
|
|
106 |
//Initialazing the layer loaders |
|
107 |
CatalogManager catalogManager = CatalogLocator.getCatalogManager(); |
|
108 |
catalogManager.addLayerLoader(Resource.WMS, WMSLayerLoader.class); |
|
109 |
catalogManager.addLayerLoader(Resource.POSTGIS, PostgisLayerLoader.class); |
|
110 |
catalogManager.addLayerLoader(Resource.WCS, WCSLayerLoader.class); |
|
111 |
catalogManager.addLayerLoader(Resource.WEBSITE, LinkLoader.class); |
|
112 |
catalogManager.addLayerLoader(Resource.DOWNLOAD, LinkLoader.class); |
|
113 |
catalogManager.addLayerLoader(Resource.WFS, WFSLayerLoader.class); |
|
114 |
catalogManager.addLayerLoader(Resource.ARCIMS_IMAGE, ARCIMSLayerLoader.class); |
|
115 |
catalogManager.addLayerLoader(Resource.ARCIMS_VECTORIAL, ARCIMSLayerLoader.class); |
|
116 |
} |
|
96 |
); |
|
97 |
PluginServices.getIconTheme().registerDefault( |
|
98 |
"catalog-up", |
|
99 |
this.getClass().getClassLoader().getResource("images/up.png") |
|
100 |
); |
|
101 |
PluginServices.getIconTheme().registerDefault( |
|
102 |
"catalog-down", |
|
103 |
this.getClass().getClassLoader().getResource("images/down.png") |
|
104 |
); |
|
105 |
PluginServices.getIconTheme().registerDefault( |
|
106 |
"catalog-record", |
|
107 |
this.getClass().getClassLoader().getResource("images/IcoRecord.png") |
|
108 |
); |
|
109 |
PluginServices.getIconTheme().registerDefault( |
|
110 |
"catalog-no-image", |
|
111 |
this.getClass().getClassLoader().getResource("images/no_image.png") |
|
112 |
); |
|
113 |
PluginServices.getIconTheme().registerDefault( |
|
114 |
"catalog-properties", |
|
115 |
this.getClass().getClassLoader().getResource("images/serverProperties.png") |
|
116 |
); |
|
117 |
} |
|
117 | 118 |
|
118 |
/* (non-Javadoc)
|
|
119 |
* @see com.iver.andami.plugins.Extension#execute(java.lang.String)
|
|
120 |
*/
|
|
121 |
public void execute(String actionCommand) {
|
|
122 |
actionConnectDialogStart();
|
|
123 |
}
|
|
119 |
/*
|
|
120 |
* (non-Javadoc)
|
|
121 |
* @see com.iver.andami.plugins.Extension#postInitialize()
|
|
122 |
*/
|
|
123 |
public void postInitialize(){
|
|
124 |
catalogLibrary.postInitialize();
|
|
124 | 125 |
|
125 |
/** |
|
126 |
* DOCUMENT ME! |
|
127 |
*/ |
|
128 |
private void actionConnectDialogStart() { |
|
129 |
System.out.println("Bot?n Cliente de metadatos pulsado"); |
|
130 |
restoreServerList(); |
|
126 |
//Initialazing the layer loaders |
|
127 |
CatalogManager catalogManager = CatalogLocator.getCatalogManager(); |
|
128 |
catalogManager.addLayerLoader(Resource.WMS, WMSLayerLoader.class); |
|
129 |
catalogManager.addLayerLoader(Resource.POSTGIS, PostgisLayerLoader.class); |
|
130 |
catalogManager.addLayerLoader(Resource.WCS, WCSLayerLoader.class); |
|
131 |
catalogManager.addLayerLoader(Resource.WEBSITE, LinkLoader.class); |
|
132 |
catalogManager.addLayerLoader(Resource.DOWNLOAD, LinkLoader.class); |
|
133 |
catalogManager.addLayerLoader(Resource.WFS, WFSLayerLoader.class); |
|
134 |
catalogManager.addLayerLoader(Resource.ARCIMS_IMAGE, ARCIMSLayerLoader.class); |
|
135 |
catalogManager.addLayerLoader(Resource.ARCIMS_VECTORIAL, ARCIMSLayerLoader.class); |
|
136 |
} |
|
131 | 137 |
|
132 |
ConnectDialog connectDialog = new ConnectDialog(); |
|
133 |
PluginServices.getMDIManager().addWindow(connectDialog); |
|
134 |
} |
|
138 |
/* (non-Javadoc) |
|
139 |
* @see com.iver.andami.plugins.Extension#execute(java.lang.String) |
|
140 |
*/ |
|
141 |
public void execute(String actionCommand) { |
|
142 |
actionConnectDialogStart(); |
|
143 |
} |
|
135 | 144 |
|
136 |
/** |
|
137 |
* It restores a server list. If this list does't exist it create a server |
|
138 |
* list by default. |
|
139 |
*/ |
|
140 |
private void restoreServerList() { |
|
141 |
ServerDataPersistence persistence = new ServerDataPersistence(this,ServerData.SERVER_TYPE_CATALOG); |
|
142 |
|
|
143 |
ServerData[] servers = persistence.getArrayOfServerData(); |
|
144 |
|
|
145 |
boolean found = false; |
|
146 |
for (int i=0 ; i<servers.length ; i++){ |
|
147 |
if (servers[i].getServiceType().equals(ServerData.SERVER_TYPE_CATALOG)){ |
|
148 |
found = true; |
|
149 |
} |
|
150 |
} |
|
151 |
|
|
152 |
if (!found){ |
|
153 |
if (servers.length == 0){ |
|
154 |
servers = getDefaultServers(); |
|
155 |
}else{ |
|
156 |
ServerData[] newServers = new ServerData[servers.length + getDefaultServers().length ]; |
|
157 |
System.arraycopy(servers, 0, newServers, 0, servers.length); |
|
158 |
System.arraycopy(getDefaultServers(), 0, newServers, servers.length, getDefaultServers().length); |
|
159 |
servers = newServers; |
|
160 |
} |
|
161 |
persistence.setArrayOfServerData(servers); |
|
162 |
} |
|
163 |
|
|
164 |
|
|
165 |
for (int i = 0; i < servers.length; i++) { |
|
166 |
if (servers[i].getServiceType().equals(ServerData.SERVER_TYPE_CATALOG)){ |
|
167 |
ConnectDialog.addServer(servers[i]); |
|
168 |
} |
|
169 |
} |
|
170 |
|
|
171 |
|
|
172 |
} |
|
145 |
/** |
|
146 |
* DOCUMENT ME! |
|
147 |
*/ |
|
148 |
private void actionConnectDialogStart() { |
|
149 |
System.out.println("Bot?n Cliente de metadatos pulsado"); |
|
150 |
restoreServerList(); |
|
173 | 151 |
|
174 |
/** |
|
175 |
* It creates a server list by default |
|
176 |
* |
|
177 |
* @return |
|
178 |
*/ |
|
179 |
private ServerData[] getDefaultServers() { |
|
180 |
ServerData[] servers = new ServerData[4]; |
|
181 |
Calendar cal = new GregorianCalendar(); |
|
182 |
Date date = cal.getTime(); |
|
152 |
ConnectDialog connectDialog = new ConnectDialog(); |
|
153 |
PluginServices.getMDIManager().addWindow(connectDialog); |
|
154 |
} |
|
183 | 155 |
|
184 |
|
|
185 |
servers[0] = new ServerData("http://delta.icc.es/indicio/csw", date, date, ServerData.SERVER_TYPE_CATALOG, ServerData.SERVER_SUBTYPE_CATALOG_CSW); |
|
186 |
servers[1] = new ServerData("mapas.euitto.upm.es:2100", date, date, ServerData.SERVER_TYPE_CATALOG, ServerData.SERVER_SUBTYPE_CATALOG_Z3950); |
|
187 |
servers[2] = new ServerData("193.43.36.137:2100", date, date, ServerData.SERVER_TYPE_CATALOG, ServerData.SERVER_SUBTYPE_CATALOG_Z3950); |
|
188 |
servers[3] = new ServerData("http://idee.unizar.es/SRW/servlet/search/ExplainSOAP",date,date,ServerData.SERVER_TYPE_CATALOG,ServerData.SERVER_SUBTYPE_CATALOG_SRW); |
|
189 |
return servers; |
|
190 |
} |
|
156 |
/** |
|
157 |
* It restores a server list. If this list does't exist it create a server |
|
158 |
* list by default. |
|
159 |
*/ |
|
160 |
private void restoreServerList() { |
|
161 |
ServerDataPersistence persistence = new ServerDataPersistence(this,ServerData.SERVER_TYPE_CATALOG); |
|
191 | 162 |
|
192 |
/* (non-Javadoc) |
|
193 |
* @see com.iver.andami.plugins.Extension#isEnabled() |
|
194 |
*/ |
|
195 |
public boolean isEnabled() { |
|
196 |
return true; |
|
197 |
} |
|
163 |
ServerData[] servers = persistence.getArrayOfServerData(); |
|
198 | 164 |
|
199 |
/* (non-Javadoc)
|
|
200 |
* @see com.iver.andami.plugins.Extension#isVisible()
|
|
201 |
*/
|
|
202 |
public boolean isVisible() {
|
|
203 |
com.iver.andami.ui.mdiManager.IWindow f = PluginServices.getMDIManager()
|
|
204 |
.getActiveWindow();
|
|
165 |
boolean found = false;
|
|
166 |
for (int i=0 ; i<servers.length ; i++){
|
|
167 |
if (servers[i].getServiceType().equals(ServerData.SERVER_TYPE_CATALOG)){
|
|
168 |
found = true;
|
|
169 |
}
|
|
170 |
}
|
|
205 | 171 |
|
206 |
if (f == null) { |
|
207 |
return false; |
|
208 |
} |
|
172 |
if (!found){ |
|
173 |
if (servers.length == 0){ |
|
174 |
servers = getDefaultServers(); |
|
175 |
}else{ |
|
176 |
ServerData[] newServers = new ServerData[servers.length + getDefaultServers().length ]; |
|
177 |
System.arraycopy(servers, 0, newServers, 0, servers.length); |
|
178 |
System.arraycopy(getDefaultServers(), 0, newServers, servers.length, getDefaultServers().length); |
|
179 |
servers = newServers; |
|
180 |
} |
|
181 |
persistence.setArrayOfServerData(servers); |
|
182 |
} |
|
209 | 183 |
|
210 |
return (f instanceof BaseView); |
|
211 |
} |
|
184 |
|
|
185 |
for (int i = 0; i < servers.length; i++) { |
|
186 |
if (servers[i].getServiceType().equals(ServerData.SERVER_TYPE_CATALOG)){ |
|
187 |
ConnectDialog.addServer(servers[i]); |
|
188 |
} |
|
189 |
} |
|
190 |
|
|
191 |
|
|
192 |
} |
|
193 |
|
|
194 |
/** |
|
195 |
* It creates a server list by default |
|
196 |
* |
|
197 |
* @return |
|
198 |
*/ |
|
199 |
private ServerData[] getDefaultServers() { |
|
200 |
ServerData[] servers = new ServerData[4]; |
|
201 |
Calendar cal = new GregorianCalendar(); |
|
202 |
Date date = cal.getTime(); |
|
203 |
|
|
204 |
|
|
205 |
servers[0] = new ServerData("http://delta.icc.es/indicio/csw", date, date, ServerData.SERVER_TYPE_CATALOG, ServerData.SERVER_SUBTYPE_CATALOG_CSW); |
|
206 |
servers[1] = new ServerData("mapas.euitto.upm.es:2100", date, date, ServerData.SERVER_TYPE_CATALOG, ServerData.SERVER_SUBTYPE_CATALOG_Z3950); |
|
207 |
servers[2] = new ServerData("193.43.36.137:2100", date, date, ServerData.SERVER_TYPE_CATALOG, ServerData.SERVER_SUBTYPE_CATALOG_Z3950); |
|
208 |
servers[3] = new ServerData("http://idee.unizar.es/SRW/servlet/search/ExplainSOAP",date,date,ServerData.SERVER_TYPE_CATALOG,ServerData.SERVER_SUBTYPE_CATALOG_SRW); |
|
209 |
return servers; |
|
210 |
} |
|
211 |
|
|
212 |
/* (non-Javadoc) |
|
213 |
* @see com.iver.andami.plugins.Extension#isEnabled() |
|
214 |
*/ |
|
215 |
public boolean isEnabled() { |
|
216 |
return true; |
|
217 |
} |
|
218 |
|
|
219 |
/* (non-Javadoc) |
|
220 |
* @see com.iver.andami.plugins.Extension#isVisible() |
|
221 |
*/ |
|
222 |
public boolean isVisible() { |
|
223 |
com.iver.andami.ui.mdiManager.IWindow f = PluginServices.getMDIManager() |
|
224 |
.getActiveWindow(); |
|
225 |
|
|
226 |
if (f == null) { |
|
227 |
return false; |
|
228 |
} |
|
229 |
|
|
230 |
return (f instanceof BaseView); |
|
231 |
} |
|
212 | 232 |
} |
branches/v2_0_0_prep/extensions/extCatalog/distribution/distribution.xml | ||
---|---|---|
14 | 14 |
</fileSet> |
15 | 15 |
<fileSet> |
16 | 16 |
<directory>images</directory> |
17 |
<outputDirectory>/${extension-distribution}/images</outputDirectory>
|
|
17 |
<outputDirectory>${extension-distribution}/images</outputDirectory> |
|
18 | 18 |
</fileSet> |
19 | 19 |
</fileSets> |
20 | 20 |
<files> |
branches/v2_0_0_prep/extensions/extGazetteer/distribution/distribution.xml | ||
---|---|---|
26 | 26 |
<outputDirectory>${extension-distribution}/${library-dir} |
27 | 27 |
</outputDirectory> |
28 | 28 |
<includes> |
29 |
<include>org.gvsig:org.gvsig.catalog</include> |
|
30 | 29 |
<include>org.gvsig:org.gvsig.gazetteer</include> |
31 | 30 |
<include>org.gvsig:org.gvsig.gazetteer.extension</include> |
32 |
<include>org.gvsig:org.gvsig.remoteClient</include> |
|
33 |
<include>org.gvsig.legacy:amic-util</include> |
|
34 |
<include>commons-beanutils:commons-beanutils</include> |
|
35 |
<include>org.gvsig.legacy:commons-codec</include> |
|
36 |
<include>commons-httpclient:commons-httpclient</include> |
|
37 |
<include>commons-logging:commons-logging</include> |
|
38 |
<include>org.dspace:cql-java</include> |
|
39 |
<include>jdom:jdom</include> |
|
40 |
<include>org.gvsig.legacy:ostermillerutils</include> |
|
41 |
<include>soap:soap</include> |
|
42 |
<include>org.geonames:geonames</include> |
|
31 |
<include>org.geonames:geonames:jar:java5</include> |
|
43 | 32 |
</includes> |
44 | 33 |
</dependencySet> |
45 | 34 |
</dependencySets> |
branches/v2_0_0_prep/extensions/extGazetteer/config/config.xml | ||
---|---|---|
1 | 1 |
<?xml version="1.0" encoding="ISO-8859-1"?> |
2 | 2 |
<plugin-config> |
3 | 3 |
<depends plugin-name="com.iver.cit.gvsig"/> |
4 |
<depends plugin-name="org.gvsig.catalog"/> |
|
4 | 5 |
<libraries library-dir="lib"/> |
5 | 6 |
<resourceBundle name="text"/> |
6 | 7 |
<extensions> |
branches/v2_0_0_prep/extensions/extGazetteer/src/org/gvsig/gazetteer/GazetteerExtension.java | ||
---|---|---|
59 | 59 |
*/ |
60 | 60 |
public class GazetteerExtension extends Extension { |
61 | 61 |
private GazetteerLibrary gazetteerLibrary = null; |
62 |
|
|
62 |
|
|
63 | 63 |
public static void main(String[] args) { |
64 | 64 |
} |
65 | 65 |
|
... | ... | |
78 | 78 |
PluginServices.getIconTheme().registerDefault( |
79 | 79 |
"gazetteer-search", |
80 | 80 |
this.getClass().getClassLoader().getResource( |
81 |
"images/GazzButton.png"));
|
|
81 |
"images/GazzButton.png")); |
|
82 | 82 |
} |
83 | 83 |
|
84 | 84 |
/* |
... | ... | |
135 | 135 |
servers = getDefaultServers(); |
136 | 136 |
} else { |
137 | 137 |
ServerData[] newServers = new ServerData[servers.length |
138 |
+ getDefaultServers().length];
|
|
138 |
+ getDefaultServers().length];
|
|
139 | 139 |
System.arraycopy(servers, 0, newServers, 0, servers.length); |
140 | 140 |
System.arraycopy(getDefaultServers(), 0, newServers, |
141 | 141 |
servers.length, getDefaultServers().length); |
... | ... | |
194 | 194 |
*/ |
195 | 195 |
public boolean isVisible() { |
196 | 196 |
com.iver.andami.ui.mdiManager.IWindow f = PluginServices |
197 |
.getMDIManager().getActiveWindow();
|
|
197 |
.getMDIManager().getActiveWindow(); |
|
198 | 198 |
|
199 | 199 |
if (f == null) { |
200 | 200 |
return false; |
branches/v2_0_0_prep/extensions/extGazetteer/src/org/gvsig/gazetteer/loaders/FeatureLoader.java | ||
---|---|---|
251 | 251 |
theSymbol.setStyle(1); |
252 | 252 |
theSymbol.setFontColor(Color.BLACK); |
253 | 253 |
theSymbol.setSizeInPixels(true); |
254 |
theSymbol.setSize(10);
|
|
254 |
theSymbol.setSize(5);
|
|
255 | 255 |
return theSymbol; |
256 | 256 |
} |
257 | 257 |
|
258 |
// private SimpleTextSymbol getSymbol(String text){ |
|
259 |
// SimpleTextSymbol theSymbol = new SimpleTextSymbol(); |
|
260 |
// theSymbol.setTextColor(Color.RED); |
|
261 |
// theSymbol.setText(text); |
|
262 |
// theSymbol.setFontSize(10); |
|
263 |
// return theSymbol; |
|
264 |
// } |
|
265 |
|
|
258 | 266 |
/** |
259 | 267 |
* Reprojects the new point |
260 | 268 |
* @param ptOrig |
branches/v2_0_0_prep/extensions/extGazetteer/src/org/gvsig/gazetteer/gui/SearchDialog.java | ||
---|---|---|
43 | 43 |
import java.awt.Frame; |
44 | 44 |
import java.awt.geom.Rectangle2D; |
45 | 45 |
|
46 |
import javax.swing.Icon; |
|
46 | 47 |
import javax.swing.JDialog; |
47 | 48 |
|
48 | 49 |
import org.gvsig.catalog.querys.Coordinates; |
... | ... | |
124 | 125 |
frame.setSize(frame.getWidth(),450); |
125 | 126 |
frame.doLayout(); |
126 | 127 |
getLowerPanel().setVisible(true); |
127 |
getUpperPanel().setUpIcon();
|
|
128 |
getUpperPanel().setIcon(getUpIcon());
|
|
128 | 129 |
}else{ |
129 | 130 |
frame.setSize(frame.getWidth(),115); |
130 | 131 |
getLowerPanel().setVisible(false); |
131 |
getUpperPanel().setDownIcon();
|
|
132 |
getUpperPanel().setIcon(getDownIcon());
|
|
132 | 133 |
} |
133 | 134 |
isMinimized = !isMinimized; |
134 | 135 |
} |
136 |
|
|
137 |
/* |
|
138 |
* (non-Javadoc) |
|
139 |
* @see org.gvsig.gazetteer.ui.search.SearchDialogPanel#getUpIcon() |
|
140 |
*/ |
|
141 |
protected Icon getUpIcon(){ |
|
142 |
return PluginServices.getIconTheme().get("catalog-up"); |
|
143 |
} |
|
144 |
|
|
145 |
/* |
|
146 |
* (non-Javadoc) |
|
147 |
* @see org.gvsig.gazetteer.ui.search.SearchDialogPanel#getDownIcon() |
|
148 |
*/ |
|
149 |
protected Icon getDownIcon(){ |
|
150 |
return PluginServices.getIconTheme().get("catalog-down"); |
|
151 |
} |
|
152 |
|
|
135 | 153 |
/** |
136 | 154 |
* Return button action |
137 | 155 |
*/ |
... | ... | |
198 | 216 |
public void setFrame(JDialog dialog) { |
199 | 217 |
this.frame = dialog; |
200 | 218 |
} |
219 |
|
|
220 |
|
|
201 | 221 |
|
202 | 222 |
|
203 | 223 |
|
branches/v2_0_0_prep/applications/appCatalog/src/org/gvsig/catalog/ui/serverconnect/ServerConnectDialogPanel.java | ||
---|---|---|
52 | 52 |
import java.util.Iterator; |
53 | 53 |
import java.util.TreeMap; |
54 | 54 |
|
55 |
import javax.swing.Icon; |
|
56 |
import javax.swing.ImageIcon; |
|
55 | 57 |
import javax.swing.JFrame; |
56 | 58 |
import javax.swing.JPanel; |
57 | 59 |
|
... | ... | |
101 | 103 |
//Load the first protocol |
102 | 104 |
controlsPanel.setProtocol(controlsPanel.getServer().getServiceSubType()); |
103 | 105 |
enableServerPropertiesButton(); |
106 |
getControlsPanel().setPropertiesIcon(getPropertiesIcon()); |
|
104 | 107 |
} |
105 | 108 |
|
106 | 109 |
/** |
... | ... | |
280 | 283 |
public CatalogClient getClient() { |
281 | 284 |
return client; |
282 | 285 |
} |
286 |
|
|
287 |
protected Icon getPropertiesIcon(){ |
|
288 |
return new ImageIcon("./gvSIG/extensiones/org.gvsig.catalog/images/serverProperties.png"); |
|
289 |
} |
|
283 | 290 |
|
284 | 291 |
/** |
285 | 292 |
* This class is used to manage the searches. |
branches/v2_0_0_prep/applications/appCatalog/src/org/gvsig/catalog/ui/serverconnect/ServerConnectPanel.java | ||
---|---|---|
42 | 42 |
package org.gvsig.catalog.ui.serverconnect; |
43 | 43 |
import java.awt.event.ActionListener; |
44 | 44 |
|
45 |
import javax.swing.ImageIcon;
|
|
45 |
import javax.swing.Icon; |
|
46 | 46 |
import javax.swing.JPanel; |
47 | 47 |
|
48 | 48 |
import org.gvsig.catalog.CatalogLocator; |
... | ... | |
245 | 245 |
replyLabel.setText(Messages.getText("serverReply")); |
246 | 246 |
connectButton.setText(Messages.getText("connectButton")); |
247 | 247 |
searchButton.setText(Messages.getText("searchButton")); |
248 |
closeButton.setText(Messages.getText("close")); |
|
248 |
closeButton.setText(Messages.getText("close")); |
|
249 |
} |
|
250 |
|
|
251 |
public void setPropertiesIcon(Icon icon){ |
|
249 | 252 |
serverPropertiesButton |
250 |
.setIcon(new ImageIcon("./gvSIG/extensiones/es.gva.cit.gvsig.catalogClient/images/serverProperties.png"));
|
|
253 |
.setIcon(icon);
|
|
251 | 254 |
} |
252 | 255 |
|
253 | 256 |
/** |
branches/v2_0_0_prep/applications/appCatalog/src/org/gvsig/catalog/ui/search/SearchUpperPanel.java | ||
---|---|---|
43 | 43 |
import java.awt.Dimension; |
44 | 44 |
import java.awt.event.ActionListener; |
45 | 45 |
|
46 |
import javax.swing.Icon; |
|
46 | 47 |
import javax.swing.ImageIcon; |
47 | 48 |
import javax.swing.JPanel; |
48 | 49 |
|
... | ... | |
216 | 217 |
titleLabel.setText(Messages.getText("title")); |
217 | 218 |
areaCheckBox.setText(Messages.getText("restrictArea")); |
218 | 219 |
resizeButton.setPreferredSize(new Dimension(CatalogConstants.RESIZE_WINDOW_BUTTON_SIZE, |
219 |
CatalogConstants.RESIZE_WINDOW_BUTTON_SIZE)); |
|
220 |
setDownIcon(); |
|
220 |
CatalogConstants.RESIZE_WINDOW_BUTTON_SIZE)); |
|
221 | 221 |
} |
222 | 222 |
|
223 | 223 |
/** |
... | ... | |
231 | 231 |
} |
232 | 232 |
|
233 | 233 |
/** |
234 |
* Sets the up triangle icon (to minimize) |
|
235 |
*/ |
|
236 |
public void setUpIcon() { |
|
237 |
resizeButton.setIcon(new ImageIcon("./gvSIG/extensiones/es.gva.cit.gvsig.catalogClient/images/up.png")); |
|
238 |
} |
|
239 |
|
|
240 |
/** |
|
241 | 234 |
* Sets the down triangle icon (to maximize) |
242 | 235 |
*/ |
243 |
public void setDownIcon() { |
|
244 |
resizeButton.setIcon(new ImageIcon("./gvSIG/extensiones/es.gva.cit.gvsig.catalogClient/images/down.png")); |
|
245 |
|
|
236 |
public void setIcon(Icon icon) { |
|
237 |
resizeButton.setIcon(icon); |
|
246 | 238 |
} |
247 | 239 |
|
248 | 240 |
/** |
branches/v2_0_0_prep/applications/appCatalog/src/org/gvsig/catalog/ui/search/SearchDialogPanel.java | ||
---|---|---|
46 | 46 |
import java.awt.event.ActionListener; |
47 | 47 |
import java.util.Collection; |
48 | 48 |
|
49 |
import javax.swing.Icon; |
|
50 |
import javax.swing.ImageIcon; |
|
49 | 51 |
import javax.swing.JFrame; |
50 | 52 |
import javax.swing.JOptionPane; |
51 | 53 |
import javax.swing.JPanel; |
... | ... | |
87 | 89 |
this.isMinimized = true; |
88 | 90 |
this.serverConnectFrame = serverConnectFrame; |
89 | 91 |
initialize(); |
90 |
|
|
92 |
getUpperPanel().setIcon(getDownIcon()); |
|
91 | 93 |
} |
92 | 94 |
|
93 | 95 |
/** |
... | ... | |
215 | 217 |
if (isMinimized){ |
216 | 218 |
parent.setSize(parent.getWidth(),487); |
217 | 219 |
getLowerPanel().setVisible(true); |
218 |
getUpperPanel().setUpIcon();
|
|
220 |
getUpperPanel().setIcon(getUpIcon());
|
|
219 | 221 |
}else{ |
220 | 222 |
parent.setSize(parent.getWidth(),165); |
221 | 223 |
getLowerPanel().setVisible(false); |
222 |
getUpperPanel().setDownIcon();
|
|
224 |
getUpperPanel().setIcon(getDownIcon());
|
|
223 | 225 |
} |
224 | 226 |
isMinimized = !isMinimized; |
225 | 227 |
} |
228 |
|
|
229 |
protected Icon getUpIcon(){ |
|
230 |
return new ImageIcon("./gvSIG/extensiones/org.gvsig.catalog/images/up.png"); |
|
231 |
} |
|
232 |
|
|
233 |
protected Icon getDownIcon(){ |
|
234 |
return new ImageIcon("./gvSIG/extensiones/org.gvsig.catalog/images/down.png"); |
|
235 |
} |
|
226 | 236 |
|
227 | 237 |
/** |
228 | 238 |
* thrown when the search button is clicked |
branches/v2_0_0_prep/applications/appGazetteer/src/org/gvsig/gazetteer/ui/search/SearchUpperPanel.java | ||
---|---|---|
43 | 43 |
import java.awt.Dimension; |
44 | 44 |
import java.awt.event.ActionListener; |
45 | 45 |
|
46 |
import javax.swing.Icon; |
|
46 | 47 |
import javax.swing.ImageIcon; |
47 | 48 |
import javax.swing.JPanel; |
48 | 49 |
|
... | ... | |
162 | 163 |
areaCheckBox.setText(Messages.getText("restrictArea")); |
163 | 164 |
resizeButton.setSize(new Dimension(CatalogConstants.RESIZE_WINDOW_BUTTON_SIZE, |
164 | 165 |
CatalogConstants.RESIZE_WINDOW_BUTTON_SIZE)); |
165 |
setDownIcon(); |
|
166 | 166 |
} |
167 | 167 |
|
168 | 168 |
/** |
... | ... | |
176 | 176 |
} |
177 | 177 |
|
178 | 178 |
/** |
179 |
* Sets the up triangle icon (to minimize) |
|
180 |
*/ |
|
181 |
public void setUpIcon() { |
|
182 |
resizeButton.setIcon(new ImageIcon("./gvSIG/extensiones/es.gva.cit.gvsig.catalogClient/images/up.png")); |
|
183 |
} |
|
184 |
|
|
185 |
/** |
|
186 | 179 |
* Sets the down triangle icon (to maximize) |
187 | 180 |
*/ |
188 |
public void setDownIcon() {
|
|
189 |
resizeButton.setIcon(new ImageIcon("./gvSIG/extensiones/es.gva.cit.gvsig.catalogClient/images/down.png"));
|
|
181 |
public void setIcon(Icon icon) {
|
|
182 |
resizeButton.setIcon(icon);
|
|
190 | 183 |
} |
191 | 184 |
|
192 | 185 |
/** |
branches/v2_0_0_prep/applications/appGazetteer/src/org/gvsig/gazetteer/ui/search/SearchDialogPanel.java | ||
---|---|---|
46 | 46 |
import java.awt.event.ActionListener; |
47 | 47 |
import java.util.Collection; |
48 | 48 |
|
49 |
import javax.swing.Icon; |
|
50 |
import javax.swing.ImageIcon; |
|
49 | 51 |
import javax.swing.JFrame; |
50 | 52 |
import javax.swing.JOptionPane; |
51 | 53 |
import javax.swing.JPanel; |
... | ... | |
92 | 94 |
this.isMinimized = true; |
93 | 95 |
this.serverConnectFrame = serverConnectFrame; |
94 | 96 |
initialize(); |
95 |
|
|
97 |
getUpperPanel().setIcon(getDownIcon()); |
|
96 | 98 |
} |
97 | 99 |
|
98 | 100 |
/** |
... | ... | |
197 | 199 |
parent.setSize(parent.getWidth(),450); |
198 | 200 |
parent.doLayout(); |
199 | 201 |
getLowerPanel().setVisible(true); |
200 |
getUpperPanel().setUpIcon();
|
|
202 |
getUpperPanel().setIcon(getUpIcon());
|
|
201 | 203 |
}else{ |
202 | 204 |
parent.setSize(parent.getWidth(),115); |
203 | 205 |
getLowerPanel().setVisible(false); |
204 |
getUpperPanel().setDownIcon();
|
|
206 |
getUpperPanel().setIcon(getDownIcon());
|
|
205 | 207 |
} |
206 | 208 |
isMinimized = !isMinimized; |
207 | 209 |
} |
210 |
|
|
211 |
|
|
212 |
protected Icon getUpIcon(){ |
|
213 |
return new ImageIcon("./gvSIG/extensiones/org.gvsig.catalog/images/up.png"); |
|
214 |
} |
|
215 |
|
|
216 |
protected Icon getDownIcon(){ |
|
217 |
return new ImageIcon("./gvSIG/extensiones/org.gvsig.catalog/images/down.png"); |
|
218 |
} |
|
208 | 219 |
|
220 |
|
|
209 | 221 |
/** |
210 | 222 |
* thrown when the search button is clicked |
211 | 223 |
* @throws Exception |
Also available in: Unified diff