Package org.eclipse.sapphire

Examples of org.eclipse.sapphire.Listener


    {
        super.init( property );
       
        this.possibleTypesService = property.service( PossibleTypesService.class );
       
        this.possibleTypesServiceListener = new Listener()
        {
            @Override
            public void handle( final Event event )
            {
                initBindingMetadata();
View Full Code Here


       
    setEditDomain(new DefaultEditDomain(this));
   
    this.part.attach
        (
            new Listener()
            {
                @Override
                public void handle( final Event event )
                {
                    if( event instanceof SelectionChangedEvent )
                    {
                      isSelectionFromPagePart = true;
                        selectParts(part.getSelections());
                        isSelectionFromPagePart = false;
                    }
                    else if ( event instanceof DiagramPageEvent )
                  {
                    handleDiagramPageEvent((DiagramPageEvent)event);
                  }
                    else if ( event instanceof DiagramDirectEditPartEvent )
                  {
                selectAndDirectEditPart(((DiagramDirectEditPartEvent)event).part());
                  }
                }
            }
        );
           
    this.layoutPersistenceServiceListener = new Listener()
    {
            @Override
            public void handle( final Event event )
            {
                if( event instanceof DiagramLayoutPersistenceService.DirtyStateEvent )
                {
                    final DiagramLayoutPersistenceService.DirtyStateEvent evt = (DiagramLayoutPersistenceService.DirtyStateEvent) event;
                   
                    if( evt.after() == true )
                    {
                        markEditorDirty();
                    }
                    else
                    {
                        markEditorClean();
                    }
                }
            }     
    };
   
    this.layoutPersistenceService.attach(this.layoutPersistenceServiceListener);
   
        this.diagramEditorPagePartListener = new Listener()
        {
            @Override
            public void handle( final Event event )
            {
                if( event instanceof PageHeaderTextEvent )
View Full Code Here

        super.init();

        final Element element = getLocalModelElement();
        final ListFactory<FormComponentPart> childPartsListFactory = ListFactory.start();
       
        final Listener childPartListener = new FilteredListener<PartValidationEvent>()
        {
            @Override
            protected void handleTypedEvent( PartValidationEvent event )
            {
                refreshValidation();
View Full Code Here

                throw new RuntimeException( path.toString() );
            }
           
            this.property = p;
           
            this.propertyListener = new Listener()
            {
                @Override
                public void handle( final Event event )
                {
                    if( event instanceof PropertyContentEvent )
                    {
                        refreshNodes();
                    }
                    else if( event instanceof PropertyValidationEvent )
                    {
                        runOnDisplayThread
                        (
                            new Runnable()
                            {
                                public void run()
                                {
                                    refreshValidation();
                                }
                            }
                        );
                    }
                }
            };
           
            this.property.attach( this.propertyListener );

            this.definition = definition;
            this.params = params;
           
            this.visibleWhenFunctionResult = initExpression
            (
                AndFunction.create
                (
                    definition.getVisibleWhen().content(),
                    createVersionCompatibleFunction( this.property )
                ),
                Boolean.class,
                Literal.TRUE,
                new Runnable()
                {
                    public void run()
                    {
                        broadcast( new PartVisibilityEvent( null ) );
                    }
                }
            );
           
            this.visibleWhenFunctionForNodes = new Function()
            {
                @Override
                public String name()
                {
                    return "NodeFactoryVisible";
                }

                @Override
                public FunctionResult evaluate( final FunctionContext context )
                {
                    return new FunctionResult( this, context )
                    {
                        private Listener listener;
                       
                        @Override
                        protected void init()
                        {
                            this.listener = new Listener()
                            {
                                @Override
                                public void handle( final Event event )
                                {
                                    refresh();
View Full Code Here

                    }
                }
            }
        );
       
        this.possibleValuesServiceListener = new Listener()
        {
            @Override
            public void handle( final Event event )
            {
                SlushBucketPropertyEditorPresentation.this.sourceTableViewer.refresh();
View Full Code Here

        super.init();
       
        final Element element = getModelElement();
        final ListFactory<TabGroupPagePart> pagesListFactory = ListFactory.start();

        final Listener tabPartListener = new FilteredListener<PartValidationEvent>()
        {
            @Override
            protected void handleTypedEvent( PartValidationEvent event )
            {
                refreshValidation();
View Full Code Here

        super.init();

        final Element element = getModelElement();
        final ListFactory<PropertiesViewPagePart> pagesListFactory = ListFactory.start();
       
        final Listener pagePartListener = new FilteredListener<PartValidationEvent>()
        {
            @Override
            protected void handleTypedEvent( PartValidationEvent event )
            {
                refreshValidation();
View Full Code Here

                return new FunctionResult( this, context )
                {
                    @Override
                    protected void init()
                    {
                        final Listener pageVisibilityListener = new FilteredListener<PartVisibilityEvent>()
                        {
                            @Override
                            protected void handleTypedEvent( final PartVisibilityEvent event )
                            {
                                refresh();
View Full Code Here

           
            this.pages.put( key, this.currentPage );
           
            if( elementForPage != null )
            {
                final Listener elementDisposeListener = new FilteredListener<ElementDisposeEvent>()
                {
                    @Override
                    protected void handleTypedEvent( final ElementDisposeEvent event )
                    {
                        final FormPart page = PageBookPart.this.pages.remove( key );
                       
                        if( page != null )
                        {
                            page.dispose();
                        }
                    }
                };
               
                elementForPage.attach( elementDisposeListener );
               
                final Listener pageDisposeListener = new FilteredListener<org.eclipse.sapphire.DisposeEvent>()
                {
                    @Override
                    protected void handleTypedEvent( final org.eclipse.sapphire.DisposeEvent event )
                    {
                        elementForPage.detach( elementDisposeListener );
View Full Code Here

                        toolItem.setSelection( action.isChecked() );
                    }
                }
            };
           
            final Listener listener = new Listener()
            {
                @Override
                public void handle( final Event event )
                {
                    if( event instanceof LabelChangedEvent )
View Full Code Here

TOP

Related Classes of org.eclipse.sapphire.Listener

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.