Revision 258
org.gvsig.geoprocess/trunk/org.gvsig.geoprocess/org.gvsig.geoprocess.algorithm/org.gvsig.geoprocess.algorithm.dissolve/src/main/java/org/gvsig/geoprocess/algorithm/dissolve/DissolveParametersPanel.java | ||
---|---|---|
23 | 23 |
*/ |
24 | 24 |
package org.gvsig.geoprocess.algorithm.dissolve; |
25 | 25 |
|
26 |
import java.awt.BorderLayout; |
|
26 | 27 |
import java.awt.Dimension; |
27 | 28 |
import java.awt.GridBagConstraints; |
28 | 29 |
import java.awt.GridBagLayout; |
... | ... | |
37 | 38 |
import javax.swing.JLabel; |
38 | 39 |
import javax.swing.JPanel; |
39 | 40 |
|
41 |
import org.gvsig.geoprocess.core.CompositeSourceOutputChannel; |
|
42 |
import org.gvsig.geoprocess.lib.api.GeoProcessLocator; |
|
43 |
import org.gvsig.geoprocess.sextante.gui.algorithm.AlgorithmOutputPanel; |
|
44 |
import org.gvsig.gui.beans.table.TableContainer; |
|
45 |
import org.gvsig.gui.beans.table.exceptions.NotInitializeException; |
|
46 |
|
|
40 | 47 |
import es.unex.sextante.core.GeoAlgorithm; |
41 | 48 |
import es.unex.sextante.core.ObjectAndDescription; |
42 | 49 |
import es.unex.sextante.core.OutputObjectsSet; |
43 | 50 |
import es.unex.sextante.core.ParametersSet; |
44 | 51 |
import es.unex.sextante.core.Sextante; |
45 | 52 |
import es.unex.sextante.dataObjects.IVectorLayer; |
53 |
import es.unex.sextante.gridCalculus.gridCalculator.GridCalculatorAlgorithm; |
|
46 | 54 |
import es.unex.sextante.gui.algorithm.GeoAlgorithmParametersPanel; |
55 |
import es.unex.sextante.gui.algorithm.OutputChannelSelectionPanel; |
|
47 | 56 |
import es.unex.sextante.gui.core.SextanteGUI; |
48 | 57 |
import es.unex.sextante.outputs.Output; |
49 | 58 |
|
50 |
import org.gvsig.geoprocess.core.CompositeSourceOutputChannel; |
|
51 |
import org.gvsig.geoprocess.lib.api.GeoProcessLocator; |
|
52 |
import org.gvsig.geoprocess.sextante.gui.algorithm.AlgorithmOutputPanel; |
|
53 |
import org.gvsig.gui.beans.table.TableContainer; |
|
54 |
import org.gvsig.gui.beans.table.exceptions.NotInitializeException; |
|
55 |
|
|
56 | 59 |
/** |
57 | 60 |
* Panel for dissolve algorithm |
58 | 61 |
* @author <a href="mailto:nachobrodin@gmail.com">Nacho Brodin</a> |
... | ... | |
69 | 72 |
private final int[] columnWidths = { 35, 35, 35, 35, 334 }; |
70 | 73 |
private TableContainer table = null; |
71 | 74 |
private AlgorithmOutputPanel algorithmOutputPanel = null; |
75 |
private OutputChannelSelectionPanel outputChannelSelectionPanel; |
|
76 |
private JPanel outputPanel; |
|
72 | 77 |
|
73 | 78 |
public DissolveParametersPanel() { |
74 | 79 |
super(); |
... | ... | |
112 | 117 |
gbc.gridy = 6; |
113 | 118 |
gbc.fill = GridBagConstraints.HORIZONTAL; |
114 | 119 |
gbc.weighty = 0.0; |
115 |
this.add(getAlgorithmOutputPanel(), gbc);
|
|
120 |
this.add(getOutputChannelSelectionPanel(), gbc);
|
|
116 | 121 |
|
117 | 122 |
initTable(); |
118 | 123 |
} |
119 | 124 |
|
120 | 125 |
/** |
126 |
* Gets the output panel (SEXTANTE) |
|
127 |
* @return |
|
128 |
*/ |
|
129 |
private JPanel getOutputChannelSelectionPanel() { |
|
130 |
if(outputPanel == null) { |
|
131 |
try { |
|
132 |
outputPanel = new JPanel(); |
|
133 |
outputPanel.setLayout(new BorderLayout()); |
|
134 |
final OutputObjectsSet ooSet = m_Algorithm.getOutputObjects(); |
|
135 |
final Output out = ooSet.getOutput(GridCalculatorAlgorithm.RESULT); |
|
136 |
outputChannelSelectionPanel = new OutputChannelSelectionPanel(out, m_Algorithm.getParameters()); |
|
137 |
outputPanel.add(new JLabel(" Dissolve [Vectorial] "), BorderLayout.WEST); |
|
138 |
outputPanel.add(outputChannelSelectionPanel, BorderLayout.CENTER); |
|
139 |
} catch (final Exception e) { |
|
140 |
Sextante.addErrorToLog(e); |
|
141 |
} |
|
142 |
} |
|
143 |
return outputPanel; |
|
144 |
} |
|
145 |
|
|
146 |
/** |
|
121 | 147 |
* Gets the output panel |
122 | 148 |
* @return |
123 | 149 |
*/ |
Also available in: Unified diff