Source Code Cross Referenced for PlaceholderToolbarContributionItem.java in  » GIS » udig-1.1 » net » refractions » udig » project » ui » internal » tool » display » 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.project.ui.internal.tool.display 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        package net.refractions.udig.project.ui.internal.tool.display;
002:
003:        import org.eclipse.jface.action.IContributionItem;
004:        import org.eclipse.jface.action.IContributionManager;
005:        import org.eclipse.jface.internal.provisional.action.IToolBarContributionItem;
006:        import org.eclipse.swt.widgets.Composite;
007:        import org.eclipse.swt.widgets.CoolBar;
008:        import org.eclipse.swt.widgets.Menu;
009:        import org.eclipse.swt.widgets.ToolBar;
010:
011:        public class PlaceholderToolbarContributionItem implements 
012:                IContributionItem {
013:
014:            /**
015:             * The identifier for the replaced contribution item.
016:             */
017:            private final String id;
018:
019:            /**
020:             * The height of the SWT widget corresponding to the replaced contribution
021:             * item.
022:             */
023:            private final int storedHeight;
024:
025:            /**
026:             * The minimum number of items to display on the replaced contribution
027:             * item.
028:             */
029:            private final int storedMinimumItems;
030:
031:            /**
032:             * Whether the replaced contribution item would display chevrons.
033:             */
034:            private final boolean storedUseChevron;
035:
036:            /**
037:             * The width of the SWT widget corresponding to the replaced contribution
038:             * item.
039:             */
040:            private final int storedWidth;
041:
042:            /**
043:             * Constructs a new instance of <code>PlaceholderContributionItem</code>
044:             * from the item it is intended to replace.
045:             * 
046:             * @param item
047:             *            The item to be replaced; must not be <code>null</code>.
048:             */
049:            public PlaceholderToolbarContributionItem(String id) {
050:                this .id = id;
051:                storedHeight = -1;
052:                storedWidth = -1;
053:                storedMinimumItems = 0;
054:                storedUseChevron = false;
055:            }
056:
057:            /*
058:             * (non-Javadoc)
059:             * 
060:             * @see org.eclipse.jface.action.IContributionItem#dispose()
061:             */
062:            public void dispose() {
063:                // Do nothing
064:            }
065:
066:            /*
067:             * (non-Javadoc)
068:             * 
069:             * @see org.eclipse.jface.action.IContributionItem#fill(org.eclipse.swt.widgets.Composite)
070:             */
071:            public void fill(Composite parent) {
072:                throw new UnsupportedOperationException();
073:            }
074:
075:            /*
076:             * (non-Javadoc)
077:             * 
078:             * @see org.eclipse.jface.action.IContributionItem#fill(org.eclipse.swt.widgets.CoolBar,
079:             *      int)
080:             */
081:            public void fill(CoolBar parent, int index) {
082:                throw new UnsupportedOperationException();
083:
084:            }
085:
086:            /*
087:             * (non-Javadoc)
088:             * 
089:             * @see org.eclipse.jface.action.IContributionItem#fill(org.eclipse.swt.widgets.Menu,
090:             *      int)
091:             */
092:            public void fill(Menu parent, int index) {
093:                throw new UnsupportedOperationException();
094:
095:            }
096:
097:            /*
098:             * (non-Javadoc)
099:             * 
100:             * @see org.eclipse.jface.action.IContributionItem#fill(org.eclipse.swt.widgets.ToolBar,
101:             *      int)
102:             */
103:            public void fill(ToolBar parent, int index) {
104:                throw new UnsupportedOperationException();
105:
106:            }
107:
108:            /**
109:             * The height of the replaced contribution item.
110:             * 
111:             * @return The height.
112:             */
113:            int getHeight() {
114:                return storedHeight;
115:            }
116:
117:            /*
118:             * (non-Javadoc)
119:             * 
120:             * @see org.eclipse.jface.action.IContributionItem#getId()
121:             */
122:            public String getId() {
123:                return id;
124:            }
125:
126:            /**
127:             * The width of the replaced contribution item.
128:             * 
129:             * @return The width.
130:             */
131:            int getWidth() {
132:                return storedWidth;
133:            }
134:
135:            /**
136:             * Returns the minimum number of tool items to show in the cool item.
137:             * 
138:             * @return the minimum number of tool items to show, or <code>SHOW_ALL_ITEMS</code>
139:             *         if a value was not set
140:             * @see #setMinimumItemsToShow(int)
141:             * @since 3.2
142:             */
143:            int getMinimumItemsToShow() {
144:                return storedMinimumItems;
145:            }
146:
147:            /**
148:             * Returns whether chevron support is enabled.
149:             * 
150:             * @return <code>true</code> if chevron support is enabled, <code>false</code>
151:             *         otherwise
152:             * @since 3.2
153:             */
154:            boolean getUseChevron() {
155:                return storedUseChevron;
156:            }
157:
158:            /*
159:             * (non-Javadoc)
160:             * 
161:             * @see org.eclipse.jface.action.IContributionItem#isDirty()
162:             */
163:            public boolean isDirty() {
164:                return false;
165:            }
166:
167:            /*
168:             * (non-Javadoc)
169:             * 
170:             * @see org.eclipse.jface.action.IContributionItem#isDynamic()
171:             */
172:            public boolean isDynamic() {
173:                return false;
174:            }
175:
176:            /*
177:             * (non-Javadoc)
178:             * 
179:             * @see org.eclipse.jface.action.IContributionItem#isEnabled()
180:             */
181:            public boolean isEnabled() {
182:                // XXX Auto-generated method stub
183:                return false;
184:            }
185:
186:            /*
187:             * (non-Javadoc)
188:             * 
189:             * @see org.eclipse.jface.action.IContributionItem#isGroupMarker()
190:             */
191:            public boolean isGroupMarker() {
192:                return false;
193:            }
194:
195:            /*
196:             * (non-Javadoc)
197:             * 
198:             * @see org.eclipse.jface.action.IContributionItem#isSeparator()
199:             */
200:            public boolean isSeparator() {
201:                return false;
202:            }
203:
204:            /*
205:             * (non-Javadoc)
206:             * 
207:             * @see org.eclipse.jface.action.IContributionItem#isVisible()
208:             */
209:            public boolean isVisible() {
210:                return false;
211:            }
212:
213:            /*
214:             * (non-Javadoc)
215:             * 
216:             * @see org.eclipse.jface.action.IContributionItem#saveWidgetState()
217:             */
218:            public void saveWidgetState() {
219:                // Do nothing.
220:
221:            }
222:
223:            /*
224:             * (non-Javadoc)
225:             * 
226:             * @see org.eclipse.jface.action.IContributionItem#setParent(org.eclipse.jface.action.IContributionManager)
227:             */
228:            public void setParent(IContributionManager parent) {
229:                // Do nothing
230:
231:            }
232:
233:            /*
234:             * (non-Javadoc)
235:             * 
236:             * @see org.eclipse.jface.action.IContributionItem#setVisible(boolean)
237:             */
238:            public void setVisible(boolean visible) {
239:                // Do nothing.
240:            }
241:
242:            /**
243:             * Displays a string representation of this contribution item, which is
244:             * really just a function of its identifier.
245:             */
246:            public String toString() {
247:                return "PlaceholderContributionItem(" + id + ")"; //$NON-NLS-1$//$NON-NLS-2$
248:            }
249:
250:            /*
251:             * (non-Javadoc)
252:             * 
253:             * @see org.eclipse.jface.action.IContributionItem#update()
254:             */
255:            public void update() {
256:                update(null);
257:
258:            }
259:
260:            /*
261:             * (non-Javadoc)
262:             * 
263:             * @see org.eclipse.jface.action.IContributionItem#update(java.lang.String)
264:             */
265:            public void update(String identifier) {
266:                // Do nothing
267:            }
268:        }
w__ww._java2___s_.__c__om__ | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.