Skip to content
Snippets Groups Projects
Select Git revision
  • eah_wrapper_improvements
  • master default protected
  • fix_Makefile.mingw#2
  • update_Makefile.mingw
  • fix_Makefile.mingw
  • fix_API_for_C_apps
  • fix_procinfo_mac
  • boinccmd_gpu_mode_always_until_sigterm
  • fgrp_osx_hotfix
  • fix_boinc_master@f8250782
  • diagnostics_win-hotfix
  • diagnostics_win-hotfix-old
  • current_fgrp_apps
  • testing_gw_apps
  • gw_app_darwin_15
  • current_brp_apps
  • current_brp_apps_android10
  • current_gfx_apps
  • current_server
  • current_gw_apps
  • previous_fgrp_apps
  • previous_gw_apps
  • testing_brp_apps
  • apps_FGRP3_1.07
  • apps_FGRP3_1.08
25 results

graphics2.cpp

Blame
  • ManualTestFrame.java 7.91 KiB
    /*
     * Copyright (c) 2021, 2022 Oracle and/or its affiliates. All rights reserved.
     * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     *
     * This code is free software; you can redistribute it and/or modify it
     * under the terms of the GNU General Public License version 2 only, as
     * published by the Free Software Foundation.
     *
     * This code is distributed in the hope that it will be useful, but WITHOUT
     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
     * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
     * version 2 for more details (a copy is included in the LICENSE file that
     * accompanied this code).
     *
     * You should have received a copy of the GNU General Public License version
     * 2 along with this work; if not, write to the Free Software Foundation,
     * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
     *
     * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
     * or visit www.oracle.com if you need additional information or have any
     * questions.
     */
    package lib;
    
    import java.awt.BorderLayout;
    import java.awt.Dimension;
    import java.awt.GridLayout;
    import java.io.File;
    import java.io.IOException;
    import java.lang.reflect.InvocationTargetException;
    import java.util.concurrent.CountDownLatch;
    import java.util.concurrent.TimeUnit;
    import java.util.concurrent.atomic.AtomicReference;
    import java.util.function.Consumer;
    import java.util.function.Supplier;
    import javax.imageio.ImageIO;
    import javax.swing.BorderFactory;
    import javax.swing.JEditorPane;
    import javax.swing.JFrame;
    import javax.swing.JLabel;
    import javax.swing.JPanel;
    import javax.swing.JSplitPane;
    import javax.swing.JTextArea;
    import javax.swing.border.BevelBorder;
    
    import static java.awt.BorderLayout.CENTER;
    import static java.awt.BorderLayout.NORTH;
    import static java.awt.BorderLayout.SOUTH;
    import static java.io.File.separator;
    import static javax.swing.SwingUtilities.invokeAndWait;
    
    /**
     * A frame which can be used to display manual test descriptions as well as, in case of a failure,
     * enter failure reason and capture the screen.
     */
    public class ManualTestFrame extends JFrame {
    
        private boolean alreadyFailed = false;
    
        private ManualTestFrame(String testName, String headerText,
                                Consumer<JEditorPane> instructions,
                                Consumer<TestResult> listener) throws IOException {
    
            super(testName);
    
            JLabel statusLabel = new JLabel("Follow test description, select \"Pass\" or \"Fail\"");
            statusLabel.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
    
            JSplitPane split = new JSplitPane(JSplitPane.VERTICAL_SPLIT);
            PassFailPane[] passFail = new PassFailPane[1];