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

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

Introduction

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

Prototype

String LEFT_TO_RIGHT

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

Click Source Link

Document

Left-To-Right 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 w  w  .ja  v a  2  s.co m
    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;/*  ww w .  j av  a2s.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;
}