Revision 3018
trunk/extensions/extCatalogYNomenclator/build.xml | ||
---|---|---|
68 | 68 |
<!--copy todir="${extensionDir}/${mainplugin}/lib/"> |
69 | 69 |
<fileset dir="../Fmap 03/lib" includes="cms-grid.jar,fmap-ra.jar"/> |
70 | 70 |
</copy--> |
71 |
<delete> |
|
72 |
<fileset dir="${extensionDir}" includes="es/gva/cit/gvsig/catalogClient/lib/xercesImpl.jar" /> |
|
73 |
<fileset dir="${extensionDir}" includes="es/gva/cit/gvsig/catalogClient/lib/xml-apis.jar" /> |
|
74 |
</delete> |
|
71 | 75 |
</target> |
72 | 76 |
|
73 | 77 |
<target name="generate-with-source" description="generate the distribution with the source file" > |
... | ... | |
93 | 97 |
<move todir="${extension-dir}/${plugin}/"> |
94 | 98 |
<fileset dir="${dist}" includes="**/**"/> |
95 | 99 |
</move> |
100 |
|
|
101 |
|
|
96 | 102 |
</target> |
97 | 103 |
|
98 | 104 |
<target name="clean" |
99 | 105 |
description="clean up" > |
100 | 106 |
<!-- Delete the ${build} and ${dist} directory trees --> |
101 |
<delete dir="${dist}"/> |
|
107 |
<delete file="${extensiones}/es/gva/cit/gvsig/catalogClient/lib/xercesImpl.jar"/> |
|
108 |
<delete file="${extensiones}/es/gva/cit/gvsig/catalogClient/lib/xml-apis.jar" /> |
|
109 |
|
|
102 | 110 |
</target> |
111 |
|
|
103 | 112 |
</project> |
104 | 113 |
|
trunk/extensions/extCatalogYNomenclator/src/es/gva/cit/gvsig/catalogClient/gui/ConnectDialog.java | ||
---|---|---|
93 | 93 |
closeJDialog(); |
94 | 94 |
SearchDialog dialog = new SearchDialog(true,""); |
95 | 95 |
dialog.setCatalogClient(getCliente()); |
96 |
dialog.setBounds(0, 0, 675, 490); |
|
97 | 96 |
dialog.setName(PluginServices.getText(this, "catalog_search")+" ["+getCurrentServer()+"]"); |
98 | 97 |
dialog.setVisible(true); |
99 | 98 |
PluginServices.getMDIManager().addView(dialog); |
trunk/extensions/extCatalogYNomenclator/src/es/gva/cit/gvsig/catalogClient/gui/SearchDialog.java | ||
---|---|---|
112 | 112 |
closeJDialog(); |
113 | 113 |
SearchDialog dialog = new SearchDialog(!(isMinimized),controlsPanel.getTitle()); |
114 | 114 |
dialog.setCatalogClient(client); |
115 |
dialog.setName(PluginServices.getText(this, "catalog_search")); |
|
116 |
PluginServices.getMDIManager().addView(dialog); |
|
115 | 117 |
} |
116 | 118 |
|
117 | 119 |
public AbstractSearchPanel getControlsPanel() { |
118 | 120 |
if (isMinimized){ |
119 |
setSize(300, 130);
|
|
121 |
setSize(275, 100);
|
|
120 | 122 |
controlsPanel = new SearchMiniPanel(); |
121 | 123 |
controlsPanel.setSize(200,55); |
122 | 124 |
//controlsPanel.setPreferredSize(new java.awt.Dimension(200, 55)); |
123 | 125 |
//controlsPanel.setLocation(0, 0); |
124 | 126 |
}else{ |
125 |
setSize(675, 520);
|
|
127 |
setSize(675, 485);
|
|
126 | 128 |
controlsPanel = new SearchPanel(); |
127 | 129 |
controlsPanel.setSize(700,455); |
128 | 130 |
//controlsPanel.setPreferredSize(new java.awt.Dimension(700, 455)); |
trunk/extensions/extCatalogYNomenclator/src/es/gva/cit/gvsig/gazetteer/gui/SearchDialog.java | ||
---|---|---|
68 | 68 |
} |
69 | 69 |
|
70 | 70 |
public void ShowResultsActionPerformed(Feature[] features) { |
71 |
closeJDialog();
|
|
71 |
//loseJDialog();
|
|
72 | 72 |
ShowResultsDialog dialog = new ShowResultsDialog(client,features,controlsPanel.getNPaginas()); |
73 | 73 |
dialog.setBounds(0, 0, 625, 292); |
74 | 74 |
dialog.setName(PluginServices.getText(this, "gazetteer_search")); |
trunk/extensions/extCatalogYNomenclator/src/es/gva/cit/gvsig/gazetteer/loaders/FeatureLoader.java | ||
---|---|---|
40 | 40 |
*/ |
41 | 41 |
package es.gva.cit.gvsig.gazetteer.loaders; |
42 | 42 |
|
43 |
import java.awt.Graphics; |
|
44 |
import java.awt.Graphics2D; |
|
45 |
import java.awt.geom.Point2D; |
|
46 |
import java.awt.geom.Rectangle2D; |
|
47 |
import java.awt.image.BufferedImage; |
|
48 |
import java.io.File; |
|
49 |
import java.io.IOException; |
|
50 |
import java.net.MalformedURLException; |
|
51 |
import java.net.URL; |
|
52 |
import java.util.ArrayList; |
|
53 |
|
|
54 |
import javax.imageio.ImageIO; |
|
55 |
|
|
56 |
import org.cresques.cts.ICoordTrans; |
|
57 |
import org.cresques.cts.gt2.CoordSys; |
|
58 |
import org.cresques.cts.gt2.CoordTrans; |
|
59 |
import org.cresques.geo.Ellipsoid; |
|
60 |
import org.cresques.geo.Mercator; |
|
61 |
import org.cresques.geo.Projection; |
|
62 |
import org.cresques.geo.ViewPortData; |
|
63 |
|
|
64 |
import com.iver.andami.PluginServices; |
|
65 |
import com.iver.andami.plugins.Extension; |
|
66 |
import com.iver.andami.ui.mdiManager.ViewInfo; |
|
67 |
import com.iver.cit.gvsig.ProjectExtension; |
|
68 |
import com.iver.cit.gvsig.RasterizerLayer; |
|
69 |
import com.iver.cit.gvsig.fmap.DriverException; |
|
70 |
import com.iver.cit.gvsig.fmap.ViewPort; |
|
71 |
import com.iver.cit.gvsig.fmap.core.v02.FLabel; |
|
43 | 72 |
import com.iver.cit.gvsig.fmap.layers.FLayer; |
73 |
import com.iver.cit.gvsig.fmap.layers.FLyrText; |
|
74 |
import com.iver.cit.gvsig.fmap.operations.Cancellable; |
|
75 |
import com.iver.cit.gvsig.gui.layout.FLayoutDraw; |
|
76 |
import com.iver.cit.gvsig.project.Project; |
|
77 |
import com.iver.cit.gvsig.project.ProjectView; |
|
44 | 78 |
|
45 | 79 |
import es.gva.cit.gazetteer.querys.Feature; |
46 | 80 |
import es.gva.cit.gvsig.catalogClient.loaders.AbstractLoader; |
... | ... | |
75 | 109 |
return false; |
76 | 110 |
} |
77 | 111 |
/** |
78 |
* It creates the new Feature layer into gvSIG
|
|
112 |
* It adds the new Feature layer into gvSIG
|
|
79 | 113 |
* @param feature |
80 | 114 |
* Feature to load |
81 | 115 |
* @return |
82 |
*/ |
|
83 |
|
|
84 |
private FLayer createFeatureLayer(Feature feature) { |
|
85 |
|
|
116 |
* @throws DriverException |
|
117 |
* @throws IOException |
|
118 |
* @throws MalformedURLException |
|
119 |
*/ |
|
120 |
private FLayer createFeatureLayer(Feature feature) throws DriverException, MalformedURLException, IOException { |
|
121 |
ProjectExtension pe = (ProjectExtension) PluginServices.getExtension(com.iver.cit.gvsig.ProjectExtension.class); |
|
122 |
Project p = pe.getProject(); |
|
123 |
ProjectView v = (ProjectView) p.getViews().get(0); |
|
124 |
v.getMapContext().getViewPort().setExtent(new Rectangle2D.Double(feature.getCoordinates().getX() - 0.05, |
|
125 |
feature.getCoordinates().getY() - 0.05, |
|
126 |
0.1, |
|
127 |
0.1)); |
|
128 |
|
|
129 |
//ViewPort viewPort = new ViewPort(Mercator.getProjection(Ellipsoid.ed50)); |
|
130 |
|
|
131 |
/* |
|
132 |
FLabel label = new FLabel(feature.getName(),feature.getCoordinates(),20,0); |
|
133 |
|
|
134 |
ArrayList al = new ArrayList(); |
|
135 |
al.add(0,label); |
|
136 |
|
|
137 |
FLyrText ft = new FLyrText(al); |
|
138 |
ft.setName(feature.getName()); |
|
139 |
|
|
140 |
*/ |
|
141 |
//ICoordTrans ct = new CoordTrans((CoordSys) proj, |
|
142 |
// (CoordSys) wi.getProjection()); |
|
143 |
|
|
144 |
//ft.setCoordTrans(ct); |
|
145 |
|
|
146 |
|
|
147 |
/* |
|
148 |
FLayoutDraw fld = new FLayoutDraw(new Layout()); |
|
149 |
Graphics2D g2d = null; |
|
150 |
|
|
151 |
BufferedImage img = ImageIO.read(new URL("http://sercartlin:8080/geonetwork/srv/es/resources.getgraphover?id=78&fname=31es.jpg")); |
|
152 |
|
|
153 |
BufferedImage image = new BufferedImage(100, 100, BufferedImage.TYPE_INT_RGB); |
|
154 |
g2d = (Graphics2D) image.getGraphics(); |
|
155 |
|
|
156 |
fld.drawLayout(g2d, img); |
|
157 |
*/ |
|
158 |
Cancellable cancel = new Cancellable() { |
|
159 |
public boolean isCanceled() { |
|
160 |
return false; |
|
161 |
} |
|
162 |
}; |
|
163 |
|
|
164 |
//ft.draw(null,null,v.getMapContext().getViewPort(),cancel,1); |
|
165 |
|
|
166 |
|
|
86 | 167 |
return null; |
87 | 168 |
|
88 | 169 |
} |
Also available in: Unified diff