Developer documentation and API.

Stairway To Heaven Intro.pdf

Goodies are plugins that provide features for viewing, rendering, manipulating, and analyzing documents.

A goody targets a document's type and flavor. This is indicated by implementing the isApplicable(docType:String, flavor:String):Boolean method.

A goody advertises the types of contribution it makes.

  • Rendering
  • Editing
  • Viewing
  • Exporting
  • Importing
  • Filtering

A goody provides additional details for displaying in the UI.

  • Label
  • Icon
  • Category
  • Order

Implement RenderPlugin and register it with the ServiceManager.

The rendering process has several phases that a plugin can tap into. Each phase has a pre, in, and post entry point; This allows the plugins to interact at a relevant stage.

This example uses the Component annotation to register with the service manager.

@Component
public class ChordDiagramPlugin implements RenderPlugin {
    @Override
    public void prePhase(RenderContext renderContext) {
        Logger.getGlobal().info("prePhase: " + renderContext.renderPhase.name());
    }
    @Override
    public void inPhase(RenderContext renderContext) {
        Logger.getGlobal().info("inPhase: " + renderContext.renderPhase.name());
    }
    @Override
    public void postPhase(RenderContext renderContext) {
        Logger.getGlobal().info("postPhase: " + render.context.renderPhase.name());
    }
}

Document
Before each document is rendered.
Page
Before each page is rendered. [progress queued]
Header
Before the page header is drawn. [progress queued]
Body
Before the page body is drawn. [progress queued]
Footer
Before the page footer is drawn. [progress queued]
Line
Before each line is rendered.
Bar
Before each bar is rendered. >The final bar is not invoked.
Text
Before each line of text is rendered. [progress queued]
Lyrics
Before each line of lyrics is rendered.

-Document
---Page
----Header
----Body
-----Line
------Bar
----Footer

form and repeat lines bar text bar header bar contents (barline, meter, chords, middle text) bar footrer bar text lyric-line padding

  • OSGI DS like service manager for GWT
  • c2d plugin for jsPDF
  • Gray Bars
  • Uses same graphics code for canvas rendering and exports as eBook/PDF
  • Book and Page plugin architecture
  • goodies

  • Plugins (Goodies) can alter the rendering process.
  • Multiple document type suport
  • Document flavor support
  • Import and export from a variety of sources and formats