~gephi.team/gephi/0.8.1

« back to all changes in this revision

Viewing changes to TimelineModule/src/org/gephi/timeline/TimelineImpl.java

  • Committer: Mathieu Bastian
  • Date: 2009-07-23 14:26:08 UTC
  • mfrom: (166.1.9)
  • Revision ID: git-v1:13fd133fa30075e587d20f75d45ceaabd45ca316
Merge with Julian's Timeline.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
Copyright 2008 WebAtlas
 
3
Authors : Mathieu Bastian, Mathieu Jacomy, Julian Bilcke
 
4
Website : http://www.gephi.org
 
5
 
 
6
This file is part of Gephi.
 
7
 
 
8
Gephi is free software: you can redistribute it and/or modify
 
9
it under the terms of the GNU General Public License as published by
 
10
the Free Software Foundation, either version 3 of the License, or
 
11
(at your option) any later version.
 
12
 
 
13
Gephi is distributed in the hope that it will be useful,
 
14
but WITHOUT ANY WARRANTY; without even the implied warranty of
 
15
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
16
GNU General Public License for more details.
 
17
 
 
18
You should have received a copy of the GNU General Public License
 
19
along with Gephi.  If not, see <http://www.gnu.org/licenses/>.
 
20
 */
 
21
 
 
22
package org.gephi.timeline;
 
23
 
 
24
import org.gephi.graph.api.Graph;
 
25
import org.gephi.timeline.api.Timeline;
 
26
 
 
27
/**
 
28
 *
 
29
 * @author Julian Bilcke
 
30
 */
 
31
public class TimelineImpl implements Timeline {
 
32
 
 
33
    private Graph graph;
 
34
    private TimelinePlayerImpl player;
 
35
 
 
36
    public String getName() {
 
37
        return "Desktop Timeline Controller";
 
38
    }
 
39
    
 
40
    public void setGraph(Graph graph) {
 
41
        //this.graph = new DirectedGraph();
 
42
        this.player = new TimelinePlayerImpl();
 
43
    }
 
44
 
 
45
    public void pause() {
 
46
        player.pause();
 
47
    }
 
48
 
 
49
    public void play() {
 
50
        player.play();
 
51
    }
 
52
 
 
53
    public void setPositionTo(double position) {
 
54
        player.setPositionTo(position);
 
55
    }
 
56
 
 
57
    public void setPositionTo(Comparable position) {
 
58
        player.setPositionTo(position);
 
59
    }
 
60
 
 
61
    public double getPosition() {
 
62
        return player.getPosition();
 
63
    }
 
64
 
 
65
    public boolean isPlaying() {
 
66
        return player.isPlaying();
 
67
    }
 
68
 
 
69
    public boolean isStopped() {
 
70
        return player.isStopped();
 
71
    }
 
72
 
 
73
    public void setSpeed(double slicepersecond) {
 
74
        player.setSpeed(slicepersecond);
 
75
    }
 
76
 
 
77
    public Comparable getFirstComparable() {
 
78
        throw new UnsupportedOperationException("Not supported yet.");
 
79
    }
 
80
 
 
81
    public Comparable getLastComparable() {
 
82
        throw new UnsupportedOperationException("Not supported yet.");
 
83
    }
 
84
 
 
85
 
 
86
 
 
87
}