Example usage for org.eclipse.jface.util BidiUtils RIGHT_TO_LEFT

List of usage examples for org.eclipse.jface.util BidiUtils RIGHT_TO_LEFT

Introduction

In this page you can find the example usage for org.eclipse.jface.util BidiUtils RIGHT_TO_LEFT.

Prototype

String RIGHT_TO_LEFT

To view the source code for org.eclipse.jface.util BidiUtils RIGHT_TO_LEFT.

Click Source Link

Document

Right-To-Left Base Text Direction.

Usage

From source file:org.eclipse.ui.internal.dialogs.GlobalizationPreferencePage.java

License:Open Source License

private int getTextDirectionIndex(String textDirection) {
    int index;/*from   w ww. ja  v  a 2  s.c om*/
    if (textDirection.equals(BidiUtils.LEFT_TO_RIGHT)) {
        index = textDirectionCombo.indexOf(LTR_DIR);
    } else if (textDirection.equals(BidiUtils.RIGHT_TO_LEFT)) {
        index = textDirectionCombo.indexOf(RTL_DIR);
    } else if (textDirection.equals(BidiUtils.AUTO)) {
        index = textDirectionCombo.indexOf(AUTO_DIR);
    } else {
        index = textDirectionCombo.indexOf(DEFAULT_DIR);
    }
    return index;
}

From source file:org.eclipse.ui.internal.dialogs.GlobalizationPreferencePage.java

License:Open Source License

private String getTextDirectionString(int index) {
    String textDir;/*from  ww  w.  j  a  v  a 2s  . c  om*/
    if (index == textDirectionCombo.indexOf(LTR_DIR)) {
        textDir = BidiUtils.LEFT_TO_RIGHT;
    } else if (index == textDirectionCombo.indexOf(AUTO_DIR)) {
        textDir = BidiUtils.AUTO;
    } else if (index == textDirectionCombo.indexOf(RTL_DIR)) {
        textDir = BidiUtils.RIGHT_TO_LEFT;
    } else {
        textDir = ""; //$NON-NLS-1$
    }
    return textDir;
}