Examples of GraphicsDevice


Examples of java.awt.GraphicsDevice

  /**
   * NOT YET IMPLEMENTED. Turn fullscreen mode on or off.
   */
  public void setFullscreen(boolean fullscreen) {
    GraphicsEnvironment ge=null;
    GraphicsDevice gd=null;
    ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
    gd = ge.getDefaultScreenDevice();
   
    if (fullscreen) {
      if (gd.isFullScreenSupported()) {
//        gd.setFullScreenWindow(this);
      }
    } else {
      if (gd.isFullScreenSupported()) {
        gd.setFullScreenWindow(null);
      }
    }
  }
View Full Code Here

Examples of java.awt.GraphicsDevice

  // TODO: TEST
  //private Polygon poly = new Polygon();
 
  public Renderer() {
      GraphicsEnvironment env = GraphicsEnvironment.getLocalGraphicsEnvironment();
      GraphicsDevice device = env.getDefaultScreenDevice();
        GraphicsConfiguration gc = device.getDefaultConfiguration();
    frame = new Frame("Fysix", gc);
    frame.addWindowListener(new WindowAdapter() {
      @Override
      public void windowClosing(WindowEvent e) {
        System.exit(0);
View Full Code Here

Examples of java.awt.GraphicsDevice

    public Image getImage()
    {
        if (image == null)
        {
            GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
            GraphicsDevice gd = ge.getDefaultScreenDevice();
            GraphicsConfiguration gc = gd.getDefaultConfiguration();
            BufferedImage bi = gc.createCompatibleImage(getIconWidth(), getIconHeight(),
                    Transparency.TRANSLUCENT);
            paintIcon(null, bi.getGraphics(), 0, 0);
        }
        return image;
View Full Code Here

Examples of java.awt.GraphicsDevice

        if (o != null)
            return (BufferedImage)(((Reference)o).get());

        // Check if this is a BufferedImage G2d if so throw an error...
        GraphicsConfiguration gc = g2d.getDeviceConfiguration();
        GraphicsDevice gd = gc.getDevice();
        if (WARN_DESTINATION &&
            (gd.getType() == GraphicsDevice.TYPE_IMAGE_BUFFER) &&
            (g2d.getRenderingHint(RenderingHintsKeyExt.KEY_TRANSCODING) !=
                RenderingHintsKeyExt.VALUE_TRANSCODING_PRINTING))
            // throw new IllegalArgumentException
            System.out.println
                ("Graphics2D from BufferedImage lacks BUFFERED_IMAGE hint");
View Full Code Here

Examples of java.awt.GraphicsDevice

        if (o != null)
            return (BufferedImage)(((Reference)o).get());

        // Check if this is a BufferedImage G2d if so throw an error...
        GraphicsConfiguration gc = g2d.getDeviceConfiguration();
        GraphicsDevice gd = gc.getDevice();
        if (WARN_DESTINATION &&
            (gd.getType() == GraphicsDevice.TYPE_IMAGE_BUFFER) &&
            (g2d.getRenderingHint(RenderingHintsKeyExt.KEY_TRANSCODING) !=
                RenderingHintsKeyExt.VALUE_TRANSCODING_PRINTING))
            // throw new IllegalArgumentException
            System.out.println
                ("Graphics2D from BufferedImage lacks BUFFERED_IMAGE hint");
View Full Code Here

Examples of java.awt.GraphicsDevice

            if (hasAlpha) {
                transparency = Transparency.TRANSLUCENT;
            }

            // Create the buffered image
            GraphicsDevice        gs = ge.getDefaultScreenDevice();
            GraphicsConfiguration gc = gs.getDefaultConfiguration();

            bimage = gc.createCompatibleImage(width, height, transparency);
        } catch (HeadlessException e) {
            // The system does not have a screen
        }
View Full Code Here

Examples of java.awt.GraphicsDevice

            if (hasAlpha) {
                transparency = Transparency.BITMASK;
            }

            // Create the buffered image
            GraphicsDevice        gs = ge.getDefaultScreenDevice();
            GraphicsConfiguration gc = gs.getDefaultConfiguration();

            bimage = gc.createCompatibleImage(image.getWidth(null), image.getHeight(null), transparency);
        } catch (HeadlessException e) {
            // The system does not have a screen
        }
View Full Code Here

Examples of java.awt.GraphicsDevice

    public boolean isFullScreenMode () {
        return fullScreenMode;
    }
   
    public void changeFullScreenMode() {       
        GraphicsDevice device = getGraphicsConfiguration().getDevice();
        if (!device.isFullScreenSupported()) return;
       
        fullScreenMode = !fullScreenMode;

        dispose();
        if (fullScreenMode) {  // Full screen mode
                setUndecorated(true);
                device.setFullScreenWindow(this);
                jBtnFullNormal.setIcon(new ImageIcon(Commons.NORMAL_SCREEN_ICON));
        }
        else {     // Normal screen mode
                setUndecorated(false);
                device.setFullScreenWindow(null);
                jBtnFullNormal.setIcon(new ImageIcon(Commons.FULL_SCREEN_ICON));
       
        setVisible(true);
    }       
View Full Code Here

Examples of java.awt.GraphicsDevice

    long thistime = java.util.Calendar.getInstance().getTimeInMillis();
    long delta = thistime - lastRefresh;
    lastRefresh = thistime;

    Graphics2D g3 = (Graphics2D) g;
    GraphicsDevice gd = GraphicsEnvironment.getLocalGraphicsEnvironment()
    .getDefaultScreenDevice();
    GraphicsConfiguration gc = gd.getDefaultConfiguration();
    if (bufferedImage == null)
    bufferedImage = gc.createCompatibleImage(resolution.x,
    resolution.y, Transparency.OPAQUE);

    Graphics2D g2 = bufferedImage.createGraphics();
View Full Code Here

Examples of java.awt.GraphicsDevice

  private PolluxSettingsDialog(AppSettings settings, Object lock, AtomicBoolean done) {
    this.settings = settings;
    this.lock = lock;
    this.done = done;
   
        GraphicsDevice device = GraphicsEnvironment.getLocalGraphicsEnvironment().getDefaultScreenDevice();
        modes = device.getDisplayModes();
        Arrays.sort(modes, new DisplayModeSorter());
    setupDialog();
    loadLogo();
   
  }
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.