Revision 334 org.gvsig.geoprocess/trunk/org.gvsig.geoprocess/org.gvsig.geoprocess.algorithm/org.gvsig.geoprocess.algorithm.reproject/src/main/java/org/gvsig/geoprocess/algorithm/reproject/ReprojectParametersPanel.java
ReprojectParametersPanel.java | ||
---|---|---|
23 | 23 |
*/ |
24 | 24 |
package org.gvsig.geoprocess.algorithm.reproject; |
25 | 25 |
|
26 |
import java.awt.BorderLayout; |
|
27 | 26 |
import java.awt.Dimension; |
28 | 27 |
import java.awt.GridBagConstraints; |
29 | 28 |
import java.awt.GridBagLayout; |
... | ... | |
50 | 49 |
import es.unex.sextante.core.ParametersSet; |
51 | 50 |
import es.unex.sextante.core.Sextante; |
52 | 51 |
import es.unex.sextante.dataObjects.IVectorLayer; |
53 |
import es.unex.sextante.gridCalculus.gridCalculator.GridCalculatorAlgorithm; |
|
54 | 52 |
import es.unex.sextante.gui.algorithm.GeoAlgorithmParametersPanel; |
55 | 53 |
import es.unex.sextante.gui.algorithm.OutputChannelSelectionPanel; |
56 | 54 |
import es.unex.sextante.gui.core.SextanteGUI; |
... | ... | |
70 | 68 |
private CRSSelectPanel projectionSrcSelector = null; |
71 | 69 |
private IProjection targetLayerProjection = null; |
72 | 70 |
private AlgorithmOutputPanel algorithmOutputPanel = null; |
73 |
private OutputChannelSelectionPanel outputChannelSelectionPanel; |
|
71 |
private OutputChannelSelectionPanel outputChannelSelectionPanelPol; |
|
72 |
private OutputChannelSelectionPanel outputChannelSelectionPanelLine; |
|
73 |
private OutputChannelSelectionPanel outputChannelSelectionPanelPoint; |
|
74 | 74 |
private JPanel outputPanel; |
75 | 75 |
|
76 | 76 |
public ReprojectParametersPanel() { |
... | ... | |
125 | 125 |
if(outputPanel == null) { |
126 | 126 |
try { |
127 | 127 |
outputPanel = new JPanel(); |
128 |
outputPanel.setLayout(new BorderLayout()); |
|
128 |
outputPanel.setLayout(new GridBagLayout()); |
|
129 |
|
|
129 | 130 |
final OutputObjectsSet ooSet = m_Algorithm.getOutputObjects(); |
130 |
final Output out = ooSet.getOutput(GridCalculatorAlgorithm.RESULT); |
|
131 |
outputChannelSelectionPanel = new OutputChannelSelectionPanel(out, m_Algorithm.getParameters()); |
|
131 |
final Output out_pol = ooSet.getOutput(ReprojectAlgorithm.RESULT_POL); |
|
132 |
final Output out_line = ooSet.getOutput(ReprojectAlgorithm.RESULT_LINE); |
|
133 |
final Output out_point = ooSet.getOutput(ReprojectAlgorithm.RESULT_POINT); |
|
134 |
|
|
135 |
outputChannelSelectionPanelPol = new OutputChannelSelectionPanel(out_pol, m_Algorithm.getParameters()); |
|
136 |
outputChannelSelectionPanelLine = new OutputChannelSelectionPanel(out_line, m_Algorithm.getParameters()); |
|
137 |
outputChannelSelectionPanelPoint = new OutputChannelSelectionPanel(out_point, m_Algorithm.getParameters()); |
|
138 |
|
|
132 | 139 |
String label = GeoProcessLocator.getGeoProcessManager().getTranslation("Reproject"); |
133 |
outputPanel.add(new JLabel(" " + label + " [Vectorial] "), BorderLayout.WEST); |
|
134 |
outputPanel.add(outputChannelSelectionPanel, BorderLayout.CENTER); |
|
140 |
|
|
141 |
GridBagConstraints gbc = new GridBagConstraints(); |
|
142 |
gbc.fill = GridBagConstraints.HORIZONTAL; |
|
143 |
gbc.insets = new Insets(0, 0, 4, 0); |
|
144 |
gbc.weightx = 1; |
|
145 |
gbc.gridx = 0; |
|
146 |
gbc.gridy = 0; |
|
147 |
outputPanel.add(new JLabel(" " + label + " [Polygon] "), gbc); |
|
148 |
|
|
149 |
gbc.gridx = 0; |
|
150 |
gbc.gridy = 1; |
|
151 |
outputPanel.add(new JLabel(" " + label + " [Line] "), gbc); |
|
152 |
|
|
153 |
gbc.gridx = 0; |
|
154 |
gbc.gridy = 2; |
|
155 |
outputPanel.add(new JLabel(" " + label + " [Point] "), gbc); |
|
156 |
|
|
157 |
gbc.fill = GridBagConstraints.HORIZONTAL; |
|
158 |
gbc.weightx = 1; |
|
159 |
gbc.gridx = 1; |
|
160 |
gbc.gridy = 0; |
|
161 |
outputPanel.add(outputChannelSelectionPanelPol, gbc); |
|
162 |
|
|
163 |
gbc.gridx = 1; |
|
164 |
gbc.gridy = 1; |
|
165 |
outputPanel.add(outputChannelSelectionPanelLine, gbc); |
|
166 |
|
|
167 |
gbc.gridx = 1; |
|
168 |
gbc.gridy = 2; |
|
169 |
outputPanel.add(outputChannelSelectionPanelPoint, gbc); |
|
135 | 170 |
} catch (final Exception e) { |
136 | 171 |
Sextante.addErrorToLog(e); |
137 | 172 |
} |
... | ... | |
255 | 290 |
*/ |
256 | 291 |
public void actionPerformed(ActionEvent e) { |
257 | 292 |
if(e.getSource() == getLayersCombo()) { |
258 |
|
|
293 |
init(); |
|
259 | 294 |
} |
260 | 295 |
} |
261 | 296 |
|
... | ... | |
269 | 304 |
params.getParameter(ReprojectAlgorithm.DST_PROJECTION).setParameterValue(proj); |
270 | 305 |
|
271 | 306 |
OutputObjectsSet ooSet = m_Algorithm.getOutputObjects(); |
272 |
Output out = ooSet.getOutput(ReprojectAlgorithm.RESULT); |
|
307 |
Output outPol = ooSet.getOutput(ReprojectAlgorithm.RESULT_POL); |
|
308 |
Output outLine = ooSet.getOutput(ReprojectAlgorithm.RESULT_LINE); |
|
309 |
Output outPoint = ooSet.getOutput(ReprojectAlgorithm.RESULT_POINT); |
|
273 | 310 |
|
274 | 311 |
//Reponer estas l?neas para cambiar el panel de salida y comentar la siguiente |
275 | 312 |
//out.setOutputChannel(new CompositeSourceOutputChannel(getAlgorithmOutputPanel().getOutputParameters())); |
276 |
out.setOutputChannel(outputChannelSelectionPanel.getOutputChannel()); |
|
313 |
outPol.setOutputChannel(outputChannelSelectionPanelPol.getOutputChannel()); |
|
314 |
outLine.setOutputChannel(outputChannelSelectionPanelLine.getOutputChannel()); |
|
315 |
outPoint.setOutputChannel(outputChannelSelectionPanelPoint.getOutputChannel()); |
|
277 | 316 |
} catch (Exception e) { |
278 | 317 |
Sextante.addErrorToLog(e); |
279 | 318 |
} |
Also available in: Unified diff