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 @ 46505
History | View | Annotate | Download (1.14 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 | 46050 | omartinez | import org.gvsig.tools.util.IsApplicable; |
10 | 44281 | jjdelcerro | |
11 | /**
|
||
12 | *
|
||
13 | * @author jjdelcerro
|
||
14 | */
|
||
15 | 46050 | omartinez | public interface DALActionFactory extends IsApplicable { |
16 | 44281 | jjdelcerro | |
17 | public interface DALActionContext { |
||
18 | public String getName(); |
||
19 | public DataStore getStore();
|
||
20 | 44712 | jjdelcerro | |
21 | public FeatureQuery getQuery();
|
||
22 | |||
23 | 44281 | jjdelcerro | public int getSelectedsCount(); |
24 | public Expression getFilterForSelecteds(); |
||
25 | 44712 | jjdelcerro | |
26 | 44281 | jjdelcerro | public JComponent getActionButton(String actionName); |
27 | public Object get(String name); |
||
28 | public void set(String name, Object value); |
||
29 | } |
||
30 | |||
31 | public String getName(); |
||
32 | |||
33 | 46050 | omartinez | /**
|
34 | * Check if this factory is applicable to the first argument.
|
||
35 | * The first argument can be instanceof DALActionContext
|
||
36 | * @param args
|
||
37 | * @return
|
||
38 | */
|
||
39 | @Override
|
||
40 | public boolean isApplicable(Object... args); |
||
41 | 44281 | jjdelcerro | |
42 | public Action createAction(DALActionContext context); |
||
43 | |||
44 | } |