Skip to content
Snippets Groups Projects
Commit 21765bcb authored by tjc's avatar tjc
Browse files

tidy

git-svn-id: svn+ssh://svn.internal.sanger.ac.uk/repos/svn/pathsoft/artemis/trunk@5452 ee4ac58c-ac51-4696-9907-e4b3aa274f04
parent 2d8665f9
No related branches found
No related tags found
No related merge requests found
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
* *
* $Header: //tmp/pathsoft/artemis/uk/ac/sanger/artemis/components/SelectionMenu.java,v 1.5 2007-02-06 08:50:10 tjc Exp $ * $Header: //tmp/pathsoft/artemis/uk/ac/sanger/artemis/components/SelectionMenu.java,v 1.6 2007-02-21 16:30:06 tjc Exp $
*/ */
package uk.ac.sanger.artemis.components; package uk.ac.sanger.artemis.components;
...@@ -31,6 +31,7 @@ import uk.ac.sanger.artemis.*; ...@@ -31,6 +31,7 @@ import uk.ac.sanger.artemis.*;
import java.awt.event.*; import java.awt.event.*;
import javax.swing.*; import javax.swing.*;
import java.awt.*; import java.awt.*;
import java.util.Hashtable;
import java.util.Vector; import java.util.Vector;
/** /**
...@@ -39,7 +40,7 @@ import java.util.Vector; ...@@ -39,7 +40,7 @@ import java.util.Vector;
* getParentFrame() to find the owning JFrame of the menu. * getParentFrame() to find the owning JFrame of the menu.
* *
* @author Kim Rutherford * @author Kim Rutherford
* @version $Id: SelectionMenu.java,v 1.5 2007-02-06 08:50:10 tjc Exp $ * @version $Id: SelectionMenu.java,v 1.6 2007-02-21 16:30:06 tjc Exp $
**/ **/
public class SelectionMenu extends JMenu public class SelectionMenu extends JMenu
...@@ -425,6 +426,19 @@ public class SelectionMenu extends JMenu ...@@ -425,6 +426,19 @@ public class SelectionMenu extends JMenu
} }
} }
/* public void getAccelerators()
{
Hashtable keyStrokeHash = new Hashtable();
Component menus[] = getMenuComponents();
for(int i = 0; i < menus.length; i++)
{
JMenuItem menu = (JMenuItem)menus[i];
KeyStroke ks = menu.getAccelerator();
if(ks != null)
keyStrokeHash.put(menu.getText(), ks);
}
}*/
public static String getKeyText(int keyCode) public static String getKeyText(int keyCode)
{ {
if(keyCode >= KeyEvent.VK_0 && keyCode <= KeyEvent.VK_9 || if(keyCode >= KeyEvent.VK_0 && keyCode <= KeyEvent.VK_9 ||
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment