Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| WebLogic Integration
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.bea.wlpi.client.common
Class ImageFactory

    java.lang.Object
      |
      +--com.bea.wlpi.client.common.ImageFactory

public class ImageFactory
extends java.lang.Object

A static factory class that creates and caches images and icons. This class is provided to enable access to images in JAR files, because the `ImageIcon(URL)` constructor now requires an absolute URL that references the actual JAR file in which the image is located. Pre JDK 1.1 releases used sun.net.* classes to search all JARs referenced in an applet's ARCHIVE tag, but this is no longer the case.

Author:
  Copyright © 2000, 2001 BEA Systems, Inc. All Rights Reserved.

Method Summary
`static javax.swing.ImageIcon` | `getIcon(java.lang.String name)` An icon constructed from the specified resource.
`static java.lang.String` | `getName(javax.swing.ImageIcon icon)` Get the resource name used to construct the specified icon.
`static java.net.URL` | `getResource(java.lang.String name)` Get a URL for the specified resource.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Method Detail

### getIcon

    public static javax.swing.ImageIcon getIcon(java.lang.String name)

  An icon constructed from the specified resource. The class caches Icons internally, and it is the cached icon that this method returns.

  Parameters:
    `name` - Resource name (fully qualified with '/' separators).
  Returns:
    The requested icon.

### getName

    public static java.lang.String getName(javax.swing.ImageIcon icon)

  Get the resource name used to construct the specified icon. The icon is assumed to have been created by a prior call to `getIcon(java.lang.String)`.

  Parameters:
    `icon` - Existing icon object.
  Returns:
    The original resource name (if known).

### getResource

    public static java.net.URL getResource(java.lang.String name)

  Get a URL for the specified resource. The method constructs the URL by this using the calling class's own ClassLoader, thus using the same protocol and codebase.

  Parameters:
    `name` - Resource name (fully qualified with '/' separators).
  Returns:
    A URL for the specified resource name.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| WebLogic Integration
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

WebLogic Integration (WLI)