net.artima.place
Interface ResourceInfo

All Superinterfaces:
java.io.Serializable
All Known Implementing Classes:
PropertyFileResourceInfo

public interface ResourceInfo
extends java.io.Serializable

A bundle of information about a resource represented by a Link.


Field Summary
static int ICON_COLOR_16x16
          Constant to indicate a 16 x 16 color icon.
static int ICON_COLOR_32x32
          Constant to indicate a 32 x 32 color icon.
static int ICON_MONO_16x16
          Constant to indicate a 16 x 16 monochrome icon.
static int ICON_MONO_32x32
          Constant to indicate a 32 x 32 monochrome icon.
 
Method Summary
 java.lang.String getDescription()
          Gets a short description for this resource, suitable for presentation to users, under the current locale.
 java.lang.String getDescription(java.util.Locale locale)
          Gets a short description for this resource, suitable for presentation to users, under the specified locale.
 java.net.URL getIconImageFile(int iconKind)
          Gets a URL for the image file of an icon for this resource, suitable for presentation to users, under the current locale.
 java.net.URL getIconImageFile(java.util.Locale locale, int iconKind)
          Gets a URL for the image file of an icon for this resource, suitable for presentation to users, under the specified locale.
 java.io.InputStream getIconImageFileAsStream(int iconKind)
          Gets an InputStream for the image file of an icon for this resource, suitable for presentation to users, under the current locale.
 java.io.InputStream getIconImageFileAsStream(java.util.Locale locale, int iconKind)
          Gets an InputStream for the image file of an icon for this resource, suitable for presentation to users, under the specified locale.
 java.lang.String getName()
          Gets the name of this resource, suitable for presentation to users,.
 java.lang.String getName(java.util.Locale locale)
          Gets the name of this resource, suitable for presentation to users.
 java.util.Locale[] getSupportedLocales()
          Returns an array of locales supported by this ResourceInfo.
 

Field Detail

ICON_COLOR_16x16

public static final int ICON_COLOR_16x16
Constant to indicate a 16 x 16 color icon. (Same value as java.beans.BeanInfo.ICON_COLOR_16x16.)

ICON_COLOR_32x32

public static final int ICON_COLOR_32x32
Constant to indicate a 32 x 32 color icon. (Same value as java.beans.BeanInfo.ICON_COLOR_32x32.)

ICON_MONO_16x16

public static final int ICON_MONO_16x16
Constant to indicate a 16 x 16 monochrome icon. (Same value as java.beans.BeanInfo.ICON_MONO_16x16.)

ICON_MONO_32x32

public static final int ICON_MONO_32x32
Constant to indicate a 32 x 32 monochrome icon. (Same value as java.beans.BeanInfo.ICON_MONO_32x32.)
Method Detail

getSupportedLocales

public java.util.Locale[] getSupportedLocales()
Returns an array of locales supported by this ResourceInfo. In other words, this ResourceInfo will be able to return user oriented data for each locale in the returned array.

getName

public java.lang.String getName()
Gets the name of this resource, suitable for presentation to users,. under the current locale.

getName

public java.lang.String getName(java.util.Locale locale)
Gets the name of this resource, suitable for presentation to users. under the specified locale.

getDescription

public java.lang.String getDescription()
Gets a short description for this resource, suitable for presentation to users, under the current locale.

getDescription

public java.lang.String getDescription(java.util.Locale locale)
Gets a short description for this resource, suitable for presentation to users, under the specified locale.

getIconImageFile

public java.net.URL getIconImageFile(int iconKind)
Gets a URL for the image file of an icon for this resource, suitable for presentation to users, under the current locale. (The image file is likely either a GIF or JPG file, but could be any image file format.) The valid parameter values are the same as for the getIcon method of java.beans.BeanInfo, which for convenience are also declared in this interface: ICON_COLOR_16x16, ICON_COLOR_32x32, ICON_MONO_16x16, ICON_MONO_32x32.

getIconImageFileAsStream

public java.io.InputStream getIconImageFileAsStream(int iconKind)
Gets an InputStream for the image file of an icon for this resource, suitable for presentation to users, under the current locale. (The image file is likely either a GIF or JPG file, but could be any image file format.) The valid parameter values are the same as for the getIcon method of java.beans.BeanInfo, which for convenience are also declared in this interface: ICON_COLOR_16x16, ICON_COLOR_32x32, ICON_MONO_16x16, ICON_MONO_32x32.

getIconImageFile

public java.net.URL getIconImageFile(java.util.Locale locale,
                                     int iconKind)
Gets a URL for the image file of an icon for this resource, suitable for presentation to users, under the specified locale. (The image file is likely either a GIF or JPG file, but could be any image file format.) The valid parameter values are the same as for the getIcon method of java.beans.BeanInfo, which for convenience are also declared in this interface: ICON_COLOR_16x16, ICON_COLOR_32x32, ICON_MONO_16x16, ICON_MONO_32x32.

getIconImageFileAsStream

public java.io.InputStream getIconImageFileAsStream(java.util.Locale locale,
                                                    int iconKind)
Gets an InputStream for the image file of an icon for this resource, suitable for presentation to users, under the specified locale. (The image file is likely either a GIF or JPG file, but could be any image file format.) The valid parameter values are the same as for the getIcon method of java.beans.BeanInfo, which for convenience are also declared in this interface: ICON_COLOR_16x16, ICON_COLOR_32x32, ICON_MONO_16x16, ICON_MONO_32x32.