com.swtdesigner
类 SwingResourceManager

java.lang.Object
  继承者 com.swtdesigner.SwingResourceManager

public class SwingResourceManager
extends java.lang.Object

Utility class for managing resources such as colors, fonts, images, etc. This class may be freely distributed as part of any application or plugin.

Copyright (c) 2003 - 2004, Instantiations, Inc.
All Rights Reserved

作者:
scheglov_ke

构造函数摘要
SwingResourceManager()
           
 
方法摘要
static void clearImages(java.lang.String section)
          Clear cached images in specified section
static javax.swing.ImageIcon getIcon(java.lang.Class<?> clazz, java.lang.String path)
          Returns an icon stored in the file at the specified path relative to the specified class
static javax.swing.ImageIcon getIcon(java.awt.Image image)
          Returns an icon based on the specified image
static javax.swing.ImageIcon getIcon(java.lang.String path)
          Returns an icon stored in the file at the specified path
static javax.swing.ImageIcon getIcon(java.lang.String section, java.lang.String path)
          Returns an icon stored in the file at the specified path
static java.awt.Image getImage(java.lang.Class<?> clazz, java.lang.String path)
          Returns an image stored in the file at the specified path relative to the specified class
static java.awt.Image getImage(java.lang.String path)
          Returns an image stored in the file at the specified path
static java.awt.Image getImage(java.lang.String section, java.lang.String path)
          Returns an image stored in the file at the specified path
 
从类 java.lang.Object 继承的方法
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

构造函数详细信息

SwingResourceManager

public SwingResourceManager()
方法详细信息

getImage

public static java.awt.Image getImage(java.lang.Class<?> clazz,
                                      java.lang.String path)
Returns an image stored in the file at the specified path relative to the specified class

参数:
clazz - Class The class relative to which to find the image
path - String The path to the image file
返回:
Image The image stored in the file at the specified path

getImage

public static java.awt.Image getImage(java.lang.String path)
Returns an image stored in the file at the specified path

参数:
path - String The path to the image file
返回:
Image The image stored in the file at the specified path

getImage

public static java.awt.Image getImage(java.lang.String section,
                                      java.lang.String path)
Returns an image stored in the file at the specified path

参数:
section - String The storage section in the cache
path - String The path to the image file
返回:
Image The image stored in the file at the specified path

clearImages

public static void clearImages(java.lang.String section)
Clear cached images in specified section

参数:
section - the section do clear

getIcon

public static javax.swing.ImageIcon getIcon(java.lang.Class<?> clazz,
                                            java.lang.String path)
Returns an icon stored in the file at the specified path relative to the specified class

参数:
clazz - Class The class relative to which to find the icon
path - String The path to the icon file
返回:
Icon The icon stored in the file at the specified path

getIcon

public static javax.swing.ImageIcon getIcon(java.lang.String path)
Returns an icon stored in the file at the specified path

参数:
path - String The path to the icon file
返回:
Icon The icon stored in the file at the specified path

getIcon

public static javax.swing.ImageIcon getIcon(java.lang.String section,
                                            java.lang.String path)
Returns an icon stored in the file at the specified path

参数:
section - String The storage section in the cache
path - String The path to the icon file
返回:
Icon The icon stored in the file at the specified path

getIcon

public static javax.swing.ImageIcon getIcon(java.awt.Image image)
Returns an icon based on the specified image

参数:
image - Image The original image
返回:
Icon The icon based on the image