Source Code Cross Referenced for OpFilter.java in  » GIS » udig-1.1 » net » refractions » udig » ui » operations » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » GIS » udig 1.1 » net.refractions.udig.ui.operations 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /* uDig - User Friendly Desktop Internet GIS client
002:         * http://udig.refractions.net
003:         * (C) 2004, Refractions Research Inc.
004:         *
005:         * This library is free software; you can redistribute it and/or
006:         * modify it under the terms of the GNU Lesser General Public
007:         * License as published by the Free Software Foundation;
008:         * version 2.1 of the License.
009:         *
010:         * This library is distributed in the hope that it will be useful,
011:         * but WITHOUT ANY WARRANTY; without even the implied warranty of
012:         * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
013:         * Lesser General Public License for more details.
014:         */
015:        package net.refractions.udig.ui.operations;
016:
017:        /**
018:         * Represents the filter element in the operation extension point.
019:         * @author jones
020:         * @since 1.1.0
021:         */
022:        public interface OpFilter {
023:
024:            OpFilter TRUE = new OpFilter() {
025:
026:                public boolean accept(Object object) {
027:                    return true;
028:                }
029:
030:                public void addListener(IOpFilterListener listener) {
031:                }
032:
033:                public boolean canCacheResult() {
034:                    return true;
035:                }
036:
037:                public boolean isBlocking() {
038:                    return false;
039:                }
040:
041:                public void removeListener(IOpFilterListener listener) {
042:                }
043:
044:            };
045:            OpFilter FALSE = new OpFilter() {
046:
047:                public boolean accept(Object object) {
048:                    return false;
049:                }
050:
051:                public void addListener(IOpFilterListener listener) {
052:                }
053:
054:                public boolean canCacheResult() {
055:                    return true;
056:                }
057:
058:                public boolean isBlocking() {
059:                    return false;
060:                }
061:
062:                public void removeListener(IOpFilterListener listener) {
063:                }
064:
065:            };
066:
067:            /**
068:             * Returns true if the object is accepted by the filter
069:             *
070:             * @param object object to test
071:             * @return true if the object is accepted by the filter
072:             */
073:            boolean accept(Object object);
074:
075:            /**
076:             * Returns true if the results can be cached.
077:             * 
078:             * <p>A result can be cached if
079:             * <ol>
080:             * <li>The value will never change</li>
081:             * <li>It is possible for the filter to listen for changes and update listeners 
082:             * added via the {@link #addListener(IOpFilterListener)} method</li>
083:             * </ol>
084:             * </p><p>
085:             * Therefore this method only returns false if it must be calculated each time because there is 
086:             * no way to listen for state changes.  If it is non-blocking that is fine, if it is blocking
087:             * then try to do this rarely.
088:             * </p>
089:             * <p>WARNING:  If this returns true then the listeners must be notified for the new value to be 
090:             * recognized</p>
091:             * @return true if the results can be cached.  
092:             */
093:            boolean canCacheResult();
094:
095:            /**
096:             * Returns true if processing this filter may block when {@link #accept(Object)} is called or takes a large amount
097:             * of time to execute.
098:             *
099:             * @return true if processing this filter may block when {@link #accept(Object)} is called.
100:             */
101:            boolean isBlocking();
102:
103:            /**
104:             * Adds a listener to listen for events indicating the value has changed.  Listeners should only be added
105:             * if {@link #canCacheResult()} returns true.
106:             *
107:             * @param listener listener to add
108:             */
109:            void addListener(IOpFilterListener listener);
110:
111:            /**
112:             * Removes a listeners
113:             *
114:             * @param listener listener to remove
115:             */
116:            void removeListener(IOpFilterListener listener);
117:
118:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.