Example usage for java.lang Character DIRECTIONALITY_RIGHT_TO_LEFT_OVERRIDE

List of usage examples for java.lang Character DIRECTIONALITY_RIGHT_TO_LEFT_OVERRIDE

Introduction

In this page you can find the example usage for java.lang Character DIRECTIONALITY_RIGHT_TO_LEFT_OVERRIDE.

Prototype

byte DIRECTIONALITY_RIGHT_TO_LEFT_OVERRIDE

To view the source code for java.lang Character DIRECTIONALITY_RIGHT_TO_LEFT_OVERRIDE.

Click Source Link

Document

Strong bidirectional character type "RLO" in the Unicode specification.

Usage

From source file:Main.java

public static boolean isStrongRightToLeft(char c) {
    byte dir = Character.getDirectionality(c);
    return (dir == Character.DIRECTIONALITY_RIGHT_TO_LEFT)
            || (dir == Character.DIRECTIONALITY_RIGHT_TO_LEFT_ARABIC)
            || (dir == Character.DIRECTIONALITY_RIGHT_TO_LEFT_EMBEDDING)
            || (dir == Character.DIRECTIONALITY_RIGHT_TO_LEFT_OVERRIDE);
}

From source file:android.text.TextDirectionHeuristics.java

private static int isRtlTextOrFormat(int directionality) {
    switch (directionality) {
    case Character.DIRECTIONALITY_LEFT_TO_RIGHT:
    case Character.DIRECTIONALITY_LEFT_TO_RIGHT_EMBEDDING:
    case Character.DIRECTIONALITY_LEFT_TO_RIGHT_OVERRIDE:
        return STATE_FALSE;
    case Character.DIRECTIONALITY_RIGHT_TO_LEFT:
    case Character.DIRECTIONALITY_RIGHT_TO_LEFT_ARABIC:
    case Character.DIRECTIONALITY_RIGHT_TO_LEFT_EMBEDDING:
    case Character.DIRECTIONALITY_RIGHT_TO_LEFT_OVERRIDE:
        return STATE_TRUE;
    default:/*  www . ja  v  a  2  s . com*/
        return STATE_UNKNOWN;
    }
}