Class SgsChangeEvent
java.lang.Object
org.jjazz.songstructure.api.event.SgsChangeEvent
- Direct Known Subclasses:
RpValueChangedEvent, SptAddedEvent, SptRemovedEvent, SptRenamedEvent, SptResizedEvent, SptRhythmParentSectionChangedEvent
Describe a change in a SongStructure.
-
Constructor Summary
ConstructorsConstructorDescriptionSgsChangeEvent(SongStructure src, Collection<SongPart> spts) SgsChangeEvent(SongStructure src, SongPart spt) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddSongPartChanges(List<PropertyChangeEvent> changes) Add some SongPart change events generated by this change.getRhythms(boolean excludeAdaptedRhythms) The unique rhythms used by the SongParts.Get the SongPart change events generated by this change.booleanisRedo()True if this is a redo event, i.e. this event's change was just redone.booleanisUndo()True if this is an undo event, i.e. this event's change was just undone.booleanvoidSet isRedo to true.voidSet isUndo to true.sortSongParts(Collection<SongPart> spts) Return a sorted unmodifiable list.
-
Constructor Details
-
SgsChangeEvent
-
SgsChangeEvent
-
SgsChangeEvent
- Parameters:
src-spts-
-
-
Method Details
-
getSongPart
- Returns:
- The first SongPart, i.e. which has the lowest startBarIndex. Can be null.
-
getSongParts
-
getSource
-
setIsUndo
public void setIsUndo()Set isUndo to true. -
setIsRedo
public void setIsRedo()Set isRedo to true. -
isUndo
public boolean isUndo()True if this is an undo event, i.e. this event's change was just undone.- Returns:
- See Also:
-
isRedo
public boolean isRedo()True if this is a redo event, i.e. this event's change was just redone.- Returns:
- See Also:
-
isUndoOrRedo
public boolean isUndoOrRedo() -
getRhythms
-
addSongPartChanges
Add some SongPart change events generated by this change.- Parameters:
changes-
-
getSongPartChanges
Get the SongPart change events generated by this change.- Returns:
- Can be empty
-
sortSongParts
Return a sorted unmodifiable list.- Parameters:
spts-- Returns:
-