Example usage for java.awt ComponentOrientation isHorizontal

List of usage examples for java.awt ComponentOrientation isHorizontal

Introduction

In this page you can find the example usage for java.awt ComponentOrientation isHorizontal.

Prototype

public boolean isHorizontal() 

Source Link

Document

Are lines horizontal?

Usage

From source file:Main.java

public static void main(String[] argv) throws Exception {
    Locale myLocale = Locale.getDefault();
    ComponentOrientation ce = ComponentOrientation.getOrientation(myLocale);
    System.out.println("Is horizontal? " + ce.isHorizontal());
    System.out.println("Is left to right? " + ce.isLeftToRight());
}

From source file:Main.java

public static void main(String[] argv) throws Exception {

    Locale myLocale;//from  w  w w. j a v a2  s .c o m
    if (argv.length < 2)
        myLocale = Locale.getDefault();
    else
        myLocale = new Locale(argv[0], argv[1]);
    ComponentOrientation ce = ComponentOrientation.getOrientation(myLocale);
    System.out.println("Is horizontal? " + ce.isHorizontal());
    System.out.println("Is left to right? " + ce.isLeftToRight());
}