Package javax.swing

Examples of javax.swing.ImageIcon


                Debug.output("BasicSymbolImageMaker: Trying to create "
                        + fileURL);
            }

            BufferedImage bi = BufferedImageHelper.getBufferedImage(fileURL);
            return new ImageIcon(ImageScaler.getOptimalScalingImage(bi, (int) di.getWidth(),
                    (int) di.getHeight()));
        } catch (IOException e) {
            e.printStackTrace();
        } catch (NullPointerException npe) {
            if (Debug.debugging("symbology")) {
View Full Code Here


            /*
             * For who like make his CustomCursor
             */
            try {
                Toolkit tk = Toolkit.getDefaultToolkit();
                ImageIcon pointer = new ImageIcon(getClass().getResource("pan.gif"));
                Dimension bestSize = tk.getBestCursorSize(pointer.getIconWidth(), pointer.getIconHeight());
                Image pointerImage = ImageScaler.getOptimalScalingImage(pointer.getImage(),(int) bestSize.getWidth(),
                                                                          (int) bestSize.getHeight());
                Cursor cursor = tk.createCustomCursor(pointerImage, new Point(0, 0), "PP");
                setModeCursor(cursor);
                return;
            } catch (Exception e) {
View Full Code Here

        deleteList = new Hashtable();
        requestors = new Vector();

        java.net.URL url = this.getClass().getResource("delete.gif");
        if (url != null) {
            ImageIcon icon = new ImageIcon(url);
            deleteButton = new JButton(icon);
        } else {
            deleteButton = new JButton("Delete");
        }
View Full Code Here

    }

    public JButton getLaunchButton() {
        if (launchButton == null) {
            float buttonHeight = 20;
            ImageIcon icon = createIcon(getBasicStroke(),
                    50,
                    (int) buttonHeight,
                    true);
            launchButton = new JButton(icon);
            launchButton.setToolTipText(i18n.get(BasicStrokeEditorMenu.class, "Modify_Line_Parameters", "Modify Line Parameters"));
View Full Code Here

                }
            }
        };

        group = new ButtonGroup();
        ImageIcon ii;
        int i;
        for (i = 1; i < 13; i++) {
            ii = createIcon(new BasicStroke(i), 50, 20, true);
            button = new JRadioButtonMenuItem(" ", ii, (int) width == i);//without the space as a parameter these instances look strange with some Look&Feel
            button.setActionCommand(String.valueOf(i));
View Full Code Here

            g.drawLine(0, height / 2, width, height / 2);
        } else {
            g.drawLine(width / 2, 0, width / 2, height);
        }

        return new ImageIcon(bigImage);
    }
View Full Code Here

        if (horizontalOrientation) {
            g.drawLine(0, height / 2, width, height / 2);
        } else {
            g.drawLine(width / 2, 0, width / 2, height);
        }
        return new ImageIcon(bigImage);
    }
View Full Code Here

        FontMetrics fm = g.getFontMetrics();

        int stringWidth = fm.stringWidth(s);
        int stringHeight = f.getSize() - 2;
        g.drawString(s, (width - stringWidth) / 2, height - (height - stringHeight) / 2);
        return new ImageIcon(bi);
    }
View Full Code Here

            try {
                if (imageURLString != null && !imageURLString.equals("")) {
                    URL imageURL = PropUtils.getResourceOrFileOrURL(this,
                            imageURLString);
                    ImageIcon imageIcon = new ImageIcon(imageURL);
                    spatialIndex.setPointIcon(imageIcon);
                }
            } catch (MalformedURLException murle) {
                Debug.error("MultiShapeLayer.setProperties(" + realPrefix
                        + ": point image URL not so good: \n\t"
View Full Code Here

                g.drawImage(bitmap, x * 256, y * 256, null);
            }
        }

        JLabel picture = new JLabel(new ImageIcon(bigImage));
        JFrame frame = com.bbn.openmap.util.PaletteHelper.getPaletteWindow(picture,
                "RPF Frame",
                null);
        frame.setSize(new Dimension(500, 500));
        frame.setVisible(true);
View Full Code Here

TOP

Related Classes of javax.swing.ImageIcon

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.