| |
|
| com.jeta.forms.project.ProjectManager
All known Subclasses: com.jeta.swingbuilder.project.DefaultProjectManager, com.jeta.forms.project.RuntimeProjectManager,
ProjectManager | public interface ProjectManager (Code) | | This interface defines methods for project management. A project is composed
of a set of 'source' directories. The application uses these diectories to
form absolute/relative paths for forms and image resources when in design
mode. When in run mode, the forms are loaded from the classpath. When in
design mode, forms are loaded from the source paths. It is the responsibility
of the ProjectManager to handle loading of form and image resources.
author: Jeff Tassin |
Method Summary | |
public void | clearResourceCache() Clears any cached resources such as images. | public String | getAbsolutePath(String relativePath) Returns a valid absolute path for a resource given only a relative path.
The the registered source paths are searched to determine if the
relativePath exists within one of the source paths. | public String | getRelativePath(String absPath) Returns the relative path given an absolute path to a resource. | public boolean | isValidAbsolutePath(String path) Determines if the given absolute path lies within one of the registered
source directories. | public boolean | isValidResource(String relpath) Returns true if the given relative path exists and is a file. | public ImageIcon | loadImage(String imageName) Utility method that loads an image from the CLASSPATH. |
COMPONENT_ID | final public static String COMPONENT_ID(Code) | | component id for the JETARegistry
|
clearResourceCache | public void clearResourceCache()(Code) | | Clears any cached resources such as images.
|
getAbsolutePath | public String getAbsolutePath(String relativePath)(Code) | | Returns a valid absolute path for a resource given only a relative path.
The the registered source paths are searched to determine if the
relativePath exists within one of the source paths. The source paths are
set by the user for a given project.
a valid absolute path given a relative path. Null is returned ifno resource matches the given relative path. |
getRelativePath | public String getRelativePath(String absPath)(Code) | | Returns the relative path given an absolute path to a resource. The
relative path is determined using the source directories. If the path
does not lie within a source directory, null is returned.
a valid relative package/filename given an absolute path. |
isValidAbsolutePath | public boolean isValidAbsolutePath(String path)(Code) | | Determines if the given absolute path lies within one of the registered
source directories.
true if the given absolute path lies within one of the sourcedirectories. |
isValidResource | public boolean isValidResource(String relpath)(Code) | | Returns true if the given relative path exists and is a file.
true if the given relative resource exists and is a file |
loadImage | public ImageIcon loadImage(String imageName)(Code) | | Utility method that loads an image from the CLASSPATH.
Parameters: imageName - the subdirectory and name of image file (i.e.images/edit16.gif ) |
|
|
|