Class ClsVetoableChangeEvent

java.lang.Object
org.jjazz.chordleadsheet.api.event.ClsChangeEvent
org.jjazz.chordleadsheet.api.event.ClsVetoableChangeEvent

public class ClsVetoableChangeEvent extends ClsChangeEvent
A special vetoable event sent before performing a ChordLeadSheet change that can be vetoed by its listeners.

For example changeSection() can be vetoed by a SongStructure listener if it can't find a Rhythm for the new TimeSignature, or if there is not enough Midi channels.

All the ChordLeadSheet methods which throw UnsupportedEditException send a ClsVetoableChangeEvent. The listener is responsible to analyze the passed ClsChangeEvent and throw an UnsupportedEditException (with an user error message) to veto the change.

See Also:
  • Constructor Details

  • Method Details

    • getChangeEvent

      public ClsChangeEvent getChangeEvent()
      Returns:
      The event corresponding to the change about to be performed -unless it is vetoed by a listener.
    • toString

      public String toString()
      Overrides:
      toString in class Object