...
SimpleGuiDemo.java
- This class contains the
main
method and is the JavaFX Application subclass - Zong! is initialized (see below)
- This class contains the
Content.java
- This class holds the current score document (
ScoreDoc
), itsLayout
and a layouter for the playback cursor (PlaybackLayouter
) - The
PlaybackLayouter
modifies the current layout so that the current playback position is shown - Registering this class as a
PlaybackListener
, it gets notified about the playback progress and can update the layout accordingly - The
onClick
method shows a message with details about the clicked element (for example a clicked note or rest)
- This class holds the current score document (
Playback.java
- MIDI playback functionality, based on Zong!'s
MidiScorePlayer
- MIDI playback functionality, based on Zong!'s
MainWindow.fxml
- The FXML code of the main window
MainWindow.java
- The Java controller of the main window
- The
renderLayout
method uses theAwtBitmapPageRenderer
classJfxLayoutRenderer
class (JavaFX renderer) or theAwtLayoutRenderer
class (AWT/Java2D renderer) to create a displayable image of the document layout. In your app, you can choose the renderer you prefer. For each platform (also Android and HTML5/JS), there is a special renderer available.
Initialize Zong!
At the beginning of the application, Zong! has to be initialized. In this demo app, this is done at the very beginning in the main
method.
...
To enable logging, call the init method with the appropriate logger (in our case the DesktopLogProcessing
, which is the logger for Java SE desktop applications).
...