Source Code Cross Referenced for SDocument.java in  » Swing-Library » wings3 » org » wings » text » 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 » wings3 » org.wings.text 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /* $Id $ */
002:        /*
003:         * Copyright 2000,2005 wingS development team.
004:         *
005:         * This file is part of wingS (http://wingsframework.org).
006:         *
007:         * wingS is free software; you can redistribute it and/or modify
008:         * it under the terms of the GNU Lesser General Public License
009:         * as published by the Free Software Foundation; either version 2.1
010:         * of the License, or (at your option) any later version.
011:         *
012:         * Please see COPYING for the complete licence.
013:         */
014:        package org.wings.text;
015:
016:        import org.wings.SDelayedEventModel;
017:        import org.wings.event.SDocumentListener;
018:
019:        import javax.swing.text.BadLocationException;
020:
021:        import java.awt.event.ActionListener;
022:        import java.io.Serializable;
023:
024:        /**
025:         * @author hengels
026:         */
027:        public interface SDocument extends Serializable, SDelayedEventModel {
028:            /**
029:             * Returns number of characters of content currently
030:             * in the document.
031:             *
032:             * @return number of characters >= 0
033:             */
034:            public int getLength();
035:
036:            /**
037:             * Returns an array of all the <code>SDocumentListener</code>s added
038:             * to this SDocument via addDocumentListener().
039:             *
040:             * @return all of the <code>SDocumentListener</code>s added or an
041:             *         empty array if no listeners are present
042:             * @see SDocument#addDocumentListener
043:             * @see SDocument#removeDocumentListener
044:             */
045:            public SDocumentListener[] getDocumentListeners();
046:
047:            /**
048:             * Registers the given observer to begin receiving notifications
049:             * when changes are made to the document.
050:             *
051:             * @param listener the observer to register
052:             * @see SDocument#removeDocumentListener
053:             */
054:            public void addDocumentListener(SDocumentListener listener);
055:
056:            /**
057:             * Unregisters the given observer from the notification list
058:             * so it will no longer receive change updates.
059:             *
060:             * @param listener the observer to register
061:             * @see SDocument#addDocumentListener
062:             */
063:            public void removeDocumentListener(SDocumentListener listener);
064:
065:            /**
066:             * Removes a portion of the content of the document.
067:             * This will cause a DocumentEvent of type
068:             * DocumentEvent.EventType.REMOVE to be sent to the
069:             * registered DocumentListeners, unless an exception
070:             * is thrown.  The notification will be sent to the
071:             * listeners by calling the removeUpdate method on the
072:             * DocumentListeners.
073:             *
074:             * @param offs the offset from the beginning >= 0
075:             * @param len  the number of characters to remove >= 0
076:             * @throws BadLocationException some portion of the removal range
077:             *                              was not a valid part of the document.  The location in the exception
078:             *                              is the first bad position encountered.
079:             * @see javax.swing.event.DocumentEvent
080:             * @see javax.swing.event.DocumentListener
081:             * @see javax.swing.event.UndoableEditEvent
082:             * @see javax.swing.event.UndoableEditListener
083:             */
084:            public void remove(int offs, int len) throws BadLocationException;
085:
086:            /**
087:             * Inserts a string of content.  This will cause a DocumentEvent
088:             * of type DocumentEvent.EventType.INSERT to be sent to the
089:             * registered DocumentListers, unless an exception is thrown.
090:             * The DocumentEvent will be delivered by calling the
091:             * insertUpdate method on the DocumentListener.
092:             * The offset and length of the generated DocumentEvent
093:             * will indicate what change was actually made to the Document.
094:             *
095:             * @param offset the offset into the document to insert the content >= 0.
096:             *               All positions that track change at or after the given location
097:             *               will move.
098:             * @param string the string to insert
099:             */
100:            public void insert(int offset, String string)
101:                    throws BadLocationException;
102:
103:            /**
104:             * Fetches the text contained within the given portion
105:             * of the document.
106:             *
107:             * @param offset the offset into the document representing the desired
108:             *               start of the text >= 0
109:             * @param length the length of the desired string >= 0
110:             * @return the text, in a String of length >= 0
111:             * @throws BadLocationException some portion of the given range
112:             *                              was not a valid part of the document.  The location in the exception
113:             *                              is the first bad position encountered.
114:             */
115:            public String getText(int offset, int length)
116:                    throws BadLocationException;
117:
118:            public String getText();
119:
120:            public void setText(String text);
121:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.