Package java.awt

Examples of java.awt.Toolkit$WindowList


        tokens = painter.currentLineTokens
          = tokenMarker.markTokens(lineSegment,line);
      }

      int offset = 0;
      Toolkit toolkit = painter.getToolkit();
      Font defaultFont = painter.getFont();
      SyntaxStyle[] styles = painter.getStyles();

      for(;;)
      {
View Full Code Here


     * @return The resulting <code>Image</code> object.
     * @throws java.io.IOException
     *             If an error occurred while reading from the stream.
     */
    private synchronized Image loadImage(InputStream stream) throws IOException {
        Toolkit toolkit = Toolkit.getDefaultToolkit();
        byte data[] = FileCopyUtils.copyToByteArray(stream);

        Image image = toolkit.createImage(data);
        imageLoaded = false;
        imageError = false;
        // fully loads the image into memory
        toolkit.prepareImage(image, -1, -1, this);
        while (!imageLoaded && !imageError) {
            try {
                wait();
            }
            catch (InterruptedException ex) {
View Full Code Here

     *            mentioned above.
     */
    public static void main(final String[] args) {
        try {

            Toolkit tk = Toolkit.getDefaultToolkit();
            OutputStream out = new BufferedOutputStream(new FileOutputStream(
                    "gif89out.gif"));

            if (args[0].toUpperCase().endsWith(".JPG")) {
                new Gif89Encoder(tk.getImage(args[0])).encode(out);
            } else {
                BufferedReader in = new BufferedReader(new FileReader(args[0]));
                Gif89Encoder ge = new Gif89Encoder();

                String line;
                while ((line = in.readLine()) != null) {
                    ge.addFrame(tk.getImage(line.trim()));
                }
                ge.setLoopCount(0); // let's loop indefinitely
                ge.encode(out);

                in.close();
View Full Code Here

     *            mentioned above.
     */
    public static void main(final String[] args) {
        try {

            Toolkit tk = Toolkit.getDefaultToolkit();
            OutputStream out = new BufferedOutputStream(new FileOutputStream(
                    "gif89out.gif"));

            if (args[0].toUpperCase().endsWith(".JPG")) {
                new Gif89Encoder(tk.getImage(args[0])).encode(out);
            } else {
                BufferedReader in = new BufferedReader(new FileReader(args[0]));
                Gif89Encoder ge = new Gif89Encoder();

                String line;
                while ((line = in.readLine()) != null) {
                    ge.addFrame(tk.getImage(line.trim()));
                }
                ge.setLoopCount(0); // let's loop indefinitely
                ge.encode(out);

                in.close();
View Full Code Here

     */
    protected int getScreenResolution(Component c) {
        if (c == null)
            return getDefaultScreenResolution();

        Toolkit toolkit = c.getToolkit();
        return toolkit != null
            ? toolkit.getScreenResolution()
            : getDefaultScreenResolution();
    }
View Full Code Here

     */
    public Image getImage(String key) {
        URL url = getResource(key + "Image");

        if (url != null) {
            Toolkit tk = Toolkit.getDefaultToolkit();
            Image img = tk.getImage(url);
            return img;
        }

        return null;
    }
View Full Code Here

    }

    public void mouseEntered(MouseEvent e) {
      if (state.getMode() == View.Mode.ZOOM_IN
          || state.getMode() == View.Mode.ZOOM_OUT) {
        Toolkit toolkit = Toolkit.getDefaultToolkit();
        try {
          GraphView.this.jgraph.setCursor(toolkit.createCustomCursor(
              IconLoader.getIcon(IconLoader.ZOOM_CURSOR), new Point(0, 0),
              "img"));
        } catch (Exception e1) {
          e1.printStackTrace();
        }
View Full Code Here

        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

      "<b>Contributors:</b><ul><li>Scott Deboy &lt;sdeboy@apache.org&gt;</li><li>Paul Smith &lt;psmith@apache.org&gt;</li><li>Ceki G&uuml;lc&uuml; &lt;ceki@apache.org&gt;</li><li>Oliver Burn</li><li>Stephen Pain</li></ul></html>");

      JButton button = new JButton("Copy bug report link to clipboard");
      button.addActionListener(new ActionListener() {
          public void actionPerformed(ActionEvent event) {
              Toolkit tk = getToolkit();
              Clipboard cb = tk.getSystemClipboard();
              cb.setContents(new StringSelection("http://logging.apache.org/site/bugreport.html"), null);
              }});
              panel.add(info, c);

    JLabel title = new JLabel(ChainsawIcons.ICON_LOG4J);
View Full Code Here

                       "(BSD) NapkinLaF .......... http://sourceforge.net/projects/napkinlaf\n"+
                       "(BCL) BouncyCastle libs .. http://www.bouncycastle.org\n\n"+
                       "ANts website.............. http://www.myjavaserver.com/~gwren/home.jsp?page=custom&xmlName=ants");
    this.setLayout(xYLayout1);
    this.setForeground(Color.white);
    Toolkit tk = Toolkit.getDefaultToolkit();
    MediaTracker mt = new MediaTracker(this);
    buffer = tk.getImage(this.getClass().getClassLoader().getResource("anims/antsLogo.jpg"));
    mt.addImage(buffer, 1);
    try {
      mt.waitForAll();
    }
    catch (InterruptedException e) {}
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.