Class ChordSymbolEditorDialog

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible, RootPaneContainer, WindowConstants, DisplayTransposableRenderer

public abstract class ChordSymbolEditorDialog extends JDialog implements DisplayTransposableRenderer
An editor dialog for a chord symbol.

The Dialog should not directly change the model, it should just return the proposed changes. The calling application will update the model if OK and manage the undo/redo aspects.

See Also:
  • Method Details

    • getDefault

      public static ChordSymbolEditorDialog getDefault()
      Search the global lookup for an instance.
      Returns:
      Can be null if no instance found.
    • preset

      public abstract void preset(String title, CLI_ChordSymbol item, char key, boolean enableAlternate)
      Prepare the dialog before being used.

      Method must take into account a possible display transposition if it was previously set.

      Parameters:
      title - Dialog title
      item -
      key - If different from 0 it represents the pressed key which triggered this dialog.
      enableAlternate - Enable the edition of the alternate chord symbol
      See Also:
    • exitedOk

      public abstract boolean exitedOk()
      Returns:
      True if dialog was exited OK, false if dialog operation was cancelled.
    • getData

      public abstract ExtChordSymbol getData()
      The new ExtChordSymbol data to be applied to the item.
      Returns:
      Non null only if exitedOk() was true.
    • cleanup

      public abstract void cleanup()
      Cleanup references to preset data and dialog results, caller must call this method after dialog has exited.
    • setDisplayTransposition

      public abstract void setDisplayTransposition(int dt)
      Must be called before calling preset() to be effective.
      Specified by:
      setDisplayTransposition in interface DisplayTransposableRenderer
      Parameters:
      dt -
      See Also:
    • getDisplayTransposition

      public abstract int getDisplayTransposition()
      Specified by:
      getDisplayTransposition in interface DisplayTransposableRenderer