Class CL_EditorTopComponent

java.lang.Object
java.awt.Component
java.awt.Container
javax.swing.JComponent
org.openide.windows.TopComponent
org.jjazz.cl_editor.api.CL_EditorTopComponent
All Implemented Interfaces:
ImageObserver, MenuContainer, PropertyChangeListener, Externalizable, Serializable, EventListener, Accessible, org.openide.util.HelpCtx.Provider, org.openide.util.Lookup.Provider

public final class CL_EditorTopComponent extends org.openide.windows.TopComponent implements PropertyChangeListener
Top component for the ChordLeadSheet editor.

TopComponent header's popupmenu actions can be added at path "Actions/CL_EditorTopComponent".
Accept a paired TopComponent which must be always be shown/closed in the same time.
TopComponent's lookup is the CL_Editor's lookup.

See Also:
  • Field Details

  • Constructor Details

    • CL_EditorTopComponent

      public CL_EditorTopComponent(Song song)
  • Method Details

    • getLookup

      public org.openide.util.Lookup getLookup()
      Specified by:
      getLookup in interface org.openide.util.Lookup.Provider
      Overrides:
      getLookup in class org.openide.windows.TopComponent
    • getActions

      public Action[] getActions()
      Overridden to insert possible new actions from path "Actions/CL_EditorTopComponent".
      Overrides:
      getActions in class org.openide.windows.TopComponent
      Returns:
      The actions to be shown in the TopComponent popup menu.
    • getPersistenceType

      public int getPersistenceType()
      Overrides:
      getPersistenceType in class org.openide.windows.TopComponent
    • closeSilent

      public void closeSilent()
      Close the TopComponent without asking for user confirmation.
    • canClose

      public boolean canClose()
      Overrides:
      canClose in class org.openide.windows.TopComponent
    • setPairedTopComponent

      public void setPairedTopComponent(org.openide.windows.TopComponent tc)
      Bind this TopComponent to another TopComponent. Show/Close operations initiated on this TopComponent will be replicated on the paired TopComponent.
      Parameters:
      tc -
    • getEditor

      public CL_Editor getEditor()
    • getSongModel

      public Song getSongModel()
    • getUndoRedo

      public org.openide.awt.UndoRedo getUndoRedo()
      Overrides:
      getUndoRedo in class org.openide.windows.TopComponent
    • getActive

      public static CL_EditorTopComponent getActive()
      Return the active (i.e. focused or ancestor of the focused component) CL_EditorTopComponent.
      Returns:
      Can be null
    • getVisible

      public static CL_EditorTopComponent getVisible()
      Return the visible CL_EditorTopComponent within its window mode.

      The visible SS_EditorTopComponent might not be the active one (for example if it's the corresponding SS_EditorTopComponent which is active)

      Returns:
      Can be null if no SS_EditorTopComponent within its window mode.
    • get

      public static CL_EditorTopComponent get(ChordLeadSheet cls)
      Return the editor for a specific ChordLeadSheet.
      Parameters:
      cls -
      Returns:
      Null if not found in the open CL_EditorTopComponent windows.
    • componentOpened

      public void componentOpened()
    • componentClosed

      public void componentClosed()
    • propertyChange

      public void propertyChange(PropertyChangeEvent evt)
      Specified by:
      propertyChange in interface PropertyChangeListener