Examples of queryAdapter()


Examples of com.sun.star.beans.XIntrospectionAccess.queryAdapter()

    public boolean isContainer(Object _oUnoObject){
    boolean bIsContainer = false;
    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){
View Full Code Here

Examples of com.sun.star.beans.XIntrospectionAccess.queryAdapter()

            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){
                    bIsContainer = (xIndexAccess.getCount() > 0);
                }
            }
        }
View Full Code Here

Examples of com.sun.star.beans.XIntrospectionAccess.queryAdapter()

    Object[] oRetComponents = null;
    try {
        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());
                }
View Full Code Here

Examples of com.sun.star.beans.XIntrospectionAccess.queryAdapter()

                XEnumeration xEnumeration = xEnumerationAccess.createEnumeration();
                while ( xEnumeration.hasMoreElements() ) {
                    oRetComponentsVector.add(xEnumeration.nextElement());
                }
            }
            XIndexAccess xIndexAccess = (XIndexAccess) UnoRuntime.queryInterface( XIndexAccess.class, xIntrospectionAccessObject.queryAdapter(new Type( XIndexAccess.class )));
            if ( xIndexAccess != null ) {
                XIdlMethod mMethod = xIntrospectionAccessObject.getMethod("getByIndex", com.sun.star.beans.MethodConcept.INDEXCONTAINER);
                for ( int i = 0; i < xIndexAccess.getCount(); i++ ) {
                    Object[][] aParamInfo = new Object[1][1];
                    aParamInfo[0] = new Integer[] { new Integer(i) };
View Full Code Here

Examples of com.sun.star.beans.XIntrospectionAccess.queryAdapter()

    try {
        if (_aProperties.length > 0){
            for ( int n = 0; n < _aProperties.length; n++ ){
                Property aProperty = _aProperties[n];
                XIntrospectionAccess xIntrospectionAccess = m_oIntrospector.getXIntrospectionAccess(_oUnoParentObject);
                XPropertySet xPropertySet = ( XPropertySet ) UnoRuntime.queryInterface( XPropertySet.class, xIntrospectionAccess.queryAdapter(new Type( XPropertySet.class)));
                if (xPropertySet != null) {
                    if (xPropertySet.getPropertySetInfo().hasPropertyByName(aProperty.Name)){
                        Object objectElement = xPropertySet.getPropertyValue(aProperty.Name);
                        if (objectElement != null) {
                            XUnoNode oChildNode = m_xTreeControlProvider.addUnoPropertyNode(_oUnoParentObject, aProperty, objectElement);
View Full Code Here

Examples of com.sun.star.beans.XIntrospectionAccess.queryAdapter()

                XIntrospectionAccess xIntrospectionAccessObject = xIntrospection.inspect( a );
               
                if ( xIntrospectionAccessObject != null ) {
                   
                    //  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
View Full Code Here

Examples of com.sun.star.beans.XIntrospectionAccess.queryAdapter()

                            parent.add( childEnumeration );
                        }
                    }
                   
                    //  get the index access
                    XIndexAccess xIndexAccess = ( XIndexAccess ) UnoRuntime.queryInterface( XIndexAccess.class, xIntrospectionAccessObject.queryAdapter( new Type( XIndexAccess.class ) ) );
                    if ( xIndexAccess != null ) {
                       
                        //  create a node for the index category
                        DefaultMutableTreeNode childIndex = new DefaultMutableTreeNode( "Index" );
                       
View Full Code Here

Examples of com.sun.star.beans.XIntrospectionAccess.queryAdapter()

                    //  get the type of class
                    Type type = myProperties[ n ].Type;
                    TypeClass typeClass = type.getTypeClass();
                   
                    //  get the property set with help of the introspection access
                    XPropertySet xPropertySet = ( XPropertySet ) UnoRuntime.queryInterface( XPropertySet.class, xIntrospectionAccess.queryAdapter( new Type( XPropertySet.class ) ) );
                   
                    if ( xPropertySet != null ) {
                        //  get the value of the property
                        Object object = xPropertySet.getPropertyValue( myProperties[ n ].Name );
                       
View Full Code Here

Examples of com.sun.star.beans.XIntrospectionAccess.queryAdapter()

    try {
        if (_aProperties.length > 0){
            for ( int n = 0; n < _aProperties.length; n++ ){
                Property aProperty = _aProperties[n];
                XIntrospectionAccess xIntrospectionAccess = m_oIntrospector.getXIntrospectionAccess(_oUnoParentObject);
                XPropertySet xPropertySet = ( XPropertySet ) UnoRuntime.queryInterface( XPropertySet.class, xIntrospectionAccess.queryAdapter(new Type( XPropertySet.class)));
                if (xPropertySet != null) {
                    if (xPropertySet.getPropertySetInfo().hasPropertyByName(aProperty.Name)){
                        Object objectElement = xPropertySet.getPropertyValue(aProperty.Name);
                        if (objectElement != null) {
                            XUnoNode oChildNode = m_xTreeControlProvider.addUnoPropertyNode(_oUnoParentObject, aProperty, objectElement);
View Full Code Here

Examples of com.sun.star.beans.XIntrospectionAccess.queryAdapter()

    public boolean isContainer(Object _oUnoObject){
    boolean bIsContainer = false;
    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){
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.