Package com.softsynth.jmsl.score
Class ScoreXMLLoader
java.lang.Object
com.softsynth.jmsl.score.ScoreXMLLoader
- All Implemented Interfaces:
NewXMLObjectListener
,XMLListener
public class ScoreXMLLoader extends java.lang.Object implements XMLListener, NewXMLObjectListener
- Author:
- Nick Didkovsky, copyright 2000 Nick Didkovsky, all rights reserved
-
Field Summary
Fields Modifier and Type Field Description static boolean
verbose
-
Constructor Summary
Constructors Constructor Description ScoreXMLLoader()
-
Method Summary
Modifier and Type Method Description void
addScoreLoaderListener(ScoreLoaderListener listener)
void
beginElement(java.lang.String tag, java.util.Hashtable attributes, boolean ifEmpty)
Handles the start of an element.void
endElement(java.lang.String tag)
Handles the end of an element.void
foundContent(java.lang.String content)
Handles the content of an element.void
handleNewXMLObject(java.lang.String tag, java.lang.Object obj)
Score
loadXML(java.io.InputStream stream)
Score
loadXML(java.lang.String fileName)
Score
loadXML(java.net.URL url)
Score
loadXMLFromZip(java.io.InputStream inputStream)
Read a score file from a zip archive.static void
main(java.lang.String[] args)
void
setMaxScoreCanvas(ScoreCanvas sc)
substitute a different scorecanvas to use before loadingvoid
setRenderAllowedAfterLoading(boolean renderAllowedAfterLoading)
void
setScore(Score score)
new feature, load into an existing Score objectMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
verbose
public static boolean verbose
-
-
Constructor Details
-
ScoreXMLLoader
public ScoreXMLLoader()
-
-
Method Details
-
setScore
new feature, load into an existing Score object -
addScoreLoaderListener
-
loadXML
- Throws:
java.io.IOException
-
loadXML
- Throws:
java.io.IOException
-
loadXMLFromZip
Read a score file from a zip archive. InputStream points to that zip archive.- Throws:
java.io.IOException
-
loadXML
- Throws:
java.io.IOException
-
beginElement
public void beginElement(java.lang.String tag, java.util.Hashtable attributes, boolean ifEmpty)Description copied from interface:XMLListener
Handles the start of an element. The flag ifEmpty if there is no content or endTag.- Specified by:
beginElement
in interfaceXMLListener
-
foundContent
public void foundContent(java.lang.String content)Description copied from interface:XMLListener
Handles the content of an element.- Specified by:
foundContent
in interfaceXMLListener
-
endElement
public void endElement(java.lang.String tag)Description copied from interface:XMLListener
Handles the end of an element.- Specified by:
endElement
in interfaceXMLListener
-
handleNewXMLObject
public void handleNewXMLObject(java.lang.String tag, java.lang.Object obj)- Specified by:
handleNewXMLObject
in interfaceNewXMLObjectListener
-
main
public static void main(java.lang.String[] args) -
setMaxScoreCanvas
substitute a different scorecanvas to use before loading -
setRenderAllowedAfterLoading
public void setRenderAllowedAfterLoading(boolean renderAllowedAfterLoading)
-