| java.lang.Object com.jgraph.editor.JGraphEditorResources
JGraphEditorResources | public class JGraphEditorResources (Code) | | Manages a set of resource bundles to retrieve keys and reads images and
streams from the classpath. In order to find a key, the class searches all
bundles in inverse insertion order (last inserted first).
|
Field Summary | |
protected static LinkedList | bundles Ordered list of the inserted resource bundles. |
bundles | protected static LinkedList bundles(Code) | | Ordered list of the inserted resource bundles.
|
addBundle | public static void addBundle(String basename)(Code) | | Adds a resource bundle.
Parameters: basename - The basename of the resource bundle to add. |
getBundles | public static LinkedList getBundles()(Code) | | Returns the bundles.
Returns the bundles. |
getImage | public static ImageIcon getImage(String uri)(Code) | | Returns the specified file as an image or null if there
was an exception. Exceptions are silently ignored by this method. This
implementation first tries to load the specified filename from the
classpath. If the file cannot be found, it tries loading it as external
file or URL.
Parameters: uri - The URI to load the image from. Returns the image for filename . See Also: ImageIO.read(java.net.URL) See Also: Class.getResource(java.lang.String) |
getOutputStream | public static OutputStream getOutputStream(String uri) throws FileNotFoundException(Code) | | Returns a buffered output stream for the specified URI or null if there
was an exception.
Parameters: uri - The URI to return the output stream for. Returns an output stream for the specified URI. throws: FileNotFoundException - If the specified URI can not be found. |
getString | public static String getString(String key)(Code) | | Returns the value for key by searching the resource
bundles in inverse order or null if no value can be found
for key .
Parameters: key - The key to be searched for. Returns the value for key or null . See Also: ResourceBundle.getString(java.lang.String) |
getString | public static String getString(String key, Object[] params)(Code) | | Returns the value for key replacing every occurrence of
{i} with params[i] where i is an integer (i =
0, 1, ..., n).
Returns the parametrized value for key . |
setBundles | public static void setBundles(LinkedList bundles)(Code) | | Sets the bundles.
Parameters: bundles - The bundles to set. |
|
|