FileDocCategorySizeDatePackage
UISwingImageRepository.javaAPI DocAzureus 3.0.3.42050Thu Sep 23 06:52:08 BST 2004org.gudy.azureus2.ui.swing

UISwingImageRepository

public class UISwingImageRepository extends Object
author
parg

Fields Summary
Constructors Summary
Methods Summary
public static javax.swing.IcongetIcon(java.lang.String name)

		Image	image = getImage( name );
		
		return( image==null?null:new ImageIcon( image ));
	
public static javax.swing.IcongetIcon(java.io.InputStream is)

		Image	image = getImage( is );
		
		return( image==null?null:new ImageIcon( image ));
	
public static java.awt.ImagegetImage(java.lang.String name)

		try{
			return(ImageIO.read(UIImageRepository.getImageAsStream(name)));
			
		}catch( Throwable e ){
	
				// some versions of Opera don't have the imageio stuff available it seems
				// so catch all errors and return null
			
			Debug.printStackTrace( e );
			
			return( null );
		}
	
public static java.awt.ImagegetImage(java.io.InputStream is)

		try{
			return(ImageIO.read(is));
			
		}catch( Throwable e ){
			
			Debug.printStackTrace( e );
			
			return( null );
		}	
	
public static java.io.InputStreamgetImageAsStream(java.lang.String name)

		return( UIImageRepository.getImageAsStream(name));