01: /*
02: * Jacareto Copyright (c) 2002-2005
03: * Applied Computer Science Research Group, Darmstadt University of
04: * Technology, Institute of Mathematics & Computer Science,
05: * Ludwigsburg University of Education, and Computer Based
06: * Learning Research Group, Aachen University. All rights reserved.
07: *
08: * Jacareto is free software; you can redistribute it and/or
09: * modify it under the terms of the GNU General Public
10: * License as published by the Free Software Foundation; either
11: * version 2 of the License, or (at your option) any later version.
12: *
13: * Jacareto 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 GNU
16: * General Public License for more details.
17: *
18: * You should have received a copy of the GNU General Public
19: * License along with Jacareto; if not, write to the Free
20: * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
21: *
22: */
23:
24: package jacareto.trackimpl.blockimpl;
25:
26: import jacareto.record.MediaClipRecordable;
27: import jacareto.record.Recordable;
28: import jacareto.track.block.BlockType;
29:
30: /**
31: * Kind of proxy class to differentiate between {@link BlockType#AUDIO audio} and {@link
32: * BlockType#VIDEO video} and {@link BlockType#EVENT event} blocks.
33: *
34: * @author Oliver Specht
35: * @version $revision$
36: */
37: public abstract class MediaBlock extends DefaultBlock {
38: /**
39: * Creates a new MediaBlock
40: *
41: * @param recordable
42: */
43: public MediaBlock(Recordable recordable) {
44: super (recordable);
45: }
46:
47: /**
48: * {@inheritDoc}
49: */
50: public abstract BlockType getType();
51:
52: /**
53: * Returns the tooltip text to be set on mouse over.
54: *
55: * @return String ToolTipText
56: */
57: public abstract String getToolTipText();
58:
59: /**
60: * Informs the block about its start time.
61: *
62: * @param startTime the start time (in msec)
63: */
64: public void tellStartTime(long startTime) {
65: Recordable recordable = getRecordable();
66:
67: if ((recordable != null)
68: && (recordable instanceof MediaClipRecordable)) {
69: ((MediaClipRecordable) recordable).tellStartTime(startTime);
70: }
71: }
72: }
|