org.jfree.report.modules.gui.config.model
public class: ConfigTreeModuleNode [javadoc |
source]
java.lang.Object
org.jfree.report.modules.gui.config.model.AbstractConfigTreeNode
org.jfree.report.modules.gui.config.model.ConfigTreeModuleNode
All Implemented Interfaces:
ConfigTreeNode
The config tree module node is used to represent a module in the report configuration.
Modules collect all task-specific configuration keys and represent a report module from
the package manager.
It is assumed, that all modules define their keys within the namespace of their
package.
| Constructor: |
public ConfigTreeModuleNode(Module module,
HierarchicalConfiguration config) {
super(module.getName());
this.assignedKeys = new ArrayList();
this.configuration = config;
this.module = module;
configurationPrefix = ModuleNodeFactory.getPackage(this.module.getClass());
}
Creates a new module node for the given module object and report configuration. Parameters:
module - the module for which to build a tree node.
config - the report configuration from where to read the keys.
|
| Methods from org.jfree.report.modules.gui.config.model.AbstractConfigTreeNode: |
|---|
|
add, children, getAllowsChildren, getChildAt, getChildCount, getIndex, getName, getParent, isLeaf, reset, setParent |
| Method from org.jfree.report.modules.gui.config.model.ConfigTreeModuleNode Detail: |
public void addAssignedKey(ConfigDescriptionEntry key) {
if (key == null)
{
throw new NullPointerException();
}
if (assignedKeys.contains(key) == false)
{
assignedKeys.add(key);
}
}
Adds the given key to the list of assigned keys, if not already added. |
public boolean getAllowsChildren() {
return false;
}
Returns true if the receiver allows children. |
public ConfigDescriptionEntry[] getAssignedKeys() {
return (ConfigDescriptionEntry[]) assignedKeys.toArray
(new ConfigDescriptionEntry[assignedKeys.size()]);
}
Returns the list of assigned keys as object array. |
public HierarchicalConfiguration getConfiguration() {
return configuration;
}
Returns the report configuration used to fill the values from this node. |
public String getConfigurationPrefix() {
return configurationPrefix;
}
Returns the configuration prefix of this module. |
public Module getModule() {
return module;
}
Returns the module represented by this node. |
public boolean isLeaf() {
return true;
}
Returns true if the receiver is a leaf. |
public void removeAssignedKey(ConfigDescriptionEntry key) {
if (key == null)
{
throw new NullPointerException();
}
assignedKeys.remove(key);
}
Removed the given key description from the list of assigned keys. |
public String toString() {
final StringBuffer buffer = new StringBuffer();
buffer.append("ConfigTreeModule={"); //$NON-NLS-1$
buffer.append(getConfigurationPrefix());
buffer.append('}");
return buffer.toString();
}
Returns a string representation of this object. |