com.bankframe.fe.ui
Class ApplicationImages

java.lang.Object
  extended bycom.bankframe.fe.ui.ApplicationImages

public class ApplicationImages
extends java.lang.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 java.lang.String APPLICATION_IMAGES_BUNDLE
           
static java.lang.String IMAGES_DIRECTORY
           
static javax.swing.ImageIcon largeAppLogo
           
static javax.swing.ImageIcon largeOffButton
           
static javax.swing.ImageIcon largeOnButton
           
static javax.swing.ImageIcon mainMenuLogo
           
static javax.swing.ImageIcon smallAppLogo
           
static javax.swing.ImageIcon smallOffButton
           
static javax.swing.ImageIcon smallOnButton
           
 
Constructor Summary
ApplicationImages()
           
 
Method Summary
static javax.swing.ImageIcon getImageIcon(java.lang.String key)
          This method loads an image given it's key name in the ApplicationImages.properties file.
static javax.swing.ImageIcon getImageIconByFile(java.lang.String imageFileName)
          This method loads an image as a local file.
static javax.swing.ImageIcon getImageIconByURL(java.net.URL codeBase, java.lang.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(java.net.URL newCodeBase)
          This method loads the icons from a url.
static void setCodeBase(java.net.URL newCodeBase)
          This method sets the codebase used by the class to load URL images.
static void setCoseBase(java.net.URL newCodeBase)
          This method sets the codebase used by the class to load URL images.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

smallOnButton

public static javax.swing.ImageIcon smallOnButton

smallOffButton

public static javax.swing.ImageIcon smallOffButton

largeOnButton

public static javax.swing.ImageIcon largeOnButton

largeOffButton

public static javax.swing.ImageIcon largeOffButton

smallAppLogo

public static javax.swing.ImageIcon smallAppLogo

largeAppLogo

public static javax.swing.ImageIcon largeAppLogo

mainMenuLogo

public static javax.swing.ImageIcon mainMenuLogo

IMAGES_DIRECTORY

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

APPLICATION_IMAGES_BUNDLE

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

ApplicationImages

public ApplicationImages()
Method Detail

getImageIcon

public static javax.swing.ImageIcon getImageIcon(java.lang.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 javax.swing.ImageIcon getImageIconByFile(java.lang.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 javax.swing.ImageIcon getImageIconByURL(java.net.URL codeBase,
                                                      java.lang.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(java.net.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(java.net.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(java.net.URL newCodeBase)
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.