Package org.eclipse.sapphire

Examples of org.eclipse.sapphire.ListPropertyBinding


                }
            };
        }
        else if( pdef == IEvent.PROP_ATTENDEES )
        {
            final ListPropertyBinding binding = new LayeredListPropertyBinding()
            {
                private final ElementList<org.eclipse.sapphire.samples.calendar.IAttendee> base
                    = EventResource.this.base.getAttendees();
               
                @Override
                public ElementType type( final Resource resource )
                {
                    return IAttendee.TYPE;
                }

                @Override
                protected Resource resource( final Object obj )
                {
                    return new AttendeeResource( EventResource.this, (org.eclipse.sapphire.samples.calendar.IAttendee) obj );
                }
               
                @Override
                protected List<?> readUnderlyingList()
                {
                    return this.base;
                }

                @Override
                protected Object insertUnderlyingObject( final ElementType type,
                                                         final int position )
                {
                    return this.base.insert( org.eclipse.sapphire.samples.calendar.IAttendee.TYPE, position );
                }
               
                @Override
                public void move( final Resource resource,
                                  final int position )
                {
                    this.base.move( ( (AttendeeResource) resource ).getBase(), position );
                }

                @Override
                public void remove( final Resource resource )
                {
                    this.base.remove( ( (AttendeeResource) resource ).getBase() );
                }
            };
           
            return binding;
        }
        else if( pdef == IEvent.PROP_ATTACHMENTS )
        {
            final ListPropertyBinding binding = new LayeredListPropertyBinding()
            {
                private final ElementList<org.eclipse.sapphire.samples.calendar.IEventAttachment> base
                    = EventResource.this.base.getAttachments();

                @Override
View Full Code Here


    @Override
    protected PropertyBinding createBinding( final Property property )
    {
        if( property.definition() == ICalendar.PROP_EVENTS )
        {
            final ListPropertyBinding binding = new LayeredListPropertyBinding()
            {
                private final ElementList<org.eclipse.sapphire.samples.calendar.IEvent> base
                    = CalendarResource.this.base.getEvents();
               
                @Override
View Full Code Here

                };
            }
        }
        else if( property instanceof ElementList )
        {
            binding = new ListPropertyBinding()
            {
                private final List<Resource> list = new ArrayList<Resource>();
               
                @Override
                public ElementType type( final Resource resource )
View Full Code Here

TOP

Related Classes of org.eclipse.sapphire.ListPropertyBinding

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.