Passage options are dynamically worked out for each version that is available. For example, the BBE text does not contain strong numbers. As a result, no interlinear options will be available. getFeatures
defined in JSwordMetadataServiceImpl
defines which options are available for any given version. This is used to determine whether a version supports a particular feature.
Because the user may switch version, and have their options grayed out, it is important to trim
these options down to what is supported by the version. The trim()
function in BibleInformationServiceImpl
is responsible for trimming down options that are not supported by particular layouts (e.g. normal, interlinear, interleaved, column view) and reducing the requested options to those that are supported by the selected options.
The LookupOption
defines the name of the minimum stylesheet required to execute a request. JSwordPassageServiceImpl
iterates through the selected LookupOption
s and works out which stylesheet to use.
The stylesheets were originally based on BibleDesktop's stylesheets. As a result, they contain a bit of repetition which could ideally be refactored, given time.
The event "version-changed-{passageId}" where passageId is the column number (indexed from 0) is listened upon. When an event is fired, a new call is made to the server (BIBLE_GET_FEATURES). Its response is the set of features available in the current mode of display (e.g. Interleaved). Options that are not available are grayed out.