Package com.sun.star.beans

Examples of com.sun.star.beans.XPropertySetInfo


        // some initializations which are the same for all controls
        XPropertySet xModelProps = UNO.queryPropertySet( xModel );
        try
        {
            XPropertySetInfo xPSI = xModelProps.getPropertySetInfo();
            if ( xPSI.hasPropertyByName( "Border" ) )
            {
                if ( ((Short)xModelProps.getPropertyValue( "Border" )).shortValue() == com.sun.star.awt.VisualEffect.LOOK3D )
                    xModelProps.setPropertyValue( "Border", new Short( com.sun.star.awt.VisualEffect.FLAT ) );
            }
            if ( xPSI.hasPropertyByName( "VisualEffect" ) )
                xModelProps.setPropertyValue( "VisualEffect", new Short( com.sun.star.awt.VisualEffect.FLAT ) );
            if ( m_document.classify() != DocumentType.CALC )
                if ( xPSI.hasPropertyByName( "BorderColor" ) )
                    xModelProps.setPropertyValue( "BorderColor", new Integer( 0x00C0C0C0 ) );
        }
        catch( com.sun.star.uno.Exception e )
        {
            System.err.println(e);
View Full Code Here


    * before and no exceptions were thrown. <p>
    */
    public void _setFastPropertyValue() {
        XPropertySet PS = (XPropertySet)UnoRuntime.queryInterface
            (XPropertySet.class, oObj);
        XPropertySetInfo propertySetInfo = PS.getPropertySetInfo();

        if (propertySetInfo == null) {
            log.println("getPropertySetInfo() method returned null");
            tRes.tested("setFastPropertyValue()", false) ;
        }
View Full Code Here

    * Has <b> OK </b> status if exceptions were thrown. <p>
    */
    public void _getFastPropertyValue() {
        XPropertySet PS = (XPropertySet)UnoRuntime.queryInterface
            (XPropertySet.class, oObj);
        XPropertySetInfo propertySetInfo = PS.getPropertySetInfo();

        if (propertySetInfo == null) {
            log.println("getPropertySetInfo() method returned null");
            tRes.tested("getFastPropertyValue()", false) ;
        }
View Full Code Here

        boolean[] r= new boolean[50];
        int i= 0;
       
        TestClass cl= new TestClass();
        try {
            XPropertySetInfo info= cl.getPropertySetInfo();
            Property[] arProps= info.getProperties();
            Property[] arRegProps= cl.getRegisteredProperties();
            r[i++]= arProps.length == arRegProps.length;
            for (int j= 0; j < arProps.length; j++)
            {
                boolean bFound= false;
                for (int k= 0; k < arRegProps.length; k++)
                {
                    if (arProps[j] == arRegProps[k])
                    {
                        bFound= true;
                        break;
                    }
                }
                if ( !bFound)
                    r[i++]= false;
            }
           
            for (int j= 0; j < arRegProps.length; j++)
            {
                Property prop= info.getPropertyByName(arRegProps[j].Name);
                if (prop != arRegProps[j])
                    r[i++]= false;
                if (! info.hasPropertyByName(arRegProps[j].Name))
                    r[i++]= false;
            }
               
           
        }catch(java.lang.Exception e){
View Full Code Here

        registerProperty("PropChar", new Type(char.class), (short) 0, "PropChar");
        registerProperty("PropInt", new Type(int.class), (short) 0, "PropInt");
        registerProperty("PropString", new Type(String.class), (short) 0, "PropString");
       
        XPropertySetInfo info= getPropertySetInfo();
        Property[] props= info.getProperties();
        for (int j= 0; j < props.length; j++)
        {
           Property aProp= props[j];
           if (aProp.Name.equals("PropChar") && aProp.Type.equals(new Type(char.class)) &&
                aProp.Attributes == 0)
View Full Code Here

        registerProperty("charB", "charB", (short) 0);
        registerProperty("charC", "charC", (short) 0);
        registerProperty("charClassB", "charClassB", PropertyAttribute.MAYBEVOID);
        registerProperty("IntProp", "intMemberA", (short) 0);
       
        XPropertySetInfo info= getPropertySetInfo();
        Property[] props= info.getProperties();
        for (int j= 0; j < props.length; j++)
        {
           Property aProp= props[j];
           if (aProp.Name.equals("charA") && aProp.Type.equals(new Type(char.class)) &&
                aProp.Attributes == 0)
View Full Code Here

         * @param propName - the property to test.
         * @result - adds the result of testing propName property to
         *           MultiMethodTest.tRes.
         */
        protected void testProperty(String propName) {
            XPropertySetInfo info = oObj.getPropertySetInfo();

            if (!info.hasPropertyByName(propName)) {
                if (isOptional(propName) || optionalService) {
                    // skipping optional property test
                    log.println("Property '" + propName
                            + "' is optional and not supported");
                    tRes.tested(propName,true);
View Full Code Here

         * <p>Subclasses can override to change this behaviour.
         */
        protected void checkResult(String propName, Object oldValue,
                Object newValue, Object resValue, Exception exception)
                    throws Exception {
            XPropertySetInfo info = oObj.getPropertySetInfo();
            Property prop = info.getPropertyByName(propName);

            short attr = prop.Attributes;
            boolean readOnly = (prop.Attributes
                    & PropertyAttribute.READONLY) != 0;
            boolean maybeVoid = (prop.Attributes
View Full Code Here

    public void removePropertyChangeListener(String name, XPropertyChangeListener l) {
    }

    public XPropertySetInfo getPropertySetInfo() {
        return new XPropertySetInfo() {
            public Property[] getProperties() {
                return props;
            }

            public boolean hasPropertyByName(String name) {
View Full Code Here

    }

    public static Map toMap(XPropertySet props) {
        Hashtable result = new Hashtable(10);

        XPropertySetInfo setInfo = props.getPropertySetInfo();
        Property[] properties = setInfo.getProperties();

        for (int i = 0; i < properties.length; i++) {
            String name = properties[i].Name;
            Object value;
View Full Code Here

TOP

Related Classes of com.sun.star.beans.XPropertySetInfo

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.