Statistics
| Revision:

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.api / src / main / java / org / gvsig / fmap / dal / swing / DALActionFactory.java @ 46978

History | View | Annotate | Download (1.24 KB)

1 44281 jjdelcerro
package org.gvsig.fmap.dal.swing;
2
3
import javax.swing.Action;
4
import javax.swing.JComponent;
5
import org.gvsig.expressionevaluator.Expression;
6
import org.gvsig.fmap.dal.DataStore;
7 44712 jjdelcerro
import org.gvsig.fmap.dal.feature.FeatureQuery;
8 44644 jjdelcerro
import org.gvsig.fmap.dal.feature.FeatureQueryOrder;
9 46900 jjdelcerro
import org.gvsig.fmap.dal.feature.FeatureSelection;
10 46050 omartinez
import org.gvsig.tools.util.IsApplicable;
11 44281 jjdelcerro
12
/**
13
 *
14
 * @author jjdelcerro
15
 */
16 46050 omartinez
public interface DALActionFactory extends IsApplicable {
17 44281 jjdelcerro
18
    public interface DALActionContext {
19
        public String getName();
20
        public DataStore getStore();
21 44712 jjdelcerro
22
        public FeatureQuery getQuery();
23
24 44281 jjdelcerro
        public int getSelectedsCount();
25
        public Expression getFilterForSelecteds();
26 46900 jjdelcerro
        public FeatureSelection getSelecteds();
27 44712 jjdelcerro
28 44281 jjdelcerro
        public JComponent getActionButton(String actionName);
29
        public Object get(String name);
30
        public void set(String name, Object value);
31
    }
32
33
    public String getName();
34
35 46050 omartinez
    /**
36
     * Check if this factory is applicable to the first argument.
37
     * The first argument can be instanceof DALActionContext
38
     * @param args
39
     * @return
40
     */
41
    @Override
42
    public boolean isApplicable(Object... args);
43 44281 jjdelcerro
44
    public Action createAction(DALActionContext context);
45
46
}