Java Doc for StyledText.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
      com.ibm.richtext.styledtext.MText
         com.ibm.richtext.styledtext.StyledText

StyledText
final public class StyledText extends MText implements Externalizable(Code)
This class is an implementation of MText, a modifyable, styled text storage model. Additionally, it supports persistance through the Externalizable interface.
See Also:   MText


Field Summary
final static  StringCOPYRIGHT
    

Constructor Summary
public  StyledText()
     Create an empty text object.
public  StyledText(int capacity)
     Create an empty text object ready to hold at least capacity chars.
public  StyledText(String string, AttributeMap initialStyle)
     Create a text object with the characters in the string, in the given style.
public  StyledText(MConstText source)
     Create a text object from the given source.
public  StyledText(MConstText source, int srcStart, int srcLimit)
     Create a text object from a subrange of the given source.

Method Summary
public  voidappend(MConstText srcText)
     Append the contents of srcText (both characters and styles) to the end of this MText.
public  charat(int pos)
     Return the character at offset pos.
public  AttributeMapcharacterStyleAt(int pos)
     Return the style applied to the character at offset pos.
public  intcharacterStyleLimit(int pos)
     Return the index after the last character in the character style run containing pos.
public  intcharacterStyleStart(int pos)
     Return the index of the first character in the character style run containing pos.
public  voidcompress()
     Minimize the amount of memory used by the MText object.
public  CharacterIteratorcreateCharacterIterator(int start, int limit)
     Create a CharacterIterator over the range [start, limit).
public  intdamagedRangeLimit()
     Return the limit of the damaged range.
public  intdamagedRangeStart()
     Return the start of the damaged range.
public  MConstTextextract(int start, int limit)
     Create an MConstText containing the characters and styles in the range [start, limit).
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.
public  MTextextractWritable(int start, int limit)
     Create an MText containing the characters and styles in the range [start, limit).
public  intgetTimeStamp()
     Return the current time stamp.
public  voidinsert(int pos, MConstText srcText)
     Insert the contents of srcText (both characters and styles) into this MText at the position specified by pos.
public  intlength()
     Return the length of the MConstText object.
public  voidmodifyCharacterStyles(int start, int limit, StyleModifier modifier)
     Invoke the given modifier on all character styles from start to limit.
public  voidmodifyParagraphStyles(int start, int limit, StyleModifier modifier)
     Invoke the given modifier on all paragraph styles in paragraphs containing characters in the range [start, limit).
public  intparagraphLimit(int pos)
     Return the limit of the paragraph containing the character at offset pos.
public  intparagraphStart(int pos)
     Return the start of the paragraph containing the character at offset pos.
public  AttributeMapparagraphStyleAt(int pos)
     Return the paragraph style applied to the paragraph containing offset pos.
public  voidreadExternal(ObjectInput in)
    
public  voidremove(int start, int limit)
     Delete the specified range of characters (and styles).
public  voidremove()
     Delete all characters and styles.
public  voidremoveCharacterStyles()
     Set the style of all characters in the MText object to AttributeMap.EMPTY_ATTRIBUTE_MAP.
public  voidreplace(int start, int limit, MConstText text, int srcStart, int srcLimit)
     Replace the characters and styles in the range [start, limit) with the characters and styles in srcText in the range [srcStart, srcLimit).
public  voidreplace(int start, int limit, MConstText text)
     Replace the characters and styles in the range [start, limit) with the characters and styles in srcText.
public  voidreplace(int start, int limit, char[] srcChars, int srcStart, int srcLimit, AttributeMap charsStyle)
     Replace the characters in the range [start, limit) with the characters in srcChars in the range [srcStart, srcLimit).
public  voidreplace(int start, int limit, char srcChar, AttributeMap charStyle)
     Replace the characters in the range [start, limit) with the character srcChar. The new character takes on the style charStyle
Parameters:
  start - the offset at which the replace operation begins
Parameters:
  limit - the offset at which the replace operation ends.
public  voidreplaceAll(MConstText srcText)
     Replace the entire contents of this MText (both characters and styles) with the contents of srcText.
public  voidresetDamagedRange()
     Reset the damaged range to an empty interval, and begin accumulating the damaged range.
public  StringtoString()
    
public  voidwriteExternal(ObjectOutput out)
    

Field Detail
COPYRIGHT
final static String COPYRIGHT(Code)




Constructor Detail
StyledText
public StyledText()(Code)
Create an empty text object.



StyledText
public StyledText(int capacity)(Code)
Create an empty text object ready to hold at least capacity chars.
Parameters:
  capacity - the minimum capacity of the internal text buffer



StyledText
public StyledText(String string, AttributeMap initialStyle)(Code)
Create a text object with the characters in the string, in the given style.
Parameters:
  string - the initial contents
Parameters:
  initialStyle - the style of the initial text



StyledText
public StyledText(MConstText source)(Code)
Create a text object from the given source.
Parameters:
  source - the text to copy



StyledText
public StyledText(MConstText source, int srcStart, int srcLimit)(Code)
Create a text object from a subrange of the given source.
Parameters:
  source - the text to copy from
Parameters:
  srcStart - the index of the first character to copy
Parameters:
  srcLimit - the index after the last character to copy




Method Detail
append
public void append(MConstText srcText)(Code)
Append the contents of srcText (both characters and styles) to the end of this MText.
Parameters:
  srcText - The text to append.



at
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
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
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
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



compress
public void compress()(Code)
Minimize the amount of memory used by the MText object.



createCharacterIterator
public CharacterIterator createCharacterIterator(int start, int limit)(Code)
Create a CharacterIterator over the range [start, limit).
Parameters:
  start - the beginning of the iterator's range
Parameters:
  limit - the limit of the iterator's range a valid CharacterIterator over the specified range
See Also:   java.text.CharacterIterator



damagedRangeLimit
public int damagedRangeLimit()(Code)
Return the limit of the damaged range. If the start is Integer.MAX_VALUE and the limit is Integer.MIN_VALUE, then the damaged range is empty. the limit of the damaged range
See Also:   StyledText.damagedRangeStart
See Also:   StyledText.resetDamagedRange



damagedRangeStart
public int damagedRangeStart()(Code)
Return the start of the damaged range. If the start is Integer.MAX_VALUE and the limit is Integer.MIN_VALUE, then the damaged range is empty. the start of the damaged range
See Also:   StyledText.damagedRangeLimit
See Also:   StyledText.resetDamagedRange



extract
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
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).



extractWritable
public MText extractWritable(int start, int limit)(Code)
Create an MText 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



getTimeStamp
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



insert
public void insert(int pos, MConstText srcText)(Code)
Insert the contents of srcText (both characters and styles) into this MText at the position specified by pos.
Parameters:
  pos - The character offset where the new text is to be inserted.
Parameters:
  srcText - The text to insert.



length
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



modifyCharacterStyles
public void modifyCharacterStyles(int start, int limit, StyleModifier modifier)(Code)
Invoke the given modifier on all character styles from start to limit.
Parameters:
  modifier - the modifier to apply to the range.
Parameters:
  start - the start of the range of text to modify.
Parameters:
  limit - the limit of the range of text to modify.



modifyParagraphStyles
public void modifyParagraphStyles(int start, int limit, StyleModifier modifier)(Code)
Invoke the given modifier on all paragraph styles in paragraphs containing characters in the range [start, limit).
Parameters:
  modifier - the modifier to apply to the range.
Parameters:
  start - the start of the range of text to modify.
Parameters:
  limit - the limit of the range of text to modify.



paragraphLimit
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
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
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



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



remove
public void remove(int start, int limit)(Code)
Delete the specified range of characters (and styles).
Parameters:
  start - Offset of the first character to delete.
Parameters:
  limit - Offset of the first character after the range to delete.



remove
public void remove()(Code)
Delete all characters and styles. Always increments time stamp.



removeCharacterStyles
public void removeCharacterStyles()(Code)
Set the style of all characters in the MText object to AttributeMap.EMPTY_ATTRIBUTE_MAP.



replace
public void replace(int start, int limit, MConstText text, int srcStart, int srcLimit)(Code)
Replace the characters and styles in the range [start, limit) with the characters and styles in srcText in the range [srcStart, srcLimit). srcText is not modified.
Parameters:
  start - the offset at which the replace operation begins
Parameters:
  limit - the offset at which the replace operation ends. The character and style atlimit is not modified.
Parameters:
  text - the source for the new characters and styles
Parameters:
  srcStart - the offset into srcText where new characters and styles will be obtained
Parameters:
  srcLimit - the offset into srcText where the new characters and styles end



replace
public void replace(int start, int limit, MConstText text)(Code)
Replace the characters and styles in the range [start, limit) with the characters and styles in srcText. srcText is not modified.
Parameters:
  start - the offset at which the replace operation begins
Parameters:
  limit - the offset at which the replace operation ends. The character and style atlimit is not modified.
Parameters:
  text - the source for the new characters and styles



replace
public void replace(int start, int limit, char[] srcChars, int srcStart, int srcLimit, AttributeMap charsStyle)(Code)
Replace the characters in the range [start, limit) with the characters in srcChars in the range [srcStart, srcLimit). New characters take on the style charsStyle. srcChars is not modified.
Parameters:
  start - the offset at which the replace operation begins
Parameters:
  limit - the offset at which the replace operation ends. The character atlimit is not modified.
Parameters:
  srcChars - the source for the new characters
Parameters:
  srcStart - the offset into srcChars where new characters will be obtained
Parameters:
  srcLimit - the offset into srcChars where the new characters end
Parameters:
  charsStyle - the style of the new characters



replace
public void replace(int start, int limit, char srcChar, AttributeMap charStyle)(Code)
Replace the characters in the range [start, limit) with the character srcChar. The new character takes on the style charStyle
Parameters:
  start - the offset at which the replace operation begins
Parameters:
  limit - the offset at which the replace operation ends. The character atlimit is not modified.
Parameters:
  srcChar - the new character
Parameters:
  charStyle - the style of the new character



replaceAll
public void replaceAll(MConstText srcText)(Code)
Replace the entire contents of this MText (both characters and styles) with the contents of srcText.
Parameters:
  srcText - the source for the new characters and styles



resetDamagedRange
public void resetDamagedRange()(Code)
Reset the damaged range to an empty interval, and begin accumulating the damaged range. The damaged range includes every index where a character, character style, or paragraph style has changed.
See Also:   StyledText.damagedRangeStart
See Also:   StyledText.damagedRangeLimit



toString
public String toString()(Code)



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



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

Methods inherited from com.ibm.richtext.styledtext.MText
abstract public void append(MConstText srcText)(Code)(Java Doc)
abstract public void compress()(Code)(Java Doc)
abstract public MText extractWritable(int start, int limit)(Code)(Java Doc)
abstract public void insert(int pos, MConstText srcText)(Code)(Java Doc)
abstract public void modifyCharacterStyles(int start, int limit, StyleModifier modifier)(Code)(Java Doc)
abstract public void modifyParagraphStyles(int start, int limit, StyleModifier modifier)(Code)(Java Doc)
abstract public void remove(int start, int limit)(Code)(Java Doc)
abstract public void remove()(Code)(Java Doc)
abstract public void removeCharacterStyles()(Code)(Java Doc)
abstract public void replace(int start, int limit, MConstText srcText, int srcStart, int srcLimit)(Code)(Java Doc)
abstract public void replace(int start, int limit, MConstText text)(Code)(Java Doc)
abstract public void replace(int start, int limit, char[] srcChars, int srcStart, int srcLimit, AttributeMap charsStyle)(Code)(Java Doc)
abstract public void replace(int start, int limit, char srcChar, AttributeMap charStyle)(Code)(Java Doc)
abstract public void replaceAll(MConstText srcText)(Code)(Java Doc)
abstract public void resetDamagedRange()(Code)(Java Doc)

Fields inherited from com.ibm.richtext.styledtext.MConstText
final static String COPYRIGHT(Code)(Java Doc)
final public static DataFlavor styledTextFlavor(Code)(Java Doc)

Methods inherited from com.ibm.richtext.styledtext.MConstText
abstract public char at(int pos)(Code)(Java Doc)
abstract public AttributeMap characterStyleAt(int pos)(Code)(Java Doc)
abstract public int characterStyleLimit(int pos)(Code)(Java Doc)
abstract public int characterStyleStart(int pos)(Code)(Java Doc)
public CharacterIterator createCharacterIterator()(Code)(Java Doc)
abstract public CharacterIterator createCharacterIterator(int start, int limit)(Code)(Java Doc)
abstract public int damagedRangeLimit()(Code)(Java Doc)
abstract public int damagedRangeStart()(Code)(Java Doc)
final public boolean equals(Object rhs)(Code)(Java Doc)
public boolean equals(MConstText rhs)(Code)(Java Doc)
abstract public MConstText extract(int start, int limit)(Code)(Java Doc)
abstract public void extractChars(int start, int limit, char[] dst, int dstStart)(Code)(Java Doc)
abstract public int getTimeStamp()(Code)(Java Doc)
final public int hashCode()(Code)(Java Doc)
abstract public int length()(Code)(Java Doc)
abstract public int paragraphLimit(int pos)(Code)(Java Doc)
abstract public int paragraphStart(int pos)(Code)(Java Doc)
abstract public AttributeMap paragraphStyleAt(int pos)(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.