JAL-3130 Some automatically fixed deprecated calls. Mostly constructors converted...
[jalview.git] / src / MCview / PDBCanvas.java
index ab172f2..cc9f85c 100644 (file)
@@ -36,13 +36,13 @@ import jalview.structure.StructureSelectionManager;
 
 import java.awt.Color;
 import java.awt.Dimension;
-import java.awt.Event;
 import java.awt.Font;
 import java.awt.Graphics;
 import java.awt.Graphics2D;
 // JBPNote TODO: This class is quite noisy - needs proper log.info/log.debug
 import java.awt.Image;
 import java.awt.RenderingHints;
+import java.awt.event.InputEvent;
 import java.awt.event.KeyAdapter;
 import java.awt.event.KeyEvent;
 import java.awt.event.MouseEvent;
@@ -277,7 +277,7 @@ public class PDBCanvas extends JPanel
   {
     seqColoursReady = false;
     // Sort the bonds by z coord
-    visiblebonds = new Vector<Bond>();
+    visiblebonds = new Vector<>();
 
     for (PDBChain chain : pdb.getChains())
     {
@@ -771,7 +771,7 @@ public class PDBCanvas extends JPanel
           {
             if (highlightRes == null)
             {
-              highlightRes = new Vector<String>();
+              highlightRes = new Vector<>();
             }
 
             final String atomString = Integer
@@ -858,7 +858,7 @@ public class PDBCanvas extends JPanel
     MCMatrix objmat = new MCMatrix(3, 3);
     objmat.setIdentity();
 
-    if ((evt.getModifiers() & Event.META_MASK) != 0)
+    if ((evt.getModifiersEx() & InputEvent.META_DOWN_MASK) != 0)
     {
       objmat.rotatez(((mx - omx)));
     }