Interface WritableItem<T>
- Type Parameters:
T-
- All Superinterfaces:
ChordLeadSheetItem<T>, Comparable<ChordLeadSheetItem<?>>, Transferable
Mutating methods of a ChordLeadSheetItem.
These methods should be *ONLY* called by the enclosing ChordLeadSheet methods which manage global synchronization. It means that WritableItem methods implementations do not have to use lock. The interface is made public only to enable creation of custom ChordLeadSheetItem subclasses.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface ChordLeadSheetItem
ChordLeadSheetItem.DefaultComparableItem -
Field Summary
Fields inherited from interface ChordLeadSheetItem
PROP_ITEM_DATA, PROP_ITEM_POSITION -
Method Summary
Modifier and TypeMethodDescriptionvoidFire an event to the ChordLeadSheetItem listeners.voidSet an optional container for this item.setPosition(Position pos) Methods inherited from interface ChordLeadSheetItem
addPropertyChangeListener, compareToSamePosition, compareToThreadUnsafe, getClientProperties, getContainer, getCopy, getData, getPosition, getPositionOrder, isBarSingleItem, removePropertyChangeListenerMethods inherited from interface Comparable
compareToMethods inherited from interface Transferable
getTransferData, getTransferDataFlavors, isDataFlavorSupported
-
Method Details
-
setPosition
- Parameters:
pos-- Returns:
- The event to be fired by caller.
-
setData
- Parameters:
data-- Returns:
- The event to be fired by caller.
-
setContainer
Set an optional container for this item.No consistency check is performed: caller is responsible to make sure this item is consistent with cls (e.g. position is within cls bounds, section does not have a name clash, ...).
- Parameters:
cls- Can be null.
-
firePropertyChangeEvent
Fire an event to the ChordLeadSheetItem listeners.- Parameters:
event-
-