public static class TextLayout.CaretPolicy extends Object
getStrongCaret ,用于指定决定双重插入文本中强插入符的策略。 
       强插嘴用于将插入符号向左或向右移动。 
       此类的实例可以传递到getCaretShapes , getNextLeftHit和getNextRightHit自定义强插入符选择。 
        要指定替代插入策略,子类CaretPolicy并覆盖getStrongCaret 。 getStrongCaret应检查两个TextHitInfo参数,并选择其中一个作为强插入符号。 
大多数客户端不需要使用这个类。
| Constructor and Description | 
|---|
| CaretPolicy()
              构造一个 
              CaretPolicy。 | 
| Modifier and Type | Method and Description | 
|---|---|
| TextHitInfo | getStrongCaret(TextHitInfo hit1, TextHitInfo hit2, TextLayout layout)
              在指定的 
              TextHitInfo选择一个指定的TextHitInfo实例作为强插销TextLayout。 | 
public TextHitInfo getStrongCaret(TextHitInfo hit1, TextHitInfo hit2, TextLayout layout)
TextHitInfo选择一个指定的 
           TextHitInfo实例作为强插销 
           TextLayout 。 
          hit1 -有效命中 
            layout 
           hit2 -有效命中 
            layout 
           layout -所述 
            TextLayout其中 
            hit1和 
            hit2中使用 
           hit1或 
            hit2 (或等效的 
            TextHitInfo ),表示强插销符号。 
            Submit a bug or feature 
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
 Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.