Revision 44263 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/DefaultDataSwingManager.java

View differences:

DefaultDataSwingManager.java
22 22
 */
23 23
package org.gvsig.fmap.dal.swing.impl;
24 24

  
25
import java.util.Collection;
26
import java.util.Collections;
27
import java.util.LinkedHashMap;
28
import java.util.Map;
25 29
import java.util.function.Predicate;
26 30
import javax.swing.JButton;
27 31
import javax.swing.JComboBox;
28 32
import javax.swing.JList;
29 33
import javax.swing.JTextField;
30
import org.gvsig.expressionevaluator.swing.ExpressionBuilderConfig;
31 34
import org.gvsig.expressionevaluator.swing.ExpressionEvaluatorSwingLocator;
32 35
import org.gvsig.expressionevaluator.swing.ExpressionEvaluatorSwingManager;
33 36
import org.gvsig.expressionevaluator.swing.JExpressionBuilder;
......
56 59
import org.gvsig.fmap.dal.swing.featuretype.AttributeDescriptorPickerController;
57 60
import org.gvsig.fmap.dal.swing.featuretype.FeatureTypeAttributePanel;
58 61
import org.gvsig.fmap.dal.swing.featuretype.FeatureTypePanel;
59
import org.gvsig.fmap.dal.swing.impl.expressionevaluator.DefaultFeatureStoreElement;
62
import org.gvsig.fmap.dal.swing.impl.expressionevaluator.DefaultFeatureStoreElement2;
60 63
import org.gvsig.fmap.dal.swing.impl.featuretable.FeatureTablePanel;
61 64
import org.gvsig.fmap.dal.swing.impl.featuretable.table.DefaultFeatureTableModel;
62 65
import org.gvsig.fmap.dal.swing.impl.featuretable.table.EmptyFeatureTableModel;
......
65 68
import org.gvsig.fmap.dal.swing.impl.featuretype.DefaultFeatureTypePanel;
66 69
import org.gvsig.fmap.dal.swing.impl.jdbc.DefaultJDBCConnectionPanel;
67 70
import org.gvsig.fmap.dal.swing.impl.searchpanel.DefaultSearchPanel;
71
import org.gvsig.fmap.dal.swing.impl.searchpanel.actions.SelectionAddAction;
72
import org.gvsig.fmap.dal.swing.impl.searchpanel.actions.SelectionAddAction.SelectionAddActionFactory;
73
import org.gvsig.fmap.dal.swing.impl.searchpanel.actions.SelectionFilterAction;
74
import org.gvsig.fmap.dal.swing.impl.searchpanel.actions.SelectionFilterAction.SelectionFilterActionFactory;
75
import org.gvsig.fmap.dal.swing.impl.searchpanel.actions.SelectionSetAction;
76
import org.gvsig.fmap.dal.swing.impl.searchpanel.actions.SelectionSetAction.SelectionSetActionFactory;
77
import org.gvsig.fmap.dal.swing.impl.searchpanel.actions.ShowFormAction;
78
import org.gvsig.fmap.dal.swing.impl.searchpanel.actions.ShowFormAction.ShowFormActionFactory;
68 79
import org.gvsig.fmap.dal.swing.jdbc.JDBCConnectionPanel;
69 80
import org.gvsig.fmap.dal.swing.searchpanel.FeatureStoreSearchPanel;
81
import org.gvsig.fmap.dal.swing.searchpanel.FeatureStoreSearchPanel.ActionFactory;
70 82
import org.gvsig.tools.dynform.DynFormLocator;
71 83
import org.gvsig.tools.dynobject.DynClass;
72 84
import org.gvsig.tools.dynobject.DynStruct;
......
80 92
@SuppressWarnings("UseSpecificCatch")
81 93
public class DefaultDataSwingManager implements DataSwingManager {
82 94

  
95
    private final Map<String,ActionFactory> featureStoreSearchActions;
96
    
97
    public DefaultDataSwingManager() {
98
        this.featureStoreSearchActions = new LinkedHashMap<>();
99
        this.registerFeatureStoreSearchAction(new SelectionAddActionFactory());
100
        this.registerFeatureStoreSearchAction(new SelectionFilterActionFactory());
101
        this.registerFeatureStoreSearchAction(new SelectionSetActionFactory());
102
        this.registerFeatureStoreSearchAction(new ShowFormActionFactory());
103
    }
104
    
83 105
    @Override
84 106
    public JFeaturesForm createJFeaturesForm(FeatureStore store) throws CreateJFeatureFormException {
85 107
        try {
......
132 154
            builder.setPreviewSymbolTable(featureSymbolTable.createParent());
133 155
        }
134 156
        builder.addSymbolTable(featureSymbolTable);
135
        DefaultFeatureStoreElement storeElement = new DefaultFeatureStoreElement(store);
157
        FeatureStoreElement storeElement = new DefaultFeatureStoreElement2(store);
136 158
        builder.addElement(storeElement);
137 159
        if( store.getProviderFactory().hasSQLSupport()==DataStoreProviderFactory.YES ) {
138 160
            builder.getPreferences().setSQLCompatible(true);
......
236 258

  
237 259
    @Override
238 260
    public FeatureStoreElement createFeatureStoreElement() {
239
        FeatureStoreElement e = new DefaultFeatureStoreElement(null);
261
        FeatureStoreElement e = new DefaultFeatureStoreElement2(null);
240 262
        return e;
241 263
    }
242 264

  
......
246 268
        return e;
247 269
    }
248 270

  
271
    @Override
272
    public final void registerFeatureStoreSearchAction(ActionFactory action) {
273
        this.featureStoreSearchActions.put(action.getName().toLowerCase(), action);
274
    }
249 275
    
276
    @Override
277
    public  Collection<ActionFactory> getFeatureStoreSearchActions() {
278
        return Collections.unmodifiableCollection(this.featureStoreSearchActions.values());
279
    }
250 280
}

Also available in: Unified diff