Class SgsVetoableChangeEvent

java.lang.Object
org.jjazz.songstructure.api.event.SgsChangeEvent
org.jjazz.songstructure.api.event.SgsVetoableChangeEvent

public class SgsVetoableChangeEvent extends SgsChangeEvent
A special vetoable event sent before performing a SongStructure change that can be vetoed by its listeners.

For example replaceSongParts() can be vetoed by a listener if there is not enough Midi channels.

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

See Also:
  • Constructor Details

  • Method Details

    • getChangeEvent

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