Class SS_EditorTopComponent

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

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

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

See Also:
  • Field Details

  • Constructor Details

    • SS_EditorTopComponent

      public SS_EditorTopComponent(Song song)
      Create an editor.
      Parameters:
      song -
  • Method Details

    • getActions

      public Action[] getActions()
      Overridden to insert possible new actions from path "Actions/SS_EditorTopComponent".
      Overrides:
      getActions in class org.openide.windows.TopComponent
      Returns:
      The actions to be shown in the TopComponent popup menu.
    • 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
    • getSongModel

      public Song getSongModel()
    • 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 SS_Editor getEditor()
    • getUndoRedo

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

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

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

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

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

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

      public void componentOpened()
    • closeSilent

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

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

      public void componentClosed()
    • propertyChange

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