From 17979a0e24cc6626a589fc70b0cc2f7d8d42e24e Mon Sep 17 00:00:00 2001 From: gmungoc Date: Thu, 1 Sep 2016 16:41:49 +0100 Subject: [PATCH] JAL-2077 don't mess with the look and feel --- test/jalview/gui/MouseEventDemo.java | 27 --------------------------- 1 file changed, 27 deletions(-) diff --git a/test/jalview/gui/MouseEventDemo.java b/test/jalview/gui/MouseEventDemo.java index aeed2c6..3667b52 100644 --- a/test/jalview/gui/MouseEventDemo.java +++ b/test/jalview/gui/MouseEventDemo.java @@ -56,8 +56,6 @@ import javax.swing.JSplitPane; import javax.swing.JTextArea; import javax.swing.KeyStroke; import javax.swing.SwingUtilities; -import javax.swing.UIManager; -import javax.swing.UnsupportedLookAndFeelException; /** * Sourced from Oracle and adapted @@ -101,27 +99,6 @@ public class MouseEventDemo extends JPanel implements MouseListener public static void main(String[] args) { - /* Use an appropriate Look and Feel */ - try - { - // UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel"); - // UIManager.setLookAndFeel("com.sun.java.swing.plaf.gtk.GTKLookAndFeel"); - UIManager.setLookAndFeel("javax.swing.plaf.metal.MetalLookAndFeel"); - } catch (UnsupportedLookAndFeelException ex) - { - ex.printStackTrace(); - } catch (IllegalAccessException ex) - { - ex.printStackTrace(); - } catch (InstantiationException ex) - { - ex.printStackTrace(); - } catch (ClassNotFoundException ex) - { - ex.printStackTrace(); - } - /* Turn off metal's use of bold fonts */ - UIManager.put("swing.boldMetal", Boolean.FALSE); // Schedule a job for the event dispatch thread: // creating and showing this application's GUI. javax.swing.SwingUtilities.invokeLater(new Runnable() @@ -206,8 +183,6 @@ public class MouseEventDemo extends JPanel implements MouseListener void logEvent(String eventDescription, MouseEvent e) { - // textArea.append(eventDescription + " detected on " - // + e.getComponent().getClass().getName() + "." + NEWLINE); log("------- " + counter++ + ": " + eventDescription); log("e.isPopupTrigger: " + e.isPopupTrigger()); log("SwingUtilities.isRightMouseButton: " @@ -246,13 +221,11 @@ public class MouseEventDemo extends JPanel implements MouseListener @Override public void mouseEntered(MouseEvent e) { - // eventOutput("Mouse entered", e); } @Override public void mouseExited(MouseEvent e) { - // eventOutput("Mouse exited", e); } @Override -- 1.7.10.2