Java Doc for AttributedString.java in  » 6.0-JDK-Modules » j2me » java » 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 » 6.0 JDK Modules » j2me » java.text 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   java.text.AttributedString

AttributedString
public class AttributedString (Code)
An AttributedString holds text and related attribute information. It may be used as the actual data storage in some cases where a text reader wants to access attributed text through the AttributedCharacterIterator interface.
See Also:   AttributedCharacterIterator
See Also:   Annotation
since:
   1.2


Field Summary
 intrunArraySize
    
 VectorrunAttributeValues
    
 VectorrunAttributes
    
 intrunCount
    
 intrunStarts
    
 Stringtext
    

Constructor Summary
 AttributedString(AttributedCharacterIterator[] iterators)
     Constructs an AttributedString instance with the given AttributedCharacterIterators.
public  AttributedString(String text)
     Constructs an AttributedString instance with the given text.
public  AttributedString(String text, Map attributes)
     Constructs an AttributedString instance with the given text and attributes.
public  AttributedString(AttributedCharacterIterator text)
     Constructs an AttributedString instance with the given attributed text represented by AttributedCharacterIterator.
public  AttributedString(AttributedCharacterIterator text, int beginIndex, int endIndex)
     Constructs an AttributedString instance with the subrange of the given attributed text represented by AttributedCharacterIterator.
public  AttributedString(AttributedCharacterIterator text, int beginIndex, int endIndex, Attribute[] attributes)
     Constructs an AttributedString instance with the subrange of the given attributed text represented by AttributedCharacterIterator.

Method Summary
public  voidaddAttribute(Attribute attribute, Object value)
     Adds an attribute to the entire string.
public  voidaddAttribute(Attribute attribute, Object value, int beginIndex, int endIndex)
     Adds an attribute to a subrange of the string.
Parameters:
  attribute - the attribute key
Parameters:
  value - The value of the attribute.
public  voidaddAttributes(Map attributes, int beginIndex, int endIndex)
     Adds a set of attributes to a subrange of the string.
public  AttributedCharacterIteratorgetIterator()
     Creates an AttributedCharacterIterator instance that provides access to the entire contents of this string.
public  AttributedCharacterIteratorgetIterator(Attribute[] attributes)
     Creates an AttributedCharacterIterator instance that provides access to selected contents of this string.
public  AttributedCharacterIteratorgetIterator(Attribute[] attributes, int beginIndex, int endIndex)
     Creates an AttributedCharacterIterator instance that provides access to selected contents of this string.
 intlength()
    

Field Detail
runArraySize
int runArraySize(Code)



runAttributeValues
Vector runAttributeValues(Code)



runAttributes
Vector runAttributes(Code)



runCount
int runCount(Code)



runStarts
int runStarts(Code)



text
String text(Code)




Constructor Detail
AttributedString
AttributedString(AttributedCharacterIterator[] iterators)(Code)
Constructs an AttributedString instance with the given AttributedCharacterIterators.
Parameters:
  iterators - AttributedCharacterIterators to constructAttributedString from.
throws:
  NullPointerException - if iterators is null



AttributedString
public AttributedString(String text)(Code)
Constructs an AttributedString instance with the given text.
Parameters:
  text - The text for this attributed string.



AttributedString
public AttributedString(String text, Map attributes)(Code)
Constructs an AttributedString instance with the given text and attributes.
Parameters:
  text - The text for this attributed string.
Parameters:
  attributes - The attributes that apply to the entire string.
exception:
  IllegalArgumentException - if the text has length 0and the attributes parameter is not an empty Map (attributescannot be applied to a 0-length range).



AttributedString
public AttributedString(AttributedCharacterIterator text)(Code)
Constructs an AttributedString instance with the given attributed text represented by AttributedCharacterIterator.
Parameters:
  text - The text for this attributed string.



AttributedString
public AttributedString(AttributedCharacterIterator text, int beginIndex, int endIndex)(Code)
Constructs an AttributedString instance with the subrange of the given attributed text represented by AttributedCharacterIterator. If the given range produces an empty text, all attributes will be discarded. Note that any attributes wrapped by an Annotation object are discarded for a subrange of the original attribute range.
Parameters:
  text - The text for this attributed string.
Parameters:
  beginIndex - Index of the first character of the range.
Parameters:
  endIndex - Index of the character following the last characterof the range.
exception:
  IllegalArgumentException - if the subrange given bybeginIndex and endIndex is out of the text range.
See Also:   java.text.Annotation



AttributedString
public AttributedString(AttributedCharacterIterator text, int beginIndex, int endIndex, Attribute[] attributes)(Code)
Constructs an AttributedString instance with the subrange of the given attributed text represented by AttributedCharacterIterator. Only attributes that match the given attributes will be incorporated into the instance. If the given range produces an empty text, all attributes will be discarded. Note that any attributes wrapped by an Annotation object are discarded for a subrange of the original attribute range.
Parameters:
  text - The text for this attributed string.
Parameters:
  beginIndex - Index of the first character of the range.
Parameters:
  endIndex - Index of the character following the last characterof the range.
Parameters:
  attributes - Specifies attributes to be extractedfrom the text. If null is specified, all available attributes willbe used.
exception:
  IllegalArgumentException - if the subrange given bybeginIndex and endIndex is out of the text range.
See Also:   java.text.Annotation




Method Detail
addAttribute
public void addAttribute(Attribute attribute, Object value)(Code)
Adds an attribute to the entire string.
Parameters:
  attribute - the attribute key
Parameters:
  value - the value of the attribute; may be null
exception:
  IllegalArgumentException - if the AttributedString has length 0(attributes cannot be applied to a 0-length range).



addAttribute
public void addAttribute(Attribute attribute, Object value, int beginIndex, int endIndex)(Code)
Adds an attribute to a subrange of the string.
Parameters:
  attribute - the attribute key
Parameters:
  value - The value of the attribute. May be null.
Parameters:
  beginIndex - Index of the first character of the range.
Parameters:
  endIndex - Index of the character following the last character of the range.
exception:
  IllegalArgumentException - if beginIndex is less then 0, endIndex isgreater than the length of the string, or beginIndex and endIndex together don'tdefine a non-empty subrange of the string.



addAttributes
public void addAttributes(Map attributes, int beginIndex, int endIndex)(Code)
Adds a set of attributes to a subrange of the string.
Parameters:
  attributes - The attributes to be added to the string.
Parameters:
  beginIndex - Index of the first character of the range.
Parameters:
  endIndex - Index of the character following the lastcharacter of the range.
exception:
  IllegalArgumentException - if beginIndex is less then0, endIndex is greater than the length of the string, orbeginIndex and endIndex together don't define a non-emptysubrange of the string and the attributes parameter is not anempty Map.



getIterator
public AttributedCharacterIterator getIterator()(Code)
Creates an AttributedCharacterIterator instance that provides access to the entire contents of this string. An iterator providing access to the text and its attributes.



getIterator
public AttributedCharacterIterator getIterator(Attribute[] attributes)(Code)
Creates an AttributedCharacterIterator instance that provides access to selected contents of this string. Information about attributes not listed in attributes that the implementor may have need not be made accessible through the iterator. If the list is null, all available attribute information should be made accessible.
Parameters:
  attributes - a list of attributes that the client is interested in an iterator providing access to the text and its attributes



getIterator
public AttributedCharacterIterator getIterator(Attribute[] attributes, int beginIndex, int endIndex)(Code)
Creates an AttributedCharacterIterator instance that provides access to selected contents of this string. Information about attributes not listed in attributes that the implementor may have need not be made accessible through the iterator. If the list is null, all available attribute information should be made accessible.
Parameters:
  attributes - a list of attributes that the client is interested in
Parameters:
  beginIndex - the index of the first character
Parameters:
  endIndex - the index of the character following the last character an iterator providing access to the text and its attributes
exception:
  IllegalArgumentException - if beginIndex is less then 0,endIndex is greater than the length of the string, or beginIndex isgreater than endIndex.



length
int length()(Code)



Methods inherited from java.lang.Object
public boolean equals(Object obj)(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.