FileDocCategorySizeDatePackage
PropertyEditorSupport.javaAPI DocAndroid 1.5 API3624Wed May 06 22:41:54 BST 2009java.beans

PropertyEditorSupport

public class PropertyEditorSupport extends Object implements PropertyEditor

Fields Summary
Object
source
List
listeners
Object
oldValue
Object
newValue
Constructors Summary
public PropertyEditorSupport(Object source)


       
        if (source == null) {
            throw new NullPointerException(Messages.getString("beans.0C")); //$NON-NLS-1$
        }
        this.source = source;
    
public PropertyEditorSupport()

        source = this;
    
Methods Summary
public synchronized voidaddPropertyChangeListener(java.beans.PropertyChangeListener listener)

        listeners.add(listener);
    
public voidfirePropertyChange()

        if (listeners.size() > 0) {
            PropertyChangeEvent event = new PropertyChangeEvent(source, null,
                    oldValue, newValue);
            Iterator<PropertyChangeListener> iterator = listeners.iterator();

            while (iterator.hasNext()) {
                PropertyChangeListener listener = iterator.next();
                listener.propertyChange(event);
            }
        }
    
public java.lang.StringgetAsText()

        return newValue == null ? "null" : newValue.toString(); //$NON-NLS-1$
    
public java.awt.ComponentgetCustomEditor()

        return null;
    
public java.lang.StringgetJavaInitializationString()

        return "???"; //$NON-NLS-1$
    
public java.lang.ObjectgetSource()

        return source;
    
public java.lang.String[]getTags()

        return null;
    
public java.lang.ObjectgetValue()

        return newValue;
    
public booleanisPaintable()

        return false;
    
public voidpaintValue(java.awt.Graphics gfx, java.awt.Rectangle box)

    
public synchronized voidremovePropertyChangeListener(java.beans.PropertyChangeListener listener)

        if (listeners != null) {
            listeners.remove(listener);
        }
    
public voidsetAsText(java.lang.String text)

        if (newValue instanceof String) {
            setValue(text);
        } else {
            throw new IllegalArgumentException(text);
        }
    
public voidsetSource(java.lang.Object source)

        if (source == null) {
            throw new NullPointerException(Messages.getString("beans.0C")); //$NON-NLS-1$
        }
        this.source = source;
    
public voidsetValue(java.lang.Object value)

        this.oldValue = this.newValue;
        this.newValue = value;
        firePropertyChange();
    
public booleansupportsCustomEditor()

        return false;