Added license and copyright notice.
[instantlauncher.git] / src / main / java / eu / svjatoslav / instantlauncher / menu / Menu.java
index 2201868..4f97952 100755 (executable)
@@ -1,3 +1,11 @@
+/*
+ * Instantlauncher. Copyright ©2012-2019, Svjatoslav Agejenko, svjatoslav@svjatoslav.eu
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of version 3 of the GNU Lesser General Public License
+ * or later as published by the Free Software Foundation.
+ */
+
 package eu.svjatoslav.instantlauncher.menu;
 
 import eu.svjatoslav.commons.gui.dialog.ExceptionDialog;
@@ -149,17 +157,17 @@ class Menu {
 
     private void menuItemSelected(final File chosenFile) {
         for (final MenuListener menuListener : menuListeners)
-            menuListener.menuItemSelected(this, chosenFile);
+            menuListener.menuItemSelected(chosenFile);
     }
 
     private void menuItemSelectedAlternative(final File chosenFile) {
         for (final MenuListener menuListener : menuListeners)
-            menuListener.menuItemSelectedAlternative(this, chosenFile);
+            menuListener.menuItemSelectedAlternative(chosenFile);
     }
 
     private void menuItemSelectedAlternative2(final File chosenFile) {
         for (final MenuListener menuListener : menuListeners)
-            menuListener.menuItemSelectedAlternative2(this, chosenFile);
+            menuListener.menuItemSelectedAlternative2(chosenFile);
     }
 
     private void setSelected(final JButton selectedButton, final File selectedFile) {
@@ -183,11 +191,11 @@ class Menu {
         public void mouseClicked(final MouseEvent e) {
             try {
 
-                if (e.getButton() == 1)
+                if (e.getButton() == 1) // left mouse click
                     parentMenu.menuItemSelected(file);
-                if (e.getButton() == 2)
+                if (e.getButton() == 2) // middle mouse click
                     parentMenu.menuItemSelectedAlternative2(file);
-                if (e.getButton() == 3)
+                if (e.getButton() == 3) //right mouse click
                     parentMenu.menuItemSelectedAlternative(file);
             } catch (final Exception ex) {
                 new ExceptionDialog(ex);