Java Code Examples for java.awt.Font#LAYOUT_RIGHT_TO_LEFT

The following examples show how to use java.awt.Font#LAYOUT_RIGHT_TO_LEFT . These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
public void init(TestEnvironment env, Result results) {
    super.init(env, results);

    int flags = Font.LAYOUT_LEFT_TO_RIGHT;
    if (Bidi.requiresBidi(chars, 0, chars.length)) { // assume rtl
        flags = Font.LAYOUT_RIGHT_TO_LEFT;
    }
    gv = font.layoutGlyphVector(frc, chars, 0, chars.length, flags);

    // gv options
}
 
Example 2
public void init(TestEnvironment env, Result results) {
    super.init(env, results);

    chars1 = new char[chars.length + 2];
    System.arraycopy(chars, 0, chars1, 1, chars.length);
    ci = new ArrayCI(chars1, 1, chars.length);
    gv = font.createGlyphVector(frc, text);
    glyphs = gv.getGlyphCodes(0, gv.getNumGlyphs(), null);
    flags = Bidi.requiresBidi(chars, 0, chars.length)
        ? Font.LAYOUT_LEFT_TO_RIGHT
        : Font.LAYOUT_RIGHT_TO_LEFT;
}
 
Example 3
public void init(TestEnvironment env, Result results) {
    super.init(env, results);

    int flags = Font.LAYOUT_LEFT_TO_RIGHT;
    if (Bidi.requiresBidi(chars, 0, chars.length)) { // assume rtl
        flags = Font.LAYOUT_RIGHT_TO_LEFT;
    }
    gv = font.layoutGlyphVector(frc, chars, 0, chars.length, flags);

    // gv options
}
 
Example 4
public void init(TestEnvironment env, Result results) {
    super.init(env, results);

    chars1 = new char[chars.length + 2];
    System.arraycopy(chars, 0, chars1, 1, chars.length);
    ci = new ArrayCI(chars1, 1, chars.length);
    gv = font.createGlyphVector(frc, text);
    glyphs = gv.getGlyphCodes(0, gv.getNumGlyphs(), null);
    flags = Bidi.requiresBidi(chars, 0, chars.length)
        ? Font.LAYOUT_LEFT_TO_RIGHT
        : Font.LAYOUT_RIGHT_TO_LEFT;
}
 
Example 5
public void init(TestEnvironment env, Result results) {
    super.init(env, results);

    int flags = Font.LAYOUT_LEFT_TO_RIGHT;
    if (Bidi.requiresBidi(chars, 0, chars.length)) { // assume rtl
        flags = Font.LAYOUT_RIGHT_TO_LEFT;
    }
    gv = font.layoutGlyphVector(frc, chars, 0, chars.length, flags);

    // gv options
}
 
Example 6
public void init(TestEnvironment env, Result results) {
    super.init(env, results);

    chars1 = new char[chars.length + 2];
    System.arraycopy(chars, 0, chars1, 1, chars.length);
    ci = new ArrayCI(chars1, 1, chars.length);
    gv = font.createGlyphVector(frc, text);
    glyphs = gv.getGlyphCodes(0, gv.getNumGlyphs(), null);
    flags = Bidi.requiresBidi(chars, 0, chars.length)
        ? Font.LAYOUT_LEFT_TO_RIGHT
        : Font.LAYOUT_RIGHT_TO_LEFT;
}
 
Example 7
public void init(TestEnvironment env, Result results) {
    super.init(env, results);

    int flags = Font.LAYOUT_LEFT_TO_RIGHT;
    if (Bidi.requiresBidi(chars, 0, chars.length)) { // assume rtl
        flags = Font.LAYOUT_RIGHT_TO_LEFT;
    }
    gv = font.layoutGlyphVector(frc, chars, 0, chars.length, flags);

    // gv options
}
 
Example 8
public void init(TestEnvironment env, Result results) {
    super.init(env, results);

    chars1 = new char[chars.length + 2];
    System.arraycopy(chars, 0, chars1, 1, chars.length);
    ci = new ArrayCI(chars1, 1, chars.length);
    gv = font.createGlyphVector(frc, text);
    glyphs = gv.getGlyphCodes(0, gv.getNumGlyphs(), null);
    flags = Bidi.requiresBidi(chars, 0, chars.length)
        ? Font.LAYOUT_LEFT_TO_RIGHT
        : Font.LAYOUT_RIGHT_TO_LEFT;
}
 
Example 9
public void init(TestEnvironment env, Result results) {
    super.init(env, results);

    int flags = Font.LAYOUT_LEFT_TO_RIGHT;
    if (Bidi.requiresBidi(chars, 0, chars.length)) { // assume rtl
        flags = Font.LAYOUT_RIGHT_TO_LEFT;
    }
    gv = font.layoutGlyphVector(frc, chars, 0, chars.length, flags);

    // gv options
}
 
Example 10
public void init(TestEnvironment env, Result results) {
    super.init(env, results);

    chars1 = new char[chars.length + 2];
    System.arraycopy(chars, 0, chars1, 1, chars.length);
    ci = new ArrayCI(chars1, 1, chars.length);
    gv = font.createGlyphVector(frc, text);
    glyphs = gv.getGlyphCodes(0, gv.getNumGlyphs(), null);
    flags = Bidi.requiresBidi(chars, 0, chars.length)
        ? Font.LAYOUT_LEFT_TO_RIGHT
        : Font.LAYOUT_RIGHT_TO_LEFT;
}
 
Example 11
public void init(TestEnvironment env, Result results) {
    super.init(env, results);

    int flags = Font.LAYOUT_LEFT_TO_RIGHT;
    if (Bidi.requiresBidi(chars, 0, chars.length)) { // assume rtl
        flags = Font.LAYOUT_RIGHT_TO_LEFT;
    }
    gv = font.layoutGlyphVector(frc, chars, 0, chars.length, flags);

    // gv options
}
 
Example 12
public void init(TestEnvironment env, Result results) {
    super.init(env, results);

    chars1 = new char[chars.length + 2];
    System.arraycopy(chars, 0, chars1, 1, chars.length);
    ci = new ArrayCI(chars1, 1, chars.length);
    gv = font.createGlyphVector(frc, text);
    glyphs = gv.getGlyphCodes(0, gv.getNumGlyphs(), null);
    flags = Bidi.requiresBidi(chars, 0, chars.length)
        ? Font.LAYOUT_LEFT_TO_RIGHT
        : Font.LAYOUT_RIGHT_TO_LEFT;
}
 
Example 13
public void init(TestEnvironment env, Result results) {
    super.init(env, results);

    int flags = Font.LAYOUT_LEFT_TO_RIGHT;
    if (Bidi.requiresBidi(chars, 0, chars.length)) { // assume rtl
        flags = Font.LAYOUT_RIGHT_TO_LEFT;
    }
    gv = font.layoutGlyphVector(frc, chars, 0, chars.length, flags);

    // gv options
}
 
Example 14
public void init(TestEnvironment env, Result results) {
    super.init(env, results);

    chars1 = new char[chars.length + 2];
    System.arraycopy(chars, 0, chars1, 1, chars.length);
    ci = new ArrayCI(chars1, 1, chars.length);
    gv = font.createGlyphVector(frc, text);
    glyphs = gv.getGlyphCodes(0, gv.getNumGlyphs(), null);
    flags = Bidi.requiresBidi(chars, 0, chars.length)
        ? Font.LAYOUT_LEFT_TO_RIGHT
        : Font.LAYOUT_RIGHT_TO_LEFT;
}
 
Example 15
public void init(TestEnvironment env, Result results) {
    super.init(env, results);

    int flags = Font.LAYOUT_LEFT_TO_RIGHT;
    if (Bidi.requiresBidi(chars, 0, chars.length)) { // assume rtl
        flags = Font.LAYOUT_RIGHT_TO_LEFT;
    }
    gv = font.layoutGlyphVector(frc, chars, 0, chars.length, flags);

    // gv options
}
 
Example 16
public void init(TestEnvironment env, Result results) {
    super.init(env, results);

    chars1 = new char[chars.length + 2];
    System.arraycopy(chars, 0, chars1, 1, chars.length);
    ci = new ArrayCI(chars1, 1, chars.length);
    gv = font.createGlyphVector(frc, text);
    glyphs = gv.getGlyphCodes(0, gv.getNumGlyphs(), null);
    flags = Bidi.requiresBidi(chars, 0, chars.length)
        ? Font.LAYOUT_LEFT_TO_RIGHT
        : Font.LAYOUT_RIGHT_TO_LEFT;
}
 
Example 17
public void init(TestEnvironment env, Result results) {
    super.init(env, results);

    int flags = Font.LAYOUT_LEFT_TO_RIGHT;
    if (Bidi.requiresBidi(chars, 0, chars.length)) { // assume rtl
        flags = Font.LAYOUT_RIGHT_TO_LEFT;
    }
    gv = font.layoutGlyphVector(frc, chars, 0, chars.length, flags);

    // gv options
}
 
Example 18
public void init(TestEnvironment env, Result results) {
    super.init(env, results);

    chars1 = new char[chars.length + 2];
    System.arraycopy(chars, 0, chars1, 1, chars.length);
    ci = new ArrayCI(chars1, 1, chars.length);
    gv = font.createGlyphVector(frc, text);
    glyphs = gv.getGlyphCodes(0, gv.getNumGlyphs(), null);
    flags = Bidi.requiresBidi(chars, 0, chars.length)
        ? Font.LAYOUT_LEFT_TO_RIGHT
        : Font.LAYOUT_RIGHT_TO_LEFT;
}
 
Example 19
public void init(TestEnvironment env, Result results) {
    super.init(env, results);

    int flags = Font.LAYOUT_LEFT_TO_RIGHT;
    if (Bidi.requiresBidi(chars, 0, chars.length)) { // assume rtl
        flags = Font.LAYOUT_RIGHT_TO_LEFT;
    }
    gv = font.layoutGlyphVector(frc, chars, 0, chars.length, flags);

    // gv options
}
 
Example 20
/**
 * The corresponding Font layout direction to this run direction.
 *
 * @return One of Font.LAYOUT_LEFT_TO_RIGHT or Font.LAYOUT_RIGHT_TO_LEFT.
 */
int getFontLayoutDirection() {
    return direction.equals(TextAttribute.RUN_DIRECTION_LTR)
            ? Font.LAYOUT_LEFT_TO_RIGHT
            : Font.LAYOUT_RIGHT_TO_LEFT;
}