Class SessionEditor

All Implemented Interfaces:
IExtendable, ClipboardOwner, ImageObserver, MenuContainer, Serializable, Accessible
Direct Known Subclasses:
CorpusTemplateEditor

public class SessionEditor extends JPanel implements IExtendable, ClipboardOwner

Main UI for the application. This window provides the interface for creating and modifying Phon Sessions.

This window supports plug-ins. Plug-ins can provide custom EditorViews.

See Also:
  • Field Details

    • BACKUP_WHEN_SAVING

      public static final String BACKUP_WHEN_SAVING
  • Constructor Details

  • Method Details

    • getTitle

      public String getTitle()
    • isFinishedLoading

      public boolean isFinishedLoading()
      Has the editor finished loading all initial views
      Returns:
      true if EditorEventType.EditorFinishedLoading has been called
    • setTitle

      public void setTitle(String title)
    • getStatusBar

      public SessionEditorStatusBar getStatusBar()
      Get the editor status bar
      Returns:
      statusBar
    • getDataModel

      public EditorDataModel getDataModel()
      Retrieve the data model
      Returns:
      the editor data model
    • getViewModel

      public EditorViewModel getViewModel()
      Retrieve the view model
      Returns:
      the editor view model
    • getEventManager

      public EditorEventManager getEventManager()
      Get the event manager
      Returns:
      the editor event model
    • getSelectionModel

      public EditorSelectionModel getSelectionModel()
      Get the selection model
      Returns:
      editor selection model
    • getMediaModel

      public SessionMediaModel getMediaModel()
      Get the media model
      Returns:
      session media model
    • getProject

      public Project getProject()
    • getSession

      public Session getSession()
      Get session
      Returns:
      session
    • getCurrentRecordIndex

      public int getCurrentRecordIndex()
      Return the index of the current record.
      Returns:
      index of current record
    • setCurrentRecordIndex

      public void setCurrentRecordIndex(int index)
      Set the index of the current record.
      Throws:
      ArrayIndexOutOfBoundsException
    • setCurrentRecordIndex

      public void setCurrentRecordIndex(int index, Component source)
      Set current record index and indicate a different source for the event
      Parameters:
      index -
      source -
      Throws:
      ArrayIndexOutOfBoundsException
    • currentRecord

      public Record currentRecord()
      Return the current record
      Returns:
      current record
    • getUndoSupport

      public SessionEditUndoSupport getUndoSupport()
      Get undo support for the editor
      Returns:
      undo support
    • getUndoManager

      public UndoManager getUndoManager()
      Get undo manager for the editor
      Returns:
      undo manager
    • setModified

      public void setModified(boolean modified)
      Set the modified flag
      Parameters:
      modified -
    • isModified

      public boolean isModified()
    • generateTitle

      public String generateTitle()
      Generate the window title
      Returns:
      window title
    • onSessionMediaChanged

      public void onSessionMediaChanged(EditorEvent<EditorEventType.SessionMediaChangedData> ee)
    • setupMenu

      public void setupMenu(JMenuBar menuBar)
    • saveData

      public boolean saveData() throws IOException
      Throws:
      IOException
    • lostOwnership

      public void lostOwnership(Clipboard clipboard, Transferable contents)
      Specified by:
      lostOwnership in interface ClipboardOwner
    • getExtensions

      public Set<Class<?>> getExtensions()
      Description copied from interface: IExtendable
      Return all extension types supported
      Specified by:
      getExtensions in interface IExtendable
    • getExtension

      public <T> T getExtension(Class<T> cap)
      Description copied from interface: IExtendable
      Get the requested extension if available.
      Specified by:
      getExtension in interface IExtendable
      Returns:
      the capability object or null if the cability is not available
    • putExtension

      public <T> T putExtension(Class<T> cap, T impl)
      Description copied from interface: IExtendable
      Add a new extension.
      Specified by:
      putExtension in interface IExtendable
      Parameters:
      cap - the extension to add
      Returns:
      the added extension implementation
    • removeExtension

      public <T> T removeExtension(Class<T> cap)
      Description copied from interface: IExtendable
      Remove a capability.
      Specified by:
      removeExtension in interface IExtendable
      Parameters:
      cap - the capability to remove