com.partnersoft.gui
Class ImageLib

java.lang.Object
  extended by com.partnersoft.gui.ImageLib

public class ImageLib
extends java.lang.Object

A GUI library class.

Author:
Paul Reavis Copyright 1998 Partner Software, Inc.

Field Summary
static java.lang.String[] imageFileExtensions
          The standard file extensions used for images, in the order searched.
 
Constructor Summary
ImageLib()
           
 
Method Summary
static java.awt.Image clientLogo()
          Returns a client logo if it exists, otherwise defaults to the Partner logo.
static java.awt.Image fetchImage(java.lang.String path)
          Returns a named image from the classpath.
static java.io.File fileForImagePath(java.lang.String imagePath)
          Returns a file for an image "path".
static java.awt.Image filterImage(java.awt.Image image, java.awt.image.ImageFilter filter)
          I can never remember how to do this, so here's a convenience method.
static void forceLoadImage(java.awt.Image imagineAllThePeople)
           
static java.awt.Image getImage(java.lang.String path)
          Returns an image from the local filesystem.
static java.awt.Image getUncachedImage(java.lang.String path)
          Returns an image from the local filesystem (no caching is done).
static java.awt.Image haloImage(java.awt.Image source)
           
static java.awt.Image offsetImage(java.awt.Image original, int deltaX, int deltaY)
          Offsets an image within a larger image.
static java.awt.Image partnerLogo()
          Returns a handy partner logo.
static java.awt.Image partnerLogoNoText()
          Returns a handy partner logo (no text).
static java.awt.Image questionMark()
          Returns a handy question mark - usually used to indicate loading errors for icons..
static java.awt.Image rotateImage(java.awt.Image original, double theta)
          Rotates an image by any angle.
static java.awt.Image rotateSquareImage(java.awt.Image source, int quarters)
          Rotates an image precisely to a cardinal direction (multiple of ninety degrees) and returns a result.
static void setHaloColor(java.awt.Color color)
           
static java.awt.Image smallPartnerLogo()
          Returns a handy small partner logo.
static java.awt.Image tinyPartnerLogo()
          Returns a tiny (16x16) partner logo.
static java.awt.Image translucentDot()
          Returns a (handy?) translucent dot.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

imageFileExtensions

public static final java.lang.String[] imageFileExtensions
The standard file extensions used for images, in the order searched.

Constructor Detail

ImageLib

public ImageLib()
Method Detail

fileForImagePath

public static java.io.File fileForImagePath(java.lang.String imagePath)
Returns a file for an image "path". This path can be either the full name given (assuming it has an extension like ".png") or the first version of that with the extension ".png", ".jpeg", ".jpg", or ".gif" (in that order). Returns null if none.


partnerLogoNoText

public static java.awt.Image partnerLogoNoText()
Returns a handy partner logo (no text).


partnerLogo

public static java.awt.Image partnerLogo()
Returns a handy partner logo.


smallPartnerLogo

public static java.awt.Image smallPartnerLogo()
Returns a handy small partner logo.


tinyPartnerLogo

public static java.awt.Image tinyPartnerLogo()
Returns a tiny (16x16) partner logo.


translucentDot

public static java.awt.Image translucentDot()
Returns a (handy?) translucent dot.


clientLogo

public static java.awt.Image clientLogo()
Returns a client logo if it exists, otherwise defaults to the Partner logo. Client logo lives in Shared/resources/icons/ClientLogo.*.


questionMark

public static java.awt.Image questionMark()
Returns a handy question mark - usually used to indicate loading errors for icons..


fetchImage

public static java.awt.Image fetchImage(java.lang.String path)
Returns a named image from the classpath.


getImage

public static java.awt.Image getImage(java.lang.String path)
Returns an image from the local filesystem.


getUncachedImage

public static java.awt.Image getUncachedImage(java.lang.String path)
Returns an image from the local filesystem (no caching is done).


forceLoadImage

public static void forceLoadImage(java.awt.Image imagineAllThePeople)

setHaloColor

public static void setHaloColor(java.awt.Color color)

filterImage

public static java.awt.Image filterImage(java.awt.Image image,
                                         java.awt.image.ImageFilter filter)
I can never remember how to do this, so here's a convenience method.


haloImage

public static java.awt.Image haloImage(java.awt.Image source)

rotateImage

public static java.awt.Image rotateImage(java.awt.Image original,
                                         double theta)
Rotates an image by any angle.


offsetImage

public static java.awt.Image offsetImage(java.awt.Image original,
                                         int deltaX,
                                         int deltaY)
Offsets an image within a larger image.


rotateSquareImage

public static java.awt.Image rotateSquareImage(java.awt.Image source,
                                               int quarters)
Rotates an image precisely to a cardinal direction (multiple of ninety degrees) and returns a result.