001    package org.nakedobjects.applib.annotation;
002    
003    import java.lang.annotation.ElementType;
004    import java.lang.annotation.Inherited;
005    import java.lang.annotation.Retention;
006    import java.lang.annotation.RetentionPolicy;
007    import java.lang.annotation.Target;
008    
009    
010    /**
011     * Indicates that a string property may have more than one line (ie may contain carriage returns).
012     * 
013     * <p>
014     * In addition you can specify the typical number of lines (defaults to 6) and whether the lines should not be
015     * wrapped (by default they will not be wrapped).
016     * 
017     * <p>
018     * Can also be specified for types that are annotated as <tt>@Value</tt> types. To apply, the value must have string semantics.
019     * 
020     * <p>
021     * Note that if this annotation is applied, then any choices for the property (ie as per a <tt>choicesXxx</tt>
022     * method) will be ignored.
023     */
024    @Inherited
025    @Target( { ElementType.TYPE, ElementType.METHOD, ElementType.PARAMETER })
026    @Retention(RetentionPolicy.RUNTIME)
027    public @interface MultiLine {
028    
029        int numberOfLines() default 6;
030    
031        boolean preventWrapping() default true;
032    }
033    
034    // Copyright (c) Naked Objects Group Ltd.