/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package usda.weru.util;

import java.beans.PropertyChangeEvent;
import java.beans.PropertyVetoException;

/**
 *
 * @author Joseph Levin <joelevin@weru.ksu.edu>
 */
public class PropertyVetoRunnableException extends PropertyVetoException implements Runnable{
    private static final long serialVersionUID = 1L;

    private final Runnable c_runnable;

	/**
	 *
	 * @param message
	 * @param event
	 */
	public PropertyVetoRunnableException(String message, PropertyChangeEvent event){
        super(message, event);
        c_runnable = null;
    }

	/**
	 *
	 * @param message
	 * @param event
	 * @param runnable
	 */
	public PropertyVetoRunnableException(String message, PropertyChangeEvent event, Runnable runnable){
        super(message, event);
        c_runnable = runnable;
    }

	/**
	 *
	 */
	@Override
    public void run() {
        if(c_runnable != null){
            c_runnable.run();
        }
    }



}
