Class TrailViewerPanel

  • All Implemented Interfaces:
    adams.core.CleanUpHandler, adams.core.StatusMessageHandler, adams.gui.core.MenuBarProvider, adams.gui.event.FilterListener<Trail>, adams.gui.plugin.ToolPluginSupporter<TrailPanel>, adams.gui.sendto.SendToActionSupporter, ImageObserver, MenuContainer, Serializable, Accessible

    public class TrailViewerPanel
    extends adams.gui.core.BasePanel
    implements adams.gui.core.MenuBarProvider, adams.core.StatusMessageHandler, adams.gui.event.FilterListener<Trail>, adams.gui.sendto.SendToActionSupporter, adams.core.CleanUpHandler, adams.gui.plugin.ToolPluginSupporter<TrailPanel>
    Panel for viewing/processing trails.
    fracpete (fracpete at waikato dot ac dot nz)
    See Also:
    Serialized Form
    • Field Detail

      • m_Properties

        protected static adams.core.Properties m_Properties
        the setup for the panel.
      • m_TabbedPane

        protected adams.gui.core.BaseTabbedPane m_TabbedPane
        the tabbed pane for the trails.
      • m_StatusBar

        protected adams.gui.core.BaseStatusBar m_StatusBar
        the status bar.
      • m_MenuBar

        protected JMenuBar m_MenuBar
        the menu bar.
      • m_MenuItemFileOpenRecent

        protected JMenu m_MenuItemFileOpenRecent
        the "load recent" submenu.
      • m_MenuItemFileReloadCurrent

        protected JMenuItem m_MenuItemFileReloadCurrent
        the "reload current" menu item.
      • m_MenuItemFileReloadAll

        protected JMenuItem m_MenuItemFileReloadAll
        the "reload all" menu item.
      • m_MenuItemFileSaveAs

        protected JMenuItem m_MenuItemFileSaveAs
        the "save as" menu item.
      • m_MenuItemFileCloseCurrent

        protected JMenuItem m_MenuItemFileCloseCurrent
        the "close current" menu item.
      • m_MenuItemFileCloseAll

        protected JMenuItem m_MenuItemFileCloseAll
        the "close all" menu item.
      • m_MenuItemProcessFilterTrail

        protected JMenuItem m_MenuItemProcessFilterTrail
        the filter menu item.
      • m_MenuItemProcessFilterAllTrails

        protected JMenuItem m_MenuItemProcessFilterAllTrails
        the filter all menu item.
      • m_MenuItemViewOverlaysApplyAll

        protected JMenuItem m_MenuItemViewOverlaysApplyAll
        whether to apply overlay changes to all panels.
      • m_MenuItemViewRemoveOverlays

        protected JMenuItem m_MenuItemViewRemoveOverlays
        the remove overlays menu item.
      • m_MenuItemViewAddOverlay

        protected JMenuItem m_MenuItemViewAddOverlay
        the add overlay menu item.
      • m_MenuViewZoom

        protected JMenu m_MenuViewZoom
        the menu "zoom".
      • m_MenuItemViewZoomIn

        protected JMenuItem m_MenuItemViewZoomIn
        the menu item "zoom in".
      • m_MenuItemViewZoomOut

        protected JMenuItem m_MenuItemViewZoomOut
        the menu item "zoom out".
      • m_FileChooser

        protected TrailFileChooser m_FileChooser
        for loading trails from disk.
      • m_CurrentFilter

        protected<Trail> m_CurrentFilter
        the current filter.
      • m_DialogFilter

        protected adams.gui.visualization.container.FilterDialog m_DialogFilter
        the filter dialog.
      • m_FilterOverlayOriginalData

        protected boolean m_FilterOverlayOriginalData
        indicates whether the filtered data was overlayed over the original.
      • m_FilterAll

        protected boolean m_FilterAll
        indicates whether filter is applied to all trails.
      • m_DialogOverlay

        protected adams.gui.goe.GenericObjectEditorDialog m_DialogOverlay
        the dialog for selecting an overlay.
      • m_SearchPanel

        protected adams.gui.core.SearchPanel m_SearchPanel
        the search panel for the trail report.
      • m_RecentFilesHandler

        protected adams.gui.core.RecentFilesHandlerWithCommandline<JMenu> m_RecentFilesHandler
        the recent files handler.
    • Constructor Detail

      • TrailViewerPanel

        public TrailViewerPanel()
    • Method Detail

      • initialize

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

        protected void initGUI()
        Initializes the widgets.
        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
        the menu bar
      • getPanelCount

        public int getPanelCount()
        Returns the number of panels open.
        the number of panels
      • getPanelAt

        public TrailPanel getPanelAt​(int index)
        Returns the specified trail panel.
        index - the index of the panel
        the panel, null if invalid index
      • getCurrentPanel

        public TrailPanel getCurrentPanel()
        Returns the currently selected trail panel.
        Specified by:
        getCurrentPanel in interface adams.gui.plugin.ToolPluginSupporter<TrailPanel>
        the panel, null if none selected
      • getAllPanels

        public TrailPanel[] getAllPanels()
        Returns the all panels.
        the panels
      • updateMenu

        protected void updateMenu()
        updates the enabled state of the menu items.
      • reloadCurrent

        protected void reloadCurrent()
        Reloads the current panel's trail.
      • reloadAll

        protected void reloadAll()
        Reloads all trails.
      • closeCurrent

        public void closeCurrent()
        Removes the current tab.
      • closeAll

        public void closeAll()
        Removes all the data.
      • newPanel

        protected TrailPanel newPanel​(Trail map)
        Creates a new panel and configures it.
        map - the map to create the panel for
        the panel
      • load

        public void load​(File[] files,
                         AbstractTrailReader reader)
        Loads trails from disk, popping up a file chooser dialog.
      • load

        public void load​(File file)
        Loads the specified file from disk. If no reader can be determined, the
      • load

        public void load()
        Loads trails from disk, popping up a file chooser dialog.
      • saveAs

        protected void saveAs()
        Saves the current trail to disk.
      • close

        public void close()
        closes the dialog/frame.
      • filter

        protected void filter()
        pops up GOE dialog for filter.
      • filter

        public void filter​(adams.gui.event.FilterEvent<Trail> e)
        Filters the data.
        Specified by:
        filter in interface adams.gui.event.FilterListener<Trail>
        e - the event
      • search

        public void search​(String text,
                           boolean isRegExp)
        Performs a search.
        text - the search text
        isRegExp - whether the search text is a regular expression
      • zoom

        protected void zoom​(int zoom)
        Zooms in/out.
        zoom - the zoom (in percent)
      • selectOverlay

        protected AbstractTrailOverlay selectOverlay()
        Lets the user select an overlay from a dialog. Returns the overlay if successfully selected (ie not dialog aborted).
        the selected overlay, null if none selected
      • showStatus

        public void showStatus​(String msg)
        Displays a message.
        Specified by:
        showStatus in interface adams.core.StatusMessageHandler
        msg - the message to display
      • getSendToClasses

        public Class[] getSendToClasses()
        Returns the classes that the supporter generates.
        Specified by:
        getSendToClasses in interface adams.gui.sendto.SendToActionSupporter
        the classes
      • hasSendToItem

        public boolean hasSendToItem​(Class[] cls)
        Checks whether something to send is available.
        Specified by:
        hasSendToItem in interface adams.gui.sendto.SendToActionSupporter
        cls - the classes to retrieve an item for
        true if an object is available for sending
      • getSendToItem

        public Object getSendToItem​(Class[] cls)
        Returns the object to send.
        Specified by:
        getSendToItem in interface adams.gui.sendto.SendToActionSupporter
        cls - the classes to retrieve the item for
        the item to send
      • getProperties

        public adams.core.Properties getProperties()
        Returns the properties for this panel.
        the properties file for this panel
      • cleanUp

        public void cleanUp()
        Cleans up data structures, frees up memory.
        Specified by:
        cleanUp in interface adams.core.CleanUpHandler