org.dmonix.util
Class ImageLoaderUtil

java.lang.Object
  extended byorg.dmonix.util.ImageLoaderUtil

public abstract class ImageLoaderUtil
extends java.lang.Object

Utility class for simple loading of the images defined in the dmonix package.

Copyright: Copyright (c) 2004

Company: dmonix.org

Version:
1.0
Author:
Peter Nerg

Field Summary
static java.lang.String PATH_IMG_REPOSITORY
          The base path to the image repository.
static java.lang.String PATH_TOOLBARBUTTONGRAPHICS_DEVELOPMENT
           
static java.lang.String PATH_TOOLBARBUTTONGRAPHICS_GENERAL
           
static java.lang.String PATH_TOOLBARBUTTONGRAPHICS_MEDIA
           
static java.lang.String PATH_TOOLBARBUTTONGRAPHICS_NAVIGATION
           
static java.lang.String PATH_TOOLBARBUTTONGRAPHICS_TABLE
           
static java.lang.String PATH_TOOLBARBUTTONGRAPHICS_TEXT
           
 
Constructor Summary
ImageLoaderUtil()
           
 
Method Summary
static java.awt.image.BufferedImage getBufferedImage(java.io.File file)
          Gets a BufferedImage from a file.
static java.awt.image.BufferedImage getBufferedImage(java.io.File file, double sx, double sy)
          Gets a resized BufferedImage from a file.
static java.awt.image.BufferedImage getBufferedImage(java.io.File file, int width, int height)
          Gets a resized BufferedImage from a file.
static javax.swing.ImageIcon getDmonixLogoBWIcon()
          Get the black and white DMoniX logo.
static java.awt.Image getDmonixLogoBWImage()
          Get the black and white DMoniX logo.
static javax.swing.ImageIcon getDmonixLogoColorIcon()
          Get the color DMoniX logo.
static java.awt.Image getDmonixLogoColorImage()
          Get the color DMoniX logo.
static java.awt.Image getImage(java.lang.String path, java.lang.String imgName)
          Get the image at the specified path.
static javax.swing.ImageIcon getImageIcon(java.lang.String path, java.lang.String imgName)
          Get the image icon at the specified path.
static java.awt.image.BufferedImage resize(java.awt.image.BufferedImage source, double sx, double sy)
          Resizes a BufferedImage to the requested size.
static java.awt.image.BufferedImage resize(java.awt.image.BufferedImage source, int width, int height)
          Resizes a BufferedImage to the requested size.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PATH_IMG_REPOSITORY

public static final java.lang.String PATH_IMG_REPOSITORY
The base path to the image repository.

See Also:
Constant Field Values

PATH_TOOLBARBUTTONGRAPHICS_DEVELOPMENT

public static final java.lang.String PATH_TOOLBARBUTTONGRAPHICS_DEVELOPMENT
See Also:
Constant Field Values

PATH_TOOLBARBUTTONGRAPHICS_GENERAL

public static final java.lang.String PATH_TOOLBARBUTTONGRAPHICS_GENERAL
See Also:
Constant Field Values

PATH_TOOLBARBUTTONGRAPHICS_MEDIA

public static final java.lang.String PATH_TOOLBARBUTTONGRAPHICS_MEDIA
See Also:
Constant Field Values

PATH_TOOLBARBUTTONGRAPHICS_NAVIGATION

public static final java.lang.String PATH_TOOLBARBUTTONGRAPHICS_NAVIGATION
See Also:
Constant Field Values

PATH_TOOLBARBUTTONGRAPHICS_TABLE

public static final java.lang.String PATH_TOOLBARBUTTONGRAPHICS_TABLE
See Also:
Constant Field Values

PATH_TOOLBARBUTTONGRAPHICS_TEXT

public static final java.lang.String PATH_TOOLBARBUTTONGRAPHICS_TEXT
See Also:
Constant Field Values
Constructor Detail

ImageLoaderUtil

public ImageLoaderUtil()
Method Detail

getDmonixLogoColorIcon

public static javax.swing.ImageIcon getDmonixLogoColorIcon()
Get the color DMoniX logo.
/org/dmonix/gui/img/dmonix_logo.gif

Returns:
The logo

getDmonixLogoColorImage

public static java.awt.Image getDmonixLogoColorImage()
Get the color DMoniX logo.
/org/dmonix/gui/img/dmonix_logo.gif

Returns:
The logo

getDmonixLogoBWIcon

public static javax.swing.ImageIcon getDmonixLogoBWIcon()
Get the black and white DMoniX logo.
/org/dmonix/gui/img/dmonix_logo.gif

Returns:
The logo

getDmonixLogoBWImage

public static java.awt.Image getDmonixLogoBWImage()
Get the black and white DMoniX logo.
/org/dmonix/gui/img/dmonix_logo.gif

Returns:
The logo

getImage

public static java.awt.Image getImage(java.lang.String path,
                                      java.lang.String imgName)
Get the image at the specified path.

Parameters:
path - The path to the image
imgName - The name of the image
Returns:
The image

getImageIcon

public static javax.swing.ImageIcon getImageIcon(java.lang.String path,
                                                 java.lang.String imgName)
Get the image icon at the specified path.

Parameters:
path - The path to the image
imgName - The name of the image
Returns:
The image icon

getBufferedImage

public static java.awt.image.BufferedImage getBufferedImage(java.io.File file)
                                                     throws java.io.IOException
Gets a BufferedImage from a file.

Parameters:
file - The image file
Returns:
The BufferedImage
Throws:
java.io.IOException

getBufferedImage

public static java.awt.image.BufferedImage getBufferedImage(java.io.File file,
                                                            double sx,
                                                            double sy)
                                                     throws java.io.IOException
Gets a resized BufferedImage from a file.

Parameters:
file - The image file
sx - Scale width
sy - Scale height
Returns:
The resized BufferedImage
Throws:
java.io.IOException

getBufferedImage

public static java.awt.image.BufferedImage getBufferedImage(java.io.File file,
                                                            int width,
                                                            int height)
                                                     throws java.io.IOException
Gets a resized BufferedImage from a file.

Parameters:
file - The image file
width - The resulting width
height - The resulting height
Returns:
The resized BufferedImage
Throws:
java.io.IOException

resize

public static java.awt.image.BufferedImage resize(java.awt.image.BufferedImage source,
                                                  double sx,
                                                  double sy)
Resizes a BufferedImage to the requested size.

Parameters:
source - The source image
sx - Scale width
sy - Scale height
Returns:
The resulting image

resize

public static java.awt.image.BufferedImage resize(java.awt.image.BufferedImage source,
                                                  int width,
                                                  int height)
Resizes a BufferedImage to the requested size.

Parameters:
source - The source image
width - The resulting width
height - The resulting height
Returns:
The resulting image


Copyright © 1998-2005 dmonix.org Peter Nerg, All Rights Reserved.