View Javadoc

    1   /*
    2    *  soapUI, copyright (C) 2004-2007 eviware.com
    3    *
    4    *  soapUI is free software; you can redistribute it and/or modify it under the
    5    *  terms of version 2.1 of the GNU Lesser General Public License as published by
    6    *  the Free Software Foundation.
    7    *
    8    *  soapUI is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without
    9    *  even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
    10   *  See the GNU Lesser General Public License for more details at gnu.org.
    11   */
    12
    13  package com.eviware.soapui.impl.wsdl.panels.request.components.editor.support;
    14
    15  import java.beans.PropertyChangeListener;
    16  import java.beans.PropertyChangeSupport;
    17
    18  import com.eviware.soapui.impl.wsdl.panels.request.components.editor.XmlDocument;
    19
    20  /***
    21   * Abstract base-class for XmlDocument implementations
    22   *
    23   * @author ole.matzura
    24   */
    25
    26  public abstract class AbstractXmlDocument implements XmlDocument
    27  {
    28     private PropertyChangeSupport propertyChangeSupport = new PropertyChangeSupport( this );
    29
    30     public void addPropertyChangeListener(String propertyName, PropertyChangeListener listener)
    31     {
    32        propertyChangeSupport.addPropertyChangeListener( propertyName, listener );
    33     }
    34
    35     public void addPropertyChangeListener(PropertyChangeListener listener)
    36     {
    37        propertyChangeSupport.addPropertyChangeListener( listener );
    38     }
    39
    40     public void removePropertyChangeListener(PropertyChangeListener listener)
    41     {
    42        propertyChangeSupport.removePropertyChangeListener( listener );
    43     }
    44
    45     public void removePropertyChangeListener(String propertyName, PropertyChangeListener listener)
    46  	{
    47     	propertyChangeSupport.removePropertyChangeListener( propertyName, listener );
    48  	}
    49
    50     protected void fireXmlChanged( String oldValue, String newValue )
    51     {
    52     	propertyChangeSupport.firePropertyChange( XML_PROPERTY, oldValue, newValue );
    53     }
    54
    55  	public void release()
    56  	{
    57  	}
    58  }