Examples of Toolkit

Most applications should not call any of the methods in this class directly. The methods defined by Toolkit are the "glue" that joins the platform-independent classes in the ae.java.awt package with their counterparts in ae.java.awt.peer. Some methods defined by Toolkit query the native operating system directly. @author Sami Shaio @author Arthur van Hoff @author Fred Ecks @since JDK1.0

  • charva.awt.Toolkit
    @author vali @author Levente S\u00e1ntha
  • java.awt.Toolkit
    sun.com/docs/books/tutorial/uiswing/misc/focus.html#transferTiming">Timing Focus Transfers, a section in The Swing Tutorial.

  • Making a top-level container visible.
    Calling setVisible(true) on a Window, Frame or Dialog may occur asynchronously.

  • Setting the size or location of a top-level container.
    Calls to setSize, setBounds or setLocation on a Window, Frame or Dialog are forwarded to the underlying window management system and may be ignored or modified. See {@link java.awt.Window} formore information.

    Most applications should not call any of the methods in this class directly. The methods defined by Toolkit are the "glue" that joins the platform-independent classes in the java.awt package with their counterparts in java.awt.peer. Some methods defined by Toolkit query the native operating system directly. @version 1.203, 12/19/03 @author Sami Shaio @author Arthur van Hoff @author Fred Ecks @since JDK1.0

  • org.sonar.sslr.toolkit.Toolkit

  • Examples of java.awt.Toolkit

       */
      private void setFaceFeature() {
        this.setTitle("XGenerator");
        this.setIconImage(IconUtils.createIconImage(APP_ICON_IMAGE));

        Toolkit tk = Toolkit.getDefaultToolkit();
        Dimension screenSize = tk.getScreenSize();
        int screenHeight = screenSize.height;
        int screenWidth = screenSize.width;
    //    this.setSize(screenWidth, screenHeight - 30);
    //    this.setSize((int)(screenWidth*0.618), (int)(screenHeight*0.618));
        this.setSize(850, 600);
    View Full Code Here

    Examples of java.awt.Toolkit

       */
      private void setFaceFeature() {
        this.setTitle("XGenerator");
        this.setIconImage(IconUtils.createIconImage(APP_ICON_IMAGE));

        Toolkit tk = Toolkit.getDefaultToolkit();
        Dimension screenSize = tk.getScreenSize();
        int screenHeight = screenSize.height;
        int screenWidth = screenSize.width;
        // this.setSize(screenWidth / 2, screenHeight / 2);
        // this.setSize(900, 600);
        //this.setSize(screenWidth, screenHeight - 30);
    View Full Code Here

    Examples of java.awt.Toolkit

      private boolean isErrorSelected() {
        return fFailureList.getSelectedIndex() != -1;
      }

      private Image loadFrameIcon() {
        Toolkit toolkit= Toolkit.getDefaultToolkit();
        try {
          java.net.URL url= BaseTestRunner.class.getResource("smalllogo.gif");
          return toolkit.createImage((ImageProducer) url.getContent());
        } catch (Exception ex) {
        }
        return null;
      }
    View Full Code Here

    Examples of java.awt.Toolkit

            fillPageCombo();
            Rectangle rect;
            if (parent != null) {
                rect = parent.getBounds();
            } else {
                Toolkit tk = Toolkit.getDefaultToolkit();
                Dimension dim = tk.getScreenSize();
                rect = new Rectangle(0,0,dim.width,dim.height);
            }
            setLocation(rect.x+(rect.width-getWidth())/2,
                    rect.y+(rect.height-getHeight())/2);
            getRootPane().setDefaultButton(print);
    View Full Code Here

    Examples of java.awt.Toolkit

            Thread t = new Thread() {
                    public void run() {
                        Filter filt = null;

                        Toolkit tk = Toolkit.getDefaultToolkit();
                        Image img = tk.createImage(url);

                        if (img != null) {
                            RenderedImage ri = loadImage(img, dr);
                            if (ri != null) {
                                filt = new RedRable(GraphicsUtil.wrap(ri));
    View Full Code Here

    Examples of java.awt.Toolkit

                } catch (Exception e) {}
            }
           
            buffer = bos.toByteArray();

            Toolkit tk = Toolkit.getDefaultToolkit();
            final Image img = tk.createImage(buffer);
            if (img == null) {
                return null;
            }

            RenderedImage ri = loadImage(img);
    View Full Code Here

    Examples of java.awt.Toolkit

       */
      static public boolean isImageLoaded(
        Image image
        )
      {
        Toolkit tk = Toolkit.getDefaultToolkit();
        int status = tk.checkImage(image, -1, -1, null);

        return ((status & (ImageObserver.ALLBITS |ImageObserver.FRAMEBITS)) != 0);
      }
    View Full Code Here

    Examples of java.awt.Toolkit

      // 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

    Examples of java.awt.Toolkit

        // 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

    Examples of java.awt.Toolkit

        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
    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.