Source Code Cross Referenced for MenuField.java in  » ERP-CRM-Financial » sakai » org » sakaiproject » cheftool » menu » 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 » ERP CRM Financial » sakai » org.sakaiproject.cheftool.menu 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /**********************************************************************************
002:         * $URL: https://source.sakaiproject.org/svn/velocity/tags/sakai_2-4-1/tool/src/java/org/sakaiproject/cheftool/menu/MenuField.java $
003:         * $Id: MenuField.java 7247 2006-03-29 21:09:51Z ggolden@umich.edu $
004:         ***********************************************************************************
005:         *
006:         * Copyright (c) 2003, 2004, 2005, 2006 The Sakai Foundation.
007:         * 
008:         * Licensed under the Educational Community License, Version 1.0 (the "License"); 
009:         * you may not use this file except in compliance with the License. 
010:         * You may obtain a copy of the License at
011:         * 
012:         *      http://www.opensource.org/licenses/ecl1.php
013:         * 
014:         * Unless required by applicable law or agreed to in writing, software 
015:         * distributed under the License is distributed on an "AS IS" BASIS, 
016:         * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
017:         * See the License for the specific language governing permissions and 
018:         * limitations under the License.
019:         *
020:         **********************************************************************************/package org.sakaiproject.cheftool.menu;
021:
022:        import java.util.List;
023:        import java.util.Vector;
024:
025:        import org.sakaiproject.cheftool.api.MenuItem;
026:
027:        /**
028:         * <p>
029:         * MenuField is a text entry field in a menu / toolbar.
030:         * </p>
031:         */
032:        public class MenuField implements  MenuItem {
033:            /** The form field name. */
034:            protected String m_name = null;
035:
036:            /** The form name string for the entry. */
037:            protected String m_form = null;
038:
039:            /** The value to display in the field. */
040:            protected String m_value = null;
041:
042:            /** The action to perform. */
043:            protected String m_action = null;
044:
045:            /**
046:             * Construct.
047:             */
048:            public MenuField(String name, String form, String action,
049:                    String value) {
050:                m_name = name;
051:                m_form = form;
052:                m_action = action;
053:                m_value = value;
054:
055:            } // MenuField
056:
057:            /**
058:             * Set the full URL of the entry. To create an entry with a URL, create one first with a "" action, then call this.
059:             * 
060:             * @param url
061:             *        The full URL for the entry.
062:             * @return This, for convenience.
063:             */
064:            public MenuField setUrl(String url) {
065:                return this ;
066:            }
067:
068:            /**
069:             * Does this item act as a container for other items?
070:             * 
071:             * @return true if this MenuItem is a container for other items, false if not.
072:             */
073:            public boolean getIsContainer() {
074:                return false;
075:
076:            } // getIsContainer
077:
078:            /**
079:             * Is this item a divider ?
080:             * 
081:             * @return true if this MenuItem is a divider, false if not.
082:             */
083:            public boolean getIsDivider() {
084:                return false;
085:
086:            } // getIsDivider
087:
088:            /**
089:             * Access the display title for the item - this is really the form field name.
090:             * 
091:             * @return The display title for the item - but really, the form field name.
092:             */
093:            public String getTitle() {
094:                return ((m_name == null) ? "" : m_name);
095:
096:            } // getTitle
097:
098:            /**
099:             * Access the icon name for the item (or null if no icon).
100:             * 
101:             * @return The icon name for the item (or null if no icon).
102:             */
103:            public String getIcon() {
104:                return null;
105:            }
106:
107:            /**
108:             * Access the enabled flag for the item.
109:             * 
110:             * @return True if the item is enabled, false if not.
111:             */
112:            public boolean getIsEnabled() {
113:                return true;
114:            }
115:
116:            /**
117:             * Access the value string for this item - the initial value.
118:             * 
119:             * @return The value string for this item - the initial value.
120:             */
121:            public String getValue() {
122:                return ((m_value == null) ? "" : m_value);
123:
124:            } // getValue
125:
126:            /**
127:             * Access the action string for this item; what to do when the user clicks. Note: if getIsMenu(), there will not be an action string (will return ""). Note: if the entry is not enabled, this will return "".
128:             * 
129:             * @return The action string for this item.
130:             */
131:            public String getAction() {
132:                return ((m_action == null) ? "" : m_action);
133:
134:            } // getAction
135:
136:            /**
137:             * Access the full URL string for this item; what to do when the user clicks. Note: this if defined overrides getAction() which should be "". Note: if getIsMenu(), there will not be a URL string (will return "").
138:             * 
139:             * @return The full URL string for this item.
140:             */
141:            public String getUrl() {
142:                return "";
143:            }
144:
145:            /**
146:             * Access the form name whose values will be used when this item is selected.
147:             * 
148:             * @return The form name whose values will be used when this item is selected.
149:             */
150:            public String getForm() {
151:                return m_form;
152:
153:            } // getForm
154:
155:            /**
156:             * Access the sub-items of the item. Note: if !isContainer(), there will be no sub-items (will return EmptyIterator).
157:             * 
158:             * @return The sub-items of the item.
159:             */
160:            public List getItems() {
161:                return new Vector();
162:
163:            } // getItems
164:
165:            /**
166:             * Access one sub-items of the item. Note: if !isContainer(), there will be no sub-items (will return null).
167:             * 
168:             * @param index
169:             *        The index position (0 based) for the sub-item to get.
170:             * @return The sub-item of the item.
171:             */
172:            public MenuItem getItem(int index) {
173:                return null;
174:
175:            } // getItem
176:
177:            /**
178:             * Access the checked status of this item. Possible values:
179:             * 
180:             * @see MenuItem
181:             * @return The the checked status of this item.
182:             */
183:            public int getChecked() {
184:                return CHECKED_NA;
185:
186:            } // getChecked
187:
188:            /**
189:             * Count the sub-items of the item. Note: if !isContainer(), the count is 0.
190:             * 
191:             * @return The count of sub-items of the item.
192:             */
193:            public int size() {
194:                return 0;
195:
196:            } // size
197:
198:            /**
199:             * Check if there are any sub-items. Note: if !isContainer(), this is empty.
200:             * 
201:             * @return true of there are no sub-items, false if there are.
202:             */
203:            public boolean isEmpty() {
204:                return true;
205:
206:            } // isEmpty
207:
208:            /**
209:             * Access the is-field (not a button) flag.
210:             * 
211:             * @return True if the item is a field, false if not.
212:             */
213:            public boolean getIsField() {
214:                return true;
215:
216:            } // getIsField
217:
218:        } // MenuField
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.