Java Doc for CaretManager.java in  » Apache-Harmony-Java-SE » org-package » org » apache » harmony » awt » gl » font » 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 » Apache Harmony Java SE » org package » org.apache.harmony.awt.gl.font 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.apache.harmony.awt.gl.font.CaretManager

CaretManager
public class CaretManager (Code)
This class provides functionality for creating caret and highlight shapes (bidirectional text is also supported, but, unfortunately, not tested yet).



Constructor Summary
public  CaretManager(TextRunBreaker breaker)
    

Method Summary
 GeneralPathconnectCarets(Line2D caret1, Line2D caret2)
     Connects two carets to produce a highlight shape.
public  float[]getCaretInfo(TextHitInfo hitInfo)
     Creates caret info.
public  Line2DgetCaretShape(TextHitInfo hitInfo, TextLayout layout)
    
public  Line2DgetCaretShape(TextHitInfo hitInfo, TextLayout layout, boolean useItalic, boolean useBounds, Rectangle2D bounds)
     Creates a caret shape.
public  Shape[]getCaretShapes(int offset, Rectangle2D bounds, TextLayout.CaretPolicy policy, TextLayout layout)
     Creates caret shapes for the specified offset.
public  ShapegetLogicalHighlightShape(int firstEndpoint, int secondEndpoint, Rectangle2D bounds, TextLayout layout)
     Creates a highlight shape from given two endpoints in the logical representation.
public  int[]getLogicalRangesForVisualSelection(TextHitInfo hit1, TextHitInfo hit2)
     Suppose that the user visually selected a block of text which has several different levels (mixed RTL and LTR), so, in the logical representation of the text this selection may be not contigous.
public  TextHitInfogetNextLeftHit(TextHitInfo hitInfo)
    
public  TextHitInfogetNextRightHit(TextHitInfo hitInfo)
    
public  ShapegetVisualHighlightShape(TextHitInfo hit1, TextHitInfo hit2, Rectangle2D bounds, TextLayout layout)
     Creates a highlight shape from given two hits.
public  TextHitInfogetVisualOtherHit(TextHitInfo hitInfo)
     For each visual caret position there are two hits.


Constructor Detail
CaretManager
public CaretManager(TextRunBreaker breaker)(Code)




Method Detail
connectCarets
GeneralPath connectCarets(Line2D caret1, Line2D caret2)(Code)
Connects two carets to produce a highlight shape.
Parameters:
  caret1 - - 1st caret
Parameters:
  caret2 - - 2nd caret highlight shape



getCaretInfo
public float[] getCaretInfo(TextHitInfo hitInfo)(Code)
Creates caret info. Required for the getCaretInfo methods of the TextLayout
Parameters:
  hitInfo - - specifies caret position caret info, see TextLayout.getCaretInfo documentation



getCaretShape
public Line2D getCaretShape(TextHitInfo hitInfo, TextLayout layout)(Code)



getCaretShape
public Line2D getCaretShape(TextHitInfo hitInfo, TextLayout layout, boolean useItalic, boolean useBounds, Rectangle2D bounds)(Code)
Creates a caret shape.
Parameters:
  hitInfo - - hit where to place a caret
Parameters:
  layout - - text layout
Parameters:
  useItalic - - unused for now, was used to createslanted carets for italic text
Parameters:
  useBounds - - true if the cared should fit into the provided bounds
Parameters:
  bounds - - bounds for the caret caret shape



getCaretShapes
public Shape[] getCaretShapes(int offset, Rectangle2D bounds, TextLayout.CaretPolicy policy, TextLayout layout)(Code)
Creates caret shapes for the specified offset. On the boundaries where the text is changing its direction this method may return two shapes for the strong and the weak carets, in other cases it would return one.
Parameters:
  offset - - offset in the text.
Parameters:
  bounds - - bounds to fit the carets into
Parameters:
  policy - - caret policy
Parameters:
  layout - - text layout one or two caret shapes



getLogicalHighlightShape
public Shape getLogicalHighlightShape(int firstEndpoint, int secondEndpoint, Rectangle2D bounds, TextLayout layout)(Code)
Creates a highlight shape from given two endpoints in the logical representation. This shape is not always visually contiguous
Parameters:
  firstEndpoint - - 1st logical endpoint
Parameters:
  secondEndpoint - - 2nd logical endpoint
Parameters:
  bounds - - bounds to fit the shape into
Parameters:
  layout - - text layout highlight shape



getLogicalRangesForVisualSelection
public int[] getLogicalRangesForVisualSelection(TextHitInfo hit1, TextHitInfo hit2)(Code)
Suppose that the user visually selected a block of text which has several different levels (mixed RTL and LTR), so, in the logical representation of the text this selection may be not contigous. This methods returns a set of logical ranges for the arbitrary visual selection represented by two hits.
Parameters:
  hit1 - - 1st hit
Parameters:
  hit2 - - 2nd hit logical ranges for the selection



getNextLeftHit
public TextHitInfo getNextLeftHit(TextHitInfo hitInfo)(Code)
Returns the next position to the left from the current caret position
Parameters:
  hitInfo - - current position next position to the left



getNextRightHit
public TextHitInfo getNextRightHit(TextHitInfo hitInfo)(Code)
Returns the next position to the right from the current caret position
Parameters:
  hitInfo - - current position next position to the right



getVisualHighlightShape
public Shape getVisualHighlightShape(TextHitInfo hit1, TextHitInfo hit2, Rectangle2D bounds, TextLayout layout)(Code)
Creates a highlight shape from given two hits. This shape will always be visually contiguous
Parameters:
  hit1 - - 1st hit
Parameters:
  hit2 - - 2nd hit
Parameters:
  bounds - - bounds to fit the shape into
Parameters:
  layout - - text layout highlight shape



getVisualOtherHit
public TextHitInfo getVisualOtherHit(TextHitInfo hitInfo)(Code)
For each visual caret position there are two hits. For the simple LTR text one is a trailing of the previous char and another is the leading of the next char. This method returns the opposite hit for the given hit.
Parameters:
  hitInfo - - given hit opposite hit



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.