Package java.awt.datatransfer

Examples of java.awt.datatransfer.UnsupportedFlavorException


    public synchronized Object getTransferData( DataFlavor flavor ) throws UnsupportedFlavorException {
        if( flavor == NODE_FLAVOR ) {
            return rows;
        } else {
            throw new UnsupportedFlavorException( flavor );
        }
    }
View Full Code Here


//      // refer to RFC 2483 for the text/uri-list format
//      String data = file.toURI() + "\r\n";
//      System.out.println("returning files list: " + data);
//      return data;
        } else {
            throw new UnsupportedFlavorException( flavor );
        }
    }
View Full Code Here

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

    public Object getTransferData(DataFlavor flavor)
    throws UnsupportedFlavorException, IOException
    {
        if( flavor.equals(DATA_FLAVOR)==false )
        {
            throw new UnsupportedFlavorException(flavor);
        }
        return registers;
    }
View Full Code Here

                            return false;
                        }
                        public Object getTransferData(DataFlavor flavor)
                            throws UnsupportedFlavorException
                        {
                            throw new UnsupportedFlavorException(flavor);
                        }
                    };
            }
            transferable = emptyTransferable;
        }
View Full Code Here

          return htmlContent != null? htmlContent: "";
        }
        if(Reader.class.equals(flavor.getRepresentationClass())) {
          return new StringReader(htmlContent != null? htmlContent: "");
        }
        throw new UnsupportedFlavorException(flavor);
      }
    }
    for(DataFlavor flavor_: plainFlavors) {
      if(flavor_.equals(flavor)) {
        if(String.class.equals(flavor.getRepresentationClass())) {
          return plainContent != null? plainContent: "";
        }
        if(Reader.class.equals(flavor.getRepresentationClass())) {
          return new StringReader(plainContent != null? plainContent: "");
        }
        throw new UnsupportedFlavorException(flavor);
      }
    }
    throw new UnsupportedFlavorException(flavor);
  }
View Full Code Here

      return htmlData;
    }
    if (flavor.equals(supportedFlavors[1])) {
      return plainData;
    }
    throw new UnsupportedFlavorException(flavor);
  }
View Full Code Here

    }

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

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

        this.image = image;   
      }
     
      public Object getTransferData(DataFlavor flavor) throws UnsupportedFlavorException {       
        if (flavor.equals(DataFlavor.imageFlavor) == false){           
          throw new UnsupportedFlavorException(flavor);       
        }       
       
        return image;   
      }      
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.