Package org.jconfig.event

Examples of org.jconfig.event.ConfigurationChangedEventImpl


                category.setConfigurationName(configName);
                category.addCategoryListener(new MyCategoryListener());
                categories.put(name, category);
                markDirty();
                category.fireCategoryChangedEvent(
                new ConfigurationChangedEventImpl(ConfigurationChangedEvent.CATEGORY_ADDED, category, null, null, null ));
            }
        }
    }
View Full Code Here


        category.setConfigurationName(configName);
        category.addCategoryListener(new MyCategoryListener());
        categories.put(category.getCategoryName(), category);
        markDirty();
        category.fireCategoryChangedEvent(
        new ConfigurationChangedEventImpl(ConfigurationChangedEvent.CATEGORY_ADDED, category, null, null, null ));
        //}
    }
View Full Code Here

    public Category setProperty(String propertyName, String propertyValue) {
        String temp = getProperty(propertyName);
        if( propertyValue == null ) {
            properties.remove(propertyName);
            firePropertyChangedEvent(
            new ConfigurationChangedEventImpl(
            PropertyChangedEvent.PROPERTY_REMOVED, this,
            propertyName, temp, propertyValue));
            return this;
        }
        properties.setProperty(propertyName, propertyValue);
        if(temp == null) {
            firePropertyChangedEvent(
            new ConfigurationChangedEventImpl(
            PropertyChangedEvent.PROPERTY_ADDED, this,
            propertyName, temp, propertyValue));
        }
        else {
            if (!temp.equals(propertyValue)) // thanks to Thorsten Jungbluth for the fix
                firePropertyChangedEvent(
                new ConfigurationChangedEventImpl(
                PropertyChangedEvent.PROPERTY_CHANGED, this,
                propertyName, temp, propertyValue));
        }
        return this;
    }
View Full Code Here

                category.setConfigurationName(configName);
                category.addCategoryListener(new MyCategoryListener());
                categories.put(categoryName, category);
                markDirty();
                category.fireCategoryChangedEvent(
                    new ConfigurationChangedEventImpl(ConfigurationChangedEvent.CATEGORY_ADDED, category, null, null, null ));
                fireConfigurationChangedEvent(
                    new ConfigurationChangedEventImpl(ConfigurationChangedEvent.CATEGORY_ADDED, category, null, null, null ));
            }
        }
    }
View Full Code Here

        if (!categories.containsKey(category.getCategoryName())) {
            category.setConfigurationName(configName);
            category.addCategoryListener(new MyCategoryListener());
            categories.put(category.getCategoryName(), category);
            category.fireCategoryChangedEvent(
                new ConfigurationChangedEventImpl(ConfigurationChangedEvent.CATEGORY_ADDED, category, null, null, null ));
            fireConfigurationChangedEvent(
                new ConfigurationChangedEventImpl(ConfigurationChangedEvent.CATEGORY_ADDED, category, null, null, null ));
        }
    }
View Full Code Here

            }
            Category category = getCategory(categoryName);
            category.setProperty(name, value);
            markDirty();
            fireConfigurationChangedEvent(
                new ConfigurationChangedEventImpl(ConfigurationChangedEvent.PROPERTY_CHANGED, category, name, value,null ));
        }
    }
View Full Code Here

            //if (categories.containsKey(category)) {
            Category cat = getCategory(category);
            String tmp = cat.getProperty(name,null);
            cat.setProperty(name, null);
            fireConfigurationChangedEvent(
                new ConfigurationChangedEventImpl(ConfigurationChangedEvent.PROPERTY_REMOVED,cat, name, tmp,null ));
            markDirty();
        }
       
    }
View Full Code Here

    public void removeCategory(String category) {
        if (categories.containsKey(category)) {
            Category cat = getCategory(category);
            categories.remove(category);
            cat.fireCategoryChangedEvent(
                new ConfigurationChangedEventImpl(ConfigurationChangedEvent.CATEGORY_REMOVED, cat, null, null, null));
            fireConfigurationChangedEvent(
                new ConfigurationChangedEventImpl(ConfigurationChangedEvent.CATEGORY_REMOVED,cat, null, null,null ));
            cat = null;
            markDirty();           
        }
    }
View Full Code Here

TOP

Related Classes of org.jconfig.event.ConfigurationChangedEventImpl

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.