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

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

Introduction

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

Prototype

String AUTO

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

Click Source Link

Document

Auto (contextual) 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;/*  w w  w . jav a  2s  .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;/*from   w  w w.  j av a 2 s. c  o m*/
    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;
}