01: package org.apache.beehive.controls.api.packaging;
02:
03: /*
04: * Licensed to the Apache Software Foundation (ASF) under one or more
05: * contributor license agreements. See the NOTICE file distributed with
06: * this work for additional information regarding copyright ownership.
07: * The ASF licenses this file to You under the Apache License, Version 2.0
08: * (the "License"); you may not use this file except in compliance with
09: * the License. You may obtain a copy of the License at
10: *
11: * http://www.apache.org/licenses/LICENSE-2.0
12: *
13: * Unless required by applicable law or agreed to in writing, software
14: * distributed under the License is distributed on an "AS IS" BASIS,
15: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16: * See the License for the specific language governing permissions and
17: * limitations under the License.
18: *
19: * $Header:$
20: */
21:
22: import java.lang.annotation.ElementType;
23: import java.lang.annotation.Target;
24:
25: import java.beans.PropertyEditor;
26:
27: /**
28: * The PropertyInfo annotation type defines a JSR-175 syntax for annotating a Control
29: * property declaration to provide java.beans.PropertyDescriptor information. Generic
30: * feature information is defined using the <code>FeatureInfo</code> annotation type
31: * <p>
32: * The elements of PropertyInfo correspond 1-to-1 with the information exposed by the
33: * <code>java.beans.PropertyDescriptor</code> class.
34: *
35: * @see java.beans.PropertyDescriptor
36: */
37: @Target({ElementType.METHOD})
38: // appears on PropertySet method declaration (i.e. properties)
39: public @interface PropertyInfo {
40: /**
41: * The NoEditor class can be used as the value of the editorClass attribute to
42: * indicate that the property has no editor
43: */
44: static public class NoEditor {
45: };
46:
47: public boolean bound() default false; // Sends PropertyChange events
48:
49: public boolean constrained() default false; // Sends VetoableChange events
50:
51: public Class editorClass() default NoEditor.class; // default == no editor
52: }
|