|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object edu.cs.ai.kreator.control.config.ConfigurationObject edu.cs.ai.kreator.control.config.ConfigurationCategory
public class ConfigurationCategory
This class encapsulates a set of configuration options (and maybe a set of sub-categories) under a common category.
Field Summary |
---|
Fields inherited from class edu.cs.ai.kreator.control.config.ConfigurationObject |
---|
IS_EDITABLE, IS_INVISIBLE, IS_NOT_EDITABLE, IS_VISIBLE, PATHCAPTION_DELIMITER, PATHID_DELIMITER |
Constructor Summary | |
---|---|
ConfigurationCategory(java.lang.String id,
java.lang.String caption,
java.lang.String description)
Creates a new configuration category with the given caption and id, empty sub-categories, and empty options that is both visible and editable. |
|
ConfigurationCategory(java.lang.String id,
java.lang.String caption,
java.lang.String description,
int visible,
int editable)
Creates a new configuration category with the given caption,the given visibility, and the given editibility, empty sub-categories. |
Method Summary | |
---|---|
void |
add(ConfigurationObject obj)
Adds a new configuration object (either a configuration option or a configuration category) to this configuration category. |
void |
addOption(ConfigurationOption option)
Adds the given configuration option to this configuration category. |
void |
addSubCategory(ConfigurationCategory subCategory)
Adds the given configuration category as a subcategory to this configuration category. |
java.util.List<ConfigurationOption> |
getAllOptions()
Returns all options contained in the sub-tree spanned by this configuration category. |
java.util.List<ConfigurationCategory> |
getAllSubCategories()
Returns all categories contained in the sub-tree spanned by this configuration category. |
java.util.List<ConfigurationOption> |
getOptions()
Returns the options of this configuration category. |
java.util.List<ConfigurationCategory> |
getSubCategories()
Returns the sub-categories of this configuration category. |
Methods inherited from class edu.cs.ai.kreator.control.config.ConfigurationObject |
---|
getCaption, getDescription, getId, getParent, getPathCaption, getPathId, hasParent, isEditable, isVisible, setParent, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ConfigurationCategory(java.lang.String id, java.lang.String caption, java.lang.String description)
id
- The id of this category.caption
- The caption of this categorydescription
- The description of this configuration category.public ConfigurationCategory(java.lang.String id, java.lang.String caption, java.lang.String description, int visible, int editable)
id
- The id of this configuration category.caption
- The caption of this configuration category.description
- The description of this configuration category.visible
- whether this configuration category is visible (one of ConfigurationObject.IS_VISIBLE, ConfigurationObject.IS_INVISIBLE)..editable
- whether this configuration category is editable (one of ConfigurationObject.IS_EDITABLE, ConfigurationObject.IS_NOT_EDITABLE).Method Detail |
---|
public java.util.List<ConfigurationCategory> getSubCategories()
public java.util.List<ConfigurationCategory> getAllSubCategories()
public java.util.List<ConfigurationOption> getAllOptions()
public java.util.List<ConfigurationOption> getOptions()
public void addSubCategory(ConfigurationCategory subCategory)
subCategory
- a configuration category.public void addOption(ConfigurationOption option)
option
- a configuration option.public void add(ConfigurationObject obj) throws java.lang.IllegalArgumentException
obj
- either a configuration option or a configuration category
java.lang.IllegalArgumentException
- if "obj" is neither a configuration option
nor a configuration category.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |