// Path: src/gui/TransferableUtils.java
// public class TransferableUtils {
// 
// 	public static void copy(Image image) {
// 		
// 		ImageTransferable transferable = new ImageTransferable(image);
// 		Toolkit.getDefaultToolkit().getSystemClipboard().setContents(transferable, null);
// 	}
// 
// 	static class ImageTransferable implements Transferable {
// 		private Image image;
// 
// 		public ImageTransferable (Image image) {
// 			this.image = image;
// 		}
// 
// 		public Object getTransferData(DataFlavor flavor) throws UnsupportedFlavorException {
// 			if (isDataFlavorSupported(flavor)) {
// 				return image;
// 			}
// 			else {
// 				throw new UnsupportedFlavorException(flavor);
// 			}
// 		}
// 
// 		public boolean isDataFlavorSupported (DataFlavor flavor){
// 			return flavor.equals(DataFlavor.imageFlavor);
// 		}
// 
// 		public DataFlavor[] getTransferDataFlavors () {
// 			return new DataFlavor[] { DataFlavor.imageFlavor};
// 		}
// 	}
// 	
// 	public static void copyObject(Serializable object) {
// 		ObjectTransferable transferable = new ObjectTransferable(object);
// 		Toolkit.getDefaultToolkit().getSystemClipboard().setContents(transferable, null);
// 		Toolkit.getDefaultToolkit().getSystemClipboard().setContents(transferable, null);
// 		
// 	}
// 	
// 	public static DataFlavor objectDataFlavor = new DataFlavor(Serializable.class, "Object");
// 	
// 	public static class ObjectTransferable implements Transferable {
// 		
// 		private Serializable object;
// 		
// 		public ObjectTransferable(Serializable object) {
// 			this.object = object;
// 		}
// 
// 		@Override
// 		public DataFlavor[] getTransferDataFlavors() {
// 			return new DataFlavor[] {objectDataFlavor};
// 		}
// 
// 		@Override
// 		public boolean isDataFlavorSupported(DataFlavor flavor) {
// 			return flavor.equals(objectDataFlavor);
// 		}
// 
// 		@Override
// 		public Object getTransferData(DataFlavor flavor) throws UnsupportedFlavorException, IOException {
// 			return object;
// 		}
// 	}
// }


import java.awt.*;
import java.awt.datatransfer.Transferable;
import java.awt.datatransfer.UnsupportedFlavorException;
import java.awt.event.ActionEvent;
import java.awt.event.KeyEvent;
import java.awt.geom.GeneralPath;
import java.io.IOException;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Collections;
import javax.swing.*;
import javax.swing.event.ChangeListener;
import gui.TransferableUtils;
package interpolation;




public class FloatInterpolator extends GraphInterpolator {

	private static final long serialVersionUID = -6215153672610067743L;
	
	protected ArrayList<Keyframe<Float>> keyframes;
	protected Keyframe<Float> dragFrame;
	
	private Algebra function;
	private JTextField equationField;
	
	private JSpinner manualSpinner;
	
	private JSpinner perciseTime;
	private JSpinner perciseValue;
	private JButton perciseButton;

	public FloatInterpolator(float startingVal, GetSet gs, ChangeListener... listeners) {
		super(gs, listeners);
		
		keyframes = new ArrayList<Keyframe<Float>>();
		keyframes.add(new Keyframe<Float>(0f, startingVal));
		keyframes.add(new Keyframe<Float>(1f, startingVal));
		
		initializeComponents();
		addActionListeners();
		
		gbc.gridwidth=1;
		gbc.weightx = 0;
// Path: src/gui/TransferableUtils.java
// public class TransferableUtils {
// 
// 	public static void copy(Image image) {
// 		
// 		ImageTransferable transferable = new ImageTransferable(image);
// 		Toolkit.getDefaultToolkit().getSystemClipboard().setContents(transferable, null);
// 	}
// 
// 	static class ImageTransferable implements Transferable {
// 		private Image image;
// 
// 		public ImageTransferable (Image image) {
// 			this.image = image;
// 		}
// 
// 		public Object getTransferData(DataFlavor flavor) throws UnsupportedFlavorException {
// 			if (isDataFlavorSupported(flavor)) {
// 				return image;
// 			}
// 			else {
// 				throw new UnsupportedFlavorException(flavor);
// 			}
// 		}
// 
// 		public boolean isDataFlavorSupported (DataFlavor flavor){
// 			return flavor.equals(DataFlavor.imageFlavor);
// 		}
// 
// 		public DataFlavor[] getTransferDataFlavors () {
// 			return new DataFlavor[] { DataFlavor.imageFlavor};
// 		}
// 	}
// 	
// 	public static void copyObject(Serializable object) {
// 		ObjectTransferable transferable = new ObjectTransferable(object);
// 		Toolkit.getDefaultToolkit().getSystemClipboard().setContents(transferable, null);
// 		Toolkit.getDefaultToolkit().getSystemClipboard().setContents(transferable, null);
// 		
// 	}
// 	
// 	public static DataFlavor objectDataFlavor = new DataFlavor(Serializable.class, "Object");
// 	
// 	public static class ObjectTransferable implements Transferable {
// 		
// 		private Serializable object;
// 		
// 		public ObjectTransferable(Serializable object) {
// 			this.object = object;
// 		}
// 
// 		@Override
// 		public DataFlavor[] getTransferDataFlavors() {
// 			return new DataFlavor[] {objectDataFlavor};
// 		}
// 
// 		@Override
// 		public boolean isDataFlavorSupported(DataFlavor flavor) {
// 			return flavor.equals(objectDataFlavor);
// 		}
// 
// 		@Override
// 		public Object getTransferData(DataFlavor flavor) throws UnsupportedFlavorException, IOException {
// 			return object;
// 		}
// 	}
// }


// Path: src/interpolation/FloatInterpolator.java
import java.awt.*;
import java.awt.datatransfer.Transferable;
import java.awt.datatransfer.UnsupportedFlavorException;
import java.awt.event.ActionEvent;
import java.awt.event.KeyEvent;
import java.awt.geom.GeneralPath;
import java.io.IOException;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Collections;
import javax.swing.*;
import javax.swing.event.ChangeListener;
import gui.TransferableUtils;

package interpolation;




public class FloatInterpolator extends GraphInterpolator {

	private static final long serialVersionUID = -6215153672610067743L;
	
	protected ArrayList<Keyframe<Float>> keyframes;
	protected Keyframe<Float> dragFrame;
	
	private Algebra function;
	private JTextField equationField;
	
	private JSpinner manualSpinner;
	
	private JSpinner perciseTime;
	private JSpinner perciseValue;
	private JButton perciseButton;

	public FloatInterpolator(float startingVal, GetSet gs, ChangeListener... listeners) {
		super(gs, listeners);
		
		keyframes = new ArrayList<Keyframe<Float>>();
		keyframes.add(new Keyframe<Float>(0f, startingVal));
		keyframes.add(new Keyframe<Float>(1f, startingVal));
		
		initializeComponents();
		addActionListeners();
		
		gbc.gridwidth=1;
		gbc.weightx = 0;
		add(new JLabel("f(x) ="), gbc);