Package com.sun.star.container

Examples of com.sun.star.container.XEnumerationAccess.createEnumeration()


    }

    protected boolean closeAllWindows(XDesktop desk)
    {
        final XEnumerationAccess compEnumAccess = desk.getComponents();
        final XEnumeration compEnum = compEnumAccess.createEnumeration();
        boolean res = true;

        try
        {
            while (compEnum.hasMoreElements())
View Full Code Here


    // create a new instance of the the desktop
    Object oDesktop = xMCF.createInstanceWithContext("com.sun.star.frame.Desktop", getConnection ().getComponentContext ());
    XDesktop desktop = (XDesktop)(UnoRuntime.queryInterface(com.sun.star.frame.XDesktop.class, oDesktop));

    XEnumerationAccess components = desktop.getComponents ();
    for (XEnumeration xEnum = components.createEnumeration () ; xEnum.hasMoreElements() ; ) {
      XComponent comp = (XComponent)((Any)(xEnum.nextElement ())).getObject ();
      XModel model = (XModel)(UnoRuntime.queryInterface(XModel.class, comp));
      if (model != null) {
        if (uri.equals (model.getURL())) {
          myLog.debug ("match {}", model.getURL());
View Full Code Here

    try {
        XIntrospectionAccess xIntrospectionAccessObject = getXIntrospectionAccess(_oUnoObject);
        if (xIntrospectionAccessObject != null){
            XEnumerationAccess xEnumerationAccess = (XEnumerationAccess) UnoRuntime.queryInterface(XEnumerationAccess.class, xIntrospectionAccessObject.queryAdapter( new Type( XEnumerationAccess.class ) ) );
            if (xEnumerationAccess != null){
                XEnumeration xEnumeration = xEnumerationAccess.createEnumeration();
                bIsContainer = xEnumeration.hasMoreElements();
            }
            if (!bIsContainer){
                XIndexAccess xIndexAccess = (XIndexAccess) UnoRuntime.queryInterface( XIndexAccess.class, xIntrospectionAccessObject.queryAdapter(new Type( XIndexAccess.class )));
                if (xIndexAccess != null){
View Full Code Here

        Vector oRetComponentsVector = new Vector();
        XIntrospectionAccess xIntrospectionAccessObject = getXIntrospectionAccess(_oUnoParentObject);
        if ( xIntrospectionAccessObject != null ) {
            XEnumerationAccess xEnumerationAccess = (XEnumerationAccess) UnoRuntime.queryInterface(XEnumerationAccess.class, xIntrospectionAccessObject.queryAdapter( new Type( XEnumerationAccess.class ) ) );
            if ( xEnumerationAccess != null ) {
                XEnumeration xEnumeration = xEnumerationAccess.createEnumeration();
                while ( xEnumeration.hasMoreElements() ) {
                    oRetComponentsVector.add(xEnumeration.nextElement());
                }
            }
            XIndexAccess xIndexAccess = (XIndexAccess) UnoRuntime.queryInterface( XIndexAccess.class, xIntrospectionAccessObject.queryAdapter(new Type( XIndexAccess.class )));
View Full Code Here

                    // Here, we access this interface
                    XEnumerationAccess xParaAccess = (XEnumerationAccess) UnoRuntime.queryInterface(
                            XEnumerationAccess.class, mxDocText );
                    // Call the XEnumerationAccess's only method to access the actual Enumeration
                    XEnumeration xParaEnum = xParaAccess.createEnumeration();

                    // While there are paragraphs, do things to them
                    while ( xParaEnum.hasMoreElements() )
                    {
                            // Get a reference to the next paragraphs XServiceInfo interface. TextTables
View Full Code Here

                   
                    //  get the enumeration access
                    XEnumerationAccess xEnumerationAccess = ( XEnumerationAccess ) UnoRuntime.queryInterface( XEnumerationAccess.class, xIntrospectionAccessObject.queryAdapter( new Type( XEnumerationAccess.class ) ) );
                    if ( xEnumerationAccess != null ) {
                        //  get the enumeration
                        XEnumeration xEnumeration = xEnumerationAccess.createEnumeration();
                       
                        //  create a node for the enumeration category
                        DefaultMutableTreeNode childEnumeration = new DefaultMutableTreeNode( "Enumeration" );
                       
                        while ( xEnumeration.hasMoreElements() ) {
View Full Code Here

            XCellRangesQuery xCellQuery = (XCellRangesQuery)UnoRuntime.queryInterface(
                XCellRangesQuery.class, sheet);
            XSheetCellRanges xFormulaCells = xCellQuery.queryContentCells(
                (short)com.sun.star.sheet.CellFlags.FORMULA);
            XEnumerationAccess xFormulas = xFormulaCells.getCells();
            XEnumeration xFormulaEnum = xFormulas.createEnumeration();
           
            while (xFormulaEnum.hasMoreElements()) {
                Object formulaCell = xFormulaEnum.nextElement();
                xCell = (XCell)UnoRuntime.queryInterface(XCell.class, formulaCell);
                XCellAddressable xCellAddress = (XCellAddressable)UnoRuntime.queryInterface(
View Full Code Here

           
            System.out.println("create an enumeration of all paragraphs");
            // create an enumeration access of all paragraphs of a document
            XEnumerationAccess xEnumerationAccess = (XEnumerationAccess) UnoRuntime.queryInterface(
                XEnumerationAccess.class, xText );
            xParagraphEnumeration = xEnumerationAccess.createEnumeration();
           
            // Loop through all paragraphs of the document
            while ( xParagraphEnumeration.hasMoreElements() ) {
                xTextElement = (XTextContent) UnoRuntime.queryInterface(
                    XTextContent.class, xParagraphEnumeration.nextElement());
View Full Code Here

           
            System.out.println("create an enumeration of all paragraphs");
            // create an enumeration access of all paragraphs of a document
            XEnumerationAccess xEnumerationAccess = (XEnumerationAccess) UnoRuntime.queryInterface(
                XEnumerationAccess.class, xText );
            xParagraphEnumeration = xEnumerationAccess.createEnumeration();
           
            // Loop through all paragraphs of the document
            while ( xParagraphEnumeration.hasMoreElements() ) {
                xTextElement = (XTextContent) UnoRuntime.queryInterface(
                    XTextContent.class, xParagraphEnumeration.nextElement());
View Full Code Here

           
            // getCellFormatRanges() has the interfaces for the enumeration
            XEnumerationAccess xEnumerationAccess = (XEnumerationAccess)
                UnoRuntime.queryInterface( XEnumerationAccess.class,
                                           xCellFormatSupplier.getCellFormatRanges() );
            XEnumeration xRanges = xEnumerationAccess.createEnumeration();
           
            while( xRanges.hasMoreElements() ) {
                // the enumeration returns a cellrange
                XCellRange xCellRange = (XCellRange) UnoRuntime.queryInterface(
                    XCellRange.class, xRanges.nextElement());
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.