Java Code Examples for java.awt.ComponentOrientation#LEFT_TO_RIGHT

The following examples show how to use java.awt.ComponentOrientation#LEFT_TO_RIGHT . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: JFileChooserOrientation.java    From openjdk-jdk9 with GNU General Public License v2.0 6 votes vote down vote up
private static void showFileChooser() throws Exception {
    if (tryLookAndFeel(lookAndFeelComboBox.getSelectedItem().toString())) {

        openChooser = new JFileChooser();

        ComponentOrientation orientation
                = ComponentOrientation.UNKNOWN;

        switch (orientationComboBox.getSelectedItem().toString()) {
            case orientationLTR:
                orientation = ComponentOrientation.LEFT_TO_RIGHT;
                break;
            case orientationRTL:
                orientation = ComponentOrientation.RIGHT_TO_LEFT;
                break;
        }
        openChooser.setComponentOrientation(orientation);
        openChooser.showOpenDialog(frame);

    }
}
 
Example 2
Source File: WazeopediaUSA.java    From wpcleaner with Apache License 2.0 5 votes vote down vote up
/**
 * Default constructor.
 */
public WazeopediaUSA() {
  super(
      "en", "Wazeopedia USA",
      new String[] {
          "wazeopedia.waze.com",
      },
      "/wiki/USA/api.php", "/wiki/USA/index.php",
      "wazeopediaUSA", null,
      ComponentOrientation.LEFT_TO_RIGHT);
}
 
Example 3
Source File: PreferencesHandler.java    From hortonmachine with GNU General Public License v3.0 5 votes vote down vote up
public static ComponentOrientation getComponentOrientation() {
    String orientationString = getPreference(PREF_ORIENTATION, LEFT_TO_RIGHT);
    if (orientationString.equals(RIGHT_TO_LEFT)) {
        return ComponentOrientation.RIGHT_TO_LEFT;
    } else {
        return ComponentOrientation.LEFT_TO_RIGHT;
    }
}
 
Example 4
Source File: WikimediaCommons.java    From wpcleaner with Apache License 2.0 5 votes vote down vote up
/**
 * Constructor.
 */
public WikimediaCommons() {
  super(
      "commons", "Commons",
      new String[] {
          "commons.wikimedia.org",
      },
      "/w/api.php", "/w/index.php",
      "commons", "commons",
      ComponentOrientation.LEFT_TO_RIGHT);
}
 
Example 5
Source File: Waze.java    From wpcleaner with Apache License 2.0 5 votes vote down vote up
/**
 * Default constructor.
 */
public Waze() {
  super(
      "en", "Waze",
      new String[] {
          "wiki.waze.com",
      },
      "/wiki/api.php", "/wiki/index.php",
      "waze", null,
      ComponentOrientation.LEFT_TO_RIGHT);
}
 
Example 6
Source File: WikiSkripta.java    From wpcleaner with Apache License 2.0 5 votes vote down vote up
/**
 * Default constructor.
 */
public WikiSkripta() {
  super(
      "cs", "WikiSkripta",
      new String[] {
          "www.wikiskripta.eu",
      },
      "/api.php", "/index.php",
      "wikiskripta", null,
      ComponentOrientation.LEFT_TO_RIGHT);
}
 
Example 7
Source File: WikimediaMeta.java    From wpcleaner with Apache License 2.0 5 votes vote down vote up
/**
 * Constructor.
 */
public WikimediaMeta() {
  super(
      "meta", "Meta",
      new String[] {
          "meta.wikimedia.org",
      },
      "/w/api.php", "/w/index.php",
      "meta", "meta",
      ComponentOrientation.LEFT_TO_RIGHT);
}
 
Example 8
Source File: TestBundle_es.java    From jdk8u_jdk with GNU General Public License v2.0 4 votes vote down vote up
protected Object[][] getContents() {
    return new Object[][] {
        { "Orientation", ComponentOrientation.LEFT_TO_RIGHT },
    };
}
 
Example 9
Source File: Wikisource.java    From wpcleaner with Apache License 2.0 4 votes vote down vote up
/**
 * @param language Language.
 * @param name Name.
 */
public Wikisource(
    String language,
    String name) {
  this(language, name, ComponentOrientation.LEFT_TO_RIGHT);
}
 
Example 10
Source File: TestBundle_es.java    From dragonwell8_jdk with GNU General Public License v2.0 4 votes vote down vote up
protected Object[][] getContents() {
    return new Object[][] {
        { "Orientation", ComponentOrientation.LEFT_TO_RIGHT },
    };
}
 
Example 11
Source File: Wikipedia.java    From wpcleaner with Apache License 2.0 4 votes vote down vote up
/**
 * @param language Language.
 * @param name Name.
 */
public Wikipedia(
    String language,
    String name) {
  this(language, name, ComponentOrientation.LEFT_TO_RIGHT);
}
 
Example 12
Source File: bug8008657.java    From openjdk-jdk9 with GNU General Public License v2.0 4 votes vote down vote up
static String getOrientation(ComponentOrientation orientation) {
    return orientation == ComponentOrientation.LEFT_TO_RIGHT ? "LEFT_TO_RIGHT" : "RIGHT_TO_LEFT";
}
 
Example 13
Source File: Wikiversity.java    From wpcleaner with Apache License 2.0 4 votes vote down vote up
/**
 * @param language Language.
 * @param name Name.
 */
public Wikiversity(
    String language,
    String name) {
  this(language, name, ComponentOrientation.LEFT_TO_RIGHT);
}
 
Example 14
Source File: TestBundle_es.java    From openjdk-jdk9 with GNU General Public License v2.0 4 votes vote down vote up
protected Object[][] getContents() {
    return new Object[][] {
        { "Orientation", ComponentOrientation.LEFT_TO_RIGHT },
    };
}
 
Example 15
Source File: Wikiquote.java    From wpcleaner with Apache License 2.0 4 votes vote down vote up
/**
 * @param language Language.
 * @param name Name.
 */
public Wikiquote(
    String language,
    String name) {
  this(language, name, ComponentOrientation.LEFT_TO_RIGHT);
}
 
Example 16
Source File: TestBundle_es.java    From openjdk-jdk8u with GNU General Public License v2.0 4 votes vote down vote up
protected Object[][] getContents() {
    return new Object[][] {
        { "Orientation", ComponentOrientation.LEFT_TO_RIGHT },
    };
}
 
Example 17
Source File: Wikivoyage.java    From wpcleaner with Apache License 2.0 4 votes vote down vote up
/**
 * @param language Language.
 * @param name Name.
 */
public Wikivoyage(
    String language,
    String name) {
  this(language, name, ComponentOrientation.LEFT_TO_RIGHT);
}
 
Example 18
Source File: Wiktionary.java    From wpcleaner with Apache License 2.0 4 votes vote down vote up
/**
 * @param language Language.
 * @param name Name.
 */
public Wiktionary(
    String language,
    String name) {
  this(language, name, ComponentOrientation.LEFT_TO_RIGHT);
}
 
Example 19
Source File: TestBundle_es.java    From TencentKona-8 with GNU General Public License v2.0 4 votes vote down vote up
protected Object[][] getContents() {
    return new Object[][] {
        { "Orientation", ComponentOrientation.LEFT_TO_RIGHT },
    };
}