// Path: src/main/java/com/eguller/mouserecorder/config/Config.java
// public interface Config {
//     public Config activateMinimizeOnPlay();
// 
//     public Config deactivateMinimizeOnPlay();
// 
//     public Config activateMinimizeOnRecord();
// 
//     public Config deactivateMinimizeOnRecord();
// 
//     public Config setSpeed(double speed);
// 
//     public double getSpeed();
// 
//     public boolean getMinimizeOnPlay();
// 
//     public boolean getMinimizeOnRecord();
// 
//     public Config setLoopCount(int loopCount);
// 
//     public int getLoopCount();
// 
//     public Config activeInfiniteLoop();
// 
//     public Config deactivateInfiniteLoop();
// 
//     public boolean isInfiniteLoop();
// }
// 
// Path: src/main/java/com/eguller/mouserecorder/player/api/LoopEventListener.java
// public interface LoopEventListener {
//     public void loopStarted(LoopStartedEvent loopStartedEvent);
// }
// 
// Path: src/main/java/com/eguller/mouserecorder/player/api/Player.java
// public interface Player extends LoopEventSource {
//     public void play(Record record);
//     public void addObserver(Observer observer);
// 
//     public void stop();
// 
// }
// 
// Path: src/main/java/com/eguller/mouserecorder/player/event/LoopStartedEvent.java
// public class LoopStartedEvent {
//     boolean isInfiniteLoop;
//     int currentLoop;
//     int totalLoop;
// 
//     public LoopStartedEvent(boolean isInfiniteLoop, int currentLoop, int totalLoop) {
//         this.isInfiniteLoop = isInfiniteLoop;
//         this.currentLoop = currentLoop;
//         this.totalLoop = totalLoop;
//     }
// 
//     public boolean isInfiniteLoop() {
//         return isInfiniteLoop;
//     }
// 
//     public int getCurrentLoop() {
//         return currentLoop;
//     }
// 
//     public int getTotalLoop() {
//         return totalLoop;
//     }
// }
// 
// Path: src/main/java/com/eguller/mouserecorder/recorder/Record.java
// public class Record {
//     private List<Event> eventList = new ArrayList<Event>();
//     long lastEvent;
//     Config config;
// 
//     public Record(Config config) {
//         this.lastEvent = System.currentTimeMillis();
//         this.config = config;
//     }
// 
//     public void post(Event event) {
//         addDelayEvent();
//         eventList.add(event);
//     }
// 
//     public void add(Event event) {
//         eventList.add(event);
//     }
// 
//     private void addDelayEvent() {
//         long elapsed = System.currentTimeMillis() - lastEvent;
//         lastEvent = System.currentTimeMillis();
//         if (elapsed > 0) {
//             eventList.add(new DelayEvent(elapsed, config));
//         }
//     }
// 
//     public List<Event> getEventList() {
//         return eventList;
//     }
// }
// 
// Path: src/main/java/com/eguller/mouserecorder/recorder/event/Event.java
// public interface  Event {
//     public void execute(Robot robot);
// }


import com.eguller.mouserecorder.config.Config;
import com.eguller.mouserecorder.player.api.LoopEventListener;
import com.eguller.mouserecorder.player.api.Player;
import com.eguller.mouserecorder.player.event.LoopStartedEvent;
import com.eguller.mouserecorder.recorder.Record;
import com.eguller.mouserecorder.recorder.event.Event;
import java.awt.*;
import java.util.LinkedList;
import java.util.List;
import java.util.Observable;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
package com.eguller.mouserecorder.player;



/**
 * User: eguller
 * Date: 11/24/13
 * Time: 5:20 PM
 * <p/>
 * Replays given set of recorded mouse and keyboard actions
 */
public class PlayerImpl extends Observable implements Runnable, Player {
    Robot robot;
    Record record;
    ExecutorService executor = null;
    Config config = null;
    List<LoopEventListener> loopEventListenerList = new LinkedList<LoopEventListener>();
// Path: src/main/java/com/eguller/mouserecorder/config/Config.java
// public interface Config {
//     public Config activateMinimizeOnPlay();
// 
//     public Config deactivateMinimizeOnPlay();
// 
//     public Config activateMinimizeOnRecord();
// 
//     public Config deactivateMinimizeOnRecord();
// 
//     public Config setSpeed(double speed);
// 
//     public double getSpeed();
// 
//     public boolean getMinimizeOnPlay();
// 
//     public boolean getMinimizeOnRecord();
// 
//     public Config setLoopCount(int loopCount);
// 
//     public int getLoopCount();
// 
//     public Config activeInfiniteLoop();
// 
//     public Config deactivateInfiniteLoop();
// 
//     public boolean isInfiniteLoop();
// }
// 
// Path: src/main/java/com/eguller/mouserecorder/player/api/LoopEventListener.java
// public interface LoopEventListener {
//     public void loopStarted(LoopStartedEvent loopStartedEvent);
// }
// 
// Path: src/main/java/com/eguller/mouserecorder/player/api/Player.java
// public interface Player extends LoopEventSource {
//     public void play(Record record);
//     public void addObserver(Observer observer);
// 
//     public void stop();
// 
// }
// 
// Path: src/main/java/com/eguller/mouserecorder/player/event/LoopStartedEvent.java
// public class LoopStartedEvent {
//     boolean isInfiniteLoop;
//     int currentLoop;
//     int totalLoop;
// 
//     public LoopStartedEvent(boolean isInfiniteLoop, int currentLoop, int totalLoop) {
//         this.isInfiniteLoop = isInfiniteLoop;
//         this.currentLoop = currentLoop;
//         this.totalLoop = totalLoop;
//     }
// 
//     public boolean isInfiniteLoop() {
//         return isInfiniteLoop;
//     }
// 
//     public int getCurrentLoop() {
//         return currentLoop;
//     }
// 
//     public int getTotalLoop() {
//         return totalLoop;
//     }
// }
// 
// Path: src/main/java/com/eguller/mouserecorder/recorder/Record.java
// public class Record {
//     private List<Event> eventList = new ArrayList<Event>();
//     long lastEvent;
//     Config config;
// 
//     public Record(Config config) {
//         this.lastEvent = System.currentTimeMillis();
//         this.config = config;
//     }
// 
//     public void post(Event event) {
//         addDelayEvent();
//         eventList.add(event);
//     }
// 
//     public void add(Event event) {
//         eventList.add(event);
//     }
// 
//     private void addDelayEvent() {
//         long elapsed = System.currentTimeMillis() - lastEvent;
//         lastEvent = System.currentTimeMillis();
//         if (elapsed > 0) {
//             eventList.add(new DelayEvent(elapsed, config));
//         }
//     }
// 
//     public List<Event> getEventList() {
//         return eventList;
//     }
// }
// 
// Path: src/main/java/com/eguller/mouserecorder/recorder/event/Event.java
// public interface  Event {
//     public void execute(Robot robot);
// }


// Path: src/main/java/com/eguller/mouserecorder/player/PlayerImpl.java
import com.eguller.mouserecorder.config.Config;
import com.eguller.mouserecorder.player.api.LoopEventListener;
import com.eguller.mouserecorder.player.api.Player;
import com.eguller.mouserecorder.player.event.LoopStartedEvent;
import com.eguller.mouserecorder.recorder.Record;
import com.eguller.mouserecorder.recorder.event.Event;
import java.awt.*;
import java.util.LinkedList;
import java.util.List;
import java.util.Observable;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

package com.eguller.mouserecorder.player;



/**
 * User: eguller
 * Date: 11/24/13
 * Time: 5:20 PM
 * <p/>
 * Replays given set of recorded mouse and keyboard actions
 */
public class PlayerImpl extends Observable implements Runnable, Player {
    Robot robot;
    Record record;
    ExecutorService executor = null;
    Config config = null;
    List<LoopEventListener> loopEventListenerList = new LinkedList<LoopEventListener>();
    StopHotKeyListener stopHotKeyListener;