Package java.awt.datatransfer

Examples of java.awt.datatransfer.UnsupportedFlavorException


        }

        public Object getTransferData(DataFlavor flavor)
                throws UnsupportedFlavorException, IOException {
            if (!isDataFlavorSupported(flavor)) {
                throw new UnsupportedFlavorException(flavor);
            }
            return data;
        }
View Full Code Here


  public Object getTransferData(DataFlavor flavor)
    throws UnsupportedFlavorException, IOException {
      if (map.containsKey(flavor)) {
    return map.get(flavor);
      } else {
    throw new UnsupportedFlavorException(flavor);
      }
  }
View Full Code Here

        throws UnsupportedFlavorException {
        Object transferData = null;

        int index = transferDataFlavors.indexOf(dataFlavor);
        if (index == -1) {
            throw new UnsupportedFlavorException(dataFlavor);
        }

        if (dataFlavor.equals(DataFlavor.stringFlavor)) {
            transferData = localManifest.getText();
        } else if (dataFlavor.equals(DataFlavor.imageFlavor)) {
View Full Code Here

  public Object getTransferData(final DataFlavor flavor)
      throws UnsupportedFlavorException, IOException {
    if (flavor.equals(EWorldAnnotationItemFlavor)) {
      return item;
    } else {
      throw new UnsupportedFlavorException(flavor);
    }
  }
View Full Code Here

        }
   
        // Returns image
        public Object getTransferData(DataFlavor flavor) throws UnsupportedFlavorException, IOException {
            if (!DataFlavor.imageFlavor.equals(flavor)) {
                throw new UnsupportedFlavorException(flavor);
            }
            return image;
        }
View Full Code Here

  if (dch != null)
      return dch.getTransferData(df, ds);
  else if (df.equals(getTransferDataFlavors()[0])) // only have one now
      return ds.getInputStream();
  else
      throw new UnsupportedFlavorException(df);
    }
View Full Code Here

  if (dch != null)
      return dch.getTransferData(df, ds);
  else if (df.equals(getTransferDataFlavors()[0])) // only have one now
      return obj;
  else
      throw new UnsupportedFlavorException(df);

    }
View Full Code Here

   */
  public Object getTransferData(final DataFlavor flavor) throws UnsupportedFlavorException, IOException
  {
    if (isDataFlavorSupported(flavor) == false)
    {
      throw new UnsupportedFlavorException(flavor);
    }
    return value.getData();
  }
View Full Code Here

   */
  public Object getTransferData(final DataFlavor flavor) throws UnsupportedFlavorException, IOException
  {
    if (isDataFlavorSupported(flavor) == false)
    {
      throw new UnsupportedFlavorException(flavor);
    }

    return fieldName;
  }
View Full Code Here

       returnObject = data.toString();
  } else if (flavor.equals(flavors[PLAIN_TEXT])) {
      String string = data.toString();
      returnObject = new ByteArrayInputStream(string.getBytes());
  } else {
      throw new UnsupportedFlavorException(flavor);
  }
  return returnObject;
    }
View Full Code Here

TOP

Related Classes of java.awt.datatransfer.UnsupportedFlavorException

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.