JFormDesigner 5.0.4 Annotations

com.jformdesigner.annotations
Annotation Type PropertyDesc.Enum


@Retention(value=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 a name, a value (one of stringValue(), classValue(), booleanValue(), charValue(), byteValue(), shortValue(), intValue(), longValue(), floatValue() or doubleValue()) and Java source code(). Only one of the *value attributes must be specified.

Note: JFormDesigner supports Java 5 enumeration types, which do not need this kind of configuration.

Since:
5.0
See Also:
PropertyDesc.enumValues()

Required Element Summary
 String code
          Java code of the enumeration.
 String name
          Name of the enumeration.
 
Optional Element Summary
 boolean booleanValue
          Boolean value of the enumeration.
 byte byteValue
          Byte value of the enumeration.
 char charValue
          Character value of the enumeration.
 Class<?> classValue
          Class value of the enumeration.
 double doubleValue
          Double value of the enumeration.
 float floatValue
          Float value of the enumeration.
 int intValue
          Integer value of the enumeration.
 long longValue
          Long value of the enumeration.
 short shortValue
          Short value of the enumeration.
 String stringValue
          String value of the enumeration.
 

Element Detail

name

public abstract String name
Name of the enumeration. Displayed in the JFormDesigner Properties view.


code

public abstract String code
Java code of the enumeration. Used by the JFormDesigner code generator.

stringValue

public abstract String stringValue
String value of the enumeration.

Default:
""

classValue

public abstract Class<?> classValue
Class value of the enumeration.

Default:
java.lang.Class.class

booleanValue

public abstract boolean booleanValue
Boolean value of the enumeration.

Default:
false

charValue

public abstract char charValue
Character value of the enumeration.

Default:
0

byteValue

public abstract byte byteValue
Byte value of the enumeration.

Default:
-128

shortValue

public abstract short shortValue
Short value of the enumeration.

Default:
-32768

intValue

public abstract int intValue
Integer value of the enumeration.

Default:
-2147483648

longValue

public abstract long longValue
Long value of the enumeration.

Default:
-9223372036854775808L

floatValue

public abstract float floatValue
Float value of the enumeration.

Default:
1.401298464324817E-45f

doubleValue

public abstract double doubleValue
Double value of the enumeration.

Default:
4.9E-324

JFormDesigner 5.0.4 Annotations

Copyright (C) 2004-2012 FormDev Software GmbH. All rights reserved.