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 InterfaceObjects, 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 booleanisOnlongstart_timeprotected booleanstartedlongstop_time -
Constructor Summary
Constructors Constructor Description VideoTask() -
Method Summary
Modifier and Type Method Description abstract java.lang.Objectclone()intcompareTo(VideoTask t2)protected abstract booleando_it(InterfaceGraphic<?> g, long time)Perform this task, contingent ontime.java.lang.StringgetDTD()Returns the Data Type Declaration (DTD) for this object's XML representationjava.lang.StringgetLocalName()Returns the local name associated with this XML object.abstract java.lang.StringgetName()java.lang.StringgetSchema()java.lang.StringgetShortXML()java.lang.StringgetShortXML(int tab)Returns a short XML representation of this object.longgetStart()Returns the start time for this tasklonggetStop()Returns the stop time for this taskjava.lang.StringgetXML()Returns this object's XML representation as a single string.java.lang.StringgetXML(int tab)Returns this object's XML representation as a single string.voidhandleXMLElementEnd(java.lang.String localName)Handles the end of an XML element.voidhandleXMLElementStart(java.lang.String localName, org.xml.sax.Attributes attributes, XMLObject.XMLType type)Handles the start of an XML element.voidhandleXMLString(java.lang.String s)Handles a string within an XML element.booleanisActive(long time)booleanperform(InterfaceGraphic<?> g, long time)Performs this video task, for the giventime.voidreset()Resets this taskabstract voidsetFromTask(VideoTask task)voidsetStart(long d)Sets the start time for this taskvoidsetStop(long d)Sets the stop time for this taskvoidupdateTask(InterfaceDisplayPanel panel)voidwriteXML(int tab, java.io.Writer writer)Writes the XML representation of this object to file.voidwriteXML(int tab, java.io.Writer writer, ProgressUpdater progress_bar)Writes the XML representation of this object to file, asXMLType.Normal.voidwriteXML(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, waitMethods 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:XMLObjectReturns 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:XMLObjectReturns 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:XMLObjectReturns 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:XMLObjectHandles the start of an XML element.- Specified by:
handleXMLElementStartin interfaceXMLObject- Parameters:
localName- Local name of the elementattributes- Set of element attributestype- TheXMLTypeof this element
-
handleXMLElementEnd
public void handleXMLElementEnd(java.lang.String localName)Description copied from interface:XMLObjectHandles the end of an XML element.- Specified by:
handleXMLElementEndin interfaceXMLObject- Parameters:
localName- Local name of the element
-
handleXMLString
public void handleXMLString(java.lang.String s)Description copied from interface:XMLObjectHandles a string within an XML element.- Specified by:
handleXMLStringin interfaceXMLObject- Parameters:
s- String to handle
-
getLocalName
public java.lang.String getLocalName()Description copied from interface:XMLObjectReturns the local name associated with this XML object.- Specified by:
getLocalNamein interfaceXMLObject- Returns:
-
updateTask
-
compareTo
- Specified by:
compareToin interfacejava.lang.Comparable<VideoTask>
-
setFromTask
-
clone
public abstract java.lang.Object clone()- Overrides:
clonein classjava.lang.Object
-
writeXML
public void writeXML(int tab, java.io.Writer writer) throws java.io.IOExceptionDescription copied from interface:XMLObjectWrites 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.Asciiwill be used. -
writeXML
public void writeXML(int tab, java.io.Writer writer, ProgressUpdater progress_bar) throws java.io.IOExceptionDescription copied from interface:XMLObjectWrites the XML representation of this object to file, asXMLType.Normal. The default format ofXMLFormat.Asciiwill 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:XMLObjectWrites 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.Asciiwill be used. -
getShortXML
public java.lang.String getShortXML(int tab)Description copied from interface:XMLObjectReturns a short XML representation of this object.- Specified by:
getShortXMLin interfaceXMLObject- Returns:
-