Examples of XClipboard


Examples of com.sun.star.datatransfer.clipboard.XClipboard

    * Has <b> OK </b> status if the listener was called on contents changing.
    */
    public void _addClipboardListener() {
        oObj.addClipboardListener(myListener = new MyClipboardListener());

        XClipboard board = (XClipboard)UnoRuntime.queryInterface(
                XClipboard.class, tEnv.getTestObject());

        board.setContents(new MyTransferable(), new MyOwner());

        log.println("sleeping for 1 second");

        try {
            Thread.sleep(1000);
View Full Code Here

Examples of com.sun.star.datatransfer.clipboard.XClipboard

            myListener.called = false;
        } finally {
            oObj.removeClipboardListener(myListener);
        }

        XClipboard board = (XClipboard)UnoRuntime.queryInterface(
                XClipboard.class, oObj);

        board.setContents(new MyTransferable(), new MyOwner());

        try {
            Thread.sleep(1000);
        } catch (InterruptedException e) {
            log.println("interrupted");
View Full Code Here

Examples of com.sun.star.datatransfer.clipboard.XClipboard

    * Has <b> OK </b> status if not <code>null</code> value returned.
    */
    public void _getClipboard() {

        boolean result = true ;
        XClipboard cb = oObj.getClipboard("") ;

        result = cb != null ;

        tRes.tested("getClipboard()", result) ;
    }
View Full Code Here

Examples of com.sun.star.datatransfer.clipboard.XClipboard

    * Has <b> OK </b> status if the listener was called on contents changing.
    */
    public void _addClipboardListener() {
        oObj.addClipboardListener(myListener = new MyClipboardListener());

        XClipboard board = (XClipboard)UnoRuntime.queryInterface(
                XClipboard.class, tEnv.getTestObject());

        board.setContents(new MyTransferable(), new MyOwner());

        log.println("sleeping for 1 second");

        try {
            Thread.sleep(1000);
View Full Code Here

Examples of com.sun.star.datatransfer.clipboard.XClipboard

            myListener.called = false;
        } finally {
            oObj.removeClipboardListener(myListener);
        }

        XClipboard board = (XClipboard)UnoRuntime.queryInterface(
                XClipboard.class, oObj);

        board.setContents(new MyTransferable(), new MyOwner());

        try {
            Thread.sleep(1000);
        } catch (InterruptedException e) {
            log.println("interrupted");
View Full Code Here

Examples of com.sun.star.datatransfer.clipboard.XClipboard

    * Has <b> OK </b> status if not <code>null</code> value returned.
    */
    public void _getClipboard() {

        boolean result = true ;
        XClipboard cb = oObj.getClipboard("") ;

        result = cb != null ;

        tRes.tested("getClipboard()", result) ;
    }
View Full Code Here

Examples of com.sun.star.datatransfer.clipboard.XClipboard

    * Has <b> OK </b> status if not <code>null</code> value returned.
    */
    public void _getClipboard() {

        boolean result = true ;
        XClipboard cb = oObj.getClipboard("") ;

        result = cb != null ;

        tRes.tested("getClipboard()", result) ;
    }
View Full Code Here

Examples of com.sun.star.datatransfer.clipboard.XClipboard

           
      Object oClipboard = xServiceManager.createInstanceWithContext(
                "com.sun.star.datatransfer.clipboard.SystemClipboard",
                xOfficeContext);

      XClipboard xClipboard = (XClipboard)
        UnoRuntime.queryInterface(XClipboard.class, oClipboard);

      //---------------------------------------------------
      // registering as clipboard listener
      //---------------------------------------------------

      XClipboardNotifier xClipNotifier = (XClipboardNotifier)
        UnoRuntime.queryInterface(XClipboardNotifier.class, oClipboard);

      ClipboardListener aClipListener= new ClipboardListener();
     
      xClipNotifier.addClipboardListener(aClipListener);

            // Read ClipBoard
            readClipBoard(xClipboard);         

      //---------------------------------------------------
      // becoming a clipboard owner
      //---------------------------------------------------
     
      System.out.println("Becoming a clipboard owner...");
      System.out.println("");

      ClipboardOwner aClipOwner = new ClipboardOwner();
      xClipboard.setContents(new TextTransferable("Hello World!"), aClipOwner);
      int iFirst = 0;
           
      while (aClipOwner.isClipboardOwner())
      {
        if (iFirst != 2) {
View Full Code Here

Examples of com.sun.star.datatransfer.clipboard.XClipboard

           
      Object oClipboard = xServiceManager.createInstanceWithContext(
                "com.sun.star.datatransfer.clipboard.SystemClipboard",
                xOfficeContext);

      XClipboard xClipboard = (XClipboard)
        UnoRuntime.queryInterface(XClipboard.class, oClipboard);

      //---------------------------------------------------
      // registering as clipboard listener
      //---------------------------------------------------

      XClipboardNotifier xClipNotifier = (XClipboardNotifier)
        UnoRuntime.queryInterface(XClipboardNotifier.class, oClipboard);

      ClipboardListener aClipListener= new ClipboardListener();
     
      xClipNotifier.addClipboardListener(aClipListener);

            // Read ClipBoard
            readClipBoard(xClipboard);         

      //---------------------------------------------------
      // becoming a clipboard owner
      //---------------------------------------------------
     
      System.out.println("Becoming a clipboard owner...");
      System.out.println("");

      ClipboardOwner aClipOwner = new ClipboardOwner();
      xClipboard.setContents(new TextTransferable("Hello World!"), aClipOwner);
      int iFirst = 0;
           
      while (aClipOwner.isClipboardOwner())
      {
        if (iFirst != 2) {
View Full Code Here

Examples of com.sun.star.datatransfer.clipboard.XClipboard

    * Has <b> OK </b> status if the listener was called on contents changing.
    */
    public void _addClipboardListener() {
        oObj.addClipboardListener(myListener = new MyClipboardListener());

        XClipboard board = (XClipboard)UnoRuntime.queryInterface(
                XClipboard.class, tEnv.getTestObject());

        board.setContents(new MyTransferable(), new MyOwner());

        log.println("sleeping for 1 second");

        try {
            Thread.sleep(1000);
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.