org.jfree.report.modules.gui.config.model
Class ModuleNodeFactory
java.lang.Object
|
+--org.jfree.report.modules.gui.config.model.ModuleNodeFactory
- public class ModuleNodeFactory
- extends java.lang.Object
The module node factory is used to build the lists of modules and their assigned keys
for the ConfigTreeModel.
- Author:
- Thomas Morgner
|
Constructor Summary |
ModuleNodeFactory(java.io.InputStream in)
Creates a new module node factory and initializes the factory from the given input
stream. |
|
Method Summary |
ConfigDescriptionEntry |
getEntryForKey(java.lang.String key)
Returns the entry for the given key or null, if the key has no metadata. |
java.util.ArrayList |
getGlobalNodes()
Returns all global nodes. |
java.util.ArrayList |
getLocalNodes()
Returns all local nodes. |
static java.lang.String |
getPackage(java.lang.Class c)
Returns the name of the package for the given class. |
void |
init(org.jfree.base.config.HierarchicalConfiguration config)
(Re)Initializes the factory from the given report configuration. |
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
ModuleNodeFactory
public ModuleNodeFactory(java.io.InputStream in)
throws java.io.IOException
- Creates a new module node factory and initializes the factory from the given input
stream. The stream will be used to build a ConfigDescription model and should contain
suitable XML content.
- Parameters:
in - the input stream from where to read the model content.- Throws:
- java.io.IOException - if an error occured while reading the stream.
init
public void init(org.jfree.base.config.HierarchicalConfiguration config)
throws ConfigTreeModelException
- (Re)Initializes the factory from the given report configuration. This will assign all
keys frmo the report configuration to the model and assignes the definition from the
configuration description if possible.
- Parameters:
config - the report configuration that contains the keys.- Throws:
- ConfigTreeModelException - if an error occurs.
getPackage
public static java.lang.String getPackage(java.lang.Class c)
- Returns the name of the package for the given class. This is a workaround for the
classloader behaviour of JDK1.2.2 where no package objects are created.
- Parameters:
c - the class for which we search the package.- Returns:
- the name of the package, never null.
getGlobalNodes
public java.util.ArrayList getGlobalNodes()
- Returns all global nodes. You have to initialize the factory before using this
method.
- Returns:
- the list of all global nodes.
getLocalNodes
public java.util.ArrayList getLocalNodes()
- Returns all local nodes. You have to initialize the factory before using this
method.
- Returns:
- the list of all global nodes.
getEntryForKey
public ConfigDescriptionEntry getEntryForKey(java.lang.String key)
- Returns the entry for the given key or null, if the key has no metadata.
- Parameters:
key - the name of the key- Returns:
- the entry or null if not found.