Source Code Cross Referenced for ToolkitException.java in  » 6.0-JDK-Modules » j2me » sim » toolkit » 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 » 6.0 JDK Modules » j2me » sim.toolkit 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         *   
003:         *
004:         * Copyright  1990-2007 Sun Microsystems, Inc. All Rights Reserved.
005:         * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER
006:         * 
007:         * This program is free software; you can redistribute it and/or
008:         * modify it under the terms of the GNU General Public License version
009:         * 2 only, as published by the Free Software Foundation.
010:         * 
011:         * This program is distributed in the hope that it will be useful, but
012:         * WITHOUT ANY WARRANTY; without even the implied warranty of
013:         * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
014:         * General Public License version 2 for more details (a copy is
015:         * included at /legal/license.txt).
016:         * 
017:         * You should have received a copy of the GNU General Public License
018:         * version 2 along with this work; if not, write to the Free Software
019:         * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
020:         * 02110-1301 USA
021:         * 
022:         * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
023:         * Clara, CA 95054 or visit www.sun.com if you need additional
024:         * information or have any questions.
025:         */
026:
027:        //-----------------------------------------------------------------------------
028:        // PACKAGE DEFINITION
029:        //-----------------------------------------------------------------------------
030:        package sim.toolkit;
031:
032:        //-----------------------------------------------------------------------------
033:        // IMPORTS
034:        //-----------------------------------------------------------------------------
035:        import javacard.framework.*;
036:
037:        /**
038:         *
039:         * This class extends the Throwable class and allows the classes of this package
040:         * to throw specific exceptions in case of problems. <p>
041:         *
042:         * @version 8.3.0
043:         */
044:        public class ToolkitException extends CardRuntimeException {
045:
046:            // ------------------------------- Constants ------------------------------
047:            /**
048:             * This reason code (= 1) is used to indicate that data are to
049:             * large than the storage space available in the handler.  
050:             */
051:            public static final short HANDLER_OVERFLOW = (short) 1;
052:
053:            /**
054:             * This reason code (= 2) is used to indicate that the Handler is
055:             * not available (e.g. busy).  
056:             */
057:            public static final short HANDLER_NOT_AVAILABLE = (short) 2;
058:
059:            /**
060:             * This reason code (= 3) is used to indicate that the element is
061:             * unavailable in the handler buffer.  
062:             */
063:            public static final short UNAVAILABLE_ELEMENT = (short) 3;
064:
065:            /**
066:             * This reason code (= 4) is used to indicate that the requested
067:             * menu entry is not define for the corresponding applet.  
068:             */
069:            public static final short MENU_ENTRY_NOT_FOUND = (short) 4;
070:
071:            /**
072:             * This reason code (= 5) is used to indicate an error in the
073:             * applet registry.
074:             */
075:            public static final short REGISTRY_ERROR = (short) 5;
076:
077:            /**
078:             * This reason code (= 6) is used to indicate that the event code
079:             * is not supported by the toolkit framework 
080:             */
081:            public static final short EVENT_NOT_SUPPORTED = (short) 6;
082:
083:            /**
084:             * This reason code (= 7) is used to indicate that the maximum
085:             * number of registered applet for this event is already reached
086:             * (e.g Call Control) 
087:             */
088:            public static final short EVENT_ALREADY_REGISTERED = (short) 7;
089:
090:            /**
091:             * This reason code (= 8) is used to indictae that either the
092:             * offset, the length or both are out of current TLV boundaries.
093:             */
094:            public static final short OUT_OF_TLV_BOUNDARIES = (short) 8;
095:
096:            /**
097:             * This reason code (= 9) is used to indicate that the Terminal
098:             * Profile data are not available
099:             */
100:            public static final short ME_PROFILE_NOT_AVAILABLE = (short) 9;
101:
102:            /**
103:             * This reason code (=10) is used to indicate that the provided
104:             * menu entry string is bigger than the space alloacted space.
105:             */
106:            public static final short ALLOWED_LENGTH_EXCEEDED = (short) 10;
107:
108:            /**
109:             * This reason code (=11) is used to indicate that all the
110:             * available timers or the maximum number of timers have been
111:             * allocated to the applet.
112:             */
113:            public static final short NO_TIMER_AVAILABLE = (short) 11;
114:
115:            /**
116:             * This reason code (=12) is used to indicate that the indicated
117:             * timer identifier is not allocated to this applet.  
118:             */
119:            public static final short INVALID_TIMER_ID = (short) 12;
120:
121:            /**
122:             * This reason code (=13) is used to indicate that the
123:             * registration to an indicated event can not be changed by the
124:             * called method.  
125:             */
126:            public static final short EVENT_NOT_ALLOWED = (short) 13;
127:
128:            /**
129:             * This reason code (=14) is used to indicate that an input
130:             * parameter of the method is not valid.
131:             */
132:            public static final short BAD_INPUT_PARAMETER = (short) 14;
133:
134:            // ------------------------------- Constructors ---------------------------
135:            /**
136:             * Construct a ToolkitException instance with the specified reason.
137:             *
138:             * @param reason the reason for the exception
139:             */
140:            public ToolkitException(short reason) {
141:                super (reason);
142:            }
143:
144:            // ------------------------------- Public methods -------------------------
145:            /**
146:             * Throws the Toolkit Interface's instance of the 
147:             * <code>ToolkitException</code> class with the specified reason.
148:             *
149:             * @param reason the reason for the exception.
150:             *
151:             * @exception ToolkitException always
152:             */
153:            public static void throwIt(short reason) throws ToolkitException {
154:                ToolkitException systemInstance = ViewHandler.currentTI
155:                        .getToolkitExceptionInstance();
156:                systemInstance.setReason(reason);
157:                throw systemInstance;
158:            }
159:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.