~sikuli-dev/sikuli/guide

« back to all changes in this revision

Viewing changes to sikuli-guide/src/main/java/org/sikuli/guide/player/StoryPlayerModel.java

  • Committer: Tom Yeh
  • Date: 2011-09-12 10:21:27 UTC
  • Revision ID: doubleshow@gmail.com-20110912102127-irku6979hijxgqmq
undoable resize
timer shown in story player
in-place text editing

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
package org.sikuli.guide.player;
 
2
 
 
3
import org.sikuli.guide.Step;
 
4
import org.sikuli.guide.Story;
 
5
 
 
6
interface StoryPlayerModel extends PlayerModel {
 
7
        
 
8
        Story getStory();
 
9
        void setStory(Story story);
 
10
        
 
11
        void setPlayList(PlayList playList);
 
12
        PlayList getPlayList();
 
13
        
 
14
        Step getCurrentStep();
 
15
        void setCurrentStep(Step currentStep);
 
16
        
 
17
        int getTimeoutSeconds();
 
18
        void setTimeoutSeconds(int timeoutSeconds);
 
19
 
 
20
        int getCurrentStepTimeElapsed();
 
21
        void setCurrentStepTimeElapsed(int currentStepTimeElapsed);
 
22
}
 
23
 
 
24
class DefaultStoryPlayerModel extends DefaultPlayerModel implements StoryPlayerModel{
 
25
 
 
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;
 
31
 
 
32
        public void setTimeoutSeconds(int timeoutSeconds) {
 
33
                firePropertyChange("timeoutSeconds", this.timeoutSeconds, this.timeoutSeconds = timeoutSeconds);                
 
34
        }
 
35
        public int getTimeoutSeconds() {
 
36
                return timeoutSeconds;
 
37
        }
 
38
        public void setCurrentStepTimeElapsed(int currentStepTimeElapsed) {                     
 
39
                firePropertyChange("currentStepTimeElapsed", this.currentStepTimeElapsed, this.currentStepTimeElapsed = currentStepTimeElapsed);
 
40
        }
 
41
        public int getCurrentStepTimeElapsed() {
 
42
                return currentStepTimeElapsed;
 
43
        }
 
44
        public void setCurrentStep(Step currentStep) {
 
45
                firePropertyChange("currentStep", this.currentStep, this.currentStep = currentStep);
 
46
        }
 
47
        public Step getCurrentStep() {
 
48
                return currentStep;
 
49
        }
 
50
        public void setPlayList(PlayList playList) {
 
51
                firePropertyChange("playList", this.playList, this.playList = playList);
 
52
        }
 
53
        public PlayList getPlayList() {
 
54
                return playList;
 
55
        }
 
56
        public void setStory(Story story) {
 
57
                firePropertyChange("story", this.story, this.story = story);
 
58
        }
 
59
        public Story getStory() {
 
60
                return story;
 
61
        }  
 
62
}