Package org.apache.commons.configuration.event

Examples of org.apache.commons.configuration.event.ConfigurationListener


        if (event.getSource() instanceof XMLConfiguration)
        {
            Iterator iter = getConfigurationListeners().iterator();
            while (iter.hasNext())
            {
                ConfigurationListener listener = (ConfigurationListener) iter.next();
                listener.configurationChanged(event);
            }
        }
    }
View Full Code Here


    /**
     * Tests whether a cloned configuration is decoupled from its original.
     */
    public void testCloneModify()
    {
        ConfigurationListener l = new ConfigurationListener()
        {
            public void configurationChanged(ConfigurationEvent event)
            {
                // just a dummy
            }
View Full Code Here

     * @param config the subnode configuration
     * @since 1.5
     */
    void registerSubnodeConfiguration(SubnodeConfiguration config)
    {
        config.addConfigurationListener(new ConfigurationListener()
        {
            public void configurationChanged(ConfigurationEvent event)
            {
                subnodeConfigurationChanged(event);
            }
View Full Code Here

                    config.addErrorListener(listener);
                }
                iter = getConfigurationListeners().iterator();
                while (iter.hasNext())
                {
                    ConfigurationListener listener = (ConfigurationListener) iter.next();
                    config.addConfigurationListener(listener);
                }
                config.setForceReloadCheck(isForceReloadCheck());
                iter = configurations.iterator();
                while (iter.hasNext())
View Full Code Here

        if (event.getSource() instanceof XMLConfiguration)
        {
            Iterator iter = getConfigurationListeners().iterator();
            while (iter.hasNext())
            {
                ConfigurationListener listener = (ConfigurationListener) iter.next();
                listener.configurationChanged(event);
            }
        }
    }
View Full Code Here

     * @param config the subnode configuration
     * @since 1.5
     */
    void registerSubnodeConfiguration(SubnodeConfiguration config)
    {
        config.addConfigurationListener(new ConfigurationListener()
        {
            public void configurationChanged(ConfigurationEvent event)
            {
                subnodeConfigurationChanged(event);
            }
View Full Code Here

   
    @Test
    public void testListeners() {
        ConcurrentMapConfiguration conf = new ConcurrentMapConfiguration();
        final AtomicReference<ConfigurationEvent> eventRef = new AtomicReference<ConfigurationEvent>();
        conf.addConfigurationListener(new ConfigurationListener() {
            @Override
            public void configurationChanged(ConfigurationEvent arg0) {
                eventRef.set(arg0);
            }
           
View Full Code Here

        }
        Collection<ConfigurationListener> listeners = defaultConfig.getConfigurationListeners();
       
        // find the listener and remove it so that DynamicProperty will no longer receives
        // callback from the default configuration source
        ConfigurationListener dynamicPropertyListener = null;
        for (ConfigurationListener l: listeners) {
            if (l instanceof ExpandedConfigurationListenerAdapter
                    && ((ExpandedConfigurationListenerAdapter) l).getListener()
                    instanceof DynamicProperty.DynamicPropertyListener) {
                dynamicPropertyListener = l;
View Full Code Here

        configuration.setMencoderVobsubSubtitleQuality(subq.getText());
      }
    });
    builder.add(subq, FormLayoutUtil.flip(cc.xyw(3, 29, 1), colSpec, orientation));

    configuration.addConfigurationListener(new ConfigurationListener() {
      @Override
      public void configurationChanged(ConfigurationEvent event) {
        if (event.getPropertyName() == null) {
          return;
        }
View Full Code Here

    JScrollPane pane = new JScrollPane(textArea, JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED, JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
    pane.setPreferredSize(new Dimension(500, 350));
    builder.add(pane, cc.xy(2, 13));

    configuration.addConfigurationListener(new ConfigurationListener() {
      @Override
      public void configurationChanged(ConfigurationEvent event) {
        if (event.getPropertyName() == null) {
          return;
        }
View Full Code Here

TOP

Related Classes of org.apache.commons.configuration.event.ConfigurationListener

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.