Source Code Cross Referenced for TokenItem.java in  » Swing-Library » abeille-forms-designer » org » netbeans » editor » 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 » Swing Library » abeille forms designer » org.netbeans.editor 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         *                 Sun Public License Notice
003:         * 
004:         * The contents of this file are subject to the Sun Public License
005:         * Version 1.0 (the "License"). You may not use this file except in
006:         * compliance with the License. A copy of the License is available at
007:         * http://www.sun.com/
008:         * 
009:         * The Original Code is NetBeans. The Initial Developer of the Original
010:         * Code is Sun Microsystems, Inc. Portions Copyright 1997-2000 Sun
011:         * Microsystems, Inc. All Rights Reserved.
012:         */
013:
014:        package org.netbeans.editor;
015:
016:        /**
017:         * Token-item presents a token as a piece information without dependence on a
018:         * character buffer and it enables to chain the token-items in both directions.
019:         * 
020:         * @author Miloslav Metelka
021:         * @version 1.00
022:         */
023:
024:        public interface TokenItem {
025:
026:            /** Get the token-id of this token-item */
027:            public TokenID getTokenID();
028:
029:            /** Get the token-id of this token-item */
030:            public TokenContextPath getTokenContextPath();
031:
032:            /** Get the position of the token in the document */
033:            public int getOffset();
034:
035:            /** Get the image of this token. */
036:            public String getImage();
037:
038:            /**
039:             * Get next token-item in the text. It returns null if there's no more next
040:             * tokens in the text. It can throw <tt>IllegalStateException</tt> in case
041:             * the document was changed so the token-item chain becomes invalid.
042:             */
043:            public TokenItem getNext();
044:
045:            /**
046:             * Get previous token-item in the text. It returns null if there's no more
047:             * previous tokens in the text. It can throw <tt>IllegalStateException</tt>
048:             * in case the document was changed so the token-item chain becomes invalid.
049:             */
050:            public TokenItem getPrevious();
051:
052:            /** Abstract implementation that doesn't contain chaining methods. */
053:            public static abstract class AbstractItem implements  TokenItem {
054:
055:                private TokenID tokenID;
056:
057:                private TokenContextPath tokenContextPath;
058:
059:                private String image;
060:
061:                private int offset;
062:
063:                public AbstractItem(TokenID tokenID,
064:                        TokenContextPath tokenContextPath, int offset,
065:                        String image) {
066:                    this .tokenID = tokenID;
067:                    this .tokenContextPath = tokenContextPath;
068:                    this .offset = offset;
069:                    this .image = image;
070:                }
071:
072:                public TokenID getTokenID() {
073:                    return tokenID;
074:                }
075:
076:                public TokenContextPath getTokenContextPath() {
077:                    return tokenContextPath;
078:                }
079:
080:                public int getOffset() {
081:                    return offset;
082:                }
083:
084:                public String getImage() {
085:                    return image;
086:                }
087:
088:                public String toString() {
089:                    return "'"
090:                            + org.netbeans.editor.EditorDebug
091:                                    .debugString(getImage()) + "', tokenID="
092:                            + getTokenID() + ", tcp=" + getTokenContextPath()
093:                            + ", offset=" + getOffset();
094:                }
095:
096:            }
097:
098:            /** Implementation useful for delegation. */
099:            public static class FilterItem implements  TokenItem {
100:
101:                protected TokenItem delegate;
102:
103:                public FilterItem(TokenItem delegate) {
104:                    this .delegate = delegate;
105:                }
106:
107:                public TokenID getTokenID() {
108:                    return delegate.getTokenID();
109:                }
110:
111:                public TokenContextPath getTokenContextPath() {
112:                    return delegate.getTokenContextPath();
113:                }
114:
115:                public int getOffset() {
116:                    return delegate.getOffset();
117:                }
118:
119:                public String getImage() {
120:                    return delegate.getImage();
121:                }
122:
123:                public TokenItem getNext() {
124:                    return delegate.getNext();
125:                }
126:
127:                public TokenItem getPrevious() {
128:                    return delegate.getPrevious();
129:                }
130:
131:                public String toString() {
132:                    return delegate.toString();
133:                }
134:
135:            }
136:
137:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.