Class ImageProcessorPanel

    • Field Detail

      • m_SplitPane

        protected BaseSplitPane m_SplitPane
        the split pane.
      • m_MenuBar

        protected JMenuBar m_MenuBar
        the menu bar, if used.
      • m_MenuItemFileOpen

        protected JMenuItem m_MenuItemFileOpen
        the menu item "open".
      • m_MenuItemFileLoadRecent

        protected JMenu m_MenuItemFileLoadRecent
        the "load recent" submenu.
      • m_MenuItemFileClose

        protected JMenuItem m_MenuItemFileClose
        the menu item "close".
      • m_MenuItemFileCloseAll

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

        protected JMenuItem m_MenuItemViewHorizontal
        the menu item "horizontal".
      • m_MenuItemViewVertical

        protected JMenuItem m_MenuItemViewVertical
        the menu item "vertical".
      • m_MenuItemEditUndo

        protected JMenuItem m_MenuItemEditUndo
        the menu item "undo".
      • m_MenuItemEditRedo

        protected JMenuItem m_MenuItemEditRedo
        the menu item "redo".
      • m_MenuViewLocateObjects

        protected JMenuItem m_MenuViewLocateObjects
        the menu "locate objects".
      • m_MenuViewRemoveOverlays

        protected JMenuItem m_MenuViewRemoveOverlays
        the menu "remove overlays".
      • m_TitleGenerator

        protected TitleGenerator m_TitleGenerator
        for generating the title.
      • m_FileChooserImage

        protected ImageFileChooser m_FileChooserImage
        the file chooser for the pictures.
      • m_FileChooserFlow

        protected FlowFileChooser m_FileChooserFlow
        the file chooser for the flows.
      • m_PanelFlow

        protected FlowPanel m_PanelFlow
        the flow panel.
      • m_LabelProgress

        protected JLabel m_LabelProgress
        the label for the progress.
      • m_ButtonNew

        protected BaseButton m_ButtonNew
        the "new flow" button.
      • m_ButtonLoad

        protected BaseButton m_ButtonLoad
        the "load flow" button.
      • m_ButtonSave

        protected BaseButton m_ButtonSave
        the "save flow" button.
      • m_ButtonCheck

        protected BaseButton m_ButtonCheck
        the "check flow" button.
      • m_ButtonRun

        protected BaseButton m_ButtonRun
        the "run flow" button.
      • m_LastObjectLocatorOriginal

        protected AbstractObjectLocator m_LastObjectLocatorOriginal
        the last object locator in use (original).
      • m_LastObjectLocatorProcessed

        protected AbstractObjectLocator m_LastObjectLocatorProcessed
        the last object locator in use (processed).
      • m_LastImageOverlayOriginal

        protected ImageOverlay m_LastImageOverlayOriginal
        the last image overlay in use (original).
      • m_LastImageOverlayProcessed

        protected ImageOverlay m_LastImageOverlayProcessed
        the last image overlay in use (processed).
    • Constructor Detail

      • ImageProcessorPanel

        public ImageProcessorPanel()
    • Method Detail

      • initialize

        protected void initialize()
        Initializes the members.
        Overrides:
        initialize in class BasePanel
      • initGUI

        protected void initGUI()
        Initializes the widgets.
        Overrides:
        initGUI in class BasePanel
      • finishInit

        protected void finishInit()
        finishes the initialization.
        Overrides:
        finishInit in class BasePanel
      • update

        protected void update()
        Updates the title and menu.
      • getTitleGenerator

        public TitleGenerator getTitleGenerator()
        Returns the title generator in use.
        Returns:
        the generator
      • updateTitle

        protected void updateTitle()
        Updats the title of the dialog/frame if applicable.
      • getCurrentFile

        public File getCurrentFile()
        Returns the current filename.
        Returns:
        the current filename, can be null
      • getFileAt

        public File getFileAt​(int index)
        Returns the current filename.
        Parameters:
        index - the tab index
        Returns:
        the current filename, can be null
      • updateMenu

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

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

        public ImageProcessorSubPanel getCurrentPanel()
        Returns the image panel in the currently selected tab.
        Returns:
        the image panel, null if none available
      • getPanelAt

        public ImageProcessorSubPanel getPanelAt​(int index)
        Returns the image panel of the specified tab.
        Parameters:
        index - the tab index
        Returns:
        the image panel, null if none available
      • getAllPanels

        public ImageProcessorSubPanel[] getAllPanels()
        Returns all the image panels.
        Returns:
        the image panels
      • getPanelCount

        public int getPanelCount()
        Returns the number of panels in the multi-page pane.
        Returns:
        the number of panels
      • open

        protected void open()
        Opens an image.
      • load

        public void load​(File file)
        Loads the specified file in a new panel. Uses default reader.
        Parameters:
        file - the file to load
      • load

        public void load​(File file,
                         ImageReader reader)
        Loads the specified file in a new panel.
        Parameters:
        file - the file to load
        reader - the reader to use
      • close

        protected void close()
        Closes the current image.
      • closeAll

        protected void closeAll()
        Closes all images.
      • exit

        protected void exit()
        Exits the viewer.
      • getUndo

        public Undo getUndo()
        Returns the current undo manager, can be null.
        Returns:
        the undo manager, if any
      • isUndoSupported

        public boolean isUndoSupported()
        Returns whether an Undo manager is currently available.
        Returns:
        true if an undo manager is set
      • undo

        public void undo()
        peforms an undo if possible.
      • redo

        public void redo()
        peforms an redo if possible.
      • getFlow

        public FlowPanel getFlow()
        Returns the panel for the flow.
        Returns:
        the panel
      • newFlow

        protected void newFlow()
        Replaces the current flow snippet with an empty one.
      • loadFlow

        protected void loadFlow()
        Allows the user to load a flow snippet.
      • saveFlow

        protected void saveFlow()
        Allows the user to save the current flow snippet.
      • checkFlow

        protected boolean checkFlow​(boolean silent)
        Checks the flow.
        Parameters:
        silent - only pops up a dialog if invalid flow
        Returns:
        true if flow ok
      • runFlow

        protected void runFlow()
        Runs the flow.
      • selectImageOverlay

        public ImageOverlay selectImageOverlay​(ImageOverlay last)
        Displays a dialog for the user to configure an image overlay and then returns it.
        Returns:
        the image overaly, null if cancelled
      • selectObjectLocator

        public AbstractObjectLocator selectObjectLocator​(AbstractObjectLocator last)
        Displays a dialog for the user to configure an object locator and then returns it.
        Returns:
        the object locator, null if cancelled
      • setScale

        public void setScale​(double value,
                             boolean original)
        Sets the scaling factor (0-16). Use -1 to fit inside panel.
        Parameters:
        value - the scaling factor
        original - if true setting the scale for the original, otherwise for the processed image
      • cleanUp

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