11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 */
23
24 import java.awt.Dialog;
25 import java.awt.Frame;
26 import java.awt.Graphics;
27 import java.awt.Graphics2D;
28 import java.awt.geom.AffineTransform;
29 import javax.swing.UIManager;
30
31 /* @test
32 * @bug 8137571
33 * @summary Linux HiDPI Graphics support
34 * @author Alexander Scherbatiy
35 * @requires (os.family == "linux" | os.family == "mac")
36 * @run main/othervm -Dsun.java2d.uiScale.enabled=false
37 * -Dsun.java2d.uiScale=2
38 * HiDPIPropertiesUnixTest UISCALE_DISABLED
39 * @run main/othervm -Dsun.java2d.uiScale.enabled=true
40 * -Dsun.java2d.uiScale=3
41 * HiDPIPropertiesUnixTest UISCALE_3
42 * @run main/othervm -Dsun.java2d.uiScale=4
43 * HiDPIPropertiesUnixTest UISCALE_4
44 */
45 public class HiDPIPropertiesUnixTest {
46
47 public static void main(String[] args) throws Exception {
48
49 UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
50
51 String testCase = args[0];
|
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 */
23
24 import java.awt.Dialog;
25 import java.awt.Frame;
26 import java.awt.Graphics;
27 import java.awt.Graphics2D;
28 import java.awt.geom.AffineTransform;
29 import javax.swing.UIManager;
30
31 /*
32 * @test
33 * @key headful
34 * @bug 8137571
35 * @summary Linux HiDPI Graphics support
36 * @author Alexander Scherbatiy
37 * @requires (os.family == "linux" | os.family == "mac")
38 * @run main/othervm -Dsun.java2d.uiScale.enabled=false
39 * -Dsun.java2d.uiScale=2
40 * HiDPIPropertiesUnixTest UISCALE_DISABLED
41 * @run main/othervm -Dsun.java2d.uiScale.enabled=true
42 * -Dsun.java2d.uiScale=3
43 * HiDPIPropertiesUnixTest UISCALE_3
44 * @run main/othervm -Dsun.java2d.uiScale=4
45 * HiDPIPropertiesUnixTest UISCALE_4
46 */
47 public class HiDPIPropertiesUnixTest {
48
49 public static void main(String[] args) throws Exception {
50
51 UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
52
53 String testCase = args[0];
|