|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.gargoylesoftware.base.gui.DefaultComponentLoader
A default implementation of ComponentLoader that uses reflection to instantiate components.
| Constructor Summary | |
DefaultComponentLoader(Class clazz)
Create a new loader. |
|
DefaultComponentLoader(Class clazz,
boolean wrapInJScrollPane)
Create a new loader. |
|
DefaultComponentLoader(String className)
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. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public DefaultComponentLoader(String className)
throws ClassNotFoundException
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.
ClassNotFoundException - If the class cannot be found.public DefaultComponentLoader(Class clazz)
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.
public DefaultComponentLoader(Class clazz,
boolean wrapInJScrollPane)
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.| Method Detail |
public Component loadComponent()
throws Exception
loadComponent in interface ComponentLoaderException - If something went wrong during the creation of the component.
protected final void assertNotNull(String fieldName,
Object object)
fieldName - The name of the field that we are checking.object - The value of the field that we are checking
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||