Package adams.gui.core
Class PopupMenuActions
- java.lang.Object
-
- adams.gui.core.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 Summary
Constructors Constructor Description PopupMenuActions()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
copyAbsolutePath(JPopupMenu menu, File path)
Copies the file's/dir's absolute path to the clipboard.static void
openInFileBrowser(JPopupMenu menu, File path)
Adds a menu item for opening the file/dir in the system's file browser.static void
openInPreviewBrowser(JPopupMenu menu, File path)
Adds a menu item for opening the file/dir in the Preview browser.static void
openInTerminal(JPopupMenu menu, File path)
Adds a menu item for opening the file/dir in the system's terminal.
-
-
-
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 appendpath
- 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 appendpath
- 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 appendpath
- 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 appendpath
- the file/dir
-
-