svn-gvsig-desktop / 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 @ 44835
History | View | Annotate | Download (39.6 KB)
1 |
package org.gvsig.fmap.dal.swing.impl.searchpanel; |
---|---|
2 |
|
3 |
import java.awt.BorderLayout; |
4 |
import java.awt.Cursor; |
5 |
import java.awt.Dimension; |
6 |
import java.awt.FlowLayout; |
7 |
import java.awt.event.ActionEvent; |
8 |
import java.awt.event.ActionListener; |
9 |
import java.net.URL; |
10 |
import java.text.DateFormat; |
11 |
import java.text.SimpleDateFormat; |
12 |
import java.util.ArrayList; |
13 |
import java.util.Calendar; |
14 |
import java.util.Collection; |
15 |
import java.util.Collections; |
16 |
import java.util.Date; |
17 |
import java.util.HashMap; |
18 |
import java.util.List; |
19 |
import java.util.Map; |
20 |
import javax.swing.AbstractAction; |
21 |
import javax.swing.Action; |
22 |
import static javax.swing.Action.ACTION_COMMAND_KEY; |
23 |
import static javax.swing.Action.NAME; |
24 |
import javax.swing.BorderFactory; |
25 |
import javax.swing.ImageIcon; |
26 |
import javax.swing.JButton; |
27 |
import javax.swing.JComponent; |
28 |
import javax.swing.JOptionPane; |
29 |
import javax.swing.SwingUtilities; |
30 |
import javax.swing.event.ListSelectionEvent; |
31 |
import javax.swing.event.ListSelectionListener; |
32 |
import javax.swing.table.TableModel; |
33 |
import org.apache.commons.io.FilenameUtils; |
34 |
import org.apache.commons.lang.mutable.MutableObject; |
35 |
import org.apache.commons.lang3.StringUtils; |
36 |
import org.gvsig.configurableactions.ConfigurableActionsMamager; |
37 |
import org.gvsig.expressionevaluator.Expression; |
38 |
import org.gvsig.expressionevaluator.ExpressionBuilder; |
39 |
import org.gvsig.expressionevaluator.ExpressionUtils; |
40 |
import static org.gvsig.fmap.dal.DataManager.DAL_USE_LABELS; |
41 |
import static org.gvsig.fmap.dal.DataManager.USE_LABELS_BOTH; |
42 |
import static org.gvsig.fmap.dal.DataManager.USE_LABELS_NO; |
43 |
import static org.gvsig.fmap.dal.DataManager.USE_LABELS_YES; |
44 |
import org.gvsig.fmap.dal.DataStore; |
45 |
import org.gvsig.fmap.dal.complements.Search; |
46 |
import org.gvsig.fmap.dal.exception.DataException; |
47 |
import org.gvsig.fmap.dal.feature.Feature; |
48 |
import org.gvsig.fmap.dal.feature.FeatureAttributeDescriptor; |
49 |
import org.gvsig.fmap.dal.feature.FeatureQuery; |
50 |
import org.gvsig.fmap.dal.feature.FeatureStore; |
51 |
import org.gvsig.fmap.dal.feature.FeatureStoreProviderFactory; |
52 |
import org.gvsig.fmap.dal.feature.FeatureType; |
53 |
import org.gvsig.fmap.dal.feature.paging.FacadeOfAFeaturePagingHelper; |
54 |
import org.gvsig.fmap.dal.swing.AbstractDALActionFactory.AbstractDALActionContext; |
55 |
import org.gvsig.fmap.dal.swing.DALActionFactory; |
56 |
import org.gvsig.fmap.dal.swing.DALSwingLocator; |
57 |
import org.gvsig.fmap.dal.swing.featurequery.FeatureQueryCalculatedColumnsPanel; |
58 |
import org.gvsig.fmap.dal.swing.impl.featuretable.SimpleFeaturesTableModel; |
59 |
import org.gvsig.fmap.dal.swing.impl.featurequery.DefaultFeatureQueryGroupByPanel; |
60 |
import org.gvsig.fmap.dal.swing.searchpanel.FeatureStoreSearchPanel; |
61 |
import org.gvsig.fmap.dal.swing.searchpanel.SearchConditionPanel; |
62 |
import org.gvsig.fmap.dal.swing.searchpanel.SearchConditionPanel.SearchConditionPanelFactory; |
63 |
import org.gvsig.tools.ToolsLocator; |
64 |
import org.gvsig.tools.dataTypes.DataType; |
65 |
import org.gvsig.tools.dynobject.Tags; |
66 |
import org.gvsig.tools.i18n.I18nManager; |
67 |
import org.gvsig.tools.swing.api.ActionListenerSupport; |
68 |
import org.gvsig.tools.swing.api.ToolsSwingLocator; |
69 |
import org.gvsig.tools.swing.api.ToolsSwingManager; |
70 |
import org.gvsig.tools.swing.api.windowmanager.Dialog; |
71 |
import org.gvsig.tools.swing.api.windowmanager.WindowManager; |
72 |
import org.gvsig.tools.swing.api.windowmanager.WindowManager_v2; |
73 |
import org.gvsig.tools.swing.icontheme.IconTheme; |
74 |
import org.gvsig.tools.util.ToolsUtilLocator; |
75 |
import org.slf4j.Logger; |
76 |
import org.slf4j.LoggerFactory; |
77 |
import org.gvsig.fmap.dal.swing.featurequery.FeatureQueryGroupByPanel; |
78 |
import org.gvsig.fmap.dal.swing.featurequery.FeatureQueryOrderPanel; |
79 |
import org.gvsig.fmap.dal.swing.impl.featurequery.DefaultFeatureQueryCalculatedColumnsPanel; |
80 |
import org.gvsig.fmap.dal.swing.featuretype.FeatureAttributesSelectionPanel; |
81 |
import org.gvsig.fmap.dal.swing.searchpanel.SearchParameters; |
82 |
import org.gvsig.tools.bookmarksandhistory.Bookmarks; |
83 |
import org.gvsig.tools.bookmarksandhistory.History; |
84 |
import org.gvsig.tools.swing.api.bookmarkshistory.ActionEventWithCurrentValue; |
85 |
import static org.gvsig.tools.swing.api.bookmarkshistory.ActionEventWithCurrentValue.ID_GETVALUE; |
86 |
import static org.gvsig.tools.swing.api.bookmarkshistory.ActionEventWithCurrentValue.ID_SETVALUE; |
87 |
import org.gvsig.tools.swing.api.bookmarkshistory.BookmarksController; |
88 |
import org.gvsig.tools.swing.api.bookmarkshistory.HistoryController; |
89 |
import org.gvsig.tools.swing.api.threadsafedialogs.ThreadSafeDialogsManager; |
90 |
|
91 |
/**
|
92 |
*
|
93 |
* @author jjdelcerro
|
94 |
*/
|
95 |
@SuppressWarnings({"UseSpecificCatch"}) |
96 |
public class DefaultSearchPanel |
97 |
extends DefaultSearchPanelView
|
98 |
implements FeatureStoreSearchPanel {
|
99 |
|
100 |
private static final Logger LOGGER = LoggerFactory.getLogger(DefaultSearchPanel.class); |
101 |
|
102 |
static /* friend */ Integer useLabels = null; |
103 |
private BookmarksController bookmarksController;
|
104 |
private HistoryController historyController;
|
105 |
private FeatureQuery lastQuery;
|
106 |
|
107 |
public static class UseLabelsYesAction extends AbstractAction { |
108 |
|
109 |
@SuppressWarnings("OverridableMethodCallInConstructor") |
110 |
public UseLabelsYesAction() {
|
111 |
I18nManager i18n = ToolsLocator.getI18nManager(); |
112 |
|
113 |
this.putValue(NAME, i18n.getTranslation("_Use_labels")); |
114 |
this.putValue(ACTION_COMMAND_KEY, "UseLabelsYes"); |
115 |
} |
116 |
|
117 |
@Override
|
118 |
public Object getValue(String key) { |
119 |
if (NAME.equals(key)) {
|
120 |
// Cuando se registra la accion aun no se han cargado las traducciones
|
121 |
I18nManager i18n = ToolsLocator.getI18nManager(); |
122 |
return i18n.getTranslation("_Use_labels"); |
123 |
} |
124 |
return super.getValue(key); |
125 |
} |
126 |
|
127 |
@Override
|
128 |
public void actionPerformed(ActionEvent ae) { |
129 |
DefaultSearchPanel.useLabels = USE_LABELS_YES; |
130 |
} |
131 |
} |
132 |
|
133 |
public static class UseLabelsNoAction extends AbstractAction { |
134 |
|
135 |
@SuppressWarnings("OverridableMethodCallInConstructor") |
136 |
public UseLabelsNoAction() {
|
137 |
I18nManager i18n = ToolsLocator.getI18nManager(); |
138 |
this.putValue(NAME, i18n.getTranslation("_Use_names")); |
139 |
this.putValue(ACTION_COMMAND_KEY, "UseLabelsNo"); |
140 |
} |
141 |
|
142 |
@Override
|
143 |
public Object getValue(String key) { |
144 |
if (NAME.equals(key)) {
|
145 |
// Cuando se registra la accion aun no se han cargado las traducciones
|
146 |
I18nManager i18n = ToolsLocator.getI18nManager(); |
147 |
return i18n.getTranslation("_Use_names"); |
148 |
} |
149 |
return super.getValue(key); |
150 |
} |
151 |
|
152 |
@Override
|
153 |
public void actionPerformed(ActionEvent ae) { |
154 |
DefaultSearchPanel.useLabels = USE_LABELS_NO; |
155 |
} |
156 |
} |
157 |
|
158 |
public static class UseLabelsBothAction extends AbstractAction { |
159 |
|
160 |
@SuppressWarnings("OverridableMethodCallInConstructor") |
161 |
public UseLabelsBothAction() {
|
162 |
I18nManager i18n = ToolsLocator.getI18nManager(); |
163 |
|
164 |
this.putValue(NAME, i18n.getTranslation("_Use_labels_and_names")); |
165 |
this.putValue(ACTION_COMMAND_KEY, "UseLabelsBoth"); |
166 |
} |
167 |
|
168 |
@Override
|
169 |
public Object getValue(String key) { |
170 |
if (NAME.equals(key)) {
|
171 |
// Cuando se registra la accion aun no se han cargado las traducciones
|
172 |
I18nManager i18n = ToolsLocator.getI18nManager(); |
173 |
return i18n.getTranslation("_Use_labels_and_names"); |
174 |
} |
175 |
return super.getValue(key); |
176 |
} |
177 |
|
178 |
@Override
|
179 |
public void actionPerformed(ActionEvent ae) { |
180 |
DefaultSearchPanel.useLabels = USE_LABELS_BOTH; |
181 |
} |
182 |
} |
183 |
|
184 |
public static class SelectColumnsAction extends AbstractAction { |
185 |
|
186 |
@SuppressWarnings("OverridableMethodCallInConstructor") |
187 |
public SelectColumnsAction() {
|
188 |
I18nManager i18n = ToolsLocator.getI18nManager(); |
189 |
|
190 |
this.putValue(NAME, i18n.getTranslation("_Select_columns_to_display")); |
191 |
this.putValue(ACTION_COMMAND_KEY, "SelectColumns"); |
192 |
} |
193 |
|
194 |
@Override
|
195 |
public Object getValue(String key) { |
196 |
if (NAME.equals(key)) {
|
197 |
// Cuando se registra la accion aun no se han cargado las traducciones
|
198 |
I18nManager i18n = ToolsLocator.getI18nManager(); |
199 |
return i18n.getTranslation("_Select_columns_to_display"); |
200 |
} |
201 |
return super.getValue(key); |
202 |
} |
203 |
|
204 |
@Override
|
205 |
public void actionPerformed(ActionEvent ae) { |
206 |
DefaultSearchPanel panel = (DefaultSearchPanel) ae.getSource(); |
207 |
panel.doSelectResultColumnNames(); |
208 |
} |
209 |
} |
210 |
|
211 |
public static class CalculatedColumnsAction extends AbstractAction { |
212 |
|
213 |
@SuppressWarnings("OverridableMethodCallInConstructor") |
214 |
public CalculatedColumnsAction() {
|
215 |
I18nManager i18n = ToolsLocator.getI18nManager(); |
216 |
|
217 |
this.putValue(NAME, i18n.getTranslation("_Calculated_columns")); |
218 |
this.putValue(ACTION_COMMAND_KEY, "CalculatedColumns"); |
219 |
} |
220 |
|
221 |
@Override
|
222 |
public Object getValue(String key) { |
223 |
if (NAME.equals(key)) {
|
224 |
// Cuando se registra la accion aun no se han cargado las traducciones
|
225 |
I18nManager i18n = ToolsLocator.getI18nManager(); |
226 |
return i18n.getTranslation("_Calculated_columns"); |
227 |
} |
228 |
return super.getValue(key); |
229 |
} |
230 |
|
231 |
@Override
|
232 |
public void actionPerformed(ActionEvent ae) { |
233 |
DefaultSearchPanel panel = (DefaultSearchPanel) ae.getSource(); |
234 |
panel.doCalculatedColumns(); |
235 |
} |
236 |
} |
237 |
|
238 |
public static class GroupByAction extends AbstractAction { |
239 |
|
240 |
@SuppressWarnings("OverridableMethodCallInConstructor") |
241 |
public GroupByAction() {
|
242 |
I18nManager i18n = ToolsLocator.getI18nManager(); |
243 |
|
244 |
this.putValue(NAME, i18n.getTranslation("_Group_by")); |
245 |
this.putValue(ACTION_COMMAND_KEY, "GroupBy"); |
246 |
} |
247 |
|
248 |
@Override
|
249 |
public Object getValue(String key) { |
250 |
if (NAME.equals(key)) {
|
251 |
// Cuando se registra la accion aun no se han cargado las traducciones
|
252 |
I18nManager i18n = ToolsLocator.getI18nManager(); |
253 |
return i18n.getTranslation("_Group_by"); |
254 |
} |
255 |
return super.getValue(key); |
256 |
} |
257 |
|
258 |
@Override
|
259 |
public void actionPerformed(ActionEvent ae) { |
260 |
DefaultSearchPanel panel = (DefaultSearchPanel) ae.getSource(); |
261 |
panel.doGroupBy(); |
262 |
} |
263 |
} |
264 |
|
265 |
public static class OrderByAction extends AbstractAction { |
266 |
|
267 |
@SuppressWarnings("OverridableMethodCallInConstructor") |
268 |
public OrderByAction() {
|
269 |
I18nManager i18n = ToolsLocator.getI18nManager(); |
270 |
|
271 |
this.putValue(NAME, i18n.getTranslation("_Order_by")); |
272 |
this.putValue(ACTION_COMMAND_KEY, "SelectOrderBy"); |
273 |
} |
274 |
|
275 |
@Override
|
276 |
public Object getValue(String key) { |
277 |
if (NAME.equals(key)) {
|
278 |
// Cuando se registra la accion aun no se han cargado las traducciones
|
279 |
I18nManager i18n = ToolsLocator.getI18nManager(); |
280 |
return i18n.getTranslation("_Order_by"); |
281 |
} |
282 |
return super.getValue(key); |
283 |
} |
284 |
|
285 |
@Override
|
286 |
public void actionPerformed(ActionEvent ae) { |
287 |
DefaultSearchPanel panel = (DefaultSearchPanel) ae.getSource(); |
288 |
panel.doOrderBy(); |
289 |
} |
290 |
} |
291 |
|
292 |
private class ActionButtons { |
293 |
|
294 |
private final DALActionFactory factory; |
295 |
private final Action action; |
296 |
private final JButton button; |
297 |
|
298 |
public ActionButtons(DALActionFactory factory, Action action, JButton button) { |
299 |
this.factory = factory;
|
300 |
this.action = action;
|
301 |
this.button = button;
|
302 |
} |
303 |
} |
304 |
|
305 |
public static class SearchActionContext extends AbstractDALActionContext { |
306 |
|
307 |
private final DefaultSearchPanel panel; |
308 |
|
309 |
public SearchActionContext(DefaultSearchPanel panel) {
|
310 |
super(FeatureStoreSearchPanel.ACTION_CONTEXT_NAME);
|
311 |
this.panel = panel;
|
312 |
} |
313 |
|
314 |
@Override
|
315 |
public DataStore getStore() {
|
316 |
return this.panel.getStore(); |
317 |
} |
318 |
|
319 |
@Override
|
320 |
public JComponent getActionButton(String actionName) { |
321 |
return this.panel.getActionButton(actionName); |
322 |
} |
323 |
|
324 |
@Override
|
325 |
public int getSelectedsCount() { |
326 |
return this.panel.getSelectedFeatureCount(); |
327 |
} |
328 |
|
329 |
@Override
|
330 |
public Expression getFilterForSelecteds() { |
331 |
return this.panel.getFilterForSelectedFeature(); |
332 |
} |
333 |
|
334 |
@Override
|
335 |
public FeatureQuery getQuery() {
|
336 |
return this.panel.getQuery(); |
337 |
} |
338 |
} |
339 |
|
340 |
private final FeatureStore store; |
341 |
private final ActionListenerSupport acctionListeners; |
342 |
private final Map<String, ActionButtons> actions; |
343 |
private boolean showActions = true; |
344 |
private DefaultSearchParameters parameters;
|
345 |
|
346 |
private List<SearchConditionPanel> conditionPanels; |
347 |
|
348 |
private static final int PANEL_SIMPLIFIED = 0; |
349 |
private static final int PANEL_ADVANCED = 1; |
350 |
private static final String BOOKMARKSANDHISTORY_NAME = "SearchPanel"; |
351 |
private final Bookmarks<Object> bookmarks; |
352 |
private final History<Object> history; |
353 |
|
354 |
public DefaultSearchPanel(FeatureStore store) {
|
355 |
this.store = store;
|
356 |
this.acctionListeners = ToolsSwingLocator.getToolsSwingManager().createActionListenerSupport();
|
357 |
this.actions = new HashMap<>(); |
358 |
this.parameters = new DefaultSearchParameters(); |
359 |
FeatureQuery featureQuery = this.store.createFeatureQuery();
|
360 |
featureQuery.retrievesAllAttributes(); |
361 |
this.parameters.setQuery(featureQuery);
|
362 |
|
363 |
Search search = (Search) ToolsLocator.getComplementsManager().get( |
364 |
Search.COMPLEMENT_MANE, getFeatureType() |
365 |
); |
366 |
List<Search.OrderedAttribute> attributos = search.getOrderedAttributes(
|
367 |
Search.BASIC_TYPES_FILTER, |
368 |
Search.STR_INT_LONG_LABEL_ORDER, |
369 |
12
|
370 |
); |
371 |
for (Search.OrderedAttribute attrdesc : attributos) {
|
372 |
this.parameters.getResultColumnNames().add(attrdesc.getDescriptor().getName());
|
373 |
} |
374 |
this.bookmarks = ToolsLocator.getBookmarksAndHistoryManager().getBookmarksGroup(BOOKMARKSANDHISTORY_NAME);
|
375 |
this.history = ToolsLocator.getBookmarksAndHistoryManager().getHistoryGroup(BOOKMARKSANDHISTORY_NAME);
|
376 |
} |
377 |
|
378 |
@Override
|
379 |
public JComponent asJComponent() { |
380 |
if (this.conditionPanels == null) { |
381 |
this.initComponents();
|
382 |
} |
383 |
return this; |
384 |
} |
385 |
|
386 |
private void addActions() { |
387 |
if (!this.showActions) { |
388 |
return;
|
389 |
} |
390 |
this.pnlActions.removeAll();
|
391 |
this.pnlActions.setLayout(new FlowLayout(FlowLayout.TRAILING, 8, 4)); |
392 |
SearchActionContext actionContext = new SearchActionContext(this); |
393 |
Collection<DALActionFactory> factories = DALSwingLocator.getSwingManager().getStoreActions();
|
394 |
for (DALActionFactory factory : factories) {
|
395 |
Action action = factory.createAction(actionContext);
|
396 |
JButton button = new JButton(action); |
397 |
this.actions.put(factory.getName(), new ActionButtons(factory, action, button)); |
398 |
button.setBorder(BorderFactory.createEmptyBorder());
|
399 |
button.setBorderPainted(false);
|
400 |
button.setFocusPainted(false);
|
401 |
button.setContentAreaFilled(false);
|
402 |
button.setCursor(new Cursor(Cursor.HAND_CURSOR)); |
403 |
this.pnlActions.add(button);
|
404 |
} |
405 |
this.pnlActions.revalidate();
|
406 |
this.pnlActions.repaint();
|
407 |
} |
408 |
|
409 |
@Override
|
410 |
public void addActionListener(ActionListener listener) { |
411 |
this.acctionListeners.addActionListener(listener);
|
412 |
} |
413 |
|
414 |
@Override
|
415 |
public ActionListener[] getActionListeners() { |
416 |
return this.acctionListeners.getActionListeners(); |
417 |
} |
418 |
|
419 |
@Override
|
420 |
public void removeActionListener(ActionListener listener) { |
421 |
this.acctionListeners.removeActionListener(listener);
|
422 |
} |
423 |
|
424 |
@Override
|
425 |
public void removeAllActionListener() { |
426 |
this.acctionListeners.removeAllActionListener();
|
427 |
} |
428 |
|
429 |
@Override
|
430 |
public void fireActionEvent(ActionEvent event) { |
431 |
this.acctionListeners.fireActionEvent(event);
|
432 |
} |
433 |
|
434 |
@Override
|
435 |
public boolean hasActionListeners() { |
436 |
return this.acctionListeners.hasActionListeners(); |
437 |
} |
438 |
|
439 |
private void initComponents() { |
440 |
this.conditionPanels = new ArrayList<>(); |
441 |
|
442 |
ToolsSwingManager swingManager = ToolsSwingLocator.getToolsSwingManager(); |
443 |
swingManager.translate(this.tabSearchMode);
|
444 |
swingManager.translate(this.btnSearch);
|
445 |
swingManager.translate(this.btnClear);
|
446 |
swingManager.translate(this.lblExpressionDeBusqueda);
|
447 |
swingManager.translate(this.btnAddAccumulatedFilter);
|
448 |
swingManager.translate(this.btnRemoveAccumulatedFilter);
|
449 |
swingManager.translate(this.btnViewAccumulatedFilter);
|
450 |
|
451 |
ConfigurableActionsMamager cfgActionsManager = ToolsUtilLocator.getConfigurableActionsMamager(); |
452 |
JComponent c = cfgActionsManager.getConfigurableActionsComponent(CONFIGURABLE_PANEL_ID, this); |
453 |
this.pnlCfgActions.setLayout(new BorderLayout(0, 0)); |
454 |
this.pnlCfgActions.add(c, BorderLayout.CENTER); |
455 |
|
456 |
this.conditionPanels.add(
|
457 |
new SearchConditionPanelSimplified(
|
458 |
store, |
459 |
btnAddAccumulatedFilter, |
460 |
btnRemoveAccumulatedFilter, |
461 |
btnViewAccumulatedFilter, |
462 |
lblField1, |
463 |
lblExtraFields1, |
464 |
lblRelationalOperator1, |
465 |
cboValue1, |
466 |
lblLogicalOperators1, |
467 |
lblField2, |
468 |
lblExtraFields2, |
469 |
lblRelationalOperator2, |
470 |
cboValue2, |
471 |
lblLogicalOperators2, |
472 |
lblField3, |
473 |
lblExtraFields3, |
474 |
lblRelationalOperator3, |
475 |
cboValue3, |
476 |
lblLogicalOperators3, |
477 |
lblField4, |
478 |
lblExtraFields4, |
479 |
lblRelationalOperator4, |
480 |
cboValue4, |
481 |
null
|
482 |
) |
483 |
); |
484 |
this.conditionPanels.add(
|
485 |
new SearchConditionPanelAdvanced(
|
486 |
this.store,
|
487 |
txtAdvancedExpression, |
488 |
btnAdvancedExpression, |
489 |
btnAdvancedExpressionHistory, |
490 |
btnAdvancedExpressionBookmarks |
491 |
) |
492 |
); |
493 |
for (SearchConditionPanelFactory factory : DALSwingLocator.getManager().getSearchConditionPanels()) {
|
494 |
String factoryName = "unknown"; |
495 |
try {
|
496 |
factoryName = factory.getName(); |
497 |
if (factory.isApplicable(store)) {
|
498 |
SearchConditionPanel panel = factory.create(this);
|
499 |
this.conditionPanels.add(panel);
|
500 |
this.tabSearchMode.add(factory.getName(), panel.asJComponent());
|
501 |
} |
502 |
} catch (Throwable th) { |
503 |
LOGGER.warn("Can't create search panel '" + factoryName + "'."); |
504 |
} |
505 |
} |
506 |
|
507 |
this.btnSearch.addActionListener((ActionEvent e) -> { |
508 |
search(); |
509 |
}); |
510 |
|
511 |
this.tblResults.getSelectionModel().addListSelectionListener((ListSelectionEvent e) -> { |
512 |
for (ActionButtons actionButton : actions.values()) {
|
513 |
if (actionButton.action instanceof ListSelectionListener) { |
514 |
((ListSelectionListener) actionButton.action).valueChanged(e);
|
515 |
} |
516 |
} |
517 |
}); |
518 |
this.btnClear.addActionListener((ActionEvent e) -> { |
519 |
clear(); |
520 |
}); |
521 |
addActions(); |
522 |
|
523 |
swingManager.createTableColumnAdjuster(tblResults); |
524 |
|
525 |
this.setPreferredSize(new Dimension(DEFAULT_WIDTH, DEFAULT_HEIGHT)); |
526 |
|
527 |
this.bookmarksController = ToolsSwingLocator.getToolsSwingManager().createBookmarksController(this.bookmarks, btnBookmarks); |
528 |
this.historyController = ToolsSwingLocator.getToolsSwingManager().createHistoryController(this.history, btnHistory); |
529 |
|
530 |
this.historyController.setFilter(null); |
531 |
|
532 |
ActionListener bookmarksAndHistoryListener = new ActionListener() { |
533 |
@Override
|
534 |
public void actionPerformed(ActionEvent e) { |
535 |
ActionEventWithCurrentValue<DefaultSearchParameters> b = (ActionEventWithCurrentValue<DefaultSearchParameters>) e; |
536 |
switch (b.getID()) {
|
537 |
case ID_GETVALUE:
|
538 |
DefaultSearchParameters actualParams = (DefaultSearchParameters) fetch(null);
|
539 |
b.setCurrentValue(actualParams); |
540 |
break;
|
541 |
|
542 |
case ID_SETVALUE:
|
543 |
if (b.getCurrentValue() == null) { |
544 |
return;
|
545 |
} |
546 |
DefaultSearchParameters searchParams; |
547 |
try {
|
548 |
searchParams = b.getCurrentValue().getCopy(); |
549 |
} catch (Exception ex) { |
550 |
LOGGER.warn("Not been able to clone export parameters", ex);
|
551 |
return;
|
552 |
} |
553 |
clear(); |
554 |
put(searchParams); |
555 |
break;
|
556 |
} |
557 |
|
558 |
} |
559 |
}; |
560 |
this.historyController.addActionListener(bookmarksAndHistoryListener);
|
561 |
this.bookmarksController.addActionListener(bookmarksAndHistoryListener);
|
562 |
|
563 |
search(); |
564 |
} |
565 |
|
566 |
private FeatureType getFeatureType() {
|
567 |
try {
|
568 |
return store.getDefaultFeatureType();
|
569 |
} catch (Exception ex) { |
570 |
throw new RuntimeException("Can't retrieve the feature type.", ex); |
571 |
} |
572 |
} |
573 |
|
574 |
@Override
|
575 |
public void setEnabled(boolean enabled) { |
576 |
if (this.conditionPanels == null) { |
577 |
this.initComponents();
|
578 |
} |
579 |
for (SearchConditionPanel conditionPanel : conditionPanels) {
|
580 |
conditionPanel.setEnabled(enabled); |
581 |
} |
582 |
|
583 |
this.btnClear.setEnabled(enabled);
|
584 |
this.btnSearch.setEnabled(enabled);
|
585 |
for (ActionButtons actionButton : actions.values()) {
|
586 |
actionButton.action.setEnabled(enabled); |
587 |
} |
588 |
} |
589 |
|
590 |
@Override
|
591 |
public void clear() { |
592 |
if (this.conditionPanels == null) { |
593 |
return;
|
594 |
} |
595 |
for (SearchConditionPanel conditionPanel : conditionPanels) {
|
596 |
conditionPanel.clear(); |
597 |
} |
598 |
} |
599 |
|
600 |
@Override
|
601 |
public FeatureQuery getLastQuery() {
|
602 |
return this.lastQuery; |
603 |
} |
604 |
|
605 |
public boolean isValid(StringBuilder message) { |
606 |
int searchMode = this.tabSearchMode.getSelectedIndex(); |
607 |
SearchConditionPanel panel = this.conditionPanels.get(searchMode);
|
608 |
boolean valid = panel.isValid(message);
|
609 |
return valid;
|
610 |
} |
611 |
|
612 |
@Override
|
613 |
public void search() { |
614 |
final MutableObject model = new MutableObject(null); |
615 |
|
616 |
StringBuilder message = new StringBuilder(); |
617 |
if (!this.isValid(message)) { |
618 |
ThreadSafeDialogsManager dialogManager = ToolsSwingLocator.getThreadSafeDialogsManager(); |
619 |
dialogManager.messageDialog( |
620 |
"_The_specified_search_condition_is_not_valid",
|
621 |
"_Search",
|
622 |
JOptionPane.WARNING_MESSAGE
|
623 |
); |
624 |
return;
|
625 |
} |
626 |
lblMsg.setText("Searching...");
|
627 |
setEnabled(false);
|
628 |
Thread th = new Thread(() -> { |
629 |
FeatureQuery myQuery = null;
|
630 |
SearchParameters params; |
631 |
try {
|
632 |
params = this.fetch(this.parameters.getCopy()); // esto lo actualiza a la ultima // decidir si se devuelve clonado |
633 |
Date date = Calendar.getInstance().getTime(); |
634 |
DateFormat dateFormat = new SimpleDateFormat("yyyy-mm-dd hh:mm:ss"); |
635 |
String strDate = dateFormat.format(date);
|
636 |
params.setName("Params: " + strDate);
|
637 |
} catch (Exception ex) { |
638 |
LOGGER.warn("Not able to create search parameters.", ex);
|
639 |
return;
|
640 |
} |
641 |
|
642 |
try {
|
643 |
final List<Feature> features; |
644 |
|
645 |
myQuery = this.getQuery().getCopy();
|
646 |
features = store.getFeatures(myQuery); |
647 |
FacadeOfAFeaturePagingHelper facade = (FacadeOfAFeaturePagingHelper) features; |
648 |
FeatureType ftype = facade.getFeaturePagingHelper().getFeatureSet().getDefaultFeatureType(); |
649 |
// al modelo le pasamos el ftype de esas features
|
650 |
model.setValue(new SimpleFeaturesTableModel(
|
651 |
ftype, |
652 |
params.getResultColumnNames(), |
653 |
features |
654 |
) |
655 |
); |
656 |
} catch (Exception ex) { |
657 |
LOGGER.warn("Search not able to be executed. Can't get features or create table model", ex);
|
658 |
} finally {
|
659 |
SwingUtilities.invokeLater(() -> {
|
660 |
I18nManager i18n = ToolsLocator.getI18nManager(); |
661 |
TableModel m = (TableModel) model.getValue(); |
662 |
tblResults.setModel(m); |
663 |
lblMsg.setText(String.format("%d " + i18n.getTranslation("_elements"), m.getRowCount())); |
664 |
setEnabled(true);
|
665 |
}); |
666 |
if (this.parameters != null && this.parameters.getQuery() != null) { |
667 |
this.history.add(params);
|
668 |
} |
669 |
} |
670 |
}); |
671 |
th.start(); |
672 |
} |
673 |
|
674 |
public void setResultColumnNames(List<String> names) { |
675 |
this.parameters.getResultColumnNames().clear();
|
676 |
this.parameters.getResultColumnNames().addAll(names);
|
677 |
if (this.conditionPanels == null) { |
678 |
return;
|
679 |
} |
680 |
SimpleFeaturesTableModel model; |
681 |
model = (SimpleFeaturesTableModel) this.tblResults.getModel();
|
682 |
List<Feature> features = store.getFeatures(this.parameters.getQuery()); |
683 |
FacadeOfAFeaturePagingHelper facade = (FacadeOfAFeaturePagingHelper) features; |
684 |
FeatureType ftype = facade.getFeaturePagingHelper().getFeatureSet().getDefaultFeatureType(); |
685 |
model = new SimpleFeaturesTableModel(
|
686 |
ftype, |
687 |
this.parameters.getResultColumnNames(),
|
688 |
features |
689 |
); |
690 |
tblResults.setModel(model); |
691 |
} |
692 |
|
693 |
@Override
|
694 |
public boolean setFilter(Expression filter) { |
695 |
try {
|
696 |
if (this.conditionPanels == null) { |
697 |
this.initComponents();
|
698 |
} |
699 |
if (ExpressionUtils.isPhraseEmpty(filter)) {
|
700 |
this.clear();
|
701 |
return true; |
702 |
} |
703 |
int panel = 0; |
704 |
int selected = PANEL_ADVANCED;
|
705 |
for (SearchConditionPanel conditionPanel : conditionPanels) {
|
706 |
if (panel != PANEL_ADVANCED && conditionPanel.set(filter)) {
|
707 |
selected = panel; |
708 |
} |
709 |
panel++; |
710 |
} |
711 |
this.tabSearchMode.setSelectedIndex(selected);
|
712 |
|
713 |
// SimpleFeaturesTableModel model = new SimpleFeaturesTableModel(this.getStore());
|
714 |
// tblResults.setModel(model);
|
715 |
// lblMsg.setText("");
|
716 |
return true; |
717 |
} catch (Exception ex) { |
718 |
LOGGER.warn("Can't set current search", ex);
|
719 |
return false; |
720 |
} |
721 |
} |
722 |
|
723 |
@Override
|
724 |
public List<SearchConditionPanel> getConditionPanels() { |
725 |
return Collections.unmodifiableList(this.conditionPanels); |
726 |
} |
727 |
|
728 |
@Override
|
729 |
public SearchConditionPanel getConditionPanel(String name) { |
730 |
for (SearchConditionPanel panel : conditionPanels) {
|
731 |
if (StringUtils.equalsIgnoreCase(name, panel.getFactory().getName())) {
|
732 |
return panel;
|
733 |
} |
734 |
} |
735 |
return null; |
736 |
} |
737 |
|
738 |
@Override
|
739 |
public Expression getFilterForSelectedFeature() { |
740 |
if (this.conditionPanels == null) { |
741 |
return null; |
742 |
} |
743 |
int selectedRow = this.tblResults.getSelectedRow(); |
744 |
if (selectedRow < 0) { |
745 |
return null; |
746 |
} |
747 |
try {
|
748 |
List<Feature> features = ((SimpleFeaturesTableModel) this.tblResults.getModel()).getFeatures(); |
749 |
Feature feature = features.get(selectedRow); |
750 |
|
751 |
ExpressionBuilder builder = ExpressionUtils.createExpressionBuilder(); |
752 |
FeatureType ftype = this.store.getDefaultFeatureType();
|
753 |
for (FeatureAttributeDescriptor attrdesc : ftype.getPrimaryKey()) {
|
754 |
builder.and( |
755 |
builder.eq( |
756 |
builder.column(attrdesc.getName()), |
757 |
builder.constant(feature.get(attrdesc.getName())) |
758 |
) |
759 |
); |
760 |
} |
761 |
Expression filter = ExpressionUtils.createExpression(builder.toString());
|
762 |
return filter;
|
763 |
} catch (Exception ex) { |
764 |
LOGGER.warn("Can't build search for the selected feature.", ex);
|
765 |
return null; |
766 |
} |
767 |
} |
768 |
|
769 |
@Override
|
770 |
public FeatureStore getStore() {
|
771 |
return store;
|
772 |
} |
773 |
|
774 |
private void doOrderBy() { |
775 |
I18nManager i18n = ToolsLocator.getI18nManager(); |
776 |
WindowManager_v2 windowManager = (WindowManager_v2) ToolsSwingLocator.getWindowManager(); |
777 |
FeatureQueryOrderPanel orderPanel = DALSwingLocator.getDataSwingManager().createFeatureStoreOrderPanel(); |
778 |
orderPanel.setStore(store); |
779 |
orderPanel.put(parameters.getQuery()); |
780 |
Dialog dialog = windowManager.createDialog(
|
781 |
orderPanel.asJComponent(), |
782 |
i18n.getTranslation("_Select_order"),
|
783 |
null,
|
784 |
WindowManager_v2.BUTTONS_OK_CANCEL |
785 |
); |
786 |
dialog.addActionListener((ActionEvent e) -> {
|
787 |
if (dialog.getAction() == WindowManager_v2.BUTTON_OK) {
|
788 |
orderPanel.fetch(this.parameters.getQuery());
|
789 |
search(); |
790 |
} |
791 |
}); |
792 |
dialog.show(WindowManager.MODE.DIALOG); |
793 |
|
794 |
} |
795 |
|
796 |
@Override
|
797 |
public ImageIcon loadImage(String imageName) { |
798 |
String name = FilenameUtils.getBaseName(imageName);
|
799 |
IconTheme theme = ToolsSwingLocator.getIconThemeManager().getDefault(); |
800 |
if (theme.exists(name)) {
|
801 |
return theme.get(name);
|
802 |
} |
803 |
URL url = this.getClass().getResource(name + ".png"); |
804 |
if (url == null) { |
805 |
return null; |
806 |
} |
807 |
return new ImageIcon(url); |
808 |
} |
809 |
|
810 |
@Override
|
811 |
public int getSelectedFeatureCount() { |
812 |
if (this.conditionPanels == null) { |
813 |
return 0; |
814 |
} |
815 |
return this.tblResults.getSelectedRowCount(); |
816 |
} |
817 |
|
818 |
@Override
|
819 |
public JComponent getActionButton(String name) { |
820 |
ActionButtons actionButton = this.actions.get(name);
|
821 |
if (actionButton == null) { |
822 |
return null; |
823 |
} |
824 |
return actionButton.button;
|
825 |
} |
826 |
|
827 |
@Override
|
828 |
public void setShowActions(boolean showActions) { |
829 |
this.showActions = showActions;
|
830 |
} |
831 |
|
832 |
@Override
|
833 |
public boolean isShowActions() { |
834 |
return this.showActions; |
835 |
} |
836 |
|
837 |
public static String getAttributeDescriptorLabel(FeatureAttributeDescriptor attrdesc, String tableName) { |
838 |
String theLabel;
|
839 |
int theUseLabels;
|
840 |
if (useLabels == null) { |
841 |
Tags tags = attrdesc.getTags(); |
842 |
if (tags.has(DAL_USE_LABELS)) {
|
843 |
theUseLabels = tags.getInt(DAL_USE_LABELS, USE_LABELS_NO); |
844 |
} else {
|
845 |
tags = attrdesc.getFeatureType().getTags(); |
846 |
theUseLabels = tags.getInt(DAL_USE_LABELS, USE_LABELS_NO); |
847 |
} |
848 |
} else {
|
849 |
theUseLabels = useLabels; |
850 |
} |
851 |
switch (theUseLabels) {
|
852 |
case USE_LABELS_YES:
|
853 |
if (StringUtils.isBlank(tableName)) {
|
854 |
theLabel = attrdesc.getLocalizedLabel(); |
855 |
} else {
|
856 |
theLabel = String.format("%s [%s]", attrdesc.getLocalizedLabel(), tableName); |
857 |
} |
858 |
break;
|
859 |
default:
|
860 |
case USE_LABELS_NO:
|
861 |
if (StringUtils.isBlank(tableName)) {
|
862 |
theLabel = attrdesc.getName(); |
863 |
} else {
|
864 |
theLabel = String.format("%s [%s]", attrdesc.getName(), tableName); |
865 |
} |
866 |
break;
|
867 |
case USE_LABELS_BOTH:
|
868 |
if (StringUtils.isBlank(tableName)) {
|
869 |
theLabel = String.format("%s [%s]", attrdesc.getLocalizedLabel(), attrdesc.getName()); |
870 |
} else {
|
871 |
theLabel = String.format("%s [%s/%s]", attrdesc.getLocalizedLabel(), attrdesc.getName(), tableName); |
872 |
} |
873 |
break;
|
874 |
} |
875 |
return theLabel;
|
876 |
} |
877 |
|
878 |
private void doCalculatedColumns() { |
879 |
WindowManager_v2 winmanager = (WindowManager_v2) ToolsSwingLocator.getWindowManager(); |
880 |
I18nManager i18n = ToolsLocator.getI18nManager(); |
881 |
final FeatureQueryCalculatedColumnsPanel panel = new DefaultFeatureQueryCalculatedColumnsPanel(); |
882 |
panel.setStore(this.store);
|
883 |
panel.put(this.parameters.getQuery());
|
884 |
final Dialog dialog = winmanager.createDialog( |
885 |
panel.asJComponent(), |
886 |
i18n.getTranslation("_Calculated_columns"),
|
887 |
null,
|
888 |
WindowManager_v2.BUTTONS_OK_CANCEL |
889 |
); |
890 |
dialog.addActionListener((ActionEvent e) -> {
|
891 |
if (dialog.getAction() == WindowManager_v2.BUTTONS_OK) {
|
892 |
panel.fetch(this.parameters.getQuery());
|
893 |
search(); |
894 |
} |
895 |
}); |
896 |
dialog.show(WindowManager.MODE.DIALOG); |
897 |
} |
898 |
|
899 |
private void doGroupBy() { |
900 |
int allowGroupBy = ((FeatureStoreProviderFactory) (this.store.getProviderFactory())).allowGroupBy(); |
901 |
if (allowGroupBy != DataType.YES) {
|
902 |
// FIXME: mensaje al usaurio.
|
903 |
return;
|
904 |
} |
905 |
|
906 |
WindowManager_v2 winmanager = (WindowManager_v2) ToolsSwingLocator.getWindowManager(); |
907 |
I18nManager i18n = ToolsLocator.getI18nManager(); |
908 |
final FeatureQueryGroupByPanel panel = new DefaultFeatureQueryGroupByPanel(); |
909 |
panel.setStore(this.store);
|
910 |
panel.put(this.parameters.getQuery());
|
911 |
final Dialog dialog = winmanager.createDialog( |
912 |
panel.asJComponent(), |
913 |
i18n.getTranslation("_Select_group_columns_and_aggregate_functions"),
|
914 |
null,
|
915 |
WindowManager_v2.BUTTONS_OK_CANCEL |
916 |
); |
917 |
dialog.addActionListener((ActionEvent e) -> {
|
918 |
if (dialog.getAction() == WindowManager_v2.BUTTONS_OK) {
|
919 |
panel.fetch(this.parameters.getQuery());
|
920 |
search(); |
921 |
} |
922 |
}); |
923 |
dialog.show(WindowManager.MODE.DIALOG); |
924 |
} |
925 |
|
926 |
private void doSelectResultColumnNames() { |
927 |
WindowManager_v2 winmanager = (WindowManager_v2) ToolsSwingLocator.getWindowManager(); |
928 |
I18nManager i18n = ToolsLocator.getI18nManager(); |
929 |
final FeatureAttributesSelectionPanel panel = DALSwingLocator.getManager().createFeatureAttributeSelectionPanel();
|
930 |
FeatureType ftype; |
931 |
try {
|
932 |
ftype = store.findFirst(this.parameters.getQuery()).getType();
|
933 |
} catch (DataException ex) {
|
934 |
ftype = this.getFeatureType();
|
935 |
} |
936 |
panel.setFeatureType(ftype); |
937 |
panel.setSelectedNames(this.parameters.getResultColumnNames());
|
938 |
final Dialog dialog = winmanager.createDialog( |
939 |
panel.asJComponent(), |
940 |
i18n.getTranslation("_Select_the_columns_to_display"),
|
941 |
null,
|
942 |
WindowManager_v2.BUTTONS_OK_CANCEL |
943 |
); |
944 |
dialog.addActionListener((ActionEvent e) -> {
|
945 |
if (dialog.getAction() == WindowManager_v2.BUTTONS_OK) {
|
946 |
this.setResultColumnNames(panel.getSelectedNames());
|
947 |
} |
948 |
}); |
949 |
dialog.show(WindowManager.MODE.DIALOG); |
950 |
} |
951 |
|
952 |
@Override
|
953 |
public void put(SearchParameters inParams) { |
954 |
for (SearchConditionPanel conditionPanel : this.conditionPanels) { |
955 |
try {
|
956 |
conditionPanel.put(inParams); |
957 |
} catch (Exception ex) { |
958 |
LOGGER.warn("Can't open panel", ex);
|
959 |
} |
960 |
} |
961 |
this.parameters = (DefaultSearchParameters) inParams;
|
962 |
|
963 |
} |
964 |
|
965 |
private FeatureQuery getQuery() {
|
966 |
FeatureQuery query; |
967 |
try {
|
968 |
int searchMode = this.tabSearchMode.getSelectedIndex(); |
969 |
SearchConditionPanel panel = this.conditionPanels.get(searchMode);
|
970 |
Expression filter = panel.get();
|
971 |
if (searchMode != PANEL_ADVANCED) {
|
972 |
this.conditionPanels.get(PANEL_ADVANCED).set(filter);
|
973 |
} |
974 |
query = (FeatureQuery) this.parameters.getQuery().clone();
|
975 |
query.retrievesAllAttributes(); |
976 |
if (ExpressionUtils.isPhraseEmpty(filter)) {
|
977 |
return query;
|
978 |
} |
979 |
query.setFilter(filter); |
980 |
query.retrievesAllAttributes(); |
981 |
return query;
|
982 |
} catch (Exception ex) { |
983 |
LOGGER.warn("Can't build query.", ex);
|
984 |
return null; |
985 |
} |
986 |
} |
987 |
|
988 |
@Override
|
989 |
public SearchParameters fetch(SearchParameters outParams) {
|
990 |
// Actualiza el fquery del parameters con los paneles
|
991 |
for (SearchConditionPanel conditionPanel : conditionPanels) {
|
992 |
try {
|
993 |
conditionPanel.fetch(this.parameters);
|
994 |
} catch (Exception ex) { |
995 |
LOGGER.warn("Panel not able to fetch values", ex);
|
996 |
} |
997 |
} |
998 |
|
999 |
// Actualiza el filtro con el panel activo
|
1000 |
int searchMode = this.tabSearchMode.getSelectedIndex(); |
1001 |
SearchConditionPanel panel = this.conditionPanels.get(searchMode);
|
1002 |
Expression filter = panel.get();
|
1003 |
if (searchMode != PANEL_ADVANCED) {
|
1004 |
this.conditionPanels.get(PANEL_ADVANCED).set(filter);
|
1005 |
} |
1006 |
FeatureQuery query = (FeatureQuery) this.parameters.getQuery();
|
1007 |
this.lastQuery = query.getCopy();
|
1008 |
query.retrievesAllAttributes(); |
1009 |
query.clearFilter(); |
1010 |
if (!ExpressionUtils.isPhraseEmpty(filter)) {
|
1011 |
query.setFilter(filter); |
1012 |
query.retrievesAllAttributes(); |
1013 |
} |
1014 |
|
1015 |
if (outParams == null) { |
1016 |
return this.parameters.getCopy(); |
1017 |
} |
1018 |
outParams.copyFrom(this.parameters.getCopy());
|
1019 |
return outParams;
|
1020 |
} |
1021 |
|
1022 |
public static void selfRegister() { |
1023 |
String[][] iconNames = new String[][]{ |
1024 |
new String[]{"dalswing", "featurestore-column"}, |
1025 |
new String[]{"dalswing", "featurestore-foreing-key"}, |
1026 |
new String[]{"dalswing", "featurestore-table"}, |
1027 |
new String[]{"dalswing", "search-action-showform"}, |
1028 |
new String[]{"dalswing", "search-action-select"}, |
1029 |
new String[]{"dalswing", "search-action-select-add"}, |
1030 |
new String[]{"dalswing", "search-action-select-filter"} |
1031 |
}; |
1032 |
IconTheme theme = ToolsSwingLocator.getIconThemeManager().getCurrent(); |
1033 |
for (String[] icon : iconNames) { |
1034 |
URL url = DefaultSearchPanel.class.getResource(icon[1] + ".png"); |
1035 |
theme.registerDefault("DALSwing", icon[0], icon[1], null, url); |
1036 |
} |
1037 |
|
1038 |
ConfigurableActionsMamager cfgActionsManager = ToolsUtilLocator.getConfigurableActionsMamager(); |
1039 |
cfgActionsManager.addConfigurableAction(CONFIGURABLE_PANEL_ID, new UseLabelsYesAction());
|
1040 |
cfgActionsManager.addConfigurableAction(CONFIGURABLE_PANEL_ID, new UseLabelsNoAction());
|
1041 |
cfgActionsManager.addConfigurableAction(CONFIGURABLE_PANEL_ID, new UseLabelsBothAction());
|
1042 |
cfgActionsManager.addConfigurableAction(CONFIGURABLE_PANEL_ID, new SelectColumnsAction());
|
1043 |
cfgActionsManager.addConfigurableAction(CONFIGURABLE_PANEL_ID, new CalculatedColumnsAction());
|
1044 |
cfgActionsManager.addConfigurableAction(CONFIGURABLE_PANEL_ID, new GroupByAction());
|
1045 |
cfgActionsManager.addConfigurableAction(CONFIGURABLE_PANEL_ID, new OrderByAction());
|
1046 |
} |
1047 |
} |