args = new String[] {
// "headless",
"open", "examples/uniref50.fa",
-- "features",
-- "examples/exampleFeatures.txt"
-- , "noannotation"
- , "showoverview"
- // , "png", "test-bh.png"
++// "features",
++// "examples/exampleFeatures.txt"
++// , "noannotation"
+ //, "showoverview"
+ //, "png", "test-bh.png"
};
}
*/
protected void addQuitHandler()
{
++<<<<<<< HEAD
+ getRootPane()
+ .getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(
+ KeyStroke
+ .getKeyStroke(KeyEvent.VK_Q,
+ jalview.util.ShortcutKeyMaskExWrapper
+ .getMenuShortcutKeyMaskEx()),
++=======
+ getRootPane().getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW)
+ .put(KeyStroke.getKeyStroke(KeyEvent.VK_Q,
+ Platform.SHORTCUT_KEY_MASK),
++>>>>>>> refs/heads/Jalview-JS/develop.JAL-3446.ctrlDown
"Quit");
getRootPane().getActionMap().put("Quit", new AbstractAction()
{
*/
protected static boolean isControlDown(MouseEvent e, boolean aMac)
{
- if (!aMac)
- {
- return e.isControlDown();
-
- // Jalview 2.11 code below: above is as amended for JalviewJS
- // /*
- // * answer false for right mouse button
- // */
- // if (e.isPopupTrigger())
- // {
- // return false;
- // }
- // return
- // (jalview.util.ShortcutKeyMaskExWrapper.getMenuShortcutKeyMaskEx() //
- // .getMenuShortcutKeyMaskEx()
- // & jalview.util.ShortcutKeyMaskExWrapper
- // .getModifiersEx(e)) != 0; // getModifiers()) != 0;
- }
- // answer false for right mouse button
- // shortcut key will be META for a Mac
- return !e.isPopupTrigger()
- && (Toolkit.getDefaultToolkit().getMenuShortcutKeyMask()
- & e.getModifiers()) != 0;
- // could we use e.isMetaDown() here?
-
++
+ System.out.println(e.isPopupTrigger()
+ + " " + ((SHORTCUT_KEY_MASK & e.getModifiersEx()) != 0)
+ + " " + e.isControlDown());
+ return (aMac ? !e.isPopupTrigger()
+ && (SHORTCUT_KEY_MASK & e.getModifiersEx()) != 0
+ : e.isControlDown());
- }
+ }
// BH: I don't know about that previous method. Here is what SwingJS uses.
// Notice the distinction in mouse events. (BUTTON3_MASK == META)