Package com.sun.star.lang

Examples of com.sun.star.lang.XTypeProvider


        tRes.tested("createClone()", result) ;
    }
   
    protected byte[] getImplementationID(XInterface ifc) {
        byte[] res = new byte[0];
        XTypeProvider provider = (XTypeProvider)
                    UnoRuntime.queryInterface(XTypeProvider.class, ifc);
        if (provider != null) {
            res = provider.getImplementationId();
        }
        return res;
    }
View Full Code Here


     * @return An array with all interface types; null if there are none.
     * @see com.sun.star.uno.XInterface
     */
    public static Type[] getInterfaceTypes(XInterface xTarget) {
        Type[] types = null;
        XTypeProvider xTypeProvider = (XTypeProvider)
                UnoRuntime.queryInterface( XTypeProvider.class, xTarget);
        if( xTypeProvider != null )
            types = xTypeProvider.getTypes();
        return types;
    }
View Full Code Here

     * @param xTarget An implementation of a UNO object.
     * @return The implementation id.
     */
    public static String getImplID( XInterface xTarget ) {
    String str = "";
    XTypeProvider xTypeProvider = (XTypeProvider)
                UnoRuntime.queryInterface( XTypeProvider.class, xTarget);
            if( xTypeProvider != null ) {
        byte[] id = xTypeProvider.getImplementationId();
        str = "ImplementationID: ";
        for (int i=0; i<id.length;i++) {
            Byte b = new Byte(id[i]);
            str += b.intValue();
        }
View Full Code Here

     * @return An array with all interface types; null if there are none.
     * @see com.sun.star.uno.XInterface
     */
    public static Type[] getInterfaceTypes(XInterface xTarget) {
        Type[] types = null;
        XTypeProvider xTypeProvider = (XTypeProvider)
                UnoRuntime.queryInterface( XTypeProvider.class, xTarget);
        if( xTypeProvider != null )
            types = xTypeProvider.getTypes();
        return types;
    }
View Full Code Here

     * @param xTarget An implementation of a UNO object.
     * @return The implementation id.
     */
    public static String getImplID( XInterface xTarget ) {
    String str = "";
    XTypeProvider xTypeProvider = (XTypeProvider)
                UnoRuntime.queryInterface( XTypeProvider.class, xTarget);
            if( xTypeProvider != null ) {
        byte[] id = xTypeProvider.getImplementationId();
        str = "ImplementationID: ";
        for (int i=0; i<id.length;i++) {
            Byte b = new Byte(id[i]);
            str += b.intValue();
        }
View Full Code Here

    }

   
    protected Type[] getInterfaces(Object _oUnoParentObject){
        Type[] aTypes = new Type[]{};
        XTypeProvider xTypeProvider = ( XTypeProvider ) UnoRuntime.queryInterface( XTypeProvider.class, _oUnoParentObject);
        if ( xTypeProvider != null ) {
            aTypes = xTypeProvider.getTypes();
        }
        return aTypes;
    }
View Full Code Here

        //  add all interfaces for the given object to the tree under the node parent
        private void addInterfacesToTree( Object a,
        DefaultMutableTreeNode parent ) {
            try {
                //  get the type provider for the given object
                XTypeProvider xTypeProvider = ( XTypeProvider ) UnoRuntime.queryInterface( XTypeProvider.class, a );
                if ( xTypeProvider != null ) {
                    //  get all interfaces
                    Type[] type = xTypeProvider.getTypes();
                   
                    for ( int m = 0; m < type.length; m++ ) {
                        //  create a node for the current interface and add it to the tree
                        DefaultMutableTreeNode child = new DefaultMutableTreeNode( type[ m ].getTypeName() );
                        //DefaultMutableTreeNode child = new DefaultMutableTreeNode( com.sun.star.lib.uno.typedesc.TypeDescription.getTypeDescription( type[ m ] ).getTypeName() );
View Full Code Here

        tRes.tested("createClone()", result) ;
    }
   
    protected byte[] getImplementationID(XInterface ifc) {
        byte[] res = new byte[0];
        XTypeProvider provider = (XTypeProvider)
                    UnoRuntime.queryInterface(XTypeProvider.class, ifc);
        if (provider != null) {
            res = provider.getImplementationId();
        }
        return res;
    }
View Full Code Here

        try
        {
            MessageArea.println ("Interfaces:");
            // Use interface XTypeProvider to retrieve a list of supported
            // interfaces.
            XTypeProvider xTP = (XTypeProvider) UnoRuntime.queryInterface (
                XTypeProvider.class, xObject);
            if (xTP == null)
                MessageArea.println ("    interface XTypeProvider not supported");
            else
            {
                Type[] aTypeList = xTP.getTypes ();
                MessageArea.println ("    object supports " + aTypeList.length
                    + " interfaces");
                for (int i=0; i<aTypeList.length; i++)
                    MessageArea.println ("        " + i + " : "
                        + aTypeList[i].getTypeName());
View Full Code Here

                XServiceInfo.class, ((AccTreeNode)aNode).getContext());
        return xServiceInfo;
    }
    private XTypeProvider GetTypeProvider (AccessibleTreeNode aNode)
    {
        XTypeProvider xTypeProvider = null;
        if (aNode instanceof AccTreeNode)
            xTypeProvider = (XTypeProvider)UnoRuntime.queryInterface(
                XTypeProvider.class, ((AccTreeNode)aNode).getContext());
        return xTypeProvider;
    }
View Full Code Here

TOP

Related Classes of com.sun.star.lang.XTypeProvider

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.