Examples of XIntrospectionAccess


Examples of com.sun.star.beans.XIntrospectionAccess

    * has a base <code>XInterface</code> method
    * <code>acquire</code>.
    */
    public void _inspect() {
       boolean result = true;
       XIntrospectionAccess xIA = oObj.inspect(oObj);
       result = (xIA.hasMethod("acquire",1));
       tRes.tested("inspect()",result);
    }
View Full Code Here

Examples of com.sun.star.beans.XIntrospectionAccess

    private void addPropertiesToTreeNode(XUnoNode _oParentNode, Object _oUnoParentObject,  Property[] _aProperties) {
    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

   
   
    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){
                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

    //  parent
    public Object[] getUnoObjectsOfContainer(Object _oUnoParentObject) {
    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());
                }
            }
            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) };
                    oRetComponentsVector.add(mMethod.invoke(_oUnoParentObject, aParamInfo));
                }
View Full Code Here

Examples of com.sun.star.beans.XIntrospectionAccess

   
   
    //  add all methods for the given object to the tree under the node parent
    public XIdlMethod[] getMethods(Object _oUnoParentObject) {
    try {
        XIntrospectionAccess xIntrospectionAccess = getXIntrospectionAccess(_oUnoParentObject);
        if (xIntrospectionAccess != null){
            XIdlMethod[] xIdlMethods = xIntrospectionAccess.getMethods(MethodConcept.ALL - MethodConcept.DANGEROUS);
            return xIdlMethods;
        }
    }
    catch( Exception e ) {
        System.err.println( e );
View Full Code Here

Examples of com.sun.star.beans.XIntrospectionAccess

    }
   
   
    protected Property[] getProperties( Object _oUnoParentObject){
    try {
        XIntrospectionAccess xIntrospectionAccess = getXIntrospectionAccess(_oUnoParentObject);
        if (xIntrospectionAccess != null){
            Property[] aProperties = xIntrospectionAccess.getProperties(com.sun.star.beans.PropertyConcept.ATTRIBUTES + com.sun.star.beans.PropertyConcept.PROPERTYSET);               
            return aProperties;
        }
    }
    catch( Exception e ) {
        System.err.println( e );
View Full Code Here

Examples of com.sun.star.beans.XIntrospectionAccess

    private void addPropertiesToTreeNode(XUnoNode _oParentNode, Object _oUnoParentObject,  Property[] _aProperties) {
    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

   
   
    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){
                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

    //  parent
    public Object[] getUnoObjectsOfContainer(Object _oUnoParentObject) {
    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());
                }
            }
            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) };
                    oRetComponentsVector.add(mMethod.invoke(_oUnoParentObject, aParamInfo));
                }
View Full Code Here

Examples of com.sun.star.beans.XIntrospectionAccess

   
   
    //  add all methods for the given object to the tree under the node parent
    public XIdlMethod[] getMethods(Object _oUnoParentObject) {
    try {
        XIntrospectionAccess xIntrospectionAccess = getXIntrospectionAccess(_oUnoParentObject);
        if (xIntrospectionAccess != null){
            XIdlMethod[] xIdlMethods = xIntrospectionAccess.getMethods(MethodConcept.ALL - MethodConcept.DANGEROUS);
            return xIdlMethods;
        }
    }
    catch( Exception e ) {
        System.err.println( e );
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.