net.sourceforge.geeboss.util
Class ImageUtil

java.lang.Object
  extended by net.sourceforge.geeboss.util.ImageUtil

public class ImageUtil
extends java.lang.Object

Utility class for some Image / Icon concerns in Geeboss


Field Summary
static org.eclipse.swt.graphics.Color mGrayViewFormColor
          Gray ViewForm color
static org.eclipse.swt.graphics.Color mHeaderColor
          Make the headerColor accessible from all Objects
static org.eclipse.swt.graphics.Image mIconBlueStripes
          Some multiple used Icons in Geeboss
static org.eclipse.swt.graphics.Image mIconCancelOperation
          Some multiple used Icons in Geeboss
static org.eclipse.swt.graphics.Image mIconCancelOperationDisabled
          Some multiple used Icons in Geeboss
static org.eclipse.swt.graphics.Image mIconCopy
          Some multiple used Icons in Geeboss
static org.eclipse.swt.graphics.Image mIconError
          Some multiple used Icons in Geeboss
static org.eclipse.swt.graphics.Image mIconFolder
          Some multiple used Icons in Geeboss
static org.eclipse.swt.graphics.Image[] mIconGeeboss
          Some multiple used Icons in Geeboss
static org.eclipse.swt.graphics.Image mIconSkip
          Some multiple used Icons in Geeboss
static org.eclipse.swt.graphics.Image mIconSkipDisabled
          Some multiple used Icons in Geeboss
static org.eclipse.swt.graphics.Image mIconStop
          Some multiple used Icons in Geeboss
static org.eclipse.swt.graphics.Image mIconValidate
          Some multiple used Icons in Geeboss
static org.eclipse.swt.graphics.Image mIconWarning
          Some multiple used Icons in Geeboss
 
Method Summary
static void disposeIcons()
          Dispose icons
static org.eclipse.swt.graphics.Image getFilledImage(org.eclipse.swt.widgets.Display display, org.eclipse.swt.graphics.RGB color, int width, int height)
          Fill an Image with a given color
static org.eclipse.swt.graphics.Image getLanguageFlag(java.lang.String locale, java.lang.Class curClass)
          Get the correct flag for the given language.
static org.eclipse.swt.graphics.Image getProgressIcon(int value)
          Get the progress icon for the given value.
static void initHeaderColor(org.eclipse.swt.widgets.Display display, org.eclipse.swt.graphics.RGB color)
          Set the color for the header of the ViewForms in Geeboss
static void initIcons(org.eclipse.swt.widgets.Display display, java.lang.Class mainClass)
          Initialize the multiple used icons
static boolean isset(org.eclipse.swt.graphics.Image image)
          Check the given Image for being NULL or disposed.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mGrayViewFormColor

public static org.eclipse.swt.graphics.Color mGrayViewFormColor
Gray ViewForm color


mHeaderColor

public static org.eclipse.swt.graphics.Color mHeaderColor
Make the headerColor accessible from all Objects


mIconBlueStripes

public static org.eclipse.swt.graphics.Image mIconBlueStripes
Some multiple used Icons in Geeboss


mIconCancelOperation

public static org.eclipse.swt.graphics.Image mIconCancelOperation
Some multiple used Icons in Geeboss


mIconCancelOperationDisabled

public static org.eclipse.swt.graphics.Image mIconCancelOperationDisabled
Some multiple used Icons in Geeboss


mIconCopy

public static org.eclipse.swt.graphics.Image mIconCopy
Some multiple used Icons in Geeboss


mIconError

public static org.eclipse.swt.graphics.Image mIconError
Some multiple used Icons in Geeboss


mIconFolder

public static org.eclipse.swt.graphics.Image mIconFolder
Some multiple used Icons in Geeboss


mIconGeeboss

public static org.eclipse.swt.graphics.Image[] mIconGeeboss
Some multiple used Icons in Geeboss


mIconSkip

public static org.eclipse.swt.graphics.Image mIconSkip
Some multiple used Icons in Geeboss


mIconSkipDisabled

public static org.eclipse.swt.graphics.Image mIconSkipDisabled
Some multiple used Icons in Geeboss


mIconStop

public static org.eclipse.swt.graphics.Image mIconStop
Some multiple used Icons in Geeboss


mIconValidate

public static org.eclipse.swt.graphics.Image mIconValidate
Some multiple used Icons in Geeboss


mIconWarning

public static org.eclipse.swt.graphics.Image mIconWarning
Some multiple used Icons in Geeboss

Method Detail

disposeIcons

public static void disposeIcons()
Dispose icons


getFilledImage

public static org.eclipse.swt.graphics.Image getFilledImage(org.eclipse.swt.widgets.Display display,
                                                            org.eclipse.swt.graphics.RGB color,
                                                            int width,
                                                            int height)
Fill an Image with a given color

Parameters:
display - The display as device for the color
color - The color to display
width - Width of the image
height - Height of the image
Returns:
Image Filled image

getLanguageFlag

public static org.eclipse.swt.graphics.Image getLanguageFlag(java.lang.String locale,
                                                             java.lang.Class curClass)
Get the correct flag for the given language. If a flag for the given language is not found, return the "unknown" flag.

Parameters:
locale - The language
curClass - Current class
Returns:
An image that displays the flag

getProgressIcon

public static org.eclipse.swt.graphics.Image getProgressIcon(int value)
Get the progress icon for the given value.

Parameters:
value - The value (20, 40, 60, 80, 100)
Returns:
Image The image of the progress bar

initHeaderColor

public static void initHeaderColor(org.eclipse.swt.widgets.Display display,
                                   org.eclipse.swt.graphics.RGB color)
Set the color for the header of the ViewForms in Geeboss

Parameters:
display - The display

initIcons

public static void initIcons(org.eclipse.swt.widgets.Display display,
                             java.lang.Class mainClass)
Initialize the multiple used icons

Parameters:
display - The display
mainClass - to access the JAR

isset

public static boolean isset(org.eclipse.swt.graphics.Image image)
Check the given Image for being NULL or disposed. Return false in that case.

Parameters:
image - The image to check
Returns:
boolean true if the Image is available


Copyright (c) 2005 The Geeboss team (http://geeboss.sourceforge.net). All Rights Reserved.