com.aptana.ide.core.ui
Class ImageUtils

java.lang.Object
  extended by com.aptana.ide.core.ui.ImageUtils

public final class ImageUtils
extends java.lang.Object

ImageUtils

Author:
Paul Colton

Field Summary
static java.util.Hashtable fileIconsHash
          Holds a hash of icons
 
Method Summary
static org.eclipse.swt.graphics.ImageData awtBufferedImageToSWTImageData(java.awt.image.BufferedImage bufferedImage)
          AWTBufferedImageToSWTImageData
static org.eclipse.swt.graphics.Image awtImageIconToSWTImage(javax.swing.Icon icon, org.eclipse.swt.graphics.Color backgroundColor)
          awtImageIconToSWTImage
static org.eclipse.swt.graphics.Image getDriveIcon()
          getDriveIcon
static org.eclipse.swt.graphics.Image getFileIcon()
          getFileIcon
static org.eclipse.swt.graphics.Image getFolderIcon()
          getFolderIcon
static org.eclipse.swt.graphics.Image getIcon(java.io.File file, org.eclipse.swt.graphics.Color backgroundColor)
          Returns an icon representing the specified file.
static org.eclipse.swt.graphics.Image getIcon(java.lang.String extension)
          getIcon Returns the icon for the file type with the specified extension.
static org.eclipse.jface.resource.ImageDescriptor getImageDescriptor(java.lang.String imageFilePath)
          Retrieves the image descriptor associated with resource from the image descriptor registry.
static int loadImageCache(org.eclipse.swt.widgets.Display display)
          loadImageCache
static int saveImageCache()
          saveImageCache
static void shutdownAptanaDB()
          shutdownAptanaDB
static java.awt.Color swtColorToAWTColor(org.eclipse.swt.graphics.Color background)
          SWTColorToAWTColor
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

fileIconsHash

public static java.util.Hashtable fileIconsHash
Holds a hash of icons

Method Detail

getImageDescriptor

public static org.eclipse.jface.resource.ImageDescriptor getImageDescriptor(java.lang.String imageFilePath)
Retrieves the image descriptor associated with resource from the image descriptor registry. If the image descriptor cannot be retrieved, attempt to find and load the image descriptor at the location specified in resource.

Parameters:
imageFilePath - the image descriptor to retrieve
Returns:
The image descriptor associated with resource or the default "missing" image descriptor if one could not be found

getIcon

public static org.eclipse.swt.graphics.Image getIcon(java.io.File file,
                                                     org.eclipse.swt.graphics.Color backgroundColor)
Returns an icon representing the specified file.

Parameters:
file -
backgroundColor -
Returns:
Image

getDriveIcon

public static org.eclipse.swt.graphics.Image getDriveIcon()
getDriveIcon

Returns:
Image

getFolderIcon

public static org.eclipse.swt.graphics.Image getFolderIcon()
getFolderIcon

Returns:
Image

getFileIcon

public static org.eclipse.swt.graphics.Image getFileIcon()
getFileIcon

Returns:
Image

getIcon

public static org.eclipse.swt.graphics.Image getIcon(java.lang.String extension)
getIcon Returns the icon for the file type with the specified extension.

Parameters:
extension -
Returns:
Image

awtImageIconToSWTImage

public static org.eclipse.swt.graphics.Image awtImageIconToSWTImage(javax.swing.Icon icon,
                                                                    org.eclipse.swt.graphics.Color backgroundColor)
awtImageIconToSWTImage

Parameters:
icon -
backgroundColor -
Returns:
Image

swtColorToAWTColor

public static java.awt.Color swtColorToAWTColor(org.eclipse.swt.graphics.Color background)
SWTColorToAWTColor

Parameters:
background -
Returns:
java.awt.Color

awtBufferedImageToSWTImageData

public static org.eclipse.swt.graphics.ImageData awtBufferedImageToSWTImageData(java.awt.image.BufferedImage bufferedImage)
AWTBufferedImageToSWTImageData

Parameters:
bufferedImage -
Returns:
ImageData

loadImageCache

public static int loadImageCache(org.eclipse.swt.widgets.Display display)
loadImageCache

Parameters:
display -
Returns:
int

saveImageCache

public static int saveImageCache()
saveImageCache

Returns:
int

shutdownAptanaDB

public static void shutdownAptanaDB()
shutdownAptanaDB