Class AnnotatorPanel

  • All Implemented Interfaces:
    adams.core.CleanUpHandler, adams.gui.core.MenuBarProvider, ImageObserver, MenuContainer, Serializable, Accessible

    public class AnnotatorPanel
    extends adams.gui.core.BasePanel
    implements adams.gui.core.MenuBarProvider, adams.core.CleanUpHandler
    Panel for viewing and annotating videos
    Author:
    sjb90
    See Also:
    Serialized Form
    • Field Detail

      • m_Bindings

        protected List<Binding> m_Bindings
        the list to store the bindings
      • m_TitleGenerator

        protected adams.gui.core.TitleGenerator m_TitleGenerator
        a title generator
      • m_BindingPanel

        protected adams.gui.core.BasePanel m_BindingPanel
        a panel for the annotation bindings
      • m_MenuBar

        protected JMenuBar m_MenuBar
        menu bad
      • m_MenuItemFileOpen

        protected JMenuItem m_MenuItemFileOpen
        menu item for 'open'
      • m_RecentVideosHandler

        protected adams.gui.core.RecentFilesHandler<JMenu> m_RecentVideosHandler
        Recent file handler for videos
      • m_MenuFileLoadRecentVideos

        protected JMenu m_MenuFileLoadRecentVideos
        recent files menu for videos
      • m_RecentAnnotationsHandler

        protected adams.gui.core.RecentFilesHandler<JMenu> m_RecentAnnotationsHandler
        Recent file handler for Annotations
      • m_MenuAnnotationLoadRecentAnnotations

        protected JMenu m_MenuAnnotationLoadRecentAnnotations
        recent files menu for Annotations
      • m_RecentBackgroundHandler

        protected adams.gui.core.RecentFilesHandler<JMenu> m_RecentBackgroundHandler
        Recent file handler for backgrounds
      • m_MenuBackgroundLoadRecentBackground

        protected JMenu m_MenuBackgroundLoadRecentBackground
        recent files menu for backgrounds
      • m_MenuItemVideoClose

        protected JMenuItem m_MenuItemVideoClose
        for closing the program
      • m_ActionNewBindings

        protected adams.gui.action.AbstractBaseAction m_ActionNewBindings
        New Bindings action.
      • m_ActionEditBindings

        protected adams.gui.action.AbstractBaseAction m_ActionEditBindings
        Edit Bindings action
      • m_ActionNewAnnotations

        protected adams.gui.action.AbstractBaseAction m_ActionNewAnnotations
        New annotations action
      • m_ActionOpenAnnotations

        protected adams.gui.action.AbstractBaseAction m_ActionOpenAnnotations
      • m_MenuItemAnnotationsOpen

        protected JMenuItem m_MenuItemAnnotationsOpen
      • m_ActionSaveAnnotations

        protected adams.gui.action.AbstractBaseAction m_ActionSaveAnnotations
      • m_ActionExtractBackground

        protected adams.gui.action.AbstractBaseAction m_ActionExtractBackground
        extract background action
      • m_ActionExportAnnotations

        protected adams.gui.action.AbstractBaseAction m_ActionExportAnnotations
        Export annotations
      • m_ActionSaveBindings

        protected adams.gui.action.AbstractBaseAction m_ActionSaveBindings
        save bindings
      • m_ActionLoadBindings

        protected adams.gui.action.AbstractBaseAction m_ActionLoadBindings
        open bindings
      • m_dateFormatter

        protected adams.core.DateFormat m_dateFormatter
        Date formater for outputing timestamps
      • m_ExportFileChooser

        protected adams.gui.chooser.SpreadSheetFileChooser m_ExportFileChooser
        the file chooser for exporting trails.
      • m_SavePropertiesFileChooser

        protected adams.gui.chooser.BaseFileChooser m_SavePropertiesFileChooser
        the file chooser for saving bindings.
      • m_LoadPropertiesFileChooser

        protected adams.gui.chooser.BaseFileChooser m_LoadPropertiesFileChooser
        the file chooser for saving bindings.
      • m_EventQueue

        protected EventQueue m_EventQueue
        the queue that handles binding events
      • m_RecentBindingsHandler

        protected adams.gui.core.RecentFilesHandler<JMenu> m_RecentBindingsHandler
        handler for recent bindings
      • m_MenuFileLoadRecentBindings

        protected JMenu m_MenuFileLoadRecentBindings
        recent bindings menu
      • m_Ticker

        protected Ticker m_Ticker
        the ticker that takes care of toggleable bindigns
      • m_ExtractDialog

        protected ExtractBackgroundDialog m_ExtractDialog
        the dialog for extracting the background image
      • m_BackgroundImage

        protected BufferedImage m_BackgroundImage
        the extracted background image
      • m_ActionClearBackground

        protected adams.gui.action.AbstractBaseAction m_ActionClearBackground
        clear background action
      • m_ActionOpenBackground

        protected adams.gui.action.AbstractBaseAction m_ActionOpenBackground
        open background action
      • m_ActionSaveBackground

        protected adams.gui.action.AbstractBaseAction m_ActionSaveBackground
        save background action
      • m_ActionViewBackground

        protected adams.gui.action.AbstractBaseAction m_ActionViewBackground
        view background action
      • m_BackgroundFileChooser

        protected adams.gui.chooser.ImageFileChooser m_BackgroundFileChooser
        file chooser for images
      • m_MenuItemBackgroundExtract

        protected JMenuItem m_MenuItemBackgroundExtract
        menu item for background extract
      • m_MenuItemBackgroundSaveAs

        protected JMenuItem m_MenuItemBackgroundSaveAs
        menu item for background save as
      • m_MenuItemBackgroundView

        protected JMenuItem m_MenuItemBackgroundView
        menu item for background view
    • Constructor Detail

      • AnnotatorPanel

        public AnnotatorPanel()
    • Method Detail

      • initialize

        protected void initialize()
        Initializes the members.
        Overrides:
        initialize in class adams.gui.core.BasePanel
      • initActions

        protected void initActions()
        for initializing actions
      • viewBackground

        protected void viewBackground()
        shows the current background image in a dialog
      • openBackground

        protected void openBackground()
        loads a background from a file
      • openBackground

        protected void openBackground​(adams.core.io.PlaceholderFile file)
      • saveBackground

        protected void saveBackground()
        Saves the background to the selected file
      • clearBackground

        protected void clearBackground()
        Clears the current background.
      • initGUI

        protected void initGUI()
        Initializes the widgets.
        Overrides:
        initGUI in class adams.gui.core.BasePanel
      • getMenuBar

        public JMenuBar getMenuBar()
        Creates a menu bar (singleton per panel object). Can be used in frames.
        Specified by:
        getMenuBar in interface adams.gui.core.MenuBarProvider
        Returns:
        the menu bar
      • update

        protected void update()
        Updates title and menu items.
      • updateTitle

        protected void updateTitle()
        Updates the title of the dialog.
      • updateMenu

        protected void updateMenu()
        Updates the state of the menu items.
      • cleanUp

        public void cleanUp()
        Specified by:
        cleanUp in interface adams.core.CleanUpHandler
      • updateBindingBar

        protected void updateBindingBar()
        Updates the binding bar to contain an indicator for every binding
      • resetBindingBar

        protected void resetBindingBar()
      • setTitle

        public void setTitle​(String value)
        Sets the base title to use for the title generator.
        Parameters:
        value - the title to use
        See Also:
        m_TitleGenerator
      • close

        protected void close()
        Closes the dialog, if possible.
      • newBindings

        public void newBindings()
        Resets the bindings.
      • editBindings

        public void editBindings()
        Pops up dialog for editing bindings
      • export

        public void export()
        Exports the current trail to a spreadsheet file that the user selects.
      • loadBindings

        public void loadBindings()
        Loads bindings from a file selected by the user
      • saveAnnotations

        protected void saveAnnotations()
        Saves the current annotation to a trail file
      • openAnnotations

        protected void openAnnotations()
        Loads annotations from a trail file
      • openAnnotations

        protected void openAnnotations​(adams.core.io.PlaceholderFile file)
        Loads annotations from a trail file
      • loadBindings

        public void loadBindings​(String bindingPath)
        Loads bindings from a file selected by the user
      • saveBindings

        public void saveBindings()
        Saves the current bindings to a file selected by the user