Revision 3319 org.gvsig.vcsgis/trunk/org.gvsig.vcsgis/org.gvsig.vcsgis.swing/org.gvsig.vcsgis.swing.impl/src/main/java/org/gvsig/vcsgis/swing/impl/VCSGisEntitySelectorController.java
VCSGisEntitySelectorController.java | ||
---|---|---|
22 | 22 |
package org.gvsig.vcsgis.swing.impl; |
23 | 23 |
|
24 | 24 |
import java.util.List; |
25 |
import java.util.function.Predicate; |
|
25 | 26 |
import javax.swing.JButton; |
26 | 27 |
import javax.swing.JList; |
27 | 28 |
import javax.swing.JTextField; |
29 |
import javax.swing.ListSelectionModel; |
|
28 | 30 |
import org.gvsig.tools.swing.api.ActionListenerSupport; |
29 | 31 |
import org.gvsig.tools.swing.api.ChangeListenerSupport; |
30 | 32 |
import org.gvsig.vcsgis.lib.VCSGisEntity; |
31 | 33 |
import org.gvsig.vcsgis.lib.workspace.VCSGisWorkspace; |
34 |
import org.gvsig.vcsgis.lib.workspace.VCSGisWorkspaceEntity; |
|
32 | 35 |
|
33 | 36 |
/** |
34 | 37 |
* |
35 | 38 |
* @author gvSIG Team |
36 | 39 |
*/ |
37 |
public interface VCSGisEntitySelectorController extends ActionListenerSupport, ChangeListenerSupport { |
|
40 |
public interface VCSGisEntitySelectorController extends ActionListenerSupport, ChangeListenerSupport { //, ListSelectionListenerSupport {
|
|
38 | 41 |
|
42 |
public static Predicate<VCSGisEntity> ALL_ENTITIES = (VCSGisEntity t) -> true; |
|
43 |
public static Predicate<VCSGisEntity> REMOTE_ENTITIES = (VCSGisEntity t) -> !(t instanceof VCSGisWorkspaceEntity); |
|
44 |
public static Predicate<VCSGisEntity> LOCAL_ENTITIES = (VCSGisEntity t) -> (t instanceof VCSGisWorkspaceEntity); |
|
45 |
|
|
39 | 46 |
public static VCSGisEntitySelectorController create(JList lstTables, JTextField txtFilter, JButton btnTable) { |
40 | 47 |
return new VCSGisEntitySelectorControllerImpl(lstTables, txtFilter, btnTable); |
41 | 48 |
} |
... | ... | |
46 | 53 |
|
47 | 54 |
public VCSGisEntity getSelectedEntity(); |
48 | 55 |
|
49 |
public List<VCSGisEntity> getCheckedsEntities();
|
|
56 |
public List<VCSGisEntity> getCheckedEntities(); |
|
50 | 57 |
|
51 | 58 |
public VCSGisWorkspace getWorkspace(); |
52 | 59 |
|
... | ... | |
62 | 69 |
|
63 | 70 |
public void setWorkspace(VCSGisWorkspace workspace); |
64 | 71 |
|
72 |
public void setViewFilter(Predicate<VCSGisEntity> viewFilter); |
|
73 |
|
|
74 |
public void setFilter(Predicate<VCSGisEntity> filter); |
|
75 |
|
|
76 |
public ListSelectionModel getCheckedModel(); |
|
77 |
|
|
78 |
|
|
65 | 79 |
} |
Also available in: Unified diff