Package com.sun.star.datatransfer

Examples of com.sun.star.datatransfer.DataFlavor


    /**
    * Get a system data type for 'text/html' MIME type. <p>
    * Has <b> OK </b> status if not <code>null</code> value returned.
    */
    public void _getSystemDataTypeFromDataFlavor() {
        DataFlavor df = new DataFlavor
            ("text/html","HTML-Documents", new Type());
        Object res = oObj.getSystemDataTypeFromDataFlavor(df);
        tRes.tested("getSystemDataTypeFromDataFlavor()",res != null);
    }
View Full Code Here


     * from 'text/html' MIME type. <p>
     * Has <b>OK</b> status if DataFlavour returned has 'text/hrml' MIME
     * type.
     */
    public void _getDataFlavorFromSystemDataType() {
        DataFlavor in = new DataFlavor
            ("text/html","HTML-Documents", new Type());
        Object res = oObj.getSystemDataTypeFromDataFlavor(in);
        DataFlavor out = oObj.getDataFlavorFromSystemDataType(res);
        tRes.tested("getDataFlavorFromSystemDataType()",
            out.MimeType.equals("text/html"));
    }
View Full Code Here

    class MyTransferable implements XTransferable {
        DataFlavor[] supportedFlavors;

        public MyTransferable() {
            supportedFlavors = new DataFlavor[] {
                new DataFlavor("text/plain", "Plain text", new Type(String.class))
            };
        }
View Full Code Here

    /**
    * Get a system data type for 'text/html' MIME type. <p>
    * Has <b> OK </b> status if not <code>null</code> value returned.
    */
    public void _getSystemDataTypeFromDataFlavor() {
        DataFlavor df = new DataFlavor
            ("text/html","HTML-Documents", new Type());
        Object res = oObj.getSystemDataTypeFromDataFlavor(df);
        tRes.tested("getSystemDataTypeFromDataFlavor()",res != null);
    }
View Full Code Here

     * from 'text/html' MIME type. <p>
     * Has <b>OK</b> status if DataFlavour returned has 'text/hrml' MIME
     * type.
     */
    public void _getDataFlavorFromSystemDataType() {
        DataFlavor in = new DataFlavor
            ("text/html","HTML-Documents", new Type());
        Object res = oObj.getSystemDataTypeFromDataFlavor(in);
        DataFlavor out = oObj.getDataFlavorFromSystemDataType(res);
        tRes.tested("getDataFlavorFromSystemDataType()",
            out.MimeType.equals("text/html"));
    }
View Full Code Here

    class MyTransferable implements XTransferable {
        DataFlavor[] supportedFlavors;

        public MyTransferable() {
            supportedFlavors = new DataFlavor[] {
                new DataFlavor("text/plain", "Plain text", new Type(String.class))
            };
        }
View Full Code Here

            XTransferable xTransfer = (XTransferable)UnoRuntime.queryInterface(
                                          XTransferable.class,
                                          xComp );
            if ( xTransfer != null )
            {
              DataFlavor aFlavor = new DataFlavor();
              aFlavor.MimeType = "image/png";
              aFlavor.HumanPresentableName = "Portable Network Graphics";
              aFlavor.DataType = new Type( byte[].class );
 
              byte[] aPNGData = (byte[])AnyConverter.toArray( xTransfer.getTransferData( aFlavor ) );
View Full Code Here

            XTransferable xTransfer = (XTransferable)UnoRuntime.queryInterface(
                                          XTransferable.class,
                                          xCloseable );
            if ( xTransfer != null )
            {
              DataFlavor aFlavor = new DataFlavor();
              aFlavor.MimeType = "application/x-openoffice;windows_formatname=\"Bitmap\"";
              aFlavor.HumanPresentableName = "Bitmap";
              aFlavor.DataType = new Type( byte[].class );

              Object aAny = xTransfer.getTransferData( aFlavor );
View Full Code Here

            XTransferable xTransfer = (XTransferable)UnoRuntime.queryInterface(
                                          XTransferable.class,
                                          xComp );
            if ( xTransfer != null )
            {
              DataFlavor aFlavor = new DataFlavor();
              aFlavor.MimeType = "image/png";
              aFlavor.HumanPresentableName = "Portable Network Graphics";
              aFlavor.DataType = new Type( byte[].class );
 
              byte[] aPNGData = (byte[])AnyConverter.toArray( xTransfer.getTransferData( aFlavor ) );
View Full Code Here

  public DataFlavor[] getTransferDataFlavors()
  {
    DataFlavor[] adf = new DataFlavor[1];

    DataFlavor uniflv = new DataFlavor(
      UNICODE_CONTENT_TYPE,
      "Unicode Text",
      new Type(String.class) );
 
    adf[0] = uniflv;
View Full Code Here

TOP

Related Classes of com.sun.star.datatransfer.DataFlavor

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.