Class ClsActionEvent
java.lang.Object
org.jjazz.chordleadsheet.api.event.ClsChangeEvent
org.jjazz.chordleadsheet.api.event.ClsActionEvent
- Direct Known Subclasses:
SongMetaEvents.ClsSourceActionEvent
A special event to indicate that a high-level action, i.e. a call to a public API method that mutates the chord leadsheet, has started or is complete.
All low-level ClsChangeEvents fired by a ChordLeadSheet are always preceded and followed by start and complete ClsActionEvents. The complete ClsActionEvent contains the low-level ClsChangeEvents.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumThis corresponds to public API methods that can mutate a ChordLeadSheet. -
Constructor Summary
ConstructorsConstructorDescriptionClsActionEvent(ChordLeadSheet src, ClsActionEvent.API_ID apiId, Object data) Create a ClsActionEvent in started state, with no subEvents. -
Method Summary
Modifier and TypeMethodDescriptionvoidAdd a ClsChangeEvent to this ClsActionEvent.voidcomplete()Mark this ClsActionEvent as complete.getApiId()getData()An optional data associated to the event.The lower-level ClsChangeEvents added to this instance.booleanCheck if complete() was called.toString()Methods inherited from class org.jjazz.chordleadsheet.api.event.ClsChangeEvent
getItem, getItems, getSource
-
Constructor Details
-
ClsActionEvent
Create a ClsActionEvent in started state, with no subEvents.- Parameters:
src-apiId-data- An optional data associated to the event
-
-
Method Details
-
getData
An optional data associated to the event.Check the source code to know which object is associated to which actionId.
- Returns:
- Can be null
-
isComplete
public boolean isComplete()Check if complete() was called.- Returns:
- See Also:
-
complete
public void complete()Mark this ClsActionEvent as complete.- See Also:
-
addSubEvent
Add a ClsChangeEvent to this ClsActionEvent.- Parameters:
e- Can not be a ClsActionEvent
-
getSubEvents
The lower-level ClsChangeEvents added to this instance.- Returns:
- An unmodifiable list. Can be empty.
-
getApiId
-
toString
-