Package java.awt

Examples of java.awt.GraphicsEnvironment


                                       (Dialog)owner);
        }
        Rectangle dlgBounds = dialog.getBounds();

        // get union of all GC bounds
        GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
        GraphicsDevice[] gs = ge.getScreenDevices();
        for (int j=0; j<gs.length; j++) {
            gcBounds =
                gcBounds.union(gs[j].getDefaultConfiguration().getBounds());
        }
View Full Code Here


  public FontChooser(Dialog owner) {
    super(owner, "Font Chooser");
    setModal(true);
   
    GraphicsEnvironment ge = GraphicsEnvironment
      .getLocalGraphicsEnvironment();
  fontNames = ge.getAvailableFontFamilyNames();
  System.out.println(fontNames);
  fontSizes = new String[] { "8", "9", "10", "11", "12", "14", "16",
      "18", "20", "22", "24", "26", "28", "36", "48", "72" };

  fontNameInputList = new InputList(fontNames, "Name:");
View Full Code Here

    }
   
  public static List getFontFamilyNames(){
    if (fontFamilyNames == null){
      GraphicsEnvironment ge =
        GraphicsEnvironment.getLocalGraphicsEnvironment();
      String[] names = ge.getAvailableFontFamilyNames();
      fontFamilyNames = new ArrayList(names.length);
      for (int ii=0; ii<names.length; ii++)
        fontFamilyNames.add(names[ii])
    }
    return fontFamilyNames;
View Full Code Here

  public View(Game game, JFrame frame)
  {
    this.game = game;

    GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
    gd = ge.getDefaultScreenDevice();
    GraphicsConfiguration gc = gd.getDefaultConfiguration();

    if(!game.isDebug())
    {
      gd.setFullScreenWindow(frame); //needs to be done before call too isDisplayChangeSupported
View Full Code Here

     * this <code>BufferedImage</code>.
     * @return a <code>Graphics2D</code>, used for drawing into this
     *          image.
     */
    public Graphics2D createGraphics() {
        GraphicsEnvironment env =
            GraphicsEnvironment.getLocalGraphicsEnvironment();
        return env.createGraphics(this);
    }
View Full Code Here

    new LwjglApplication( new PostProcessingDemo(), config );

    if( UseRightScreen ) {
      // move the window to the right screen
      GraphicsEnvironment env = GraphicsEnvironment.getLocalGraphicsEnvironment();
      GraphicsDevice primary = env.getDefaultScreenDevice();
      GraphicsDevice[] devices = env.getScreenDevices();
      GraphicsDevice target = null;

      // search for the first target screen
      for( int i = 0; i < devices.length; i++ ) {
        boolean isPrimary = (primary == devices[i]);
View Full Code Here

        /**  Lines added by Prakash
          *  Cincom Systems 
          *  5 May 2006
          *  For setting Frame size equivalent to Systems window size.  
          */       
    GraphicsEnvironment env = GraphicsEnvironment.getLocalGraphicsEnvironment();
    Rectangle bounds = env.getMaximumWindowBounds();   
    /**
     * Commented by Prakash.
     */
//        frame.setExtendedState(JFrame.MAXIMIZED_BOTH);
    frame.setSize((int)(bounds.getWidth()),(int)(bounds.getHeight()));
View Full Code Here

        }
        Point position = getLocationOnScreen();
        Toolkit toolkit = Toolkit.getDefaultToolkit();
        GraphicsConfiguration gc = getGraphicsConfiguration();
        Rectangle screenBounds = new Rectangle(toolkit.getScreenSize());
        GraphicsEnvironment ge =
            GraphicsEnvironment.getLocalGraphicsEnvironment();
        GraphicsDevice[] gd = ge.getScreenDevices();
        for(int i = 0; i < gd.length; i++) {
            if(gd[i].getType() == GraphicsDevice.TYPE_RASTER_SCREEN) {
                GraphicsConfiguration dgc =
                    gd[i].getDefaultConfiguration();
                if(dgc.getBounds().contains(position)) {
View Full Code Here

      super(width, height, refreshRate, bitsPerPixel);
    }
  }

  public static DisplayMode getDesktopDisplayMode () {
    GraphicsEnvironment genv = GraphicsEnvironment.getLocalGraphicsEnvironment();
    GraphicsDevice device = genv.getDefaultScreenDevice();
    java.awt.DisplayMode mode = device.getDisplayMode();
    return new LwjglApplicationConfigurationDisplayMode(mode.getWidth(), mode.getHeight(), mode.getRefreshRate(),
      mode.getBitDepth());
  }
View Full Code Here

    return new LwjglApplicationConfigurationDisplayMode(mode.getWidth(), mode.getHeight(), mode.getRefreshRate(),
      mode.getBitDepth());
  }

  public static DisplayMode[] getDisplayModes () {
    GraphicsEnvironment genv = GraphicsEnvironment.getLocalGraphicsEnvironment();
    GraphicsDevice device = genv.getDefaultScreenDevice();
    java.awt.DisplayMode desktopMode = device.getDisplayMode();
    java.awt.DisplayMode[] displayModes = device.getDisplayModes();
    ArrayList<DisplayMode> modes = new ArrayList<DisplayMode>();
    int idx = 0;
    for (java.awt.DisplayMode mode : displayModes) {
View Full Code Here

TOP

Related Classes of java.awt.GraphicsEnvironment

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.