Package com.jformdesigner.annotations
Annotation Type PropertyDesc.Enum
-
@Retention(RUNTIME) public static @interface PropertyDesc.Enum
This annotation can be used to specify a list of valid property values. For example:@PropertyDesc( enumValues={ @Enum(name="Horizontal", intValue=SwingConstants.HORIZONTAL, code="SwingConstants.HORIZONTAL"), @Enum(name="Vertical", intValue=SwingConstants.VERTICAL, code="SwingConstants.VERTICAL"), }, imports={SwingConstants.class} ) public int getOrientation() { return orientation; }Each enumeration value consists of aname, a value (one ofstringValue(),classValue(),booleanValue(),charValue(),byteValue(),shortValue(),intValue(),longValue(),floatValue()ordoubleValue()) and Java sourcecode(). Only one of the*valueattributes must be specified.Note: JFormDesigner supports Java 5 enumeration types, which do not need this kind of configuration.
- See Also:
PropertyDesc.enumValues()
-
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description booleanbooleanValueBoolean value of the enumeration.bytebyteValueByte value of the enumeration.charcharValueCharacter value of the enumeration.Class<?>classValueClass value of the enumeration.doubledoubleValueDouble value of the enumeration.floatfloatValueFloat value of the enumeration.intintValueInteger value of the enumeration.longlongValueLong value of the enumeration.shortshortValueShort value of the enumeration.StringstringValueString value of the enumeration.
-
-
-
Element Detail
-
name
String name
Name of the enumeration. Displayed in the JFormDesigner Properties view.
-
-
-
code
String code
Java code of the enumeration. Used by the JFormDesigner code generator.
-
-
-
stringValue
String stringValue
String value of the enumeration.- Default:
- ""
-
-
-
classValue
Class<?> classValue
Class value of the enumeration.- Default:
- java.lang.Class.class
-
-