org.jfree.report.modules.gui.config.model
Class ConfigTreeModuleNode

java.lang.Object
  |
  +--org.jfree.report.modules.gui.config.model.AbstractConfigTreeNode
        |
        +--org.jfree.report.modules.gui.config.model.ConfigTreeModuleNode

public class ConfigTreeModuleNode
extends AbstractConfigTreeNode

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.

Author:
Thomas Morgner

Constructor Summary
ConfigTreeModuleNode(org.jfree.base.modules.Module module, org.jfree.base.config.HierarchicalConfiguration config)
          Creates a new module node for the given module object and report configuration.
 
Method Summary
 void addAssignedKey(ConfigDescriptionEntry key)
          Adds the given key to the list of assigned keys, if not already added.
 boolean getAllowsChildren()
          Returns true if the receiver allows children.
 ConfigDescriptionEntry[] getAssignedKeys()
          Returns the list of assigned keys as object array.
 org.jfree.base.config.HierarchicalConfiguration getConfiguration()
          Returns the report configuration used to fill the values from this node.
 java.lang.String getConfigurationPrefix()
          Returns the configuration prefix of this module.
 org.jfree.base.modules.Module getModule()
          Returns the module represented by this node.
 boolean isLeaf()
          Returns true if the receiver is a leaf.
 void removeAssignedKey(ConfigDescriptionEntry key)
          Removed the given key description from the list of assigned keys.
 java.lang.String toString()
          Returns a string representation of this object.
 
Methods inherited from class org.jfree.report.modules.gui.config.model.AbstractConfigTreeNode
add, children, getChildAt, getChildCount, getIndex, getName, getParent, reset, setParent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ConfigTreeModuleNode

public ConfigTreeModuleNode(org.jfree.base.modules.Module module,
                            org.jfree.base.config.HierarchicalConfiguration config)
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.
Method Detail

getModule

public org.jfree.base.modules.Module getModule()
Returns the module represented by this node.
Returns:
the module used in this node.

getConfiguration

public org.jfree.base.config.HierarchicalConfiguration getConfiguration()
Returns the report configuration used to fill the values from this node.
Returns:
the used report configuration instance.

getConfigurationPrefix

public java.lang.String getConfigurationPrefix()
Returns the configuration prefix of this module.
Returns:
the configuration prefix.

toString

public java.lang.String toString()
Returns a string representation of this object.
Overrides:
toString in class java.lang.Object
Returns:
the string representing this object.
See Also:
Object.toString()

isLeaf

public boolean isLeaf()
Returns true if the receiver is a leaf.
Overrides:
isLeaf in class AbstractConfigTreeNode
Returns:
true if the receiver is a leaf.

getAllowsChildren

public boolean getAllowsChildren()
Returns true if the receiver allows children.
Overrides:
getAllowsChildren in class AbstractConfigTreeNode
Returns:
true if the receiver allows children.

addAssignedKey

public void addAssignedKey(ConfigDescriptionEntry key)
Adds the given key to the list of assigned keys, if not already added.
Parameters:
key - the new key to be added
Throws:
java.lang.NullPointerException - if the given key is null.

removeAssignedKey

public void removeAssignedKey(ConfigDescriptionEntry key)
Removed the given key description from the list of assigned keys.
Parameters:
key - the key that should be removed.
Throws:
java.lang.NullPointerException - if the given key is null.

getAssignedKeys

public ConfigDescriptionEntry[] getAssignedKeys()
Returns the list of assigned keys as object array.
Returns:
the assigned keys as array.