1
package org.sikuli.guide.player;
3
import org.sikuli.guide.Step;
4
import org.sikuli.guide.Story;
6
interface StoryPlayerModel extends PlayerModel {
9
void setStory(Story story);
11
void setPlayList(PlayList playList);
12
PlayList getPlayList();
14
Step getCurrentStep();
15
void setCurrentStep(Step currentStep);
17
int getTimeoutSeconds();
18
void setTimeoutSeconds(int timeoutSeconds);
20
int getCurrentStepTimeElapsed();
21
void setCurrentStepTimeElapsed(int currentStepTimeElapsed);
24
class DefaultStoryPlayerModel extends DefaultPlayerModel implements StoryPlayerModel{
26
private int timeoutSeconds = 20;
27
private int currentStepTimeElapsed = 0;
28
private Step currentStep = null;
29
private PlayList playList = null;
30
private Story story = null;
32
public void setTimeoutSeconds(int timeoutSeconds) {
33
firePropertyChange("timeoutSeconds", this.timeoutSeconds, this.timeoutSeconds = timeoutSeconds);
35
public int getTimeoutSeconds() {
36
return timeoutSeconds;
38
public void setCurrentStepTimeElapsed(int currentStepTimeElapsed) {
39
firePropertyChange("currentStepTimeElapsed", this.currentStepTimeElapsed, this.currentStepTimeElapsed = currentStepTimeElapsed);
41
public int getCurrentStepTimeElapsed() {
42
return currentStepTimeElapsed;
44
public void setCurrentStep(Step currentStep) {
45
firePropertyChange("currentStep", this.currentStep, this.currentStep = currentStep);
47
public Step getCurrentStep() {
50
public void setPlayList(PlayList playList) {
51
firePropertyChange("playList", this.playList, this.playList = playList);
53
public PlayList getPlayList() {
56
public void setStory(Story story) {
57
firePropertyChange("story", this.story, this.story = story);
59
public Story getStory() {