Package diva.canvas.toolbox

Examples of diva.canvas.toolbox.ImageFigure


                tracker.waitForID(0);
            } catch (InterruptedException e) {
                System.err.println(e + "... in LayerImageFigure");
            }

            ImageFigure imgFig = new ImageFigure(img);
            imgFig.translate(300, 100);
            return imgFig;
        }
View Full Code Here


    protected ImageFigure _createFigure() throws IllegalActionException {
        URL url = fileOrURL.asURL();

        Image image = Toolkit.getDefaultToolkit().createImage(url);

        ImageFigure figure = new ImageFigure(image);

        return figure;
    }
View Full Code Here

            } catch (IOException ex) {
                // Ignore, we can't find the icon.
            }
        }

        Figure newFigure = new ImageFigure(_scaledImage);
        _addLiveFigure(newFigure);

        return newFigure;
    }
View Full Code Here

            tracker.waitForID(0);
        } catch (InterruptedException e) {
            System.err.println(e + "... in FigureTutorial");
        }

        ImageFigure imgFig = new ImageFigure(img);
        imgFig.translate(300, 100);
        layer.add(imgFig);
        imgFig.setInteractor(defaultInteractor);
        imgFig.setToolTipText("Image figure");
    }
View Full Code Here

     */
    public FigureIcon(Figure figure, boolean antialias) {
        super();

        if (figure instanceof ImageFigure) {
            ImageFigure imageFigure = (ImageFigure) figure;
            setImage(imageFigure.getImage());
        } else {
            Rectangle2D bounds = figure.getBounds();
            BufferedImage image = new BufferedImage((int) bounds.getWidth(),
                    (int) bounds.getHeight(), BufferedImage.TYPE_INT_RGB);
            Graphics2D graphics = image.createGraphics();
View Full Code Here

     */
    public FigureIcon(Figure figure, int x, int y, int border, boolean antialias) {
        super();

        if (figure instanceof ImageFigure && (border == 0)) {
            ImageFigure imageFigure = (ImageFigure) figure;
            Image image = imageFigure.getImage();
            if (image != null) {
                image = image.getScaledInstance(x, y, Image.SCALE_DEFAULT);
                setImage(image);
            } else {
                throw new NullPointerException("Failed to get an image from "
View Full Code Here

TOP

Related Classes of diva.canvas.toolbox.ImageFigure

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.