01: /* uDig - User Friendly Desktop Internet GIS client
02: * http://udig.refractions.net
03: * (C) 2004, Refractions Research Inc.
04: *
05: * This library is free software; you can redistribute it and/or
06: * modify it under the terms of the GNU Lesser General Public
07: * License as published by the Free Software Foundation;
08: * version 2.1 of the License.
09: *
10: * This library is distributed in the hope that it will be useful,
11: * but WITHOUT ANY WARRANTY; without even the implied warranty of
12: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13: * Lesser General Public License for more details.
14: */
15: package net.refractions.udig.project.ui.properties;
16:
17: import net.refractions.udig.project.ui.ApplicationGIS;
18: import net.refractions.udig.ui.operations.IOpFilterListener;
19: import net.refractions.udig.ui.operations.PropertyValue;
20:
21: /**
22: * Returns true if there is an open map.
23: * @author Jesse
24: * @since 1.1.0
25: */
26: public class OpenMap implements PropertyValue {
27:
28: public boolean isTrue(Object object, String value) {
29: return ApplicationGIS.getActiveMap() != null;
30: }
31:
32: public void addListener(IOpFilterListener listener) {
33: }
34:
35: public boolean canCacheResult() {
36: return false;
37: }
38:
39: public boolean isBlocking() {
40: return false;
41: }
42:
43: public void removeListener(IOpFilterListener listener) {
44: }
45:
46: }
|