Class OptionListener


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

      Constructors 
      Constructor Description
      OptionListener()
      Default constructor for the option listener.
      OptionListener​(java.lang.String key)
      Constructor for the option listener.
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getKey()  
      abstract void optionValueChanged​(OptionChangedEvent event)
      This method is called when the value of the option associated with this listener has been modified.
      void setKey​(java.lang.String key)
      Set the key to listen to.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • 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​(java.lang.String key)
        Constructor for the option listener.
        Parameters:
        key - The key of the option whose value modification triggers the listener notification.
    • Method Detail

      • 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​(java.lang.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 java.lang.String getKey()
        Returns:
        The key of the option this listener is notified about.