summaryrefslogtreecommitdiffstats
path: root/src/main/java/org/w3c/dom/smil/ElementTime.java
blob: 715d46ac9607013b129f8ba261826a6cae9f2006 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
/*
 * Copyright (c) 2000 World Wide Web Consortium,
 * (Massachusetts Institute of Technology, Institut National de
 * Recherche en Informatique et en Automatique, Keio University). All
 * Rights Reserved. This program is distributed under the W3C's Software
 * Intellectual Property License. This program is distributed in the
 * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
 * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
 * PURPOSE. See W3C License http://www.w3.org/Consortium/Legal/ for more
 * details.
 */

package org.w3c.dom.smil;

import org.w3c.dom.DOMException;

/**
 *  This interface defines the set of timing attributes that are common to all 
 * timed elements. 
 */
public interface ElementTime {
    /**
     *  The desired value (as a list of times) of the  begin instant of this 
     * node. 
     * @exception DOMException
     *    NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly. 
     */
    public TimeList getBegin();
    public void setBegin(TimeList begin)
                     throws DOMException;

    /**
     *  The list of active  ends for this node. 
     * @exception DOMException
     *    NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly. 
     */
    public TimeList getEnd();
    public void setEnd(TimeList end)
                     throws DOMException;

    /**
     *  The desired simple  duration value of this node in seconds. Negative 
     * value means "indefinite". 
     * @exception DOMException
     *    NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly. 
     */
    public float getDur();
    public void setDur(float dur)
                     throws DOMException;

    // restartTypes
    public static final short RESTART_ALWAYS            = 0;
    public static final short RESTART_NEVER             = 1;
    public static final short RESTART_WHEN_NOT_ACTIVE   = 2;

    /**
     *  A code representing the value of the  restart attribute, as defined 
     * above. Default value is <code>RESTART_ALWAYS</code> . 
     * @exception DOMException
     *    NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly. 
     */
    public short getRestart();
    public void setRestart(short restart)
                     throws DOMException;

    // fillTypes
    public static final short FILL_REMOVE               = 0;
    public static final short FILL_FREEZE               = 1;

    /**
     *  A code representing the value of the  fill attribute, as defined 
     * above. Default value is <code>FILL_REMOVE</code> . 
     * @exception DOMException
     *    NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly. 
     */
    public short getFill();
    public void setFill(short fill)
                     throws DOMException;

    /**
     *  The  repeatCount attribute causes the element to play repeatedly 
     * (loop) for the specified number of times. A negative value repeat the 
     * element indefinitely. Default value is 0 (unspecified). 
     * @exception DOMException
     *    NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly. 
     */
    public float getRepeatCount();
    public void setRepeatCount(float repeatCount)
                     throws DOMException;

    /**
     *  The  repeatDur causes the element to play repeatedly (loop) for the 
     * specified duration in milliseconds. Negative means "indefinite". 
     * @exception DOMException
     *    NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly. 
     */
    public float getRepeatDur();
    public void setRepeatDur(float repeatDur)
                     throws DOMException;

    /**
     *  Causes this element to begin the local timeline (subject to sync 
     * constraints). 
     * @return  <code>true</code> if the method call was successful and the 
     *   element was begun. <code>false</code> if the method call failed. 
     *   Possible reasons for failure include:  The element doesn't support 
     *   the <code>beginElement</code> method. (the <code>beginEvent</code> 
     *   attribute is not set to <code>"undefinite"</code> )  The element is 
     *   already active and can't be restart when it is active. (the 
     *   <code>restart</code> attribute is set to <code>"whenNotActive"</code>
     *    )  The element is active or has been active and can't be restart. 
     *   (the <code>restart</code> attribute is set to <code>"never"</code> ).
     *    
     */
    public boolean beginElement();

    /**
     *  Causes this element to end the local timeline (subject to sync 
     * constraints). 
     * @return  <code>true</code> if the method call was successful and the 
     *   element was endeed. <code>false</code> if method call failed. 
     *   Possible reasons for failure include:  The element doesn't support 
     *   the <code>endElement</code> method. (the <code>endEvent</code> 
     *   attribute is not set to <code>"undefinite"</code> )  The element is 
     *   not active. 
     */
    public boolean endElement();

    /**
     *  Causes this element to pause the local timeline (subject to sync 
     * constraints). 
     */
    public void pauseElement();

    /**
     *  Causes this element to resume a paused local timeline. 
     */
    public void resumeElement();

    /**
     *  Seeks this element to the specified point on the local timeline 
     * (subject to sync constraints).  If this is a timeline, this must seek 
     * the entire timeline (i.e. propagate to all timeChildren). 
     * @param seekTo  The desired position on the local timeline in 
     *   milliseconds. 
     */
    public void seekElement(float seekTo);

}