Examples of LayeredListPropertyBinding


Examples of org.eclipse.sapphire.LayeredListPropertyBinding

    @Override
    protected PropertyBinding createBinding( final Property property )
    {
        if( property.definition() == TestElement.PROP_LIST )
        {
            return new LayeredListPropertyBinding()
            {
                @Override
                public ElementType type( final Resource resource )
                {
                    return Element.TYPE;
View Full Code Here

Examples of org.eclipse.sapphire.LayeredListPropertyBinding

                }
            };
        }
        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

Examples of org.eclipse.sapphire.LayeredListPropertyBinding

    @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
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.