upstream version 1.2.2
[debian/freetts] / demo / JSAPI / Player / PlayableType.java
1 /**
2  * Copyright 2001 Sun Microsystems, Inc.
3  * 
4  * See the file "license.terms" for information on usage and
5  * redistribution of this file, and for a DISCLAIMER OF ALL 
6  * WARRANTIES.
7  */
8
9 /**
10  * Defines constants which represent different types of <code>Playable</code>
11  * objects, which can be played by the <code>Player</code>.
12  */
13 public class PlayableType {
14
15     private String typeName;
16
17     /**
18      * The ASCII text type.
19      */
20     public static final PlayableType TEXT = new PlayableType("text");
21
22     /**
23      * The ASCII text file type.
24      */
25     public static final PlayableType TEXT_FILE = new PlayableType("text file");
26         
27     /**
28      * The JSML file type.
29      */
30     public static final PlayableType JSML_FILE = new PlayableType("JSML file");
31
32     /**
33      * The JSML text type.
34      */
35     public static final PlayableType JSML = new PlayableType("JSML");
36
37     /**
38      * The URL type.
39      */
40     public static final PlayableType URL = new PlayableType("URL");
41        
42      
43     /**
44      * Constructs a PlayableType with the given name.
45      *
46      * @param typeName the PlayableType name
47      */
48     private PlayableType(String typeName) {
49         this.typeName = typeName;
50     }
51
52
53     /**
54      * Returns the name of the type.
55      *
56      * @return the name of the PlayableType
57      */
58     public String toString() {
59         return typeName;
60     }
61 }