Package com.sun.star.beans

Examples of com.sun.star.beans.Property


    protected int getCountOfReadOnlyProperties() {
        int ro = 0;

        for (int i = 0; i < properties.length; i++) {
            Property property = properties[i];
            boolean isWritable = ((property.Attributes & PropertyAttribute.READONLY) == 0);

            if (!isWritable) {
                ro++;
            }
View Full Code Here


    */
    public void _getPropertyByName() {
        requiredMethod("getProperties()");
        boolean result;
        try {
            Property prop  = oObj.getPropertyByName(IsThere.Name);
            result = (prop != null);
        } catch (com.sun.star.beans.UnknownPropertyException e) {
            log.println("Exception occurred while testing" +
                                " getPropertyByName with existing property");
            e.printStackTrace(log);
View Full Code Here

            if (!mayBeDef && states[i] != PropertyState.DEFAULT_VALUE ) {
                propName = names[i];
                XPropertySet xPropSet = (XPropertySet)
                    UnoRuntime.queryInterface(XPropertySet.class, oObj);
                XPropertySetInfo xPropSetInfo = xPropSet.getPropertySetInfo();
                Property prop = null;
                try {
                    prop = xPropSetInfo.getPropertyByName(names[i]);
                }
                catch(com.sun.star.beans.UnknownPropertyException e) {
                    log.println("couldn't get property info: " + e.toString());
View Full Code Here

    protected XDynamicResultSet getDynaResultSet(XContent content) {
        Command command = new Command();
        OpenCommandArgument2 comArg = new OpenCommandArgument2();
        Property[] comProps = new Property[1];
        comArg.Mode = com.sun.star.ucb.OpenMode.ALL;
        comProps[0] = new Property();
        comProps[0].Name = "Title";
        comArg.Properties = comProps;

        command.Name = "open";
        command.Handle = -1;
View Full Code Here

     **/
    public MyPersistObject() {
        int prop_count = 7;
        props = new Property[prop_count];
        for (int i=0; i<prop_count; i++ ) {
            props[i] = new Property();
        }
        by = 1;
        props[0].Name = "byte";
        i = 3;
        props[1].Name = "int";
View Full Code Here

                        "' wasn't set to default");
                    XPropertySet xPropSet = (XPropertySet)
                        UnoRuntime.queryInterface(XPropertySet.class, oObj);
                    XPropertySetInfo xPropSetInfo =
                        xPropSet.getPropertySetInfo();
                    Property prop = xPropSetInfo.getPropertyByName(names[i]);
                    if ( (prop.Attributes &
                            PropertyAttribute.MAYBEDEFAULT) != 0 ) {
                        log.println("   ... and it has MAYBEDEFAULT "+
                            "attribute - FAILED");
                    } else {
View Full Code Here

                        new NullPointerException
                            ("XPropertySet interface isn't implemented.")) ;

            propertySetInfo = oPS.getPropertySetInfo();
            properties = propertySetInfo.getProperties();
            Property prop = null;
            for (int i=0;i<properties.length;i++) {
                try {
                    prop = propertySetInfo.getPropertyByName
                        (properties[i].Name);
                } catch (com.sun.star.beans.UnknownPropertyException e) {
View Full Code Here

public class _XProperty extends MultiMethodTest {
    public XProperty oObj;

    public void _getAsProperty() {
        Property prop = oObj.getAsProperty();
        boolean res = (prop.Name instanceof String);
        res &= (prop.Type != null);
        tRes.tested("getAsProperty()", res);
    }
View Full Code Here

        String bound = "";

        for (int i = 0; i < properties.length; i++) {

            Property property = properties[i];
            String name = property.Name;
            boolean isWritable = ((property.Attributes &
                PropertyAttribute.READONLY) == 0);
            boolean isNotNull = ((property.Attributes &
                PropertyAttribute.MAYBEVOID) == 0);
View Full Code Here

        Property[] properties = xPSI.getProperties();

        for (int i = 0; i < properties.length; i++) {
            if (exclude.contains(properties[i].Name)) continue ;
            Property property = properties[i];
            String name = property.Name;
            int handle = property.Handle;
            log.println("Checking '" + name + "' with handle = " + handle);
            boolean isWritable =
                ((property.Attributes & PropertyAttribute.READONLY) == 0);
View Full Code Here

TOP

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

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.