org.dishevelled.iconbundle.impl
Class PNGIconBundle

java.lang.Object
  extended by org.dishevelled.iconbundle.impl.PNGIconBundle
All Implemented Interfaces:
IconBundle

public final class PNGIconBundle
extends java.lang.Object
implements IconBundle

Icon bundle derived from a single base image in PNG format.

Version:
$Revision: 404 $ $Date: 2008-01-02 13:19:59 -0600 (Wed, 02 Jan 2008) $
Author:
Michael Heuer

Constructor Summary
PNGIconBundle(java.io.File file)
          Create a new PNG icon bundle from a base image that will be read from the specified file.
PNGIconBundle(javax.imageio.stream.ImageInputStream imageInputStream)
          Create a new PNG icon bundle from a base image that will be read from the specified image input stream.
PNGIconBundle(java.io.InputStream inputStream)
          Create a new PNG icon bundle from a base image that will be read from the specified input stream.
PNGIconBundle(java.net.URL url)
          Create a new PNG icon bundle from a base image that will be read from the specified URL.
 
Method Summary
 java.awt.Image getImage(java.awt.Component component, IconTextDirection direction, IconState state, IconSize size)
          Return an icon image in the specified icon text direction, size, and state suitable for the specified component.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PNGIconBundle

public PNGIconBundle(java.io.File file)
Create a new PNG icon bundle from a base image that will be read from the specified file.

Parameters:
file - file, must not be null

PNGIconBundle

public PNGIconBundle(java.io.InputStream inputStream)
Create a new PNG icon bundle from a base image that will be read from the specified input stream.

Parameters:
inputStream - input stream, must not be null

PNGIconBundle

public PNGIconBundle(javax.imageio.stream.ImageInputStream imageInputStream)
Create a new PNG icon bundle from a base image that will be read from the specified image input stream.

Parameters:
imageInputStream - image input stream, must not be null

PNGIconBundle

public PNGIconBundle(java.net.URL url)
Create a new PNG icon bundle from a base image that will be read from the specified URL.

Parameters:
url - URL, must not be null
Method Detail

getImage

public java.awt.Image getImage(java.awt.Component component,
                               IconTextDirection direction,
                               IconState state,
                               IconSize size)
Return an icon image in the specified icon text direction, size, and state suitable for the specified component. The specified AWT or Swing component may be null.

Specified by:
getImage in interface IconBundle
Parameters:
component - AWT or Swing component hint, if any
direction - icon text direction, must not be null
state - icon state, must not be null
size - icon size, must not be null
Returns:
an icon image suitable for the specified component


Copyright (c) 2003-2008 held jointly by the individual authors. Licensed under the GNU Lesser General Public License (LGPL).