View Javadoc
1   /*
2   UnusedImports
3   processJavadoc = (default)true
4   
5   
6   */
7   
8   package com.puppycrawl.tools.checkstyle.checks.imports.unusedimports;
9   
10  import java.awt.AWTException;
11  import java.awt.Rectangle; // violation 'Unused import - java.awt.Rectangle'
12  import java.awt.event.InputEvent;
13  import java.awt.event.KeyEvent; // violation 'Unused import - java.awt.event.KeyEvent'
14  
15  public class InputUnusedImports3 extends java.awt.Robot {
16      private int delay;
17  
18      protected InputUnusedImports3() throws AWTException {
19          super();
20      }
21  
22      /**
23       * Attention: usage of class by short name KeyEvent is not qualified as usage of type
24       * Qualified usage is by javadoc tag 'link'.
25       *
26       * @param keycode which key to press. For example, KeyEvent
27       */
28      public void hitKey(int keycode) {
29          keyPress(keycode);
30          delay();
31      }
32  
33      public void clickMouse(int buttons) {
34          mousePress(buttons);
35          delay();
36      }
37  
38      public void clickMouse() {
39          clickMouse(InputEvent.BUTTON1_MASK);
40      }
41  
42      public void delay() {
43          delay(delay);
44      }
45  }