com.phoenix_int.aserver.util
Class PHXIcon

java.lang.Object
  extended by com.phoenix_int.aserver.util.PHXIcon

public class PHXIcon
extends java.lang.Object

This class provides utility functions for loading and creating an icon file


Constructor Summary
PHXIcon()
          creates an icon with values set to "unknown"
PHXIcon(byte[] iconData, java.lang.String iconType)
           
PHXIcon(java.lang.String iconFileName)
           
 
Method Summary
 byte[] getData()
          retrieves the data for the image
 java.lang.String getType()
          retrieves the type for the image
 java.awt.Image toImage()
          converts the icon to an Image
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PHXIcon

public PHXIcon()
creates an icon with values set to "unknown"


PHXIcon

public PHXIcon(java.lang.String iconFileName)
        throws java.io.IOException
Parameters:
iconFileName - the file containing the icon
Throws:
java.io.IOException - thrown if there is a problem opening or reading the icon file

PHXIcon

public PHXIcon(byte[] iconData,
               java.lang.String iconType)
Parameters:
iconData - the data making up the file
iconType - the data type (gif, jpg, etc)
Method Detail

getData

public byte[] getData()
retrieves the data for the image

Returns:
the data for the image

getType

public java.lang.String getType()
retrieves the type for the image

Returns:
the type for the image

toImage

public java.awt.Image toImage()
converts the icon to an Image