Class PopupMenuActions


  • public class PopupMenuActions
    extends Object
    Helper class for adding common actions to popup menus.
    Author:
    fracpete (fracpete at waikato dot ac dot nz)
    • Constructor Detail

      • PopupMenuActions

        public PopupMenuActions()
    • Method Detail

      • openInPreviewBrowser

        public static void openInPreviewBrowser​(JPopupMenu menu,
                                                File path)
        Adds a menu item for opening the file/dir in the Preview browser.
        Parameters:
        menu - the menu to append
        path - the file/dir
      • openInFileBrowser

        public static void openInFileBrowser​(JPopupMenu menu,
                                             File path)
        Adds a menu item for opening the file/dir in the system's file browser.
        Parameters:
        menu - the menu to append
        path - the file/dir
      • openInTerminal

        public static void openInTerminal​(JPopupMenu menu,
                                          File path)
        Adds a menu item for opening the file/dir in the system's terminal.
        Parameters:
        menu - the menu to append
        path - the file/dir
      • copyAbsolutePath

        public static void copyAbsolutePath​(JPopupMenu menu,
                                            File path)
        Copies the file's/dir's absolute path to the clipboard.
        Parameters:
        menu - the menu to append
        path - the file/dir