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

          jPopupMenu.add(menuCopy);

          textInfoArea.setComponentPopupMenu(jPopupMenu);

          // centered
          Toolkit tk = Toolkit.getDefaultToolkit();
          Dimension screenSize = tk.getScreenSize();
          int screenHeight = screenSize.height;
          int screenWidth = screenSize.width;
          if (screenWidth > WIDTH && screenHeight > HEIGHT) {
            setLocation((screenWidth - WIDTH) / 2, (screenHeight - HEIGHT) / 2);
          }
    View Full Code Here

    Examples of java.awt.Toolkit

            outputStream.close();
        }

        private void copyButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_copyButtonActionPerformed

            Toolkit toolkit = Toolkit.getDefaultToolkit();
            try {
                toolkit.getSystemClipboard().setContents(new ReportSelection(this.mHTMLReport), null);
            } catch (Exception e) {
                e.printStackTrace();
            }

        }//GEN-LAST:event_copyButtonActionPerformed
    View Full Code Here

    Examples of java.awt.Toolkit

        private double[] acquireRoiFromUser(final CanvasFrame monitorWindow,
                final double monitorWindowScale) throws Exception {
            if (monitorWindow == null) {
                throw new Exception("Error: No monitor window. Could not acquire ROI from user.");
            }
            Toolkit t = Toolkit.getDefaultToolkit();
            Dimension d = t.getBestCursorSize(15, 15);
            BufferedImage cursorImage = new BufferedImage(d.width, d.height, BufferedImage.TYPE_INT_ARGB);
            Graphics2D g = cursorImage.createGraphics();
            int cx = d.width/2, cy = d.height/2;
            g.setColor(Color.WHITE); g.drawRect(cx-7, cy-7, 14, 14);
            g.setColor(Color.BLACK); g.drawRect(cx-6, cy-6, 12, 12);
            g.setColor(Color.WHITE); g.drawRect(cx-2, cy-244);
            g.setColor(Color.BLACK); g.drawRect(cx-1, cy-122);
            if (d.width%2 == 0) {
                cx += 1;
            }
            if (d.height%2 == 0) {
                cy += 1;
            }
            Cursor cursor = t.createCustomCursor(cursorImage, new Point(cx, cy), null);
            monitorWindow.setCursor(cursor);

            final double[] roiPts = new double[8];
            final int[] count = { 0 };
            monitorWindow.getCanvas().addMouseListener(new MouseAdapter() {
    View Full Code Here

    Examples of java.awt.Toolkit

        /**
         * Charge une image
         */
        public static ImageIcon getImageIcon(String name)
        {
          Toolkit toolkit = Toolkit.getDefaultToolkit();
         
            URL url;

            /*if (hashtable.containsKey(name) == true)
                return (ImageIcon) hashtable.get(name);
    View Full Code Here

    Examples of java.awt.Toolkit

            int w = s.readInt();
            int h = s.readInt();
            int[] pixels = (int[]) (s.readObject());

            if (pixels != null) {
                Toolkit tk = Toolkit.getDefaultToolkit();
                ColorModel cm = ColorModel.getRGBdefault();
                image = tk.createImage(new MemoryImageSource(w, h, cm, pixels, 0, w));
                loadImage(image);
            }
        }
    View Full Code Here

    Examples of java.awt.Toolkit

            content.add(submitButton);
            content.add(Box.createRigidArea(new Dimension(0,10)));
           
            dialog.setResizable(false);
            dialog.setSize(300,170);
            Toolkit toolkit = Toolkit.getDefaultToolkit();
            Dimension screen = toolkit.getScreenSize();
            int x = (screen.width - dialog.getWidth()) /2;
            int y = (screen.height - dialog.getHeight()) /2;
            dialog.setLocation(x, y);
            dialog.show();
        }
    View Full Code Here

    Examples of java.awt.Toolkit

         */
        private final SwingWebToolkit getToolkit()
        {
            if (_tk == null)
            {
                Toolkit tk = Toolkit.getDefaultToolkit();
                if (tk instanceof SwingWebToolkit)
                {
                    _tk = (SwingWebToolkit) tk;
                } else
                {
    View Full Code Here

    Examples of java.awt.Toolkit

      private void initComponents() {
        this.setTitle("添加数据源");
        this.setIconImage(IconUtils.createIconImage(APP_ICON_IMAGE));
        this.setContentPane(buildContentPane());

        Toolkit tk = Toolkit.getDefaultToolkit();
        Dimension screenSize = tk.getScreenSize();
        int screenHeight = screenSize.height;
        int screenWidth = screenSize.width;
        //this.setSize(screenWidth / 2, screenHeight / 2);
        this.setSize(400, 200);
        this.setLocation((screenWidth - getWidth()) / 2, (screenHeight - getHeight()) / 2);
    View Full Code Here

    Examples of java.awt.Toolkit

      private void initComponents() {
        this.setTitle("帮助主题");
        this.setIconImage(IconUtils.createIconImage(APP_ICON_IMAGE));
        this.setContentPane(buildContentPane());

        Toolkit tk = Toolkit.getDefaultToolkit();
        Dimension screenSize = tk.getScreenSize();
        int screenHeight = screenSize.height;
        int screenWidth = screenSize.width;
        this.setSize(screenWidth / 2, screenHeight / 2);
        this.setLocation((screenWidth - getWidth()) / 2, (screenHeight - getHeight()) / 2);
        this.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
    View Full Code Here

    Examples of java.awt.Toolkit

        this.getLayeredPane().add(new BackgroundImageLabel(IMAGE_CLASS_PATH + "loginbg.jpg"), new Integer(Integer.MIN_VALUE));
       
        this.setTitle(title);
        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(322, 240);
        this.setLocation((screenWidth - getWidth()) / 2, (screenHeight - getHeight() - 30) / 2);
        this.setResizable(false);
    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.