Package org.eclipse.sapphire

Examples of org.eclipse.sapphire.ImageData


   
    private static void contribute( final PropertyEditorAssistContext context,
                                    final Status status )
    {
        final Status.Severity valResultSeverity = status.severity();
        ImageData image = null;
       
        if( valResultSeverity == Status.Severity.ERROR )
        {
            image = ImageData.readFromClassLoader( SwtResourceCache.class, "Error.png" ).required();
        }
View Full Code Here


        if( oldImage != null )
        {
            oldImage.dispose();
        }
       
        final ImageData newImageData = this.part.getPageHeaderImage();
       
        if( newImageData == null )
        {
            this.header.setImage( null );
        }
View Full Code Here

      setToolTip(tooltip);
    }
   
    SapphireDiagramEditorPagePart pagePart = action.getPart().nearest(SapphireDiagramEditorPagePart.class);
    List<SapphireDiagramEditorPagePart.ConnectionPalette> conns = pagePart.getConnectionPalettes();
    ImageData connImage = null;
    for (SapphireDiagramEditorPagePart.ConnectionPalette conn : conns)
    {
      if (conn.getConnectionDef() == this.connectionDef)
      {
        connImage = conn.getSmallIcon();
View Full Code Here

            return label;
        }

        public Image image()
        {
            ImageData image = null;
           
            if( this.elementImageService != null )
            {
                image = this.elementImageService.image();
            }
View Full Code Here

 
  private void refresh()
  {
    if (getFigure() != null) {
      DiagramNodePart nodePart = part().nearest(DiagramNodePart.class);
      final ImageData data = getImage();
      if (data != null) {  
        ((SapphireImageFigure)getFigure()).setImage(nodePart.getSwtResourceCache().image(data));
      }
    }
  }
View Full Code Here

    {
    IFigure figure = null;
    if (visible())
    {
      DiagramNodePart nodePart = part().nearest(DiagramNodePart.class);
      final ImageData data = getImage();
      if (data != null)
      {
        figure = new SapphireImageFigure(this, nodePart.getSwtResourceCache().image(data));
      }
      else
View Full Code Here

    {
        if( this.showImage )
        {
            for( FunctionResult imageFunctionResult : this.imageFunctionResults )
            {
                final ImageData image = (ImageData) imageFunctionResult.value();
               
                if( image != null && sizeOfImage( image ) == size )
                {
                    return image;
                }
View Full Code Here

    protected void setMenuItemImage( final MenuItem menuItem,
                                     final SapphireActionHandler handler )
    {
        Image image = null;
   
        final ImageData imageData = handler.getImage( 16 );
       
        if( imageData != null )
        {
            image = ( (SwtPresentation) getManager().context() ).resources().image( imageData );
        }
View Full Code Here

    return menuEntries;
  }
 
  private Image getActionHandlerImage(SapphireActionHandler handler)
  {
      ImageData imageData = handler.getImage(16);
             
    if (imageData != null)
    {
      ImageDescriptor imageDescriptor = SwtUtil.toImageDescriptor(imageData);
      return imageDescriptor.createImage();
View Full Code Here

    return DefaultActionImage.getDefaultActionImage();
  }

  private Image getActionImage(SapphireAction action)
  {   
    ImageData imageData = null;
    List<SapphireActionHandler> handlers = action.getActiveHandlers();
    if (handlers.size() == 1)
    {   
      imageData = action.getFirstActiveHandler().getImage(16);
    }
View Full Code Here

TOP

Related Classes of org.eclipse.sapphire.ImageData

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.