Example usage for org.eclipse.jface.window Window setDefaultOrientation

List of usage examples for org.eclipse.jface.window Window setDefaultOrientation

Introduction

In this page you can find the example usage for org.eclipse.jface.window Window setDefaultOrientation.

Prototype

public static void setDefaultOrientation(int defaultOrientation) 

Source Link

Document

Sets the default orientation of windows.

Usage

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

License:Open Source License

/**
 * The user has pressed Ok. Store/apply this page's values appropriately.
 *///w w  w .  j  a va  2 s  .c o  m
@Override
public boolean performOk() {
    IPreferenceStore store = getPreferenceStore();

    store.setValue(IPreferenceConstants.NL_EXTENSIONS, nlExtensionsField.getStringValue());
    store.setValue(IPreferenceConstants.LAYOUT_DIRECTION, layoutDirection);
    store.setValue(IPreferenceConstants.BIDI_SUPPORT, bidiSupport);
    store.setValue(IPreferenceConstants.TEXT_DIRECTION, textDirection);

    Window.setDefaultOrientation(layoutDirection);
    BidiUtils.setBidiSupport(bidiSupport);
    BidiUtils.setTextDirection(textDirection.isEmpty() ? null : textDirection);

    PrefUtil.savePrefs();
    return true;
}

From source file:org.eclipse.ui.internal.WorkbenchPlugin.java

License:Open Source License

public void start(BundleContext context) throws Exception {
    context.addBundleListener(getBundleListener());
    super.start(context);
    bundleContext = context;//from  w  w  w .  j a  va 2  s .c o m

    JFaceUtil.initializeJFace();

    Window.setDefaultOrientation(getDefaultOrientation());

    // The UI plugin needs to be initialized so that it can install the callback in PrefUtil,
    // which needs to be done as early as possible, before the workbench
    // accesses any API preferences.
    Bundle uiBundle = Platform.getBundle(PlatformUI.PLUGIN_ID);
    try {
        // Attempt to load the activator of the ui bundle.  This will force lazy start
        // of the ui bundle.  Using the bundle activator class here because it is a
        // class that needs to be loaded anyway so it should not cause extra classes
        // to be loaded.s
        if (uiBundle != null)
            uiBundle.start(Bundle.START_TRANSIENT);
    } catch (BundleException e) {
        WorkbenchPlugin.log("Unable to load UI activator", e); //$NON-NLS-1$
    }
    /*
     * DO NOT RUN ANY OTHER CODE AFTER THIS LINE.  If you do, then you are
     * likely to cause a deadlock in class loader code.  Please see Bug 86450
     * for more information.
     */

}