Source Code Cross Referenced for MockupPreferenceStore.java in  » IDE-Eclipse » jdt » org » eclipse » jdt » internal » ui » preferences » 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 » IDE Eclipse » jdt » org.eclipse.jdt.internal.ui.preferences 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*******************************************************************************
002:         * Copyright (c) 2000, 2006 IBM Corporation and others.
003:         * All rights reserved. This program and the accompanying materials
004:         * are made available under the terms of the Eclipse Public License v1.0
005:         * which accompanies this distribution, and is available at
006:         * http://www.eclipse.org/legal/epl-v10.html
007:         *
008:         * Contributors:
009:         *     IBM Corporation - initial API and implementation
010:         *******************************************************************************/package org.eclipse.jdt.internal.ui.preferences;
011:
012:        import org.eclipse.core.runtime.ListenerList;
013:
014:        import org.eclipse.jface.preference.IPreferenceStore;
015:        import org.eclipse.jface.util.IPropertyChangeListener;
016:        import org.eclipse.jface.util.PropertyChangeEvent;
017:
018:        /**
019:         * Mockup preference store, for registering listeners and firing events,
020:         * without being an actual store.
021:         * <p>
022:         * All methods except firing, adding and removing listeners throw
023:         * an {@link java.lang.UnsupportedOperationException}.
024:         * </p>
025:         * 
026:         * @since 3.0
027:         */
028:        public class MockupPreferenceStore implements  IPreferenceStore {
029:
030:            /** Listeners on this store */
031:            private ListenerList fListeners = new ListenerList(
032:                    ListenerList.IDENTITY);
033:
034:            /**
035:             * {@inheritDoc}
036:             */
037:            public void addPropertyChangeListener(
038:                    IPropertyChangeListener listener) {
039:                fListeners.add(listener);
040:            }
041:
042:            /**
043:             * {@inheritDoc}
044:             */
045:            public void removePropertyChangeListener(
046:                    IPropertyChangeListener listener) {
047:                fListeners.remove(listener);
048:            }
049:
050:            /**
051:             * {@inheritDoc}
052:             */
053:            public boolean contains(String name) {
054:                throw new UnsupportedOperationException();
055:            }
056:
057:            /**
058:             * {@inheritDoc}
059:             */
060:            public void firePropertyChangeEvent(String name, Object oldValue,
061:                    Object newValue) {
062:                firePropertyChangeEvent(this , name, oldValue, newValue);
063:            }
064:
065:            /**
066:             * Fires a property change event with the given source, property name, old and new value. Used
067:             * when the event source should be different from this mockup preference store.
068:             * @param source The event source 
069:             * @param name The property name
070:             * @param oldValue The property's old value
071:             * @param newValue The property's new value
072:             */
073:            public void firePropertyChangeEvent(Object source, String name,
074:                    Object oldValue, Object newValue) {
075:                PropertyChangeEvent event = new PropertyChangeEvent(source,
076:                        name, oldValue, newValue);
077:                Object[] listeners = fListeners.getListeners();
078:                for (int i = 0; i < listeners.length; i++)
079:                    ((IPropertyChangeListener) listeners[i])
080:                            .propertyChange(event);
081:            }
082:
083:            /**
084:             * {@inheritDoc}
085:             */
086:            public boolean getBoolean(String name) {
087:                throw new UnsupportedOperationException();
088:            }
089:
090:            /**
091:             * {@inheritDoc}
092:             */
093:            public boolean getDefaultBoolean(String name) {
094:                throw new UnsupportedOperationException();
095:            }
096:
097:            /**
098:             * {@inheritDoc}
099:             */
100:            public double getDefaultDouble(String name) {
101:                throw new UnsupportedOperationException();
102:            }
103:
104:            /**
105:             * {@inheritDoc}
106:             */
107:            public float getDefaultFloat(String name) {
108:                throw new UnsupportedOperationException();
109:            }
110:
111:            /**
112:             * {@inheritDoc}
113:             */
114:            public int getDefaultInt(String name) {
115:                throw new UnsupportedOperationException();
116:            }
117:
118:            /**
119:             * {@inheritDoc}
120:             */
121:            public long getDefaultLong(String name) {
122:                throw new UnsupportedOperationException();
123:            }
124:
125:            /**
126:             * {@inheritDoc}
127:             */
128:            public String getDefaultString(String name) {
129:                throw new UnsupportedOperationException();
130:            }
131:
132:            /**
133:             * {@inheritDoc}
134:             */
135:            public double getDouble(String name) {
136:                throw new UnsupportedOperationException();
137:            }
138:
139:            /**
140:             * {@inheritDoc}
141:             */
142:            public float getFloat(String name) {
143:                throw new UnsupportedOperationException();
144:            }
145:
146:            /**
147:             * {@inheritDoc}
148:             */
149:            public int getInt(String name) {
150:                throw new UnsupportedOperationException();
151:            }
152:
153:            /**
154:             * {@inheritDoc}
155:             */
156:            public long getLong(String name) {
157:                throw new UnsupportedOperationException();
158:            }
159:
160:            /**
161:             * {@inheritDoc}
162:             */
163:            public String getString(String name) {
164:                throw new UnsupportedOperationException();
165:            }
166:
167:            /**
168:             * {@inheritDoc}
169:             */
170:            public boolean isDefault(String name) {
171:                throw new UnsupportedOperationException();
172:            }
173:
174:            /**
175:             * {@inheritDoc}
176:             */
177:            public boolean needsSaving() {
178:                throw new UnsupportedOperationException();
179:            }
180:
181:            /**
182:             * {@inheritDoc}
183:             */
184:            public void putValue(String name, String value) {
185:                throw new UnsupportedOperationException();
186:            }
187:
188:            /**
189:             * {@inheritDoc}
190:             */
191:            public void setDefault(String name, double value) {
192:                throw new UnsupportedOperationException();
193:            }
194:
195:            /**
196:             * {@inheritDoc}
197:             */
198:            public void setDefault(String name, float value) {
199:                throw new UnsupportedOperationException();
200:            }
201:
202:            /**
203:             * {@inheritDoc}
204:             */
205:            public void setDefault(String name, int value) {
206:                throw new UnsupportedOperationException();
207:            }
208:
209:            /**
210:             * {@inheritDoc}
211:             */
212:            public void setDefault(String name, long value) {
213:                throw new UnsupportedOperationException();
214:            }
215:
216:            /**
217:             * {@inheritDoc}
218:             */
219:            public void setDefault(String name, String defaultObject) {
220:                throw new UnsupportedOperationException();
221:            }
222:
223:            /**
224:             * {@inheritDoc}
225:             */
226:            public void setDefault(String name, boolean value) {
227:                throw new UnsupportedOperationException();
228:            }
229:
230:            /**
231:             * {@inheritDoc}
232:             */
233:            public void setToDefault(String name) {
234:                throw new UnsupportedOperationException();
235:            }
236:
237:            /**
238:             * {@inheritDoc}
239:             */
240:            public void setValue(String name, double value) {
241:                throw new UnsupportedOperationException();
242:            }
243:
244:            /**
245:             * {@inheritDoc}
246:             */
247:            public void setValue(String name, float value) {
248:                throw new UnsupportedOperationException();
249:            }
250:
251:            /**
252:             * {@inheritDoc}
253:             */
254:            public void setValue(String name, int value) {
255:                throw new UnsupportedOperationException();
256:            }
257:
258:            /**
259:             * {@inheritDoc}
260:             */
261:            public void setValue(String name, long value) {
262:                throw new UnsupportedOperationException();
263:            }
264:
265:            /**
266:             * {@inheritDoc}
267:             */
268:            public void setValue(String name, String value) {
269:                throw new UnsupportedOperationException();
270:            }
271:
272:            /**
273:             * {@inheritDoc}
274:             */
275:            public void setValue(String name, boolean value) {
276:                throw new UnsupportedOperationException();
277:            }
278:
279:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.