com.bankframe.fe.ui
Class ApplicationImages

java.lang.Object
  extended by com.bankframe.fe.ui.ApplicationImages

public class ApplicationImages
extends Object

This class loads and stores all the images used by an application. This class requires all the image files to exist in an images directory of the root of where the application is run. Access to common images are provided via public static variables. Other images can be loaded via the ApplicationImages.properties file and accessed through the getImageIcon() method.


Field Summary
static String APPLICATION_IMAGES_BUNDLE
           
static String IMAGES_DIRECTORY
           
static ImageIcon largeAppLogo
           
static ImageIcon largeOffButton
           
static ImageIcon largeOnButton
           
static ImageIcon mainMenuLogo
           
static ImageIcon smallAppLogo
           
static ImageIcon smallOffButton
           
static ImageIcon smallOnButton
           
 
Constructor Summary
ApplicationImages()
           
 
Method Summary
static ImageIcon getImageIcon(String key)
          This method loads an image given it's key name in the ApplicationImages.properties file.
static ImageIcon getImageIconByFile(String imageFileName)
          This method loads an image as a local file.
static ImageIcon getImageIconByURL(URL codeBase, String imageFileName)
          This method loads an image as a URL.
static void loadImagesByFile()
          This method loads the icons locally from the file system.
static void loadImagesByURL(URL newCodeBase)
          This method loads the icons from a url.
static void setCodeBase(URL newCodeBase)
          This method sets the codebase used by the class to load URL images.
static void setCoseBase(URL newCodeBase)
          Deprecated. As of MCA 4.0, replaced by setCodeBase(URL)
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

smallOnButton

public static ImageIcon smallOnButton

smallOffButton

public static ImageIcon smallOffButton

largeOnButton

public static ImageIcon largeOnButton

largeOffButton

public static ImageIcon largeOffButton

smallAppLogo

public static ImageIcon smallAppLogo

largeAppLogo

public static ImageIcon largeAppLogo

mainMenuLogo

public static ImageIcon mainMenuLogo

IMAGES_DIRECTORY

public static final String IMAGES_DIRECTORY
See Also:
Constant Field Values

APPLICATION_IMAGES_BUNDLE

public static final String APPLICATION_IMAGES_BUNDLE
See Also:
Constant Field Values
Constructor Detail

ApplicationImages

public ApplicationImages()
Method Detail

getImageIcon

public static ImageIcon getImageIcon(String key)
This method loads an image given it's key name in the ApplicationImages.properties file.

Parameters:
key - a key to an image
Returns:
an ImageIcon for the given key

getImageIconByFile

public static ImageIcon getImageIconByFile(String imageFileName)
This method loads an image as a local file. The directory in which the image is located must be in the applications classpath

Parameters:
imageFileName - the filename of the image to get
Returns:
an ImageIcon

getImageIconByURL

public static ImageIcon getImageIconByURL(URL codeBase,
                                          String imageFileName)
This method loads an image as a URL. The image must be located on the applications web server in an images directory.

Parameters:
codeBase - the URL of the web server
imageFileName - the file name of the image to retrieve
Returns:
an ImageIcon

loadImagesByFile

public static void loadImagesByFile()
This method loads the icons locally from the file system.


loadImagesByURL

public static void loadImagesByURL(URL newCodeBase)
This method loads the icons from a url.

Parameters:
newCodeBase - the url codeBase where the icon images are located.

setCodeBase

public static void setCodeBase(URL newCodeBase)
This method sets the codebase used by the class to load URL images.

Parameters:
newCodeBase - the new codebase

setCoseBase

public static void setCoseBase(URL newCodeBase)
Deprecated. As of MCA 4.0, replaced by setCodeBase(URL)

This method sets the codebase used by the class to load URL images.

Parameters:
newCodeBase - the new codebase


Copyright © 2005, 2007, Oracle. All rights reserved.