Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 


Eclipse Platform
Release 3.5

org.eclipse.jface.resource
Class CompositeImageDescriptor


java.lang.Object
  extended by 

org.eclipse.jface.resource.DeviceResourceDescriptor
      extended by 

org.eclipse.jface.resource.ImageDescriptor
          extended by 
org.eclipse.jface.resource.CompositeImageDescriptor
Direct Known Subclasses:
DecorationOverlayIcon

public abstract class CompositeImageDescriptor
extends ImageDescriptor

Abstract base class for image descriptors that synthesize an image from other images in order to simulate the effect of custom drawing. For example, this could be used to superimpose a red bar dexter symbol across an image to indicate that something was disallowed.

Subclasses must implement the getSize and fill methods. Little or no work happens until the image descriptor's image is actually requested by a call to createImage (or to getImageData directly).


Field Summary
 
Fields inherited from class org.eclipse.jface.resource. ImageDescriptor
DEFAULT_IMAGE_DATA
 
Constructor Summary
protected CompositeImageDescriptor ()
          Constructs an uninitialized composite image.
 
Method Summary
protected abstract  void drawCompositeImage (int width, int height)
          Draw the composite images.
protected  void drawImage ( ImageData src, int ox, int oy)
          Draws the given source image data into this composite image at the given position.
  ImageData getImageData ()
          Creates and returns a new SWT ImageData object for this image descriptor.
protected abstract   Point getSize ()
          Return the size of this composite image.
protected  int getTransparentPixel ()
          Return the transparent pixel for the receiver.
protected  void setImageData ( ImageData imageData)
           
 
Methods inherited from class org.eclipse.jface.resource. ImageDescriptor
createFromFile, createFromImage, createFromImage, createFromImageData, createFromURL, createImage, createImage, createImage, createImage, createResource, createWithFlags, destroyResource, getMissingImageDescriptor
 
Methods inherited from class java.lang. Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CompositeImageDescriptor

protected CompositeImageDescriptor()
Constructs an uninitialized composite image.

Method Detail

drawCompositeImage

protected abstract void drawCompositeImage(int width,
                                           int height)
Draw the composite images.

Subclasses must implement this framework method to paint images within the given bounds using one or more calls to the drawImage framework method.

Parameters:
width - the width
height - the height

drawImage

protected final void drawImage(
ImageData src,
                               int ox,
                               int oy)
Draws the given source image data into this composite image at the given position.

Call this internal framework method to superimpose another image atop this composite image.

Parameters:
src - the source image data
ox - the x position
oy - the y position

getImageData

public 
ImageData getImageData()
Description copied from class: ImageDescriptor
Creates and returns a new SWT ImageData object for this image descriptor. Note that each call returns a new SWT image data object.

This framework method is declared public so that it is possible to request an image descriptor's image data without creating an SWT image object.

Returns null if the image data could not be created.

Specified by:
getImageData in class ImageDescriptor
Returns:
a new image data or null

getTransparentPixel

protected int getTransparentPixel()
Return the transparent pixel for the receiver. NOTE This value is not currently in use in the default implementation.

Returns:
int
Since:
3.3

getSize

protected abstract 
Point getSize()
Return the size of this composite image.

Subclasses must implement this framework method.

Returns:
the x and y size of the image expressed as a point object

setImageData

protected void setImageData(
ImageData imageData)
Parameters:
imageData - The imageData to set.
Since:
3.3

Eclipse Platform
Release 3.5

Guidelines for using Eclipse APIs.

Copyright (c) Eclipse contributors and others 2000, 2008. All rights reserved.


 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire