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 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.

    See Also:
    PropertyDesc.enumValues()
    • Required Element Summary

      Required Elements 
      Modifier and Type Required Element Description
      String code
      Java code of the enumeration.
      String name
      Name of the enumeration.
    • Optional Element Summary

      Optional Elements 
      Modifier and Type Optional Element Description
      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

        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
      • booleanValue

        boolean booleanValue
        Boolean value of the enumeration.
        Default:
        false
      • charValue

        char charValue
        Character value of the enumeration.
        Default:
        '\u0000'
      • byteValue

        byte byteValue
        Byte value of the enumeration.
        Default:
        (byte)0x80
      • shortValue

        short shortValue
        Short value of the enumeration.
        Default:
        -32768
      • intValue

        int intValue
        Integer value of the enumeration.
        Default:
        -2147483648
      • longValue

        long longValue
        Long value of the enumeration.
        Default:
        -9223372036854775808L
      • floatValue

        float floatValue
        Float value of the enumeration.
        Default:
        1.4E-45f
      • doubleValue

        double doubleValue
        Double value of the enumeration.
        Default:
        4.9E-324