Examples of PropertyDef


Examples of org.eclipse.sapphire.PropertyDef

    }
   
    @Override
    protected PropertyBinding createBinding( final Property property )
    {
        final PropertyDef pdef = property.definition();
       
        if( pdef == IEventAttachment.PROP_LOCAL_COPY_LOCATION )
        {
            return new ValuePropertyBinding()
            {
View Full Code Here

Examples of org.eclipse.sapphire.PropertyDef

    }
   
    public static PropertyDef resolveProperty( final ISapphireUiDef def,
                                                 final String qualifiedPropertyName )
    {
        PropertyDef property = null;
       
        if( qualifiedPropertyName != null )
        {
            final int dot = qualifiedPropertyName.indexOf( '.' );
            final String className = qualifiedPropertyName.substring( 0, dot );
View Full Code Here

Examples of org.eclipse.sapphire.PropertyDef

        final Listener listener = new FilteredListener<PropertyEvent>()
        {
            @Override
            protected void handleTypedEvent( final PropertyEvent event )
            {
                final PropertyDef property = event.property().definition();
                final IEvent calevent = (IEvent) element();
               
                if( property == org.eclipse.sapphire.samples.calendar.IEvent.PROP_SUBJECT )
                {
                    calevent.getSubject().refresh();
View Full Code Here

Examples of org.eclipse.sapphire.PropertyDef

    }
   
    @Override
    protected PropertyBinding createBinding( final Property property )
    {
        final PropertyDef pdef = property.definition();
       
        if( pdef == IEvent.PROP_SUBJECT )
        {
            return new ValuePropertyBinding()
            {
View Full Code Here

Examples of org.eclipse.sapphire.PropertyDef

        out.println( "  </tr>" );
       
        for( Map.Entry<String,PropertyDef> entry : properties.entrySet() )
        {
            final String xmlPath = entry.getKey();
            final PropertyDef property = entry.getValue();
           
            final String cardinality;
           
            if( property instanceof ValueProperty )
            {
                if( property.hasAnnotation( Required.class ) )
                {
                    cardinality = "1";
                }
                else
                {
                    cardinality = "0 or 1";
                }
            }
            else if( property instanceof ElementProperty )
            {
                cardinality = "0 or 1";
            }
            else if( property instanceof ListProperty )
            {
                cardinality = "0 or more";
            }
            else
            {
                throw new IllegalStateException();
            }
           
            out.println( "  <tr>" );

            out.println( td( xmlPath ) );
            out.println( td( cardinality ) );
           
            out.println( "    <td>" );
           
            if( property.hasAnnotation( Documentation.class ) )
            {
                documentation( out, property.getAnnotation( Documentation.class ) );
            }
            else
            {
                out.println( "&nbsp;" );
            }
           
            if( property instanceof ElementProperty || property instanceof ListProperty )
            {
                boolean skip = false;
               
                final ElementType childType = property.service( PossibleTypesService.class ).types().first();
                final SortedSet<PropertyDef> childTypeProperties = childType.properties();
               
                if( childTypeProperties.size() == 1 )
                {
                    final PropertyDef childTypeProperty = childTypeProperties.first();
                   
                    if( childTypeProperty instanceof ValueProperty )
                    {
                        if( childTypeProperty.hasAnnotation( XmlBinding.class ) )
                        {
                            final XmlBinding b = childTypeProperty.getAnnotation( XmlBinding.class );
                           
                            if( b != null && b.path().length() == 0 )
                            {
                                skip = true;
                            }
                        }
                        else if( childTypeProperty.hasAnnotation( XmlValueBinding.class ) )
                        {
                            final XmlValueBinding b = childTypeProperty.getAnnotation( XmlValueBinding.class );
                           
                            if( b != null && b.path().length() == 0 )
                            {
                                skip = true;
                            }
View Full Code Here

Examples of org.eclipse.sapphire.PropertyDef

        final Listener listener = new FilteredListener<PropertyEvent>()
        {
            @Override
            protected void handleTypedEvent( final PropertyEvent event )
            {
                final PropertyDef property = event.property().definition();
                final ICalendar calendar = (ICalendar) element();
               
                if( property == org.eclipse.sapphire.samples.calendar.ICalendar.PROP_EVENTS )
                {
                    calendar.getEvents().refresh();
View Full Code Here

Examples of org.eclipse.sapphire.PropertyDef

        this.listener = new FilteredListener<PropertyEvent>()
        {
            @Override
            protected void handleTypedEvent( final PropertyEvent event )
            {
                final PropertyDef property = event.property().definition();
                final IAttendee attendee = (IAttendee) element();
               
                if( property == org.eclipse.sapphire.samples.calendar.IAttendee.PROP_NAME )
                {
                    attendee.getName().refresh();
View Full Code Here

Examples of org.eclipse.sapphire.PropertyDef

    }
   
    @Override
    protected PropertyBinding createBinding( final Property property )
    {
        final PropertyDef pdef = property.definition();
       
        if( pdef == IAttendee.PROP_NAME )
        {
            return new ValuePropertyBinding()
            {
View Full Code Here

Examples of org.eclipse.sapphire.PropertyDef

        }

        @Override
        protected PropertyBinding createBinding( final Property property )
        {
            final PropertyDef pdef = property.definition();
           
            PropertyBinding binding = null;
           
            if( pdef == Manufacturer.PROP_NAME )
            {
View Full Code Here

Examples of org.eclipse.sapphire.PropertyDef

        }

        @Override
        protected PropertyBinding createBinding( final Property property )
        {
            final PropertyDef pdef = property.definition();
           
            PropertyBinding binding = null;
           
            if( pdef == Category.PROP_NAME )
            {
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.