5253N/A/*
5253N/A * Copyright (c) 1996, 2012, Oracle and/or its affiliates. All rights reserved.
5253N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5253N/A *
5253N/A * This code is free software; you can redistribute it and/or modify it
5253N/A * under the terms of the GNU General Public License version 2 only, as
5253N/A * published by the Free Software Foundation. Oracle designates this
5253N/A * particular file as subject to the "Classpath" exception as provided
5253N/A * by Oracle in the LICENSE file that accompanied this code.
5253N/A *
5253N/A * This code is distributed in the hope that it will be useful, but WITHOUT
5253N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
5253N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
5253N/A * version 2 for more details (a copy is included in the LICENSE file that
5253N/A * accompanied this code).
5253N/A *
5253N/A * You should have received a copy of the GNU General Public License version
5253N/A * 2 along with this work; if not, write to the Free Software Foundation,
5253N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
5253N/A *
5253N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
5253N/A * or visit www.oracle.com if you need additional information or have any
5253N/A * questions.
5253N/A */
5253N/A
5253N/Apackage com.sun.beans.infos;
5253N/A
5253N/Aimport java.beans.*;
5253N/A
5253N/A/**
5253N/A * BeanInfo descriptor for a standard AWT component.
5253N/A */
5253N/A
5253N/Apublic class ComponentBeanInfo extends SimpleBeanInfo {
5253N/A private static final Class beanClass = java.awt.Component.class;
5253N/A
5253N/A public PropertyDescriptor[] getPropertyDescriptors() {
5253N/A try {
5253N/A PropertyDescriptor
5253N/A name = new PropertyDescriptor("name", beanClass),
5253N/A background = new PropertyDescriptor("background", beanClass),
5253N/A foreground = new PropertyDescriptor("foreground", beanClass),
5253N/A font = new PropertyDescriptor("font", beanClass),
5253N/A enabled = new PropertyDescriptor("enabled", beanClass),
5253N/A visible = new PropertyDescriptor("visible", beanClass),
5253N/A focusable = new PropertyDescriptor("focusable", beanClass);
5253N/A
5253N/A enabled.setExpert(true);
5253N/A visible.setHidden(true);
5253N/A
5253N/A background.setBound(true);
5253N/A foreground.setBound(true);
5253N/A font.setBound(true);
5253N/A focusable.setBound(true);
5253N/A
5253N/A PropertyDescriptor[] rv = {name, background, foreground, font, enabled, visible, focusable };
5253N/A return rv;
5253N/A } catch (IntrospectionException e) {
5253N/A throw new Error(e.toString());
5253N/A }
5253N/A }
5253N/A}