Examples of XFramesSupplier


Examples of com.sun.star.frame.XFramesSupplier

    public TextDocument(XMultiServiceFactory xMSF, boolean bShowStatusIndicator, XTerminateListener listener)
    {
        this.xMSF = xMSF;

        XDesktop xDesktop = Desktop.getDesktop(xMSF);
        XFramesSupplier xFrameSupplier = (XFramesSupplier) UnoRuntime.queryInterface(XFramesSupplier.class, xDesktop);
        xFrame = xFrameSupplier.getActiveFrame();
        xComponent = (XComponent) UnoRuntime.queryInterface(XComponent.class, xFrame.getController().getModel());
        xTextDocument = (XTextDocument) UnoRuntime.queryInterface(XTextDocument.class, xComponent);

        if (bShowStatusIndicator)
        {
View Full Code Here

Examples of com.sun.star.frame.XFramesSupplier

    //creates an instance of TextDocument and creates a frame with an empty document
    public TextDocument(XMultiServiceFactory xMSF, boolean bshowStatusIndicator, boolean bgetCurrentFrame, XTerminateListener listener, String _sUrl, boolean bShowPreview) {
        this.xMSF = xMSF;
        XDesktop xDesktop = Desktop.getDesktop(xMSF);
        if (bgetCurrentFrame) {
            XFramesSupplier xFrameSupplier = (XFramesSupplier) UnoRuntime.queryInterface(XFramesSupplier.class, xDesktop);
            xFrame = xFrameSupplier.getActiveFrame();
            xComponent = (XComponent) UnoRuntime.queryInterface(XComponent.class, xFrame.getController().getModel());
            xTextDocument = (XTextDocument) UnoRuntime.queryInterface(XTextDocument.class, xComponent);
        } else {
            xFrame = OfficeDocument.createNewFrame(xMSF, listener);
            if (bShowPreview){
View Full Code Here

Examples of com.sun.star.frame.XFramesSupplier

            XFrame xFrame = (XFrame) UnoRuntime.queryInterface(XFrame.class, oFrame);
           
            xFrame.setName("ObjectInspector");
            xFrame.initialize(xWindow);
           
            XFramesSupplier xFramesSup = (XFramesSupplier) UnoRuntime.queryInterface(XFramesSupplier.class, StarDesktop);
           
            XFrames xFrames = xFramesSup.getFrames();
            xFrames.append(xFrame);
           
           
            log.println("attach ObjectInspector to floating frame...");
           
View Full Code Here

Examples of com.sun.star.frame.XFramesSupplier

        {
            XFrame xF = UnoRuntime.queryInterface(XFrame.class, Desktop.getDesktop(xMSF));
            xFrame = xF.findFrame(FrameName, 0);
            if (listener != null)
            {
                XFramesSupplier xFS = UnoRuntime.queryInterface(XFramesSupplier.class, xF);
                XFrames xFF = xFS.getFrames();
                xFF.remove(xFrame);
                XDesktop xDesktop = UnoRuntime.queryInterface(XDesktop.class, xF);
                xDesktop.addTerminateListener(listener);
            }
        }
View Full Code Here

Examples of com.sun.star.frame.XFramesSupplier

    public TextDocument(XMultiServiceFactory xMSF, boolean bShowStatusIndicator, XTerminateListener listener)
    {
        this.xMSF = xMSF;

        XDesktop xDesktop = Desktop.getDesktop(xMSF);
        XFramesSupplier xFrameSupplier = UnoRuntime.queryInterface(XFramesSupplier.class, xDesktop);
        xFrame = xFrameSupplier.getActiveFrame();
        xComponent = UnoRuntime.queryInterface(XComponent.class, xFrame.getController().getModel());
        xTextDocument = UnoRuntime.queryInterface(XTextDocument.class, xComponent);

        if (bShowStatusIndicator)
        {
View Full Code Here

Examples of com.sun.star.frame.XFramesSupplier

        DocumentHandle docHandle = null;
        try
        {
            // create component loaader
            XComponentLoader xCompLoader = UnoRuntime.queryInterface(XComponentLoader.class, xMSF.createInstance("com.sun.star.frame.Desktop"));
            XFramesSupplier xFrameSupp = UnoRuntime.queryInterface(XFramesSupplier.class, xCompLoader);
            // close all existing frames
            XFrames xFrames = xFrameSupp.getFrames();
            XIndexAccess xAcc = UnoRuntime.queryInterface(XIndexAccess.class, xFrames);
            for (int i = 0; i < xAcc.getCount(); i++)
            {
                XCloseable xClose = UnoRuntime.queryInterface(XCloseable.class, xAcc.getByIndex(i));
                try
View Full Code Here

Examples of com.sun.star.frame.XFramesSupplier

            log.println("Desktop has no creator");
            tRes.tested("getCreator()", true) ;
            return;
        }

        XFramesSupplier creator = oObj.getCreator() ;
        if (creator == null)
            log.println("getCreator() returns null") ;
        boolean res = isDesktop(log,tEnv,"getCreator()");
        if (res) result=res; else result = (creator != null);
        tRes.tested("getCreator()", result) ;
View Full Code Here

Examples of com.sun.star.frame.XFramesSupplier

            log.println("Desktop has no creator");
            tRes.tested("setCreator()", true) ;
            return;
        }

        XFramesSupplier oldCreator = oObj.getCreator() ;
        oObj.setCreator(null) ;
        tRes.tested("setCreator()", oObj.getCreator() == null) ;
        oObj.setCreator(oldCreator) ;
    }
View Full Code Here

Examples of com.sun.star.frame.XFramesSupplier

               
            } else {
                // Note: This method is potentially dangerous and should only be used for debugging
                // purposes as it relies on the platform dependent window handler..
                Object oDesktop = m_xMCF.createInstanceWithContext("com.sun.star.frame.Desktop", m_xContext);
                XFramesSupplier xFramesSupplier = (XFramesSupplier) UnoRuntime.queryInterface(XFramesSupplier.class, oDesktop);
                xFrame = xFramesSupplier.getActiveFrame();               
            }
                       
            if (xFrame != null){
                XWindow xWindow = xFrame.getContainerWindow();
                if (xWindow != null){
View Full Code Here

Examples of com.sun.star.frame.XFramesSupplier

            XFrame xFrame = (XFrame) UnoRuntime.queryInterface(XFrame.class, oFrame);
           
            xFrame.setName("ObjectInspector");
            xFrame.initialize(xWindow);
           
            XFramesSupplier xFramesSup = (XFramesSupplier) UnoRuntime.queryInterface(XFramesSupplier.class, StarDesktop);
           
            XFrames xFrames = xFramesSup.getFrames();
            xFrames.append(xFrame);
           
           
            log.println("attach ObjectInspector to floating frame...");
           
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.