|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.melloware.jukes.file.image.ImageFactory
public final class ImageFactory
Class to represent and storage area for all icon references. This will reduce overhead and memory usage throughout the application. Also contains some static helper methods for loading and scaling images.
Copyright: Copyright (c) 2006
Company: Melloware, Inc.
| Field Summary | |
|---|---|
static ImageIcon |
ICO_TRAYICON
|
static ImageIcon |
ICO_TRAYPAUSE
|
static ImageIcon |
ICO_TRAYPLAY
|
static ImageIcon |
ICO_TRAYSTOP
|
static ImageIcon |
IMAGE_NOCOVER
|
static Settings |
settings
EAL |
| Method Summary | |
|---|---|
static ImageIcon |
getDiscImage(String aFileName)
Gets the disc and returns it the correct size. |
static ImageIcon |
getIconFromFile(String aFileName)
Method to create a new ImageIcon and return the reference |
static Image |
getImageFromUrl(String aUrl)
Gets an Image from the URL specified. |
static ImageIcon |
getScaledImage(String aFileName,
int height,
int width)
Gets an ImageIcon and scales it to the size requested. |
static File |
saveImage(Image image,
String filename)
Saves an image file to disk in the location specified. |
static String |
saveImageToUserDefinedDirectory(File imageFile,
String aArtist,
String aDisc,
String aYear)
AZ |
static String |
saveImageWithFileFormat(Image image,
String aFormat,
String aDirectory,
String aArtist,
String aDisc,
String aYear)
Saves this image file based on a format from prefs. |
static void |
setSettings(Settings aSettings)
EAL |
static String |
standardImageFileName(String aArtist,
String aDisc,
String aYear)
AZ |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final ImageIcon ICO_TRAYICON
public static final ImageIcon ICO_TRAYPLAY
public static final ImageIcon ICO_TRAYPAUSE
public static final ImageIcon ICO_TRAYSTOP
public static final ImageIcon IMAGE_NOCOVER
public static Settings settings
| Method Detail |
|---|
public static void setSettings(Settings aSettings)
public static ImageIcon getDiscImage(String aFileName)
aFileName - the file location of the disc
public static ImageIcon getIconFromFile(String aFileName)
aFileName - filename of icon to load
public static Image getImageFromUrl(String aUrl)
aUrl - the URL to look for the image
public static ImageIcon getScaledImage(String aFileName,
int height,
int width)
aFileName - the filename to getheight - the desired height of the imagewidth - the desired width of the image
public static File saveImage(Image image,
String filename)
throws IOException
image - the image to savefilename - the file to save it as
IOException - if any error occurs writing the file.
public static String saveImageWithFileFormat(Image image,
String aFormat,
String aDirectory,
String aArtist,
String aDisc,
String aYear)
throws IOException
image - the image to saveaFormat - the string format like %a - %d = Black Crowes - Amorica.jpgaDirectory - the directory to save the file in.aArtist - the name of the artistaDisc - the name of the disc
IOException - if any error occurs writing the file out
public static String saveImageToUserDefinedDirectory(File imageFile,
String aArtist,
String aDisc,
String aYear)
throws IOException
IOException
public static String standardImageFileName(String aArtist,
String aDisc,
String aYear)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||