Class OptionElementFactory

java.lang.Object
org.jppf.ui.options.xml.OptionElementFactory

public class OptionElementFactory extends Object
Factory class used to build UI elements from XML descriptors.
Author:
Laurent Cohen
  • Constructor Details

    • OptionElementFactory

      public OptionElementFactory(OptionsPageBuilder builder)
      Initialize this factory.
      Parameters:
      builder - the builder using this factory.
  • Method Details

    • buildPage

      public OptionElement buildPage(OptionDescriptor desc) throws Exception
      Build an option page from the specified option descriptor.
      Parameters:
      desc - the descriptor to get the page properties from.
      Returns:
      an OptionsPage instance, or null if the page could not be build.
      Throws:
      Exception - if an error was raised while building the page.
    • buildSplitPane

      public OptionElement buildSplitPane(OptionDescriptor desc) throws Exception
      Build a split pane option from the specified option descriptor.
      Parameters:
      desc - the descriptor to get the properties from.
      Returns:
      an Option instance, or null if the option could not be build.
      Throws:
      Exception - if an error was raised while building the option.
    • buildToolbar

      public OptionElement buildToolbar(OptionDescriptor desc) throws Exception
      Build a toolbar option from the specified option descriptor.
      Parameters:
      desc - the descriptor to get the properties from.
      Returns:
      an Option instance, or null if the option could not be build.
      Throws:
      Exception - if an error was raised while building the option.
    • buildTabbedPane

      public OptionElement buildTabbedPane(OptionDescriptor desc) throws Exception
      Build a toolbar option from the specified option descriptor.
      Parameters:
      desc - the descriptor to get the properties from.
      Returns:
      an Option instance, or null if the option could not be build.
      Throws:
      Exception - if an error was raised while building the option.
    • buildButton

      public Option buildButton(OptionDescriptor desc) throws Exception
      Build a button option from the specified option descriptor.
      Parameters:
      desc - the descriptor to get the page properties from.
      Returns:
      an Option instance, or null if the option could not be build.
      Throws:
      Exception - if an error was raised while building the option.
    • buildLabel

      public Option buildLabel(OptionDescriptor desc) throws Exception
      Build a label option from the specified option descriptor.
      Parameters:
      desc - the descriptor to get the page properties from.
      Returns:
      an Option instance, or null if the option could not be build.
      Throws:
      Exception - if an error was raised while building the option.
    • buildTextArea

      public Option buildTextArea(OptionDescriptor desc) throws Exception
      Build a text area option from the specified option descriptor.
      Parameters:
      desc - the descriptor to get the page properties from.
      Returns:
      an Option instance, or null if the option could not be build.
      Throws:
      Exception - if an error was raised while building the option.
    • buildCodeEditor

      public Option buildCodeEditor(OptionDescriptor desc) throws Exception
      Build a code editor option from the specified option descriptor.
      Parameters:
      desc - the descriptor to get the page properties from.
      Returns:
      an Option instance, or null if the option could not be build.
      Throws:
      Exception - if an error was raised while building the option.
    • buildPassword

      public Option buildPassword(OptionDescriptor desc) throws Exception
      Build a password option from the specified option descriptor.
      Parameters:
      desc - the descriptor to get the page properties from.
      Returns:
      an Option instance, or null if the option could not be build.
      Throws:
      Exception - if an error was raised while building the option.
    • buildPlainText

      public Option buildPlainText(OptionDescriptor desc) throws Exception
      Build a plain text option from the specified option descriptor.
      Parameters:
      desc - the descriptor to get the page properties from.
      Returns:
      an Option instance, or null if the option could not be build.
      Throws:
      Exception - if an error was raised while building the option.
    • buildFormattedNumber

      public Option buildFormattedNumber(OptionDescriptor desc) throws Exception
      Build a formatted number option from the specified option descriptor.
      Parameters:
      desc - the descriptor to get the page properties from.
      Returns:
      an Option instance, or null if the option could not be build.
      Throws:
      Exception - if an error was raised while building the option.
    • buildSpinnerNumber

      public Option buildSpinnerNumber(OptionDescriptor desc) throws Exception
      Build a spinner number option from the specified option descriptor.
      Parameters:
      desc - the descriptor to get the page properties from.
      Returns:
      an Option instance, or null if the option could not be build.
      Throws:
      Exception - if an error was raised while building the option.
    • buildBoolean

      public Option buildBoolean(OptionDescriptor desc) throws Exception
      Build a check box option from the specified option descriptor.
      Parameters:
      desc - the descriptor to get the page properties from.
      Returns:
      an Option instance, or null if the option could not be build.
      Throws:
      Exception - if an error was raised while building the option.
    • buildRadio

      public Option buildRadio(OptionDescriptor desc) throws Exception
      Build a radio button option from the specified option descriptor.
      Parameters:
      desc - the descriptor to get the page properties from.
      Returns:
      an Option instance, or null if the option could not be build.
      Throws:
      Exception - if an error was raised while building the option.
    • buildComboBox

      public Option buildComboBox(OptionDescriptor desc) throws Exception
      Build a combo box option from the specified option descriptor.
      Parameters:
      desc - the descriptor to get the page properties from.
      Returns:
      an Option instance, or null if the option could not be build.
      Throws:
      Exception - if an error was raised while building the option.
    • buildList

      public Option buildList(OptionDescriptor desc) throws Exception
      Build a list option from the specified option descriptor.
      Parameters:
      desc - the descriptor to get the page properties from.
      Returns:
      an Option instance, or null if the option could not be build.
      Throws:
      Exception - if an error was raised while building the option.
    • buildFiller

      public Option buildFiller(OptionDescriptor desc) throws Exception
      Build a filler option from the specified option descriptor.
      Parameters:
      desc - the descriptor to get the properties from.
      Returns:
      an Option instance, or null if the option could not be build.
      Throws:
      Exception - if an error was raised while building the option.
    • buildToolbarSeparator

      public Option buildToolbarSeparator(OptionDescriptor desc) throws Exception
      Build a toolbar separator option from the specified option descriptor.
      Parameters:
      desc - the descriptor to get the properties from.
      Returns:
      an Option instance, or null if the option could not be build.
      Throws:
      Exception - if an error was raised while building the option.
    • buildFileChooser

      public Option buildFileChooser(OptionDescriptor desc) throws Exception
      Build a file chooser option from the specified option descriptor.
      Parameters:
      desc - the descriptor to get the page properties from.
      Returns:
      an Option instance, or null if the option could not be build.
      Throws:
      Exception - if an error was raised while building the option.
    • buildPickList

      public Option buildPickList(OptionDescriptor desc) throws Exception
      Build a pick list option from the specified option descriptor.
      Parameters:
      desc - the descriptor to get the page properties from.
      Returns:
      an Option instance, or null if the option could not be build.
      Throws:
      Exception - if an error was raised while building the option.
    • loadImport

      public List<OptionElement> loadImport(OptionDescriptor desc) throws Exception
      Build a toolbar option from the specified option descriptor.
      Parameters:
      desc - the descriptor to get the properties from.
      Returns:
      an Option instance, or null if the option could not be build.
      Throws:
      Exception - if an error was raised while building the option.
    • buildJavaOption

      public Option buildJavaOption(OptionDescriptor desc) throws Exception
      Build an option with a UI component created from a Java class.
      Parameters:
      desc - the descriptor to get the properties from.
      Returns:
      an Option instance, or null if the option could not be build.
      Throws:
      Exception - if an error was raised while building the option.
    • buildCustomOption

      public Option buildCustomOption(OptionDescriptor desc) throws Exception
      Build a custom option implemented as a Java class.
      Parameters:
      desc - the descriptor to get the properties from.
      Returns:
      an Option instance, or null if the option could not be build.
      Throws:
      Exception - if an error was raised while building the option.