Examples of UnsupportedFlavorException


Examples of java.awt.datatransfer.UnsupportedFlavorException

    }

    private Object getFileList(DataFlavor f)
            throws IOException, UnsupportedFlavorException {
        if (!data.isNativeFormatAtailable(DataProvider.FORMAT_FILE_LIST)) {
            throw new UnsupportedFlavorException(f);
        }
        String[] files = data.getFileList();
        if (files == null) {
            throw new IOException("Data is not available");
        }
View Full Code Here

Examples of java.awt.datatransfer.UnsupportedFlavorException

    }

    private Object getHTML(DataFlavor f)
            throws IOException, UnsupportedFlavorException {
        if (!data.isNativeFormatAtailable(DataProvider.FORMAT_HTML)) {
            throw new UnsupportedFlavorException(f);
        }
        String str = data.getHTML();
        if (str == null) {
            throw new IOException("Data is not available");
        }
View Full Code Here

Examples of java.awt.datatransfer.UnsupportedFlavorException

    }

    private Object getURL(DataFlavor f)
            throws IOException, UnsupportedFlavorException {
        if (!data.isNativeFormatAtailable(DataProvider.FORMAT_URL)) {
            throw new UnsupportedFlavorException(f);
        }
        String str = data.getURL();
        if (str == null) {
            throw new IOException("Data is not available");
        }
        URL url = new URL(str);
        if (f.getRepresentationClass().isAssignableFrom(URL.class)) {
            return url;
        }
        if (f.isFlavorTextType()) {
            return getTextRepresentation(url.toString(), f);
        }
        throw new UnsupportedFlavorException(f);
    }
View Full Code Here

Examples of java.awt.datatransfer.UnsupportedFlavorException

    private Object getSerializedObject(DataFlavor f)
            throws IOException, UnsupportedFlavorException {
        String nativeFormat = SystemFlavorMap.encodeDataFlavor(f);
        if ((nativeFormat == null) ||
                !data.isNativeFormatAtailable(nativeFormat)) {
            throw new UnsupportedFlavorException(f);
        }
        byte bytes[] = data.getSerializedObject(f.getRepresentationClass());
        if (bytes == null) {
            throw new IOException("Data is not available");
        }
View Full Code Here

Examples of java.awt.datatransfer.UnsupportedFlavorException

        }
        if (f.isRepresentationClassInputStream()) {
            byte[] bytes = text.getBytes(charset);
            return new ByteArrayInputStream(bytes);
        }
        throw new UnsupportedFlavorException(f);
    }
View Full Code Here

Examples of java.awt.datatransfer.UnsupportedFlavorException

    }

    private Image getImage(DataFlavor f)
            throws IOException, UnsupportedFlavorException {
        if (!data.isNativeFormatAtailable(DataProvider.FORMAT_IMAGE)) {
            throw new UnsupportedFlavorException(f);
        }
        RawBitmap bitmap = data.getRawBitmap();
        if (bitmap == null) {
            throw new IOException("Data is not available");
        }
View Full Code Here

Examples of java.awt.datatransfer.UnsupportedFlavorException

            return messages ;
        }
      
        else
        {
            throw new UnsupportedFlavorException(flavour) ;
        }
    }
View Full Code Here

Examples of java.awt.datatransfer.UnsupportedFlavorException

            return messages ;
        }
      
        else
        {
            throw new UnsupportedFlavorException(flavour) ;
        }
    }
View Full Code Here

Examples of java.awt.datatransfer.UnsupportedFlavorException

        public Object getTransferData(DataFlavor df)
            throws UnsupportedFlavorException, IOException {
            if (isDataFlavorSupported (df))
                return object;
            else
                throw new UnsupportedFlavorException(df);
        }
View Full Code Here

Examples of java.awt.datatransfer.UnsupportedFlavorException

                            throws UnsupportedFlavorException, IOException {
                          if (flavor.getHumanPresentableName().equals(
                              DefaultGraphCell.class.getSimpleName()))
                            return this;
                          else
                            throw new UnsupportedFlavorException(flavor);
                        }

                        public DataFlavor[] getTransferDataFlavors() {
                          return new DataFlavor[] { new DataFlavor(
                              DefaultGraphCell.class, DefaultGraphCell.class
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.