Example usage for java.awt GraphicsEnvironment getLocalGraphicsEnvironment

List of usage examples for java.awt GraphicsEnvironment getLocalGraphicsEnvironment

Introduction

In this page you can find the example usage for java.awt GraphicsEnvironment getLocalGraphicsEnvironment.

Prototype

public static GraphicsEnvironment getLocalGraphicsEnvironment() 

Source Link

Document

Returns the local GraphicsEnvironment .

Usage

From source file:MainClass.java

public static void main(String[] a) {
    GraphicsEnvironment e = GraphicsEnvironment.getLocalGraphicsEnvironment();
    String[] fontnames = e.getAvailableFontFamilyNames();
    for (String s : fontnames) {
        System.out.println(s);//from  www .  j ava  2 s .  c  o m
    }
}

From source file:Main.java

public static void main(String[] args) {
    GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
    System.out.println(ge.isHeadlessInstance());

}

From source file:Main.java

public static void main(String[] args) {
    GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
    GraphicsDevice[] defaultScreens = ge.getScreenDevices();

}

From source file:Main.java

public static void main(String[] args) {
    GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
    Font[] fonts = ge.getAllFonts();
    for (Font font : fonts) {
        String fontName = font.getName();
        String familyName = font.getFamily();

        System.out.println("Font: " + fontName + "; family: " + familyName);
    }/*from  ww  w  . j a v  a 2 s. co m*/
}

From source file:Main.java

public static void main(String[] args) {

    GraphicsEnvironment e = GraphicsEnvironment.getLocalGraphicsEnvironment();
    String[] fontnames = e.getAvailableFontFamilyNames(Locale.CANADA);
    System.out.println("\nFonts available on this platform: ");
    for (int i = 0; i < fontnames.length; i++)
        System.out.println(fontnames[i]);

    return;/*from  w  w  w.j  a va2s .c  o m*/
}

From source file:ShowFonts.java

public static void main(String[] args) {
    Font[] fonts;/* ww w . j av a  2s .  c  om*/
    fonts = GraphicsEnvironment.getLocalGraphicsEnvironment().getAllFonts();
    for (int i = 0; i < fonts.length; i++) {
        System.out.print(fonts[i].getFontName() + " : ");
        System.out.print(fonts[i].getFamily() + " : ");
        System.out.print(fonts[i].getName());
        System.out.println();
    }
}

From source file:MainClass.java

public static void main(String[] args) throws Exception {
    Font[] fonts = GraphicsEnvironment.getLocalGraphicsEnvironment().getAllFonts();
    for (int i = 0; i < fonts.length; i++) {
        System.out.print(fonts[i].getFontName() + " : ");
        System.out.print(fonts[i].getFamily() + " : ");
        System.out.print(fonts[i].getName());
        System.out.println();//from   w  ww  . j  a  va  2 s  .  c om
    }
}

From source file:Main.java

public static void main(String[] a) throws Exception {
    GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
    GraphicsDevice[] screenDevices = ge.getScreenDevices();
    for (int i = 0; i < screenDevices.length; i++)
        System.out.println(screenDevices[i].getIDstring());
}

From source file:Main.java

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

    GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
    Font[] fonts = ge.getAllFonts();

    for (int i = 0; i < fonts.length; i++) {
        System.out.print(fonts[i].getFontName() + " : ");
        System.out.print(fonts[i].getFamily() + " : ");
        System.out.print(fonts[i].getName());
        System.out.println();//  w ww  . j a  v  a2 s  .c o m
    }
}

From source file:MainClass.java

public static void main(String[] a) throws Exception {
    GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
    GraphicsDevice[] screenDevices = ge.getScreenDevices();
    for (int i = 0; i < screenDevices.length; i++) {
        GraphicsDevice s = screenDevices[i];
        System.out.println(s.getAvailableAcceleratedMemory());
    }/*from  w  w w.j  av  a  2 s  .  co m*/
}