Package org.apache.pivot.wtk.media

Examples of org.apache.pivot.wtk.media.Picture


    private static void updateFrameTitleBar(Window rootOwner) {
        windowedHostFrame.setTitle(rootOwner.getTitle());

        Image icon = rootOwner.getIcon();
        if (icon instanceof Picture) {
            Picture rootPicture = (Picture)icon;
            windowedHostFrame.setIconImage(rootPicture.getBufferedImage());
        }
    }
View Full Code Here


    private Sheet sheet = null;

    @Override
    public void startup(final Display display, Map<String, String> properties)
        throws Exception {
        Picture picture = (Picture)Image.load(getClass().getResource("IMG_0767_2.jpg"));
        picture.resample(120);

        BoxPane windowContent = new BoxPane();
        PushButton button = new PushButton(picture);
        button.getStyles().put("toolbar", true);
View Full Code Here

        }

        if (dataFlavor.equals(DataFlavor.stringFlavor)) {
            transferData = localManifest.getText();
        } else if (dataFlavor.equals(DataFlavor.imageFlavor)) {
            Picture picture = (Picture)localManifest.getImage();
            transferData = picture.getBufferedImage();
        } else if (dataFlavor.equals(DataFlavor.javaFileListFlavor)) {
            FileList fileList = localManifest.getFileList();
            transferData = fileList.getList();
        } else if (dataFlavor.getMimeType().equals(URI_LIST_MIME_TYPE)) {
            FileList fileList = localManifest.getFileList();
View Full Code Here

    private static void updateFrameTitleBar(Window rootOwner) {
        windowedHostFrame.setTitle(rootOwner.getTitle());

        Image icon = rootOwner.getIcon();
        if (icon instanceof Picture) {
            Picture rootPicture = (Picture)icon;
            windowedHostFrame.setIconImage(rootPicture.getBufferedImage());
        }
    }
View Full Code Here

    private Sheet sheet = null;

    @Override
    public void startup(final Display display, Map<String, String> properties)
        throws Exception {
        Picture picture = (Picture)Image.load(getClass().getResource("IMG_0767_2.jpg"));
        picture.resample(120);

        BoxPane windowContent = new BoxPane();
        PushButton button = new PushButton(picture);
        button.getStyles().put("toolbar", true);
View Full Code Here

    @Override
    public Image getImage() throws IOException {
        Image image = null;
        try {
            image = new Picture((BufferedImage)transferable.getTransferData(imageDataFlavor));
        } catch (UnsupportedFlavorException exception) {
            // No-op
        }

        return image;
View Full Code Here

        }

        if (dataFlavor.equals(DataFlavor.stringFlavor)) {
            transferData = localManifest.getText();
        } else if (dataFlavor.equals(DataFlavor.imageFlavor)) {
            Picture picture = (Picture)localManifest.getImage();
            transferData = picture.getBufferedImage();
        } else if (dataFlavor.equals(DataFlavor.javaFileListFlavor)) {
            FileList fileList = localManifest.getFileList();
            transferData = fileList.getList();
        } else if (dataFlavor.getMimeType().equals(URI_LIST_MIME_TYPE)) {
            FileList fileList = localManifest.getFileList();
View Full Code Here

    private Sheet sheet = null;

    @Override
    public void startup(final Display display, Map<String, String> properties)
        throws Exception {
        Picture picture = (Picture)Image.load(getClass().getResource("IMG_0767_2.jpg"));
        picture.resample(120);

        BoxPane windowContent = new BoxPane();
        PushButton button = new PushButton(picture);
        button.getStyles().put("toolbar", true);
View Full Code Here

                    } else {
                        windowedHostFrame.setTitle(DesktopApplicationContext.rootOwner.getTitle());

                        Image icon = DesktopApplicationContext.rootOwner.getIcon();
                        if (icon instanceof Picture) {
                            Picture rootPicture = (Picture)icon;
                            windowedHostFrame.setIconImage(rootPicture.getBufferedImage());
                        }
                    }

                    updateFrameTitleBarCallback = null;
                }
View Full Code Here

    private Sheet sheet = null;

    @Override
    public void startup(final Display display, Map<String, String> properties)
        throws Exception {
        Picture picture = (Picture)Image.load(getClass().getResource("IMG_0767_2.jpg"));
        picture.resample(120);

        PushButton windowContent = new PushButton(picture);
        windowContent.setPreferredSize(480, 360);

        frame = new Frame(windowContent);
View Full Code Here

TOP

Related Classes of org.apache.pivot.wtk.media.Picture

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.