Java Code Examples for java.awt.font.TextLayout.getCaretShape()

The following are Jave code examples for showing how to use getCaretShape() of the java.awt.font.TextLayout class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
+ Save this method
Example 1
Project: OpenJSharp   File: TextMeasureTests.java   View Source Code Vote up 5 votes
public void runTest(Object ctx, int numReps) {
    TLExContext tlctx = (TLExContext)ctx;
    TextLayout tl = tlctx.tl;
    TextHitInfo[] hits = tlctx.hits;
    Shape s;
    do {
        for (int i = 0; i < hits.length; ++i) {
            s = tl.getCaretShape(hits[i]);
        }
    } while (--numReps >= 0);
}
 
Example 2
Project: jdk8u-jdk   File: TextMeasureTests.java   View Source Code Vote up 5 votes
public void runTest(Object ctx, int numReps) {
    TLExContext tlctx = (TLExContext)ctx;
    TextLayout tl = tlctx.tl;
    TextHitInfo[] hits = tlctx.hits;
    Shape s;
    do {
        for (int i = 0; i < hits.length; ++i) {
            s = tl.getCaretShape(hits[i]);
        }
    } while (--numReps >= 0);
}
 
Example 3
Project: openjdk-jdk10   File: TextMeasureTests.java   View Source Code Vote up 5 votes
public void runTest(Object ctx, int numReps) {
    TLExContext tlctx = (TLExContext)ctx;
    TextLayout tl = tlctx.tl;
    TextHitInfo[] hits = tlctx.hits;
    Shape s;
    do {
        for (int i = 0; i < hits.length; ++i) {
            s = tl.getCaretShape(hits[i]);
        }
    } while (--numReps >= 0);
}