Revision 254 org.gvsig.geoprocess/trunk/org.gvsig.geoprocess/org.gvsig.geoprocess.algorithm/org.gvsig.geoprocess.algorithm.spatialjoin/src/main/java/org/gvsig/geoprocess/algorithm/spatialjoin/SpatialJoinParametersPanel.java
SpatialJoinParametersPanel.java | ||
---|---|---|
23 | 23 |
*/ |
24 | 24 |
package org.gvsig.geoprocess.algorithm.spatialjoin; |
25 | 25 |
|
26 |
import java.awt.Color; |
|
26 | 27 |
import java.awt.Dimension; |
27 | 28 |
import java.awt.GridBagConstraints; |
28 | 29 |
import java.awt.GridBagLayout; |
... | ... | |
30 | 31 |
import java.awt.event.ActionEvent; |
31 | 32 |
import java.awt.event.ActionListener; |
32 | 33 |
|
34 |
import javax.swing.BorderFactory; |
|
33 | 35 |
import javax.swing.ComboBoxModel; |
34 | 36 |
import javax.swing.DefaultComboBoxModel; |
35 | 37 |
import javax.swing.JCheckBox; |
... | ... | |
37 | 39 |
import javax.swing.JLabel; |
38 | 40 |
import javax.swing.JPanel; |
39 | 41 |
|
42 |
import org.gvsig.geoprocess.core.CompositeSourceOutputChannel; |
|
43 |
import org.gvsig.geoprocess.lib.sextante.AbstractSextanteGeoProcess; |
|
44 |
import org.gvsig.geoprocess.sextante.gui.algorithm.AlgorithmOutputPanel; |
|
45 |
import org.gvsig.gui.beans.table.TableContainer; |
|
46 |
import org.gvsig.gui.beans.table.exceptions.NotInitializeException; |
|
47 |
|
|
40 | 48 |
import es.unex.sextante.core.GeoAlgorithm; |
41 | 49 |
import es.unex.sextante.core.ObjectAndDescription; |
42 | 50 |
import es.unex.sextante.core.OutputObjectsSet; |
43 | 51 |
import es.unex.sextante.core.ParametersSet; |
44 | 52 |
import es.unex.sextante.core.Sextante; |
45 | 53 |
import es.unex.sextante.dataObjects.IVectorLayer; |
54 |
import es.unex.sextante.gridCalculus.gridCalculator.GridCalculatorAlgorithm; |
|
46 | 55 |
import es.unex.sextante.gui.algorithm.GeoAlgorithmParametersPanel; |
56 |
import es.unex.sextante.gui.algorithm.OutputChannelSelectionPanel; |
|
47 | 57 |
import es.unex.sextante.gui.core.SextanteGUI; |
58 |
import es.unex.sextante.outputs.IOutputChannel; |
|
48 | 59 |
import es.unex.sextante.outputs.Output; |
49 | 60 |
|
50 |
import org.gvsig.geoprocess.core.CompositeSourceOutputChannel; |
|
51 |
import org.gvsig.geoprocess.sextante.gui.algorithm.AlgorithmOutputPanel; |
|
52 |
import org.gvsig.gui.beans.table.TableContainer; |
|
53 |
import org.gvsig.gui.beans.table.exceptions.NotInitializeException; |
|
54 |
|
|
55 | 61 |
/** |
56 | 62 |
* Panel for dissolve algorithm |
57 | 63 |
* @author <a href="mailto:nachobrodin@gmail.com">Nacho Brodin</a> |
... | ... | |
67 | 73 |
private final String[] columnNames = { "Min", "Max", "Sum", "Avg", "Field ID" }; |
68 | 74 |
private final int[] columnWidths = { 35, 35, 35, 35, 334 }; |
69 | 75 |
private TableContainer table = null; |
70 |
|
|
76 |
private OutputChannelSelectionPanel outputChannelSelectionPanel; |
|
77 |
|
|
71 | 78 |
public SpatialJoinParametersPanel() { |
72 | 79 |
super(); |
73 | 80 |
} |
... | ... | |
80 | 87 |
private void initGUI() { |
81 | 88 |
GridBagLayout gbl = new GridBagLayout(); |
82 | 89 |
this.setLayout(gbl); |
90 |
this.setBorder(BorderFactory.createLineBorder(Color.gray)); |
|
83 | 91 |
|
84 | 92 |
GridBagConstraints gbc = new GridBagConstraints(); |
85 | 93 |
gbc.fill = GridBagConstraints.HORIZONTAL; |
... | ... | |
106 | 114 |
gbc.insets = new Insets(0, 0, 12, 0); |
107 | 115 |
gbc.weighty = 1.0; |
108 | 116 |
this.add(getRadioButtonTable(), gbc); |
109 |
|
|
110 |
gbc.gridy = 6; |
|
117 |
|
|
118 |
//Salida propia |
|
119 |
/*gbc.gridy = 6; |
|
111 | 120 |
gbc.fill = GridBagConstraints.HORIZONTAL; |
112 | 121 |
gbc.weighty = 0.0; |
113 |
this.add(getAlgorithmOutputPanel(), gbc); |
|
122 |
this.add(getAlgorithmOutputPanel(), gbc);*/
|
|
114 | 123 |
|
124 |
//Salida de SEXTANTE |
|
125 |
try { |
|
126 |
final OutputObjectsSet ooSet = m_Algorithm.getOutputObjects(); |
|
127 |
final Output out = ooSet.getOutput(GridCalculatorAlgorithm.RESULT); |
|
128 |
outputChannelSelectionPanel = new OutputChannelSelectionPanel(out, m_Algorithm.getParameters()); |
|
129 |
gbc.gridy = 6; |
|
130 |
gbc.fill = GridBagConstraints.HORIZONTAL; |
|
131 |
gbc.weighty = 0.0; |
|
132 |
this.add(outputChannelSelectionPanel, gbc); |
|
133 |
} catch (final Exception e) { |
|
134 |
Sextante.addErrorToLog(e); |
|
135 |
} |
|
136 |
|
|
115 | 137 |
initTable(); |
116 | 138 |
getRadioButtonTable().setVisible(false); |
117 | 139 |
} |
... | ... | |
299 | 321 |
|
300 | 322 |
OutputObjectsSet ooSet = m_Algorithm.getOutputObjects(); |
301 | 323 |
Output out = ooSet.getOutput(SpatialJoinAlgorithm.RESULT); |
302 |
AlgorithmOutputPanel fsp = getAlgorithmOutputPanel(); |
|
303 |
out.setOutputChannel(new CompositeSourceOutputChannel(fsp.getOutputParameters())); |
|
324 |
|
|
325 |
//Reponer estas l?neas para cambiar el panel de salida y comentar la siguiente |
|
326 |
//AlgorithmOutputPanel fsp = getAlgorithmOutputPanel(); |
|
327 |
//out.setOutputChannel(new CompositeSourceOutputChannel(fsp.getOutputParameters())); |
|
328 |
out.setOutputChannel(outputChannelSelectionPanel.getOutputChannel()); |
|
304 | 329 |
} catch (Exception e) { |
305 | 330 |
Sextante.addErrorToLog(e); |
306 | 331 |
} |
Also available in: Unified diff