org.crosswire.bibledesktop.util

## Class ConfigurableSwingConverter

- java.lang.Object
- - org.crosswire.bibledesktop.util.ConfigurableSwingConverter

- All Implemented Interfaces:
    org.crosswire.common.xml.Converter

      public class ConfigurableSwingConverter
      extends Object
      implements org.crosswire.common.xml.Converter

  Turn XML from a Bible into HTML according to a Display style.
  Author:
    Joe Walker
  See Also:
    `for license details.`

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `(package private) static class` | `ConfigurableSwingConverter.XSLTFilter`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `private static String` | `font` The font to be used in OSIS->HTML generation
    `private static String` | `style` The stylesheet we are transforming using

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ConfigurableSwingConverter()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `org.crosswire.common.xml.SAXEventProvider` | `convert(org.crosswire.common.xml.SAXEventProvider xmlsep)`
    `static String` | `getFont()` Accessor for the stylesheet we are transforming using
    `static String` | `getResourceName()` Accessor for the stylesheet we are transforming using
    `String[]` | `getStyles()` Get an array of the available style names for a given subject.
    `static void` | `setFont(String font)` Accessor for the stylesheet we are transforming using
    `static void` | `setResourceName(String style)` Accessor for the stylesheet we are transforming using
    `static Font` | `toFont()` Accessor for the stylesheet we are transforming using

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### font

          private static String font

      The font to be used in OSIS->HTML generation

    - #### style

          private static String style

      The stylesheet we are transforming using

  - ### Constructor Detail

    - #### ConfigurableSwingConverter

          public ConfigurableSwingConverter()

  - ### Method Detail

    - #### getStyles

          public String[] getStyles()

      Get an array of the available style names for a given subject. Different subjects are available for different contexts. For example - for insertion into a web page we might want to use a set that had complex HTML, or IE/NS specific HTML, where as a JFC HTMLDocument needs simpler HTML - and special tags like the starting <HTML> tags.

      If the protocol of the URL of the current directory is not file then we can't use File.list to get the contents of the directory. This will happen if this is being run as an applet. When we start doing that then we will need to think up something smarter here. Until then we just return a zero length array.

      Returns:
        An array of available style names

    - #### convert

          public org.crosswire.common.xml.SAXEventProvider convert(org.crosswire.common.xml.SAXEventProvider xmlsep)
                                                            throws TransformerException

      Specified by:
        `convert` in interface `org.crosswire.common.xml.Converter`
      Throws:
        `TransformerException`

    - #### getFont

          public static String getFont()

      Accessor for the stylesheet we are transforming using

    - #### toFont

          public static Font toFont()

      Accessor for the stylesheet we are transforming using

    - #### setFont

          public static void setFont(String font)

      Accessor for the stylesheet we are transforming using

    - #### getResourceName

          public static String getResourceName()

      Accessor for the stylesheet we are transforming using

    - #### setResourceName

          public static void setResourceName(String style)

      Accessor for the stylesheet we are transforming using