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

        public static Image getImage(String icon) {
            if (instance == null) {
                instance = new Standard();
            }

            Toolkit toolkit = Toolkit.getDefaultToolkit();
            URL imageUrl = instance.getClass().getClassLoader().getResource(
                    "images/" + icon);
            if (imageUrl == null) {
                return null;
            }

            return toolkit.createImage(imageUrl);
        }
    View Full Code Here

    Examples of java.awt.Toolkit

        public static ImageIcon getIcon(String icon) {
            if (instance == null) {
                instance = new Standard();
            }

            Toolkit toolkit = Toolkit.getDefaultToolkit();
            URL iconUrl = instance.getClass().getClassLoader().getResource(icon);

            if (iconUrl == null) {
                com.valhalla.Logger.debug("Could not find an image for " + icon);
                return null;
    View Full Code Here

    Examples of java.awt.Toolkit

        public static void cascadePlacement(Container container) {
            if (instance == null) {
                instance = new Standard();
            }

            Toolkit toolkit = Toolkit.getDefaultToolkit();
            Dimension sSize = toolkit.getScreenSize();
            Dimension cSize = container.getSize();

            if (instance.currentX + cSize.width > sSize.width - 50) {
                instance.currentX = 20;
            }
    View Full Code Here

    Examples of java.awt.Toolkit

    public class GnomeSystemTrayService implements SystemTrayService {

      public GnomeSystemTrayService()
      {
        Toolkit t = Toolkit.getDefaultToolkit();
      }
    View Full Code Here

    Examples of java.awt.Toolkit

                    e.printStackTrace();
                }
                ef = (EmbeddedFrame) value;
            } else {  
                // 1.5  JVM decide on which EmbeddedFrame to use
                Toolkit toolkit = Toolkit.getDefaultToolkit();

                // System.out.println("toolkit = " + toolkit);
                // System.out.flush();
                if (toolkit instanceof sun.awt.motif.MToolkit) {
                    Class clazz = null;
    View Full Code Here

    Examples of java.awt.Toolkit

        final String flocalized = localized;

                    cursor = (Cursor) java.security.AccessController.doPrivileged(
            new java.security.PrivilegedExceptionAction() {
            public Object run() throws Exception {
          Toolkit toolkit = Toolkit.getDefaultToolkit();
          Image image = toolkit.getImage(
             systemCustomCursorDirPrefix + fileName);
          return toolkit.createCustomCursor(
                image, new Point(fx,fy), flocalized);
            }
        });
          } catch (Exception e) {
        throw new AWTException(
    View Full Code Here

    Examples of java.awt.Toolkit

            }

            private void initialize() {
                refreshLanguage();

                final Toolkit toolkit = Toolkit.getDefaultToolkit();
                clipboard = toolkit.getSystemClipboard();

                cutItem.addActionListener(this);
                copyItem.addActionListener(this);
                pasteItem.addActionListener(this);
    View Full Code Here

    Examples of java.awt.Toolkit

            frame.setVisible(true);
        }

        public void center()
        {
            Toolkit toolkit = Toolkit.getDefaultToolkit();
            Dimension screenSize = toolkit.getScreenSize();

            // Calculate the frame location
            int x = (screenSize.width - frame.getWidth()) / 2;
            int y = (screenSize.height - frame.getHeight()) / 2;
    View Full Code Here

    Examples of java.awt.Toolkit

            private int myProgressIs;

            public ChangeTaskProgressInteraction(MouseEvent e,
                    TaskProgressChartItem taskProgress) {
                super(e);
                Toolkit toolkit = Toolkit.getDefaultToolkit();
                try {
                    setCursor(CHANGE_PROGRESS_CURSOR);
                } catch (Exception exept) {
                    setCursor(E_RESIZE_CURSOR);
                }
    View Full Code Here

    Examples of java.awt.Toolkit

      public Dimension autoSetSize(Component content) {

        Dimension preferredSize = content.getPreferredSize();

        Toolkit toolkit = Toolkit.getDefaultToolkit();

        int maxWidth = toolkit.getScreenSize().width - 30;
        int maxHeight = toolkit.getScreenSize().height - 30;
        preferredSize.width = Math.min(preferredSize.width, maxWidth);
        preferredSize.height = Math.min(preferredSize.height, maxHeight);

        if (isVisible()) {
          Dimension currentSize = getContentPane().getSize();
    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.