Revision 44764 trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.swing/org.gvsig.fmap.dal.swing.impl/src/main/java/org/gvsig/fmap/dal/swing/impl/searchpanel/DefaultSearchPanel.java
DefaultSearchPanel.java | ||
---|---|---|
21 | 21 |
import javax.swing.ImageIcon; |
22 | 22 |
import javax.swing.JButton; |
23 | 23 |
import javax.swing.JComponent; |
24 |
import javax.swing.JOptionPane; |
|
24 | 25 |
import javax.swing.SwingUtilities; |
25 | 26 |
import javax.swing.event.ListSelectionEvent; |
26 | 27 |
import javax.swing.event.ListSelectionListener; |
... | ... | |
71 | 72 |
import org.gvsig.fmap.dal.swing.featurequery.FeatureQueryOrderPanel; |
72 | 73 |
import org.gvsig.fmap.dal.swing.impl.featurequery.DefaultFeatureQueryCalculatedColumnsPanel; |
73 | 74 |
import org.gvsig.fmap.dal.swing.featuretype.FeatureAttributesSelectionPanel; |
75 |
import org.gvsig.tools.swing.api.threadsafedialogs.ThreadSafeDialogsManager; |
|
74 | 76 |
|
75 | 77 |
/** |
76 | 78 |
* |
... | ... | |
567 | 569 |
return this.parameters.getQuery(); |
568 | 570 |
} |
569 | 571 |
|
572 |
public boolean isValid(StringBuilder message) { |
|
573 |
int searchMode = this.tabSearchMode.getSelectedIndex(); |
|
574 |
SearchConditionPanel panel = this.conditionPanels.get(searchMode); |
|
575 |
boolean valid = panel.isValid(message); |
|
576 |
return valid; |
|
577 |
} |
|
578 |
|
|
570 | 579 |
@Override |
571 | 580 |
public void search() { |
572 | 581 |
final MutableObject model = new MutableObject(null); |
573 |
|
|
582 |
|
|
583 |
StringBuilder message = new StringBuilder(); |
|
584 |
if( !this.isValid(message) ) { |
|
585 |
ThreadSafeDialogsManager dialogManager = ToolsSwingLocator.getThreadSafeDialogsManager(); |
|
586 |
dialogManager.messageDialog( |
|
587 |
"_The_specified_search_condition_is_not_valid", |
|
588 |
"_Search", |
|
589 |
JOptionPane.WARNING_MESSAGE |
|
590 |
); |
|
591 |
return; |
|
592 |
} |
|
574 | 593 |
lblMsg.setText("Searching..."); |
575 | 594 |
setEnabled(false); |
576 | 595 |
Thread th = new Thread(() -> { |
Also available in: Unified diff