Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.flexstor.common.awt.image
Class ImageGenerator  view ImageGenerator download ImageGenerator.java

java.lang.Object
  extended bycom.flexstor.common.awt.image.ImageGenerator

public class ImageGenerator
extends java.lang.Object

Utility functons to generate images on the fly.

Version:
3.0

Constructor Summary
ImageGenerator()
           
 
Method Summary
static java.awt.Image generateImage(java.util.Hashtable hColors, java.lang.String[] data)
          Generates a image based on a hashtable of colors and an array of Strings.
static java.awt.Image generateImage(java.util.Hashtable hColors, java.lang.StringBuffer[] data)
          Generates a image based on a hashtable of colors and an array of StringBuffers.
static java.lang.Integer prepColor(java.awt.Color color)
           
static java.lang.Integer prepColor(int red, int green, int blue, int alpha)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ImageGenerator

public ImageGenerator()
Method Detail

generateImage

public static java.awt.Image generateImage(java.util.Hashtable hColors,
                                           java.lang.String[] data)
Generates a image based on a hashtable of colors and an array of Strings. Example of a red X on a transparent background: Hashtable hColors = new Hashtable(); hColors.put ( "R", ImageGenerator.prepColor ( Color.red ) ); // Red hColors.put ( " ", ImageGenerator.prepColor ( 0, 0, 0, 0 ) ); // Transparent String saImageData[] = { "RR RR", "RR RR", " RR RR ", " RRRR ", " RR RR ", "RR RR", "RR RR" }; Image i = ImageGenerator.generateImage ( hColors, saImageData );


generateImage

public static java.awt.Image generateImage(java.util.Hashtable hColors,
                                           java.lang.StringBuffer[] data)
Generates a image based on a hashtable of colors and an array of StringBuffers.


prepColor

public static java.lang.Integer prepColor(int red,
                                          int green,
                                          int blue,
                                          int alpha)

prepColor

public static java.lang.Integer prepColor(java.awt.Color color)