Revision 18999
trunk/extensions/extTopology/build.number | ||
---|---|---|
1 | 1 |
#Build Number for ANT. Do not edit! |
2 |
#Mon Jan 21 22:46:59 CET 2008 |
|
3 |
build.number=217 |
|
2 |
#Thu Feb 14 18:50:05 CET 2008 |
|
3 |
build.number=230 |
trunk/extensions/extTopology/src/org/gvsig/topology/TopologyCommandsExtension.java | ||
---|---|---|
118 | 118 |
if(aux instanceof Topology) |
119 | 119 |
{ |
120 | 120 |
Topology topology = (Topology) aux; |
121 |
PluginServices.cancelableBackgroundExecution(new TopologyValidationTask(topology)); |
|
121 |
PluginServices.cancelableBackgroundExecution(new TopologyValidationTask(topology, mapContext));
|
|
122 | 122 |
} |
123 | 123 |
}//while |
124 | 124 |
} |
trunk/extensions/extTopology/src/org/gvsig/topology/ui/NewTopologyRulePanel.java | ||
---|---|---|
223 | 223 |
leftPanel.addComponent(destinationLyrText, insets); |
224 | 224 |
leftPanel.addComponent(lyrCombo2, insets); |
225 | 225 |
|
226 |
//FIXME Mover todo esto a un TopologyRuleDescriptionPanel |
|
226 | 227 |
rightPanel = new JScrollPane(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED, JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED); |
227 | 228 |
htmlViewer = new JEditorPane(){ |
228 | 229 |
public URL getPage() { |
trunk/extensions/extTopology/src/org/gvsig/topology/ui/TopologyErrorPanel.java | ||
---|---|---|
48 | 48 |
*/ |
49 | 49 |
package org.gvsig.topology.ui; |
50 | 50 |
|
51 |
import java.awt.BorderLayout; |
|
52 |
import java.awt.Dimension; |
|
51 | 53 |
import java.awt.Point; |
52 | 54 |
import java.awt.event.ActionEvent; |
53 | 55 |
import java.awt.event.ActionListener; |
54 | 56 |
import java.awt.event.MouseAdapter; |
55 | 57 |
import java.awt.event.MouseEvent; |
56 | 58 |
import java.awt.geom.Rectangle2D; |
59 |
import java.net.URL; |
|
57 | 60 |
import java.util.ArrayList; |
58 | 61 |
import java.util.HashMap; |
59 | 62 |
import java.util.List; |
60 | 63 |
import java.util.Map; |
61 | 64 |
|
65 |
import javax.swing.BoxLayout; |
|
62 | 66 |
import javax.swing.JCheckBox; |
63 | 67 |
import javax.swing.JComboBox; |
64 | 68 |
import javax.swing.JComponent; |
69 |
import javax.swing.JDialog; |
|
70 |
import javax.swing.JEditorPane; |
|
65 | 71 |
import javax.swing.JLabel; |
66 | 72 |
import javax.swing.JMenuItem; |
67 | 73 |
import javax.swing.JOptionPane; |
74 |
import javax.swing.JPanel; |
|
68 | 75 |
import javax.swing.JPopupMenu; |
69 | 76 |
import javax.swing.JScrollPane; |
70 | 77 |
import javax.swing.JTable; |
71 | 78 |
import javax.swing.event.ListSelectionEvent; |
72 | 79 |
import javax.swing.event.ListSelectionListener; |
73 | 80 |
import javax.swing.table.AbstractTableModel; |
81 |
import javax.swing.text.html.HTMLEditorKit; |
|
74 | 82 |
|
75 | 83 |
import org.gvsig.gui.beans.swing.JButton; |
76 | 84 |
import org.gvsig.topology.IOneLyrRule; |
... | ... | |
439 | 447 |
viewDescriptionMenu.setText(PluginServices.getText(this, "VIEW_RULE_DESCRIPTION")); |
440 | 448 |
viewDescriptionMenu.addActionListener(new ActionListener() { |
441 | 449 |
public void actionPerformed(ActionEvent e) { |
442 |
JOptionPane.showConfirmDialog(TopologyErrorPanel.this, "DESARROLLO: Aqu? se mostrar? una descripci?n de la regla violada"); |
|
450 |
final JDialog descriptionDialog = new JDialog(); |
|
451 |
descriptionDialog.setLayout(new BorderLayout()); |
|
452 |
JScrollPane rightPanel = new JScrollPane(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED, JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED); |
|
453 |
JEditorPane htmlViewer = new JEditorPane(){ |
|
454 |
public URL getPage() { |
|
455 |
return null; |
|
456 |
} |
|
457 |
}; |
|
458 |
htmlViewer.setEditable(false); |
|
459 |
htmlViewer.setEditorKit(new HTMLEditorKit()); |
|
460 |
rightPanel.setViewportView(htmlViewer); |
|
461 |
rightPanel.setPreferredSize(new Dimension(250, 140)); |
|
462 |
try { |
|
463 |
ITopologyRule rule = error.getViolatedRule(); |
|
464 |
URL description = rule.getDescription(); |
|
465 |
htmlViewer.setPage(description); |
|
466 |
} catch (Exception ex) { |
|
467 |
htmlViewer.setText("<p>"+PluginServices.getText(this, "UNAVAILABLE_DESCRIPTION")+"</p>"); |
|
468 |
} |
|
469 |
|
|
470 |
|
|
471 |
JPanel southPanel = new JPanel(); |
|
472 |
JButton okButton = new JButton(PluginServices.getText(this, "OK")); |
|
473 |
okButton.addActionListener(new ActionListener(){ |
|
474 |
public void actionPerformed(ActionEvent arg0) { |
|
475 |
descriptionDialog.dispose(); |
|
476 |
}}); |
|
477 |
southPanel.setLayout(new BoxLayout(southPanel, BoxLayout.X_AXIS)); |
|
478 |
southPanel.add(okButton); |
|
479 |
|
|
480 |
descriptionDialog.add(rightPanel, BorderLayout.CENTER); |
|
481 |
descriptionDialog.add(southPanel, BorderLayout.SOUTH); |
|
482 |
descriptionDialog.setSize(new Dimension(300, 300)); |
|
483 |
descriptionDialog.setVisible(true); |
|
484 |
// JOptionPane.showConfirmDialog(TopologyErrorPanel.this, "DESARROLLO: Aqu? se mostrar? una descripci?n de la regla violada"); |
|
443 | 485 |
} |
444 | 486 |
}); |
445 | 487 |
contextMenu.add(viewDescriptionMenu); |
446 | 488 |
contextMenu.addSeparator(); |
447 | 489 |
|
490 |
|
|
491 |
JMenuItem markAsExceptionMenu = new JMenuItem(); |
|
492 |
markAsExceptionMenu.setText(PluginServices.getText(this, "MARK_AS_EXCEPTION")); |
|
493 |
markAsExceptionMenu.addActionListener(new ActionListener() { |
|
494 |
public void actionPerformed(ActionEvent e) { |
|
495 |
error.getTopology().markAsTopologyException(error); |
|
496 |
updateErrorTable(); |
|
497 |
} |
|
498 |
}); |
|
499 |
contextMenu.add(markAsExceptionMenu); |
|
500 |
|
|
501 |
|
|
448 | 502 |
ITopologyRule violatedRule = error.getViolatedRule(); |
449 |
|
|
450 | 503 |
//TODO Obtener las correcciones predefinidas para cada tipo de regla |
451 | 504 |
//violada (Milestone 4) |
452 | 505 |
return contextMenu; |
trunk/extensions/extTopology/src/org/gvsig/topology/ui/NewTopologyWizard.java | ||
---|---|---|
73 | 73 |
import com.iver.andami.ui.mdiManager.WindowInfo; |
74 | 74 |
import com.iver.andami.ui.wizard.WizardAndami; |
75 | 75 |
import com.iver.cit.gvsig.fmap.MapContext; |
76 |
import com.iver.cit.gvsig.fmap.layers.CancelationException; |
|
76 | 77 |
import com.iver.cit.gvsig.fmap.layers.FLyrVect; |
78 |
import com.iver.cit.gvsig.fmap.layers.LayerCollectionEvent; |
|
79 |
import com.iver.cit.gvsig.fmap.layers.LayerCollectionListener; |
|
80 |
import com.iver.cit.gvsig.fmap.layers.LayerPositionEvent; |
|
77 | 81 |
|
78 | 82 |
/** |
79 | 83 |
* Wizard to create new topologies. |
... | ... | |
136 | 140 |
return; |
137 | 141 |
} |
138 | 142 |
|
139 |
Topology newTopology = new Topology(tempMapContext, tempMapContext.getLayers()); |
|
143 |
final Topology newTopology = new Topology(tempMapContext, tempMapContext.getLayers()); |
|
144 |
|
|
145 |
//trick to update TOC component |
|
146 |
newTopology.addLayerCollectionListener(new LayerCollectionListener(){ |
|
147 |
public void layerAdded(LayerCollectionEvent e) { |
|
148 |
tempMapContext.endAtomicEvent(); |
|
149 |
newTopology.moveTo(1, 1); |
|
150 |
} |
|
151 |
|
|
152 |
public void layerAdding(LayerCollectionEvent e) |
|
153 |
throws CancelationException { |
|
154 |
|
|
155 |
tempMapContext.beginAtomicEvent(); |
|
156 |
} |
|
157 |
|
|
158 |
public void layerMoved(LayerPositionEvent e) { |
|
159 |
} |
|
160 |
|
|
161 |
public void layerMoving(LayerPositionEvent e) |
|
162 |
throws CancelationException { |
|
163 |
} |
|
164 |
|
|
165 |
public void layerRemoved(LayerCollectionEvent e) { |
|
166 |
} |
|
167 |
|
|
168 |
public void layerRemoving(LayerCollectionEvent e) |
|
169 |
throws CancelationException { |
|
170 |
} |
|
171 |
|
|
172 |
public void visibilityChanged(LayerCollectionEvent e) |
|
173 |
throws CancelationException { |
|
174 |
}}); |
|
175 |
|
|
140 | 176 |
int maxNumberOfErrors = propertiesPanel.getMaxNumberOfErrors(); |
141 | 177 |
if(maxNumberOfErrors >= 0){ |
142 | 178 |
newTopology.setMaxNumberOfErrors(maxNumberOfErrors); |
Also available in: Unified diff