Package java.awt

Examples of java.awt.Toolkit$WindowList


  // Waits until the image is done loading;  start(image) must
  // have already been called (or any other function that starts
  // preparing the image)
  public synchronized boolean waitFor()
  {
    Toolkit tk = Toolkit.getDefaultToolkit();

    _status |= tk.checkImage(_image, -1, -1, this);

    while ((_status &
            (ImageObserver.ALLBITS   |
             ImageObserver.FRAMEBITS |
             ImageObserver.ERROR     |
View Full Code Here


    // Get the colorizing filter
    int[] targetColors = _getTargetColors(requestedProperties);
    ImageFilter filter = new ColorizingFilter(_SOURCE_COLORS, targetColors);

    Toolkit toolkit = Toolkit.getDefaultToolkit();
    ImageProducer producer = icon.getSource();

    // If direction is RTL, flip the source image
    if (_isRightToLeft(context))
      producer = new FilteredImageSource(producer, new MirrorImageFilter());

    Image colorizedIcon =
      toolkit.createImage(new FilteredImageSource(producer, filter));

    // Be sure that the image is fully loaded
    ImageUtils.loadImage(colorizedIcon);

    // Get the width/height.  We use an ImageLoader object the ImageObserver
View Full Code Here

    if (icon == null)
    {
      return null;
    }

    Toolkit toolkit = Toolkit.getDefaultToolkit();

    ImageProducer producer = icon.getSource();

    // If direction is RTL, flip the source image
    if (_isRightToLeft(context))
      producer = new FilteredImageSource(producer, new MirrorImageFilter());

    Image flippedIcon =
      toolkit.createImage(producer);

    // Be sure that the image is fully loaded
    ImageUtils.loadImage(flippedIcon);

    // Get the width/height.  We use an ImageLoader object the ImageObserver
View Full Code Here

    }

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

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

public class Utilities
{
  public static void centerGuiWindow(Component c)
  {
    // Center on-screen
    Toolkit toolkit = Toolkit.getDefaultToolkit()
    Dimension screenSize = toolkit.getScreenSize();
   
    int x = (screenSize.width - c.getWidth()) / 2
    int y = (screenSize.height - c.getHeight()) / 2
   
    //Set the new frame location 
View Full Code Here

     *
     * @return The current toolkit casted to JNodeToolkit.
     * @throws AWTError If the default toolkit is not instanceof JNodeToolkit.
     */
    public static JNodeToolkit getJNodeToolkit() {
        final Toolkit tk = Toolkit.getDefaultToolkit();
        if (tk instanceof JNodeToolkit) {
            return (JNodeToolkit) tk;
        } else {
            throw new AWTError("Toolkit is not a JNodeToolkit");
        }
View Full Code Here

            throw new AWTError("Toolkit is not a JNodeToolkit");
        }
    }

    public static boolean isGuiActive() {
        final Toolkit tk = Toolkit.getDefaultToolkit();
        if (!(tk instanceof JNodeToolkit)) {
            throw new AWTError("Toolkit is not a JNodeToolkit");
        }
        return (((JNodeToolkit) tk).graphics != null);
    }
View Full Code Here

        }
        return (((JNodeToolkit) tk).graphics != null);
    }

    public static void startGui() {
        final Toolkit tk = Toolkit.getDefaultToolkit();
        if (!(tk instanceof JNodeToolkit)) {
            throw new AWTError("Toolkit is not a JNodeToolkit");
        }
        ((JNodeToolkit) tk).incRefCount();
    }
View Full Code Here

        }
        ((JNodeToolkit) tk).incRefCount();
    }

    public static void initGui() {
        final Toolkit tk = Toolkit.getDefaultToolkit();
        if (!(tk instanceof JNodeToolkit)) {
            throw new AWTError("Toolkit is not a JNodeToolkit");
        }
        ((JNodeToolkit) tk).incRefCount();
    }
View Full Code Here

        }
        ((JNodeToolkit) tk).incRefCount();
    }

    public static void stopGui() {
        final Toolkit tk = Toolkit.getDefaultToolkit();
        if (!(tk instanceof JNodeToolkit)) {
            throw new AWTError("Toolkit is not a JNodeToolkit");
        }
        ((JNodeToolkit) tk).decRefCount(true);
        Toolkit.clearDefaultToolkit();
View Full Code Here

TOP

Related Classes of java.awt.Toolkit$WindowList

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.