Examples of GraphicsEnvironment


Examples of ae.java.awt.GraphicsEnvironment

     * This method should be called from subclasses which create
     * cached SurfaceData objects that depend on the current
     * properties of the display.
     */
    protected void activateDisplayListener() {
        GraphicsEnvironment ge =
            GraphicsEnvironment.getLocalGraphicsEnvironment();
        // We could have a HeadlessGE at this point, so double-check before
        // assuming anything.
        // Also, no point in listening to display change events if
        // the image is never going to be accelerated.
View Full Code Here

Examples of com.google.code.appengine.awt.GraphicsEnvironment

        points[0] = new Point(0, 0);
        return points;
    }

    public Graphics2D createGraphics() {
        GraphicsEnvironment ge =
            GraphicsEnvironment.getLocalGraphicsEnvironment();
        return ge.createGraphics(this);
    }
View Full Code Here

Examples of java.awt.GraphicsEnvironment

      }
      Rectangle desired = new Rectangle(x, y, 50, 50);
   
      int gcBestSize = 0;
      Point gcBestPoint = null;
      GraphicsEnvironment ge;
      ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
      for (GraphicsDevice gd : ge.getScreenDevices()) {
        for (GraphicsConfiguration gc : gd.getConfigurations()) {
          Rectangle gcBounds = gc.getBounds();
          if (gcBounds.intersects(desired)) {
            Rectangle inter = gcBounds.intersection(desired);
            int size = inter.width * inter.height;
 
View Full Code Here

Examples of java.awt.GraphicsEnvironment

    // Center to parent frame or to screen
    if (centerToParentFrame) {
      frameD = frame.getSize();
      framePos = frame.getLocation();
    } else {
      GraphicsEnvironment ge = GraphicsEnvironment
          .getLocalGraphicsEnvironment();
      // dual head, use first screen
      if (ge.getScreenDevices().length > 1) {
        try {
          GraphicsDevice gd = ge.getDefaultScreenDevice();
          GraphicsConfiguration config = gd.getConfigurations()[0];
          frameD = config.getBounds().getSize();
          framePos = config.getBounds().getLocation();
        } catch (RuntimeException e) {
          frameD = Toolkit.getDefaultToolkit().getScreenSize();
View Full Code Here

Examples of java.awt.GraphicsEnvironment

  public void componentMoved(ComponentEvent e) {
    updateBounds();
  }

  public static GraphicsDevice getDevice() {
    GraphicsEnvironment g_env = GraphicsEnvironment.getLocalGraphicsEnvironment();
    GraphicsDevice device = g_env.getDefaultScreenDevice();
    return device;
  }
View Full Code Here

Examples of java.awt.GraphicsEnvironment

   * @return the center point of the current screen.
   * @deprecated Not used anymore, will be removed.
   */
  public static Point getCenterPoint()
  {
    final GraphicsEnvironment localGraphicsEnvironment = GraphicsEnvironment.getLocalGraphicsEnvironment();
    try
    {
      final Method method = GraphicsEnvironment.class.getMethod("getCenterPoint", (Class[]) null);//$NON-NLS-1$
      return (Point) method.invoke(localGraphicsEnvironment, (Object[]) null);
    }
View Full Code Here

Examples of java.awt.GraphicsEnvironment

   *
   * @return the maximum bounds of the current screen.
   */
  public static Rectangle getMaximumWindowBounds()
  {
    final GraphicsEnvironment localGraphicsEnvironment = GraphicsEnvironment.getLocalGraphicsEnvironment();
    try
    {
      final Method method = GraphicsEnvironment.class.getMethod("getMaximumWindowBounds", (Class[]) null);//$NON-NLS-1$
      return (Rectangle) method.invoke(localGraphicsEnvironment, (Object[]) null);
    }
View Full Code Here

Examples of java.awt.GraphicsEnvironment

            if (bufferedMapImage == null || bufferedRenderingImage == null) {
                createBuffers(w, h);
            }

            GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
            Graphics2D g = (Graphics2D) ge.createGraphics(bufferedMapImage);
            g.setClip(0, 0, w, h);
            Border border = mb.getBorder();
            mb.setBorder(null);
            mb.paintAll(g);
            mb.setBorder(border);
View Full Code Here

Examples of java.awt.GraphicsEnvironment

     * @see java.awt.image.BufferedImage
     */
    public Graphics getGraphics(int width, int height, int imageType) {
        bufferedImage = new BufferedImage(width, height, imageType);

        GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
        Graphics g = ge.createGraphics(bufferedImage);
        g.setClip(0, 0, width, height);
        return g;
    }
View Full Code Here

Examples of java.awt.GraphicsEnvironment

    public void view() {
        int height = 256;
        int width = 256;

        BufferedImage bigImage = new BufferedImage(width * 6, height * 6, BufferedImage.TYPE_INT_RGB);
        GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
        Graphics g = ge.createGraphics(bigImage);
        Toolkit tk = Toolkit.getDefaultToolkit();

        for (int x = 0; x < 6; x++) {
            for (int y = 0; y < 6; y++) {
                int[] pixels = decompressSubframe(x, y, colortable);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.