Package org.eclipse.sapphire.ui.forms.swt

Examples of org.eclipse.sapphire.ui.forms.swt.SwtResourceCache$ImageHandle


        if( this.control.isDisposed() )
        {
            return;
        }
       
        final SwtResourceCache imageCache = this.part.getSwtResourceCache();
       
        if( this.assistContext != null )
        {
            if( this.problem != null )
            {
                final String fieldDecorationId;
               
                switch( this.problem.severity() )
                {
                    case ERROR:
                    {
                        fieldDecorationId = FieldDecorationRegistry.DEC_ERROR;
                        break;
                    }
                    case WARNING:
                    {
                        fieldDecorationId = FieldDecorationRegistry.DEC_WARNING;
                        break;
                    }
                    default:
                    {
                        throw new IllegalStateException();
                    }
                }
               
                final FieldDecoration fieldDecoration
                    = FieldDecorationRegistry.getDefault().getFieldDecoration( fieldDecorationId );
           
                this.control.setImage( fieldDecoration.getImage() );
            }
            else
            {
                if( this.mouseOverEditorControl )
                {
                    this.control.setImage( imageCache.image( IMG_ASSIST ) );
                }
                else
                {
                    this.control.setImage( imageCache.image( IMG_ASSIST_FAINT ) );
                }
            }
           
            this.control.setVisible( true );
            this.control.setCursor( Display.getCurrent().getSystemCursor( SWT.CURSOR_HAND ) );
        }
        else
        {
            this.control.setVisible( false );
            this.control.setImage( imageCache.image( IMG_ASSIST_CLEAR ) );
            this.control.setCursor( null );
        }
    }
View Full Code Here


    public SwtResourceCache getSwtResourceCache()
    {
        if( this.imageCache == null )
        {
            this.imageCache = ( this.parent == null ? new SwtResourceCache() : this.parent.getSwtResourceCache() );
        }
       
        return this.imageCache;
    }
View Full Code Here

    private boolean ignorePageChange;

    public SapphireEditor()
    {
        this.pluginId = FrameworkUtil.getBundle( getClass() ).getSymbolicName();
        this.imageCache = new SwtResourceCache();
        this.outline = null;
        this.actionsManager = new SapphireActionManager( this, getActionContexts() );
    }
View Full Code Here

TOP

Related Classes of org.eclipse.sapphire.ui.forms.swt.SwtResourceCache$ImageHandle

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.