alvinalexander.com | career | drupal | java | mac | mysql | perl | scala | uml | unix  

What this is

This file is included in the DevDaily.com "Java Source Code Warehouse" project. The intent of this project is to help you "Learn Java by Example" TM.

Other links

The source code

/*
 * IfUnlessPropertyModel.java
 *
 * Created on March 1, 2004, 3:54 PM
 */

package org.netbeans.modules.vcs.advanced.conditioned;

import java.beans.PropertyChangeSupport;
import org.openide.explorer.propertysheet.PropertyModel;

/**
 *
 * @author  Martin Entlicher
 */
public class IfUnlessPropertyModel implements PropertyModel {
    
    private PropertyChangeSupport pcs = new PropertyChangeSupport(this);
    private IfUnlessCondition iuc;
    
    /** Creates a new instance of IfUnlessPropertyModel */
    public IfUnlessPropertyModel() {
    }
    
    public void addPropertyChangeListener(java.beans.PropertyChangeListener l) {
        pcs.addPropertyChangeListener(l);
    }
    
    public Class getPropertyEditorClass() {
        return IfUnlessPropertyEditor.class;
    }
    
    public Class getPropertyType() {
        return IfUnlessCondition.class;
    }
    
    public Object getValue() throws java.lang.reflect.InvocationTargetException {
        return iuc;
    }
    
    public void removePropertyChangeListener(java.beans.PropertyChangeListener l) {
        pcs.removePropertyChangeListener(l);
    }
    
    public void setValue(Object v) throws java.lang.reflect.InvocationTargetException {
        Object old = this.iuc;
        this.iuc = (IfUnlessCondition) v;
        pcs.firePropertyChange("value", old, v);
    }
    
}
... this post is sponsored by my books ...

#1 New Release!

FP Best Seller

 

new blog posts

 

Copyright 1998-2021 Alvin Alexander, alvinalexander.com
All Rights Reserved.

A percentage of advertising revenue from
pages under the /java/jwarehouse URI on this website is
paid back to open source projects.