Class ClsActionEvent
java.lang.Object
org.jjazz.chordleadsheet.api.event.ClsChangeEvent
org.jjazz.chordleadsheet.api.event.ClsActionEvent
An event to indicate that a high-level ChordLeadSheet action that changes the leadsheet has started or is complete.
All other ClsChangeEvents are always preceded and followed by one ClsActionEvent. This can be used by listener to group lower-level change events by actionId. The actionId must be the corresponding method name from the ChordLeadSheet interface, e.g. "addItem".
There is the guarantee that if a start ClsActionEvent is received, the complete ClsActionEvent will be received on the same actionId. It's possible that no lower-level change event occur between 2 started/complete action events on the same actionId.
-
Constructor Summary
ConstructorDescriptionClsActionEvent
(ChordLeadSheet src, String actionId, boolean startedOrComplete, boolean undo, Object data) -
Method Summary
Methods inherited from class org.jjazz.chordleadsheet.api.event.ClsChangeEvent
getItem, getItems, getSource
-
Constructor Details
-
ClsActionEvent
public ClsActionEvent(ChordLeadSheet src, String actionId, boolean startedOrComplete, boolean undo, Object data) - Parameters:
src
-actionId
- The corresponding method name from the ChordLeadSheet interface which performs the change, e.g. "addItem".startedOrComplete
- False means action has started, true action is completeundo
- If true this action is part ofdata
- 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
-
isActionStarted
public boolean isActionStarted() -
isActionComplete
public boolean isActionComplete() -
getActionId
-
isUndo
public boolean isUndo() -
toString
-