Class DiffPanel

    • Field Detail


        public static final String SESSION_FILE_LEFT
        the file to store the recent files in (left panel).
        See Also:
        Constant Field Values

        public static final String SESSION_FILE_RIGHT
        the file to store the recent files in (right panel).
        See Also:
        Constant Field Values
      • m_ClipboardLeft

        protected ArrayList<String> m_ClipboardLeft
        the left content from the clipboard (null if none).
      • m_ClipboardRight

        protected ArrayList<String> m_ClipboardRight
        the right content from the clipboard (null if none).
      • m_FileLeft

        protected File m_FileLeft
        the file with the left content.
      • m_FileRight

        protected File m_FileRight
        the file with the right content.
      • m_MenuBar

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

        protected JMenu m_MenuFileLoadRecentLeft
        the "load recent (left)" submenu.
      • m_MenuFileLoadRecentRight

        protected JMenu m_MenuFileLoadRecentRight
        the "load recent (right)" submenu.
      • m_MenuItemEditPasteLeft

        protected JMenuItem m_MenuItemEditPasteLeft
        the "Paste (left)" submenu.
      • m_MenuItemEditPasteRight

        protected JMenuItem m_MenuItemEditPasteRight
        the "Paste (right)" submenu.
      • m_ButtonPasteLeft

        protected BaseButton m_ButtonPasteLeft
        the button for pasting the left content.
      • m_ButtonPasteRight

        protected BaseButton m_ButtonPasteRight
        the button for pasting the right content.
      • m_RecentFilesHandlerLeft

        protected RecentFilesHandler<JMenu> m_RecentFilesHandlerLeft
        the recent files handler (left).
      • m_RecentFilesHandlerRight

        protected RecentFilesHandler<JMenu> m_RecentFilesHandlerRight
        the recent files handler (right).
    • Constructor Detail

      • DiffPanel

        public DiffPanel()
    • Method Detail

      • initialize

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

        protected void initGUI()
        Initializes the widgets.
        initGUI in class BasePanel
      • getMenuBar

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

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

        protected void pasteLeft()
        Pastes the clipboard content into the left panel, if possible.
      • pasteRight

        protected void pasteRight()
        Pastes the clipboard content into the right panel, if possible.
      • openFiles

        protected void openFiles()
        Opens dialog for selecting two files and then comparing them.
      • compareFiles

        public void compareFiles​(File file1,
                                 File file2)
        Compares the two files (if they exist).
        file1 - the first file
        file2 - the second file
      • reload

        protected void reload()
        Compares the content again.
      • compare

        protected void compare()
        Performs the comparison, either using files or clipboard content.