Package org.jjazz.song.api
Class StructuralChangeListener
java.lang.Object
org.jjazz.song.api.StructuralChangeListener
- All Implemented Interfaces:
PropertyChangeListener,EventListener,ClsChangeListener,SgsChangeListener
public class StructuralChangeListener
extends Object
implements ClsChangeListener, SgsChangeListener, PropertyChangeListener
A song listener to detect a structural change in the song: bar added or removed, time signature changed, section moved.
Chord symbols changes or rhythm parameter changes are not structural changes.
The listener automatically unregisters itself if song is closed.
-
Constructor Summary
ConstructorsConstructorDescriptionStructuralChangeListener(Song song, ChangeListener listener) Create a listener for structural changes in the song. -
Method Summary
Modifier and TypeMethodDescriptionvoidSome change events might need to be authorized by all listeners before being processed by chordLeadSheetChanged().voidSome change events might need to be authorized by all listeners before being processed by songStructureChanged().voidProcess the change.voidcleanup()voidvoidProcess the change.
-
Constructor Details
-
StructuralChangeListener
Create a listener for structural changes in the song.- Parameters:
song-listener- Called when a structural change occured.
-
-
Method Details
-
cleanup
public void cleanup() -
authorizeChange
Description copied from interface:ClsChangeListenerSome change events might need to be authorized by all listeners before being processed by chordLeadSheetChanged().- Specified by:
authorizeChangein interfaceClsChangeListener- Parameters:
e- The change to authorize.- Throws:
UnsupportedEditException- Listener shall throw this exception if change is not acceptable. Exception message might be shown to user to explain the problem.
-
chordLeadSheetChanged
Description copied from interface:ClsChangeListenerProcess the change.Note that this method might be called outside of the EDT.
- Specified by:
chordLeadSheetChangedin interfaceClsChangeListener
-
authorizeChange
Description copied from interface:SgsChangeListenerSome change events might need to be authorized by all listeners before being processed by songStructureChanged().- Specified by:
authorizeChangein interfaceSgsChangeListener- Parameters:
e- The change to authorize.- Throws:
UnsupportedEditException- Listener shall throw this exception if change is not acceptable. Exception message might be shown to user to explain the problem.
-
songStructureChanged
Description copied from interface:SgsChangeListenerProcess the change.Note that this method might be called outside of the EDT.
- Specified by:
songStructureChangedin interfaceSgsChangeListener
-
propertyChange
- Specified by:
propertyChangein interfacePropertyChangeListener
-