603N/A/*
2365N/A * Copyright (c) 2008, Oracle and/or its affiliates. All rights reserved.
603N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
603N/A *
603N/A * This code is free software; you can redistribute it and/or modify it
603N/A * under the terms of the GNU General Public License version 2 only, as
603N/A * published by the Free Software Foundation.
603N/A *
603N/A * This code is distributed in the hope that it will be useful, but WITHOUT
603N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
603N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
603N/A * version 2 for more details (a copy is included in the LICENSE file that
603N/A * accompanied this code).
603N/A *
603N/A * You should have received a copy of the GNU General Public License version
603N/A * 2 along with this work; if not, write to the Free Software Foundation,
603N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
603N/A *
2365N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
2365N/A * or visit www.oracle.com if you need additional information or have any
2365N/A * questions.
603N/A */
603N/A
603N/A/*
603N/A * @test
603N/A * @bug 4916852
603N/A * @summary Tests Component encoding (background, foreground and font)
603N/A * @author Sergey Malenkov
603N/A */
603N/A
603N/Aimport java.awt.Color;
603N/Aimport java.awt.Component;
603N/Aimport java.awt.Font;
603N/A
603N/Apublic final class java_awt_Component extends AbstractTest<Component> {
603N/A public static void main(String[] args) {
603N/A new java_awt_Component().test(true);
603N/A }
603N/A
603N/A @Override
603N/A protected Component getObject() {
603N/A Component component = new MyComponent();
603N/A component.setBackground(Color.WHITE);
603N/A component.setFont(new Font(null, Font.BOLD, 5));
603N/A return component;
603N/A }
603N/A
603N/A @Override
603N/A protected Component getAnotherObject() {
603N/A Component component = new MyComponent();
603N/A component.setForeground(Color.BLACK);
603N/A component.setFont(new Font(null, Font.ITALIC, 6));
603N/A return component;
603N/A }
603N/A
603N/A public static final class MyComponent extends Component {
603N/A }
2365N/A}
2365N/A