Package java.awt

Examples of java.awt.GraphicsEnvironment


        if (width == -1 || height == -1) {
            // OWL issue #146: for full screen, set the size of the frame to the
            // full size of the screen device, and let the rest of the panels
            // size themselves appropriately
            GraphicsEnvironment ge =
                        GraphicsEnvironment.getLocalGraphicsEnvironment();
            GraphicsDevice[] gs = ge.getScreenDevices();
            if (gs.length > 1) {
                LOGGER.warning("Fullscreen using size of first screen");
            }

            GraphicsConfiguration gc = gs[0].getDefaultConfiguration();
View Full Code Here


    {
    }

    public void run()
    {
      GraphicsEnvironment ge = null;
      Toolkit toolkit = null;

      try
      {
        ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
View Full Code Here

    {
    }

    public void run()
    {
      GraphicsEnvironment ge = null;
      // -= Simon Lessard =-
      // TODO: Check if synchronization is required
      Hashtable<String, Boolean> fontNames = null;

      try
      {
        ge = GraphicsEnvironment.getLocalGraphicsEnvironment();

        if (ge != null)
        {
          String[] families = ge.getAvailableFontFamilyNames();

          if ((families != null) && (families.length > 0))
          {
            fontNames = new Hashtable<String, Boolean>(families.length);
            for (int i = 0; i < families.length; i++)
View Full Code Here

    }

    private static void configureInstalledAWTFonts(FontInfo fontInfo, Graphics2D graphics,
            int startNumber) {
        int num = startNumber;
        GraphicsEnvironment env = GraphicsEnvironment.getLocalGraphicsEnvironment();
        String[] allFontFamilies = env.getAvailableFontFamilyNames();
        for (int i = 0; i < allFontFamilies.length; i++) {
            String family = allFontFamilies[i];
            if (HARDCODED_FONT_NAMES.contains(family)) {
                continue; //skip
            }
View Full Code Here

    return awtFontFamily;
  }

  public String[] getRegisteredFamilies()
  {
    final GraphicsEnvironment genv = GraphicsEnvironment.getLocalGraphicsEnvironment();
    return genv.getAvailableFontFamilyNames();
  }
View Full Code Here

   */
  private static Rectangle getMaximumWindowBounds()
  {
    try
    {
      final GraphicsEnvironment localGraphicsEnvironment = GraphicsEnvironment.getLocalGraphicsEnvironment();
      return localGraphicsEnvironment.getMaximumWindowBounds();
    }
    catch (Exception e)
    {
      // ignore ... will fail if this is not a JDK 1.4 ..
    }
View Full Code Here

   */
  public static Rectangle getMaximumWindowBounds()
  {
    try
    {
      final GraphicsEnvironment localGraphicsEnvironment = GraphicsEnvironment.getLocalGraphicsEnvironment();
      return localGraphicsEnvironment.getMaximumWindowBounds();
    }
    catch (Exception e)
    {
      // ignore ... will fail if this is not a JDK 1.4 ..
    }
View Full Code Here

    LibFontBoot.getInstance().start();
  }

  public void testFontRegistration () throws IOException, ResourceKeyCreationException
  {
    final GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
    final String[] names = ge.getAvailableFontFamilyNames();

    final TrueTypeFontRegistry tfr = new TrueTypeFontRegistry();
    tfr.registerDefaultFontPath();
    final int length = names.length;
    for (int i = 0; i < length; i++)
View Full Code Here

    return (Window) component;
  }

  public static boolean safeRestoreWindow(final Window frame, final Rectangle bounds)
  {
    final GraphicsEnvironment graphicsEnvironment = GraphicsEnvironment.getLocalGraphicsEnvironment();
    final GraphicsDevice[] devices = graphicsEnvironment.getScreenDevices();
    for (int i = 0; i < devices.length; i++)
    {
      final GraphicsDevice device = devices[i];
      final Rectangle rectangle = device.getDefaultConfiguration().getBounds();
      if (rectangle.contains(bounds) || rectangle.equals(bounds))
View Full Code Here

            return false;
        }

        /** Return the default graphics configuration. */
        public GraphicsConfiguration getAlphaCompatibleGraphicsConfiguration() {
            GraphicsEnvironment env = GraphicsEnvironment
                                                         .getLocalGraphicsEnvironment();
            GraphicsDevice dev = env.getDefaultScreenDevice();
            return dev.getDefaultConfiguration();
        }
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.