01: /*
02: * Licensed to the Apache Software Foundation (ASF) under one or more
03: * contributor license agreements. See the NOTICE file distributed with
04: * this work for additional information regarding copyright ownership.
05: * The ASF licenses this file to You under the Apache License, Version 2.0
06: * (the "License"); you may not use this file except in compliance with
07: * the License. You may obtain a copy of the License at
08: *
09: * http://www.apache.org/licenses/LICENSE-2.0
10: *
11: * Unless required by applicable law or agreed to in writing, software
12: * distributed under the License is distributed on an "AS IS" BASIS,
13: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14: * See the License for the specific language governing permissions and
15: * limitations under the License.
16: */
17:
18: package java.beans;
19:
20: import java.awt.Image;
21: import java.awt.Toolkit;
22: import java.net.URL;
23:
24: public class SimpleBeanInfo implements BeanInfo {
25:
26: public SimpleBeanInfo() {
27: // expected
28: }
29:
30: public Image loadImage(String resourceName) {
31: if (null == resourceName) {
32: return null;
33: }
34:
35: URL file = getClass().getResource(resourceName);
36:
37: if (file != null) {
38: return Toolkit.getDefaultToolkit().createImage(file);
39: }
40: return null;
41: }
42:
43: public PropertyDescriptor[] getPropertyDescriptors() {
44: return null;
45: }
46:
47: public MethodDescriptor[] getMethodDescriptors() {
48: return null;
49: }
50:
51: public EventSetDescriptor[] getEventSetDescriptors() {
52: return null;
53: }
54:
55: public BeanInfo[] getAdditionalBeanInfo() {
56: return null;
57: }
58:
59: public BeanDescriptor getBeanDescriptor() {
60: return null;
61: }
62:
63: public Image getIcon(int iconKind) {
64: return null;
65: }
66:
67: public int getDefaultPropertyIndex() {
68: return -1;
69: }
70:
71: public int getDefaultEventIndex() {
72: return -1;
73: }
74: }
|