com.gargoylesoftware.base.gui
public class DefaultComponentLoader extends Object implements ComponentLoader
Version: $Revision: 1.4 $
Field Summary | |
---|---|
Class | clazz_ |
boolean | wrapInJScrollPane_ |
Constructor Summary | |
---|---|
DefaultComponentLoader(String className)
Create a new loader. | |
DefaultComponentLoader(Class clazz)
Create a new loader.
| |
DefaultComponentLoader(Class clazz, boolean wrapInJScrollPane)
Create a new loader.
|
Method Summary | |
---|---|
protected void | assertNotNull(String fieldName, Object object)
Throw an Exception if the specified object is null.
|
Component | loadComponent()
Load the component.
|
Parameters: className The name of the class that will be used to create the new object. This class must have a public no-arg constructor and must be an instance of java.awt.Component.
Throws: ClassNotFoundException If the class cannot be found.
Parameters: clazz The class that will be used to create the new object. This class must have a public no-arg constructor and must be an instance of java.awt.Component.
Parameters: clazz The class that will be used to create the new object. This class must have a public no-arg constructor and must be an instance of java.awt.Component. wrapInJScrollPane If true then the returned component will be a JScrollPane which contains the loaded component.
Parameters: fieldName The name of the field that we are checking. object The value of the field that we are checking
Returns: the loaded component.
Throws: Exception If something went wrong during the creation of the component.