Class OptionListener

java.lang.Object
ro.sync.ecss.extensions.api.OptionListener

@API(type=EXTENDABLE, src=PUBLIC) public abstract class OptionListener extends Object
The listener which is notified about the value changes of an author extension level option.
  • Constructor Details

    • OptionListener

      public OptionListener()
      Default constructor for the option listener. IMPORTANT, this default constructor is mostly intended to facilitate creating such objects from Javascript Rhino code. You must set a an option key using the "setKey" method after you are using this implicit constructor.
      Since:
      21
    • OptionListener

      public OptionListener(String key)
      Constructor for the option listener.
      Parameters:
      key - The key of the option whose value modification triggers the listener notification.
  • Method Details

    • optionValueChanged

      public abstract void optionValueChanged(OptionChangedEvent event)
      This method is called when the value of the option associated with this listener has been modified.
      Parameters:
      event - An OptionChangedEvent which indicates that the value of the associated option has been changed.
    • setKey

      public void setKey(String key)
      Set the key to listen to. The key must be set before the listener is added.
      Parameters:
      key - The key of the option whose value modification triggers the listener notification.
      Since:
      21
    • getKey

      public final String getKey()
      Returns:
      The key of the option this listener is notified about.