Interface WritableItem<T>

Type Parameters:
T -
All Superinterfaces:
ChordLeadSheetItem<T>, Comparable<ChordLeadSheetItem<?>>, Transferable

public interface WritableItem<T> extends ChordLeadSheetItem<T>
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:
  • Method Details

    • setPosition

      PropertyChangeEvent setPosition(Position pos)
      Parameters:
      pos -
      Returns:
      The event to be fired by caller.
    • setData

      PropertyChangeEvent setData(T data)
      Parameters:
      data -
      Returns:
      The event to be fired by caller.
    • setContainer

      void setContainer(ChordLeadSheet cls)
      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

      void firePropertyChangeEvent(PropertyChangeEvent event)
      Fire an event to the ChordLeadSheetItem listeners.
      Parameters:
      event -