Java Doc for ParagraphBuffer.java in  » Internationalization-Localization » icu4j » com » ibm » richtext » styledtext » 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 » Internationalization Localization » icu4j » com.ibm.richtext.styledtext 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   com.ibm.richtext.styledtext.MParagraphBuffer
      com.ibm.richtext.styledtext.ParagraphBuffer

ParagraphBuffer
final class ParagraphBuffer extends MParagraphBuffer implements Externalizable(Code)
This class stores offsets where paragraph breaks occur, and the style applied to each paragraph. The offsets where paragraph breaks occur are stored in a RunArray object. This is not strictly necessary, but it makes scanning the text for paragraph breaks unnecessary. However, it makes determining where paragraphs start a little confusing. If there is a paragraph break at offset p, then there will be a paragraph start at offset p+1. If the last character in the text is a paragraph break, there will be a run array entry for that character (and also a paragraph style for that paragraph, even though the style does not apply to any text). The style of the first paragraph in the text is in the fFirstStyle member. Other paragraph styles are stored in the fStyleTable array, in the following manner: the paragraph with begins at offset fRunArray.fRunStart[i]+1 has style fStyleTable[i]. The style table's "gap range" is kept in sync with the RunArray. This class propogates paragraph styles in the "Microsoft Word" fashion: styles propogate backward from paragraph breaks. This class maintains a time stamp, which changes every time extra formatting (formatting on a range other than the current selection) is needed; for example, when a paragraph break is removed.


Field Summary
final static  StringCOPYRIGHT
    

Constructor Summary
 ParagraphBuffer(MCharBuffer charBuffer)
     Construct a new paragraph buffer from the characters in charBuffer.
public  ParagraphBuffer()
     Note: this constructor is ONLY for use by the Serialization mechanism.

Method Summary
 voidcompress()
    
public  voiddeleteText(int start, int limit, int[] damagedRange)
     Process deletion by removing paragraph breaks contained in deleted range.
public  voidinsertText(int start, char insertedChar)
     Process a character insertion at offset start.
public  voidinsertText(int start, char srcChars, int srcStart, int srcLimit)
     Process character insertion at offset start.
public  booleanmodifyParagraphStyles(int start, int limit, StyleModifier modifier, int[] damagedRange)
     Modify the style of all paragraphs containing offsets in the range [start, limit) to style.
public  intparagraphLimit(int pos)
     Returns the limit of the paragraph containing offset pos.
public  intparagraphStart(int pos)
     Returns the start of the paragraph containing offset pos.
public  AttributeMapparagraphStyleAt(int offset)
     Returns the style of the paragraph containing offset pos.
public  voidreadExternal(ObjectInput in)
    
public  voidreplace(int start, int limit, MConstText srcText, int srcStart, int srcLimit, int[] damagedRange)
     Replace paragraph breaks/styles between start and length with paragraph breaks/styles from srcText.
public  voidwriteExternal(ObjectOutput out)
    

Field Detail
COPYRIGHT
final static String COPYRIGHT(Code)




Constructor Detail
ParagraphBuffer
ParagraphBuffer(MCharBuffer charBuffer)(Code)
Construct a new paragraph buffer from the characters in charBuffer.



ParagraphBuffer
public ParagraphBuffer()(Code)
Note: this constructor is ONLY for use by the Serialization mechanism. It does not leave this object in a valid state!




Method Detail
compress
void compress()(Code)



deleteText
public void deleteText(int start, int limit, int[] damagedRange)(Code)
Process deletion by removing paragraph breaks contained in deleted range. Propogate paragraph styles backward, if necessary.



insertText
public void insertText(int start, char insertedChar)(Code)
Process a character insertion at offset start. If a paragraph break was inserted, propogate paragraph style at start to new paragraph.



insertText
public void insertText(int start, char srcChars, int srcStart, int srcLimit)(Code)
Process character insertion at offset start. Each new paragraph gets paragraph style at start.



modifyParagraphStyles
public boolean modifyParagraphStyles(int start, int limit, StyleModifier modifier, int[] damagedRange)(Code)
Modify the style of all paragraphs containing offsets in the range [start, limit) to style.



paragraphLimit
public int paragraphLimit(int pos)(Code)
Returns the limit of the paragraph containing offset pos.



paragraphStart
public int paragraphStart(int pos)(Code)
Returns the start of the paragraph containing offset pos.



paragraphStyleAt
public AttributeMap paragraphStyleAt(int offset)(Code)
Returns the style of the paragraph containing offset pos.



readExternal
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException(Code)



replace
public void replace(int start, int limit, MConstText srcText, int srcStart, int srcLimit, int[] damagedRange)(Code)
Replace paragraph breaks/styles between start and length with paragraph breaks/styles from srcText.
Parameters:
  start - an offset into the text
Parameters:
  limit - the index after the last character to replace
Parameters:
  srcText - the text from which new paragraphs are taken
Parameters:
  srcStart - the start of the range in srcText to copy
Parameters:
  srcLimit - the first index after the range in srcText to copy



writeExternal
public void writeExternal(ObjectOutput out) throws IOException(Code)



Fields inherited from com.ibm.richtext.styledtext.MParagraphBuffer
final static String COPYRIGHT(Code)(Java Doc)

Methods inherited from com.ibm.richtext.styledtext.MParagraphBuffer
abstract void compress()(Code)(Java Doc)
abstract void deleteText(int start, int limit, int[] damagedRange)(Code)(Java Doc)
abstract void insertText(int start, char insertedChar)(Code)(Java Doc)
abstract void insertText(int start, char[] srcChars, int srcStart, int srcLimit)(Code)(Java Doc)
abstract boolean modifyParagraphStyles(int start, int limit, StyleModifier modifier, int[] damagedRange)(Code)(Java Doc)
abstract int paragraphLimit(int pos)(Code)(Java Doc)
abstract int paragraphStart(int pos)(Code)(Java Doc)
abstract AttributeMap paragraphStyleAt(int offset)(Code)(Java Doc)
abstract void replace(int start, int limit, MConstText srcText, int srcStart, int srcLimit, int[] damagedRange)(Code)(Java Doc)

Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.