当前位置: 首页>>代码示例>>Java>>正文


Java Sysout.createDialogWithInstructions方法代码示例

本文整理汇总了Java中test.java.awt.regtesthelpers.Sysout.createDialogWithInstructions方法的典型用法代码示例。如果您正苦于以下问题:Java Sysout.createDialogWithInstructions方法的具体用法?Java Sysout.createDialogWithInstructions怎么用?Java Sysout.createDialogWithInstructions使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在test.java.awt.regtesthelpers.Sysout的用法示例。


在下文中一共展示了Sysout.createDialogWithInstructions方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: init

import test.java.awt.regtesthelpers.Sysout; //导入方法依赖的package包/类
public void init() {
    String[] instructions = {
        "(1) Go to the test directory test/java/awt/Focus/8044614",
        "(2) Compile source file: javac TestApplet.java",
        "(3) Open the \"main.html\" file in the browser",
        "(4) Click the \"Start First Applet\" link to open the first applet window",
        "(5) Wait for the applet to start (press \"Run\" to any security alerts that appears)",
        "(6) Enter \"Hello\" to the text field",
        "(7) Click the \"Start Second Applet)\" link to open the second applet window",
        "(8) Wait for the applet to start (press \"Run\" to any security alerts that appears)",
        "(9) Enter \"World\" to the text field",
        "(10) Go back to the first applet and make sure you can enter some text to the text field"
    };

    Sysout.createDialogWithInstructions(instructions);
}
 
开发者ID:lambdalab-mirror,项目名称:jdk8u-jdk,代码行数:17,代码来源:bug8044614.java

示例2: init

import test.java.awt.regtesthelpers.Sysout; //导入方法依赖的package包/类
@Override
public void init() {
    if (OSInfo.getOSType() != OSInfo.OSType.MACOSX) {
        Sysout.createDialogWithInstructions(new String[]{
                "Press PASS, this test is for MacOS X only."});
        return;
    }

    System.setProperty("apple.awt.use-file-dialog-packages", "true");

    setLayout(new GridLayout(1, 1));

    fd = new FileDialog(new Frame(), "Open");
    fd.setDirectory(APPLICATIONS_FOLDER);

    showBtn = new Button("Show File Dialog");
    showBtn.addActionListener(this);
    add(showBtn);
    String[] instructions = {
            "1) Click on 'Show File Dialog' button. A file dialog will come up.",
            "2) Navigate to the Applications folder if not already there",
            "3) Check that the application bundles can be selected and can not be navigated",
            "4) If it's true then the test passed, otherwise it failed."};
    Sysout.createDialogWithInstructions(instructions);
}
 
开发者ID:lambdalab-mirror,项目名称:jdk8u-jdk,代码行数:26,代码来源:FileDialogForPackages.java

示例3: init

import test.java.awt.regtesthelpers.Sysout; //导入方法依赖的package包/类
public void init() {
    this.setLayout(new GridLayout(1, 1));

    fd = new FileDialog(new Frame(), "Save", FileDialog.SAVE);

    showBtn = new Button("Show File Dialog");
    showBtn.addActionListener(this);
    add(showBtn);

    File tmpDir = new File(dirPath + File.separator + clickDirName);
    tmpDir.mkdir();

    String[] instructions = {
            "1) Click on 'Show File Dialog' button. A file dialog will come up.",
            "2) Double-click on '" + clickDirName + "' and click a confirmation",
            "   button, it can be 'OK', 'Save' or any other platform-dependent name.",
            "3) See result of the test below"
    };

    Sysout.createDialogWithInstructions(instructions);

}
 
开发者ID:lambdalab-mirror,项目名称:jdk8u-jdk,代码行数:23,代码来源:SaveFileNameOverrideTest.java

示例4: init

import test.java.awt.regtesthelpers.Sysout; //导入方法依赖的package包/类
@Override
public void init() {
    if (OSInfo.getOSType() != OSInfo.OSType.MACOSX) {
        Sysout.createDialogWithInstructions(new String[]{
                "Press PASS, this test is for MacOS X only."});
        return;
    }

    System.setProperty("apple.awt.fileDialogForDirectories", "true");

    setLayout(new GridLayout(1, 1));

    fd = new FileDialog(new Frame(), "Open");

    showBtn = new Button("Show File Dialog");
    showBtn.addActionListener(this);
    add(showBtn);
    String[] instructions = {
            "1) Click on 'Show File Dialog' button. A file dialog will come up.",
            "2) Check that files can't be selected.",
            "3) Check that directories can be selected.",
            "4) Repeat steps 1 - 3 a few times for different files and directories.",
            "5) If it's true then the test passed, otherwise it failed."};
    Sysout.createDialogWithInstructions(instructions);
}
 
开发者ID:lambdalab-mirror,项目名称:jdk8u-jdk,代码行数:26,代码来源:FileDialogForDirectories.java

示例5: init

import test.java.awt.regtesthelpers.Sysout; //导入方法依赖的package包/类
public void init() {
    this.setLayout(new GridLayout(1, 1));

    fd = new FileDialog(new Frame(), "Save", FileDialog.SAVE);

    showBtn = new Button("Show File Dialog");
    showBtn.addActionListener(this);
    add(showBtn);

    File tmpDir = new File(dirPath + File.separator + clickDirName);
    tmpDir.mkdir();

    String[] instructions = {
            "1) Click on 'Show File Dialog' button. A file dialog will come up.",
            "2) Double-click on '" + clickDirName + "' and click OK.",
            "3) See result of the test below"
    };

    Sysout.createDialogWithInstructions(instructions);

}
 
开发者ID:openjdk,项目名称:jdk7-jdk,代码行数:22,代码来源:SaveFileNameOverrideTest.java

示例6: init

import test.java.awt.regtesthelpers.Sysout; //导入方法依赖的package包/类
@Override
public void init() {
    if (!SystemTray.isSupported()) {
        Sysout.createDialogWithInstructions(new String[]{
                "Press PASS, the System Tray is not supported"});
        return;
    }


    String[] instructions = {
            "1) The red circle icon was added to the system tray.",
            "2) Check that a popup menu is opened when the icon is clicked.",
            "3) If true the test is passed, otherwise failed."};
    Sysout.createDialogWithInstructions(instructions);
}
 
开发者ID:lambdalab-mirror,项目名称:jdk8u-jdk,代码行数:16,代码来源:AddPopupAfterShowTest.java

示例7: init

import test.java.awt.regtesthelpers.Sysout; //导入方法依赖的package包/类
public void init() {
    this.setLayout(new GridLayout(1, 1));

    fd = new FileDialog(new Frame(), "Open");

    showBtn = new Button("Show File Dialog");
    showBtn.addActionListener(this);
    add(showBtn);

    try {
        File tmpFileUp = new File(dirPath + File.separator + fileName);
        File tmpDir = new File(dirPath + File.separator + clickDirName);
        File tmpFileIn = new File(tmpDir.getAbsolutePath() + File.separator + fileName);
        tmpDir.mkdir();
        tmpFileUp.createNewFile();
        tmpFileIn.createNewFile();
    } catch (IOException ex) {
        throw new RuntimeException("Cannot create test folder", ex);
    }

    String[] instructions = {
            "1) Click on 'Show File Dialog' button. A file dialog will come up.",
            "2) Double-click on '" + clickDirName + "' and click OK.",
            "3) See result of the test below"
    };
    Sysout.createDialogWithInstructions(instructions);
}
 
开发者ID:lambdalab-mirror,项目名称:jdk8u-jdk,代码行数:28,代码来源:FileNameOverrideTest.java

示例8: init

import test.java.awt.regtesthelpers.Sysout; //导入方法依赖的package包/类
public void init() {
    this.setLayout(new BorderLayout());

    String[] instructions;
    traySupported = SystemTray.isSupported();
    if (traySupported) {
        String clickInstruction;
        if (OSInfo.getOSType().equals(OSInfo.OSType.MACOSX)) {
            clickInstruction = "right";
        } else {
            clickInstruction = "left";
        }
        instructions = new String[]{
                "When the test starts an icon is added to the SystemTray area.",
                " Double-click on it with a " + clickInstruction + " button and make sure that",
                "  ACTION_PERFORMED event is sent to Java (all the clicks and",
                "  action events are shown below these instructions).",
                "Then, if your system allows the tray icon to get focus (for",
                "  example, windows 2000 or windows XP), double-click on the",
                "  icon with SPACE button and single-click with RETURN button.",
                "  Both of them must also trigger ACTION_PERFORMED event.",
                "If you see ACTION_PERFORMED events after each of your actions",
                "  (either mouse clicks or key presses), press PASS, else FAIL"
        };
    } else {
        instructions = new String[]{
                "The test cannot be run because SystemTray is not supported.",
                "Simply press PASS button."
        };
    }
    Sysout.createDialogWithInstructions(instructions);
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:33,代码来源:DblClickActionEventTest.java

示例9: init

import test.java.awt.regtesthelpers.Sysout; //导入方法依赖的package包/类
public void init() {
    this.setLayout(new BorderLayout());

    String[] instructions;
    traySupported = SystemTray.isSupported();
    if (!traySupported) {
        instructions = new String[]{
                "The test cannot be run because SystemTray is not supported.",
                "Simply press PASS button."
        };
    } else {
        String clickInstruction;
        if (OSInfo.getOSType().equals(OSInfo.OSType.MACOSX)) {
            clickInstruction = "right";
        } else {
            clickInstruction = "left";
        }
        instructions = new String[]{
                "When the test starts, it adds the icon to the tray aread. If you",
                "  don't see a tray icon, please, make sure that the tray area",
                "  (also called Taskbar Status Area on MS Windows, Notification",
                "  Area on Gnome or System Tray on KDE) is visible.",
                "Double-click with " + clickInstruction + " button on the tray icon to trigger the",
                "  action event. Brief information about action events is printed",
                "  below. After each action event the tray icon is removed from",
                "  the tray and then added back in a second.",
                "The test performs some automatic checks when removing the icon. If",
                "  something is wrong the corresponding message is displayed below.",
                "  Repeat double-clicks several times. If no 'Test FAILED' messages",
                "  are printed, press PASS button else FAIL button."
        };
    }
    Sysout.createDialogWithInstructions(instructions);
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:35,代码来源:DisposeInActionEventTest.java


注:本文中的test.java.awt.regtesthelpers.Sysout.createDialogWithInstructions方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。