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


java.lang.Object
   com.ibm.richtext.textformat.TextOffset

TextOffset
final public class TextOffset (Code)
A TextOffset indicates both an integer offset into text and a placement on one of the characters adjacent to the offset. An offset is a position between two characters; offset n is between character n-1 and character n. The placement specifies whether it is associated with the character after the offset (character n) or the character before the offset (character n-1).

Knowing which character the TextOffset is associated with is necessary when displaying carets. In bidirectional text, a single offset may have two distinct carets. Also, in multiline text, an offset at a line break has a possible caret on each line.

Most clients will not be interested in the placement, and will just use the offset.



Field Summary
final public static  booleanAFTER_OFFSET
     Indicates that the TextOffset is associated with character fOffset - ie the character after its offset.
final public static  booleanBEFORE_OFFSET
     Indicates that the TextOffset is associated with character fOffset - 1 - ie the character before its offset.
final static  StringCOPYRIGHT
    
public  intfOffset
     The offset into the text.
public  booleanfPlacement
     The placement - before or after.

Constructor Summary
public  TextOffset(int offset)
     Constructs a new TextOffset
Parameters:
  offset - the offset into the text to represent.
public  TextOffset()
     Constructs a new TextOffset at 0, with placement AFTER_OFFSET.
public  TextOffset(int offset, boolean placement)
     Constructs a new TextOffset with the given offset and placement.
public  TextOffset(TextOffset rhs)
     Constructs a new TextOffset from an existing one.

Method Summary
public  voidassign(TextOffset other)
    
public  booleanequals(Object other)
     Compare this to another Object.
public  booleanequals(TextOffset other)
     Return true if offset and placement are the same.
public  booleangreaterThan(TextOffset other)
     Return true if this offset is 'greaterThan' other.
public  inthashCode()
     Return the hashCode for this object.
public  booleanlessThan(TextOffset other)
     Return true if this offset is 'lessThan' other.
public  voidsetOffset(int offset, boolean placement)
    
public  StringtoString()
     Return a string representation of this object.

Field Detail
AFTER_OFFSET
final public static boolean AFTER_OFFSET(Code)
Indicates that the TextOffset is associated with character fOffset - ie the character after its offset.



BEFORE_OFFSET
final public static boolean BEFORE_OFFSET(Code)
Indicates that the TextOffset is associated with character fOffset - 1 - ie the character before its offset.



COPYRIGHT
final static String COPYRIGHT(Code)



fOffset
public int fOffset(Code)
The offset into the text.



fPlacement
public boolean fPlacement(Code)
The placement - before or after.




Constructor Detail
TextOffset
public TextOffset(int offset)(Code)
Constructs a new TextOffset
Parameters:
  offset - the offset into the text to represent. Placement is implicitly AFTER_OFFSET.



TextOffset
public TextOffset()(Code)
Constructs a new TextOffset at 0, with placement AFTER_OFFSET.



TextOffset
public TextOffset(int offset, boolean placement)(Code)
Constructs a new TextOffset with the given offset and placement.
Parameters:
  offset - the offset into the text
Parameters:
  placement - indicates the position of the caret; one of BEFORE_OFFSET or AFTER_OFFSET



TextOffset
public TextOffset(TextOffset rhs)(Code)
Constructs a new TextOffset from an existing one.
Parameters:
  rhs - the TextOffset to copy




Method Detail
assign
public void assign(TextOffset other)(Code)
Copy the value of another TextOffset into this
Parameters:
  other - the TextOffset to copy



equals
public boolean equals(Object other)(Code)
Compare this to another Object.



equals
public boolean equals(TextOffset other)(Code)
Return true if offset and placement are the same.
Parameters:
  other - offset to compare against true if both offsets are equal



greaterThan
public boolean greaterThan(TextOffset other)(Code)
Return true if this offset is 'greaterThan' other. If the fOffset fields are equal, the placement field is considered, and AFTER_OFFSET is considered 'greaterThan' BEFORE_OFFSET.
Parameters:
  other - the other offset true if this offset appears after other



hashCode
public int hashCode()(Code)
Return the hashCode for this object.



lessThan
public boolean lessThan(TextOffset other)(Code)
Return true if this offset is 'lessThan' other. If the fOffset fields are equal, the placement field is considered, and BEFORE_OFFSET is considered 'lessThan' AFTER_OFFSET.
Parameters:
  other - the other offset true if this offset appears before other



setOffset
public void setOffset(int offset, boolean placement)(Code)
Set the value of the TextOffset
Parameters:
  offset - the offset into the text
Parameters:
  placement - indicates the position of the caret; one of BEFORE_OFFSET or AFTER_OFFSET



toString
public String toString()(Code)
Return a string representation of this object.



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.