Class JavaOption

All Implemented Interfaces:
Serializable, Option, OptionElement, OptionProperties

public class JavaOption extends AbstractOption
An option that displays a UI component created through a Java class.
Author:
Laurent Cohen
See Also:
  • Field Details

    • className

      protected String className
      The fully qualified class name of the UI component to instantiate.
    • mouseListenerClassName

      protected String mouseListenerClassName
      Name of the mouseListener to set on this element.
    • instance

      protected JComponent instance
      The instance of the class that is created.
  • Constructor Details

    • JavaOption

      public JavaOption()
      Constructor provided as a convenience to facilitate the creation of option elements through reflexion.
  • Method Details

    • createUI

      public void createUI()
      Description copied from class: AbstractOptionProperties
      Create the UI components for this option.
      Specified by:
      createUI in class AbstractOptionProperties
    • setupValueChangeNotifications

      protected void setupValueChangeNotifications()
      Propagate the state changes of the underlying component to the listeners to this component.
      Specified by:
      setupValueChangeNotifications in class AbstractOption
      See Also:
    • setEnabled

      public void setEnabled(boolean enabled)
      Enable or disable this option.
      Parameters:
      enabled - true to enable this option, false to disable it.
      See Also:
    • getClassName

      public String getClassName()
      Get the fully qualified class name of the UI component to instantiate.
      Returns:
      the class name as a string.
    • setClassName

      public void setClassName(String className)
      Set the fully qualified class name of the UI component to instantiate.
      Parameters:
      className - the class name as a string.
    • getMouseListenerClassName

      public String getMouseListenerClassName()
      Get the class name of the mouseListener to set on this element.
      Returns:
      the class name as a string.
    • setMouseListenerClassName

      public void setMouseListenerClassName(String mouseListenerClassName)
      Set the class name of the mouseListener to set on this element.
      Parameters:
      mouseListenerClassName - the class name as a string.
    • getInstance

      public JComponent getInstance()
      Get the instance of the class that is created.
      Returns:
      a JComponent.