package net.sourceforge.ganttproject.datafilter;

import java.awt.event.ActionEvent;

import javax.swing.AbstractAction;
import javax.swing.Action;
import javax.swing.ImageIcon;

public class AutoFixAction extends AbstractAction {

    private AutoFix myAutoFix;
    
    public AutoFixAction(AutoFix autoFix) {
        super(autoFix.getDescription());
        this.putValue(Action.SMALL_ICON, new ImageIcon(getClass().getResource("/icons/light_16.gif")));
        myAutoFix = autoFix;
    }

    public void actionPerformed(ActionEvent arg0) {
        if (myAutoFix.run().isOK()) {
        
        }

    }
}
