⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 arrowbuttontester.java

📁 非常好的Java应用测试构架(Framework). 如果你对Java自动化测试很感兴趣
💻 JAVA
字号:
package abbot.tester.extensions;import java.awt.*;import java.awt.event.InputEvent;import example.ArrowButton;/** Provide user actions and identifiers for the {@link ArrowButton}    component. */ public class ArrowButtonTester extends abbot.tester.ComponentTester {    /** Set up the editor menu documentation properties. */    static {        System.setProperty("actionRoll.menu", "Roll");        System.setProperty("actionRoll.desc", "Hold down the arrow button");        System.setProperty("ArrowButtonTester.actionRoll.args",                           "actionRoll(Component comp, int ms)");    }    // NOTE: while deprecated, there is not currently in place a replacement    // for noting one or more unique attributes of custom components, so for    // now, this will do, but you are restricted to a single tag.    public String deriveTag(Component comp) {        return ((ArrowButton)comp).getDirection();    }    /** Press and hold the button for the given length of time (in ms). */    public void actionRoll(Component comp, int ms) {        Dimension size = comp.getSize();        mousePress(comp, (size.width + 1) / 2, (size.height + 1) / 2,                   InputEvent.BUTTON1_MASK);        delay(ms);        mouseRelease(InputEvent.BUTTON1_MASK);    }}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -