Java Doc for MConstText.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.MConstText

All known Subclasses:   com.ibm.richtext.styledtext.MText,
MConstText
abstract public class MConstText (Code)
MConstText is a base class for text with multiple character and paragraph styles. The text is a sequence of Unicode characters, represented by char. Character and paragraph styles are represented by the AttributeMap class.

Characters in the text are accessed with an integer index using the at method. Valid indices are between 0 and (length-1), where length is the number of characters in the text. Additionally, the characters in the text may be accessed through a java.text.CharacterIterator.

Every character in the text has a character style associated with it, represented by the AttributeMap class. The character style for a particular character can be obtained using the characterStyleAt method.

Each character in the text is contained in a paragraph. A paragraph is a range of text including and terminated by a paragraph separator (either \n or U+2029). Every paragraph has a paragraph style associated with it, represented by the AttributeMap class. Paragraph boundaries and styles can be obtained from the MConstText.

This class does not have methods for modifying the text or styles. However, subclasses may add this capability, so it is not safe to assume that an MConstText instance is immutable. In particular, the MText class adds modification protocol to this class. Clients can detect whether an MConstText has changed by keeping track of its timestamp.

A DataFlavor for clipboard content is defined in this class. Using this DataFlavor insures that all clients will recognize MConstText content on the clipboard.
See Also:   MText
See Also:   AttributeMap
See Also:   java.text.CharacterIterator
See Also:   java.awt.datatransfer.DataFlavor



Field Summary
final static  StringCOPYRIGHT
    
final public static  DataFlavorstyledTextFlavor
     The DataFlavor for MConstText clipboard content.

Constructor Summary
protected  MConstText()
    

Method Summary
abstract public  charat(int pos)
     Return the character at offset pos.
abstract public  AttributeMapcharacterStyleAt(int pos)
     Return the style applied to the character at offset pos.
abstract public  intcharacterStyleLimit(int pos)
     Return the index after the last character in the character style run containing pos.
abstract public  intcharacterStyleStart(int pos)
     Return the index of the first character in the character style run containing pos.
public  CharacterIteratorcreateCharacterIterator()
     Create a java.text.CharacterIterator over all of the characters in the text.
abstract public  CharacterIteratorcreateCharacterIterator(int start, int limit)
     Create a java.text.CharacterIterator over the given range of characters in the text.
abstract public  intdamagedRangeLimit()
     Return the limit of the damaged range.
abstract public  intdamagedRangeStart()
     Return the start of the damaged range.
final public  booleanequals(Object rhs)
     Compare this to another Object for equality.
public  booleanequals(MConstText rhs)
     Compare this to another MConstText for equality.
abstract public  MConstTextextract(int start, int limit)
     Create an MConstText containing the characters and styles in the range [start, limit).
abstract public  voidextractChars(int start, int limit, char[] dst, int dstStart)
     Copy the characters in the range [start, limit) into the array dst, beginning at dstStart.
Parameters:
  start - offset of first character which will be copied into the array
Parameters:
  limit - offset immediately after the last character which will be copied into the array
Parameters:
  dst - array in which to copy characters.
abstract public  intgetTimeStamp()
     Return the current time stamp.
final public  inthashCode()
     Return the hashCode for this MConstText.
abstract public  intlength()
     Return the length of the MConstText object.
abstract public  intparagraphLimit(int pos)
     Return the limit of the paragraph containing the character at offset pos.
abstract public  intparagraphStart(int pos)
     Return the start of the paragraph containing the character at offset pos.
abstract public  AttributeMapparagraphStyleAt(int pos)
     Return the paragraph style applied to the paragraph containing offset pos.

Field Detail
COPYRIGHT
final static String COPYRIGHT(Code)



styledTextFlavor
final public static DataFlavor styledTextFlavor(Code)
The DataFlavor for MConstText clipboard content. Used to indicate that clipboard data has an MConstText representation.




Constructor Detail
MConstText
protected MConstText()(Code)




Method Detail
at
abstract public char at(int pos)(Code)
Return the character at offset pos.
Parameters:
  pos - a valid offset into the text the character at offset pos



characterStyleAt
abstract public AttributeMap characterStyleAt(int pos)(Code)
Return the style applied to the character at offset pos.
Parameters:
  pos - a valid offset into the text the style at offset pos



characterStyleLimit
abstract public int characterStyleLimit(int pos)(Code)
Return the index after the last character in the character style run containing pos. All characters in a style run have the same character style. the style at offset pos



characterStyleStart
abstract public int characterStyleStart(int pos)(Code)
Return the index of the first character in the character style run containing pos. All characters in a style run have the same character style. the style at offset pos



createCharacterIterator
public CharacterIterator createCharacterIterator()(Code)
Create a java.text.CharacterIterator over all of the characters in the text. Default implementation calls createCharacterIterator(0, length()) a java.text.CharacterIterator over allof the characters in the text



createCharacterIterator
abstract public CharacterIterator createCharacterIterator(int start, int limit)(Code)
Create a java.text.CharacterIterator over the given range of characters in the text.
Parameters:
  start - the first index in the iteration range
Parameters:
  limit - the index after the last character in the iteration range a java.text.CharacterIterator over thegiven range



damagedRangeLimit
abstract public int damagedRangeLimit()(Code)
Return the limit of the damaged range. If the start is not less than the the limit of the damaged range, then the damaged range is empty. the start of the damaged range
See Also:   MConstText.damagedRangeStart
See Also:   MText.resetDamagedRange



damagedRangeStart
abstract public int damagedRangeStart()(Code)
Return the start of the damaged range. If the start is not less than the the limit of the damaged range, then the damaged range is empty. the start of the damaged range
See Also:   MConstText.damagedRangeLimit
See Also:   MText.resetDamagedRange



equals
final public boolean equals(Object rhs)(Code)
Compare this to another Object for equality. This is equal to rhs if rhs is an MConstText which is equal to this.
Parameters:
  rhs - Object to compare to true if this equals rhs



equals
public boolean equals(MConstText rhs)(Code)
Compare this to another MConstText for equality. This is equal to rhs if the characters and styles in rhs are the same as this. Subclasses may override this implementation for efficiency, but they should preserve these semantics. Determining that two MConstText instances are equal may be an expensive operation, since every character and style must be compared.
Parameters:
  rhs - Object to compare to true if this equals rhs



extract
abstract public MConstText extract(int start, int limit)(Code)
Create an MConstText containing the characters and styles in the range [start, limit).
Parameters:
  start - offset of first character in the new text
Parameters:
  limit - offset immediately after the last character in the new text an MConstText object containing the characters and styles in the given range



extractChars
abstract public void extractChars(int start, int limit, char[] dst, int dstStart)(Code)
Copy the characters in the range [start, limit) into the array dst, beginning at dstStart.
Parameters:
  start - offset of first character which will be copied into the array
Parameters:
  limit - offset immediately after the last character which will be copied into the array
Parameters:
  dst - array in which to copy characters. The length of dst must be at least(dstStart + limit - start).



getTimeStamp
abstract public int getTimeStamp()(Code)
Return the current time stamp. The time stamp is incremented whenever the contents of the MConstText changes. the current paragraph style time stamp



hashCode
final public int hashCode()(Code)
Return the hashCode for this MConstText. An empty MConstText has hashCode 0; a nonempty MConstText's hashCode is
 at(0) +
 at(length/2)*31^1 +
 at(length-1)*31^2 +
 characterStyleAt(0).hashCode()*31^3 +
 paragraphStyleAt(length-1).hashCode()*31^4
 
where ^ is exponentiation (not bitwise XOR).



length
abstract public int length()(Code)
Return the length of the MConstText object. The length is the number of characters in the text. the length of the MConstText object



paragraphLimit
abstract public int paragraphLimit(int pos)(Code)
Return the limit of the paragraph containing the character at offset pos.
Parameters:
  pos - a valid offset into the text the limit of the paragraph containing the character at offset pos



paragraphStart
abstract public int paragraphStart(int pos)(Code)
Return the start of the paragraph containing the character at offset pos.
Parameters:
  pos - a valid offset into the text the start of the paragraph containing the character at offset pos



paragraphStyleAt
abstract public AttributeMap paragraphStyleAt(int pos)(Code)
Return the paragraph style applied to the paragraph containing offset pos.
Parameters:
  pos - a valid offset into the text the paragraph style in effect at pos



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.