/** * Adds a child configuration and makes it the <em>container * configuration</em>. This means that all future property write operations * are executed on this configuration. Note that the current container * configuration stays in the list of child configurations * at its current position, but it passes its role as container * configuration to the new one. * * @param config the configuration to be added * @param name the name of the configuration to be added * @param index index to add this configuration * * @throws IndexOutOfBoundsException */ public void setContainerConfiguration(AbstractConfiguration config, String name, int index) throws IndexOutOfBoundsException { if (!configList.contains(config)) { checkIndex(index); containerConfigurationChanged = true; containerConfiguration = config; addConfigurationAtIndex(config, name, index); } else { logger.warn(config + " is not added as it already exits"); } }
/** * Adds a child configuration and makes it the <em>container * configuration</em>. This means that all future property write operations * are executed on this configuration. Note that the current container * configuration stays in the list of child configurations * at its current position, but it passes its role as container * configuration to the new one. * * @param config the configuration to be added * @param name the name of the configuration to be added * @param index index to add this configuration * * @throws IndexOutOfBoundsException */ public void setContainerConfiguration(AbstractConfiguration config, String name, int index) throws IndexOutOfBoundsException { if (!configList.contains(config)) { checkIndex(index); containerConfigurationChanged = true; containerConfiguration = config; addConfigurationAtIndex(config, name, index); } else { logger.warn(config + " is not added as it already exits"); } }
/** * Add a configuration with a name at a particular index. * * @throws IndexOutOfBoundsException */ public void addConfigurationAtIndex(AbstractConfiguration config, String name, int index) throws IndexOutOfBoundsException { if (!configList.contains(config)) { checkIndex(index); configList.add(index, config); if (name != null) { namedConfigurations.put(name, config); } config.addConfigurationListener(eventPropagater); fireEvent(EVENT_CONFIGURATION_SOURCE_CHANGED, null, null, false); } else { logger.warn(config + " is not added as it already exits"); } }
/** * Add a configuration with a name at a particular index. * * @throws IndexOutOfBoundsException */ public void addConfigurationAtIndex(AbstractConfiguration config, String name, int index) throws IndexOutOfBoundsException { if (!configList.contains(config)) { checkIndex(index); configList.add(index, config); if (name != null) { namedConfigurations.put(name, config); } config.addConfigurationListener(eventPropagater); fireEvent(EVENT_CONFIGURATION_SOURCE_CHANGED, null, null, false); } else { logger.warn(config + " is not added as it already exits"); } }