Package mgui.interfaces.graphics.video
Class VideoTask
java.lang.Object
mgui.interfaces.graphics.video.VideoTask
- Direct Known Subclasses:
AttributeObjectVideoTask
,VideoTask3D
public abstract class VideoTask extends java.lang.Object implements java.lang.Cloneable, java.lang.Comparable<VideoTask>, XMLObject
Base class for a video task, which manipulates an
InterfaceGraphic
window or its associated InterfaceObject
s, over a specified time
interval. Video tasks form the elements of a Video
sequence.- Since:
- 1.0
- Version:
- 1.0
- Author:
- Andrew Reid
-
Nested Class Summary
Nested classes/interfaces inherited from interface mgui.interfaces.xml.XMLObject
XMLObject.XMLEncoding, XMLObject.XMLType
-
Field Summary
Fields Modifier and Type Field Description boolean
isOn
long
start_time
protected boolean
started
long
stop_time
-
Constructor Summary
Constructors Constructor Description VideoTask()
-
Method Summary
Modifier and Type Method Description abstract java.lang.Object
clone()
int
compareTo(VideoTask t2)
protected abstract boolean
do_it(InterfaceGraphic<?> g, long time)
Perform this task, contingent ontime
.java.lang.String
getDTD()
Returns the Data Type Declaration (DTD) for this object's XML representationjava.lang.String
getLocalName()
Returns the local name associated with this XML object.abstract java.lang.String
getName()
java.lang.String
getSchema()
java.lang.String
getShortXML()
java.lang.String
getShortXML(int tab)
Returns a short XML representation of this object.long
getStart()
Returns the start time for this tasklong
getStop()
Returns the stop time for this taskjava.lang.String
getXML()
Returns this object's XML representation as a single string.java.lang.String
getXML(int tab)
Returns this object's XML representation as a single string.void
handleXMLElementEnd(java.lang.String localName)
Handles the end of an XML element.void
handleXMLElementStart(java.lang.String localName, org.xml.sax.Attributes attributes, XMLObject.XMLType type)
Handles the start of an XML element.void
handleXMLString(java.lang.String s)
Handles a string within an XML element.boolean
isActive(long time)
boolean
perform(InterfaceGraphic<?> g, long time)
Performs this video task, for the giventime
.void
reset()
Resets this taskabstract void
setFromTask(VideoTask task)
void
setStart(long d)
Sets the start time for this taskvoid
setStop(long d)
Sets the stop time for this taskvoid
updateTask(InterfaceDisplayPanel panel)
void
writeXML(int tab, java.io.Writer writer)
Writes the XML representation of this object to file.void
writeXML(int tab, java.io.Writer writer, ProgressUpdater progress_bar)
Writes the XML representation of this object to file, asXMLType.Normal
.void
writeXML(int tab, java.io.Writer writer, XMLOutputOptions options, ProgressUpdater progress_bar)
Writes the XML representation of this object to file.Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface mgui.interfaces.xml.XMLObject
getXMLSchema
-
Field Details
-
start_time
public long start_time -
stop_time
public long stop_time -
started
protected boolean started -
isOn
public boolean isOn
-
-
Constructor Details
-
VideoTask
public VideoTask()
-
-
Method Details
-
perform
Performs this video task, for the giventime
.- Parameters:
g
-time
-- Returns:
-
do_it
Perform this task, contingent ontime
.- Parameters:
g
-time
-- Returns:
- Throws:
VideoException
-
setStart
public void setStart(long d)Sets the start time for this task- Parameters:
d
-
-
setStop
public void setStop(long d)Sets the stop time for this task- Parameters:
d
-
-
getStart
public long getStart()Returns the start time for this task- Returns:
-
getStop
public long getStop()Returns the stop time for this task- Returns:
-
reset
public void reset()Resets this task -
isActive
public boolean isActive(long time) -
getName
public abstract java.lang.String getName() -
getDTD
public java.lang.String getDTD()Description copied from interface:XMLObject
Returns the Data Type Declaration (DTD) for this object's XML representationSee http://en.wikipedia.org/wiki/Document_Type_Definition for a description.
-
getSchema
public java.lang.String getSchema() -
getXML
public java.lang.String getXML(int tab)Description copied from interface:XMLObject
Returns this object's XML representation as a single string. NOTE: this is not feasible for larger objects and containers, thus may not be implemented for these objects. Use theXMLObject.writeXML(int,java.io.Writer,mgui.io.standard.xml.XMLOutputOptions,mgui.interfaces.ProgressUpdater)
functions to write larger objects to file. -
getShortXML
public java.lang.String getShortXML() -
getXML
public java.lang.String getXML()Description copied from interface:XMLObject
Returns this object's XML representation as a single string. NOTE: this is not feasible for larger objects and containers, thus may not be implemented for these objects. Use theXMLObject.writeXML(int,java.io.Writer,mgui.io.standard.xml.XMLOutputOptions,mgui.interfaces.ProgressUpdater)
functions to write larger objects to file. -
handleXMLElementStart
public void handleXMLElementStart(java.lang.String localName, org.xml.sax.Attributes attributes, XMLObject.XMLType type)Description copied from interface:XMLObject
Handles the start of an XML element.- Specified by:
handleXMLElementStart
in interfaceXMLObject
- Parameters:
localName
- Local name of the elementattributes
- Set of element attributestype
- TheXMLType
of this element
-
handleXMLElementEnd
public void handleXMLElementEnd(java.lang.String localName)Description copied from interface:XMLObject
Handles the end of an XML element.- Specified by:
handleXMLElementEnd
in interfaceXMLObject
- Parameters:
localName
- Local name of the element
-
handleXMLString
public void handleXMLString(java.lang.String s)Description copied from interface:XMLObject
Handles a string within an XML element.- Specified by:
handleXMLString
in interfaceXMLObject
- Parameters:
s
- String to handle
-
getLocalName
public java.lang.String getLocalName()Description copied from interface:XMLObject
Returns the local name associated with this XML object.- Specified by:
getLocalName
in interfaceXMLObject
- Returns:
-
updateTask
-
compareTo
- Specified by:
compareTo
in interfacejava.lang.Comparable<VideoTask>
-
setFromTask
-
clone
public abstract java.lang.Object clone()- Overrides:
clone
in classjava.lang.Object
-
writeXML
public void writeXML(int tab, java.io.Writer writer) throws java.io.IOExceptionDescription copied from interface:XMLObject
Writes the XML representation of this object to file. The basic contract for this method is that it should not write a newline character at its start or end. The default format ofXMLFormat.Ascii
will be used. -
writeXML
public void writeXML(int tab, java.io.Writer writer, ProgressUpdater progress_bar) throws java.io.IOExceptionDescription copied from interface:XMLObject
Writes the XML representation of this object to file, asXMLType.Normal
. The default format ofXMLFormat.Ascii
will be used. The basic contract for this method is that it should not write a newline character at its start or end. -
writeXML
public void writeXML(int tab, java.io.Writer writer, XMLOutputOptions options, ProgressUpdater progress_bar) throws java.io.IOExceptionDescription copied from interface:XMLObject
Writes the XML representation of this object to file. The basic contract for this method is that it should not write a newline character at its start or end. The default format ofXMLFormat.Ascii
will be used. -
getShortXML
public java.lang.String getShortXML(int tab)Description copied from interface:XMLObject
Returns a short XML representation of this object.- Specified by:
getShortXML
in interfaceXMLObject
- Returns:
-