org.eclipse.gmf.runtime.common.ui.util
Class ShiftedImageDescriptor
java.lang.Object
org.eclipse.jface.resource.DeviceResourceDescriptor
org.eclipse.jface.resource.ImageDescriptor
org.eclipse.jface.resource.CompositeImageDescriptor
org.eclipse.gmf.runtime.common.ui.util.ShiftedImageDescriptor
- public class ShiftedImageDescriptor
- extends CompositeImageDescriptor
An image descriptor that is cached and shifted from the left or from the
top or both. The shifted area contains the original image and the area
on the left or top contains a background color. Both the original image
and background color are specified in the constructor.
|
Method Summary |
protected void |
drawCompositeImage(int width,
int height)
Draw the image in the shifted position |
protected Point |
getSize()
Return the size of the shifted image and cache it |
| 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 |
ShiftedImageDescriptor
public ShiftedImageDescriptor(short shiftX,
short shiftY,
ImageDescriptor imageDescriptor)
- Make a new image descriptor of an image that is shifted.
- Parameters:
shiftX - how much to shift from the leftshiftY - how much to shift from the topimageDescriptor - original image to shift by shiftX and shiftY
drawCompositeImage
protected void drawCompositeImage(int width,
int height)
- Draw the image in the shifted position
- Parameters:
width - int ignoredheight - int ignored- See Also:
CompositeImageDescriptor.drawCompositeImage(int,
int)
getSize
protected Point getSize()
- Return the size of the shifted image and cache it
- Returns:
- Point with the size of the shifted image
- See Also:
CompositeImageDescriptor.getSize()
Guidelines for using Eclipse APIs.
Copyright (c) IBM Corp., Borland Software Corp., and others 2005,2006. All rights reserved.