View Javadoc

1   /***
2    *     Ambient - A music player for the Android platform
3    Copyright (C) 2007 Martin Vysny
4    
5    This program is free software: you can redistribute it and/or modify
6    it under the terms of the GNU General Public License as published by
7    the Free Software Foundation, either version 3 of the License, or
8    (at your option) any later version.
9    
10   This program is distributed in the hope that it will be useful,
11   but WITHOUT ANY WARRANTY; without even the implied warranty of
12   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13   GNU General Public License for more details.
14  
15   You should have received a copy of the GNU General Public License
16   along with this program.  If not, see <http://www.gnu.org/licenses/>.
17   */
18  package sk.baka.ambient.commons;
19  
20  import java.lang.annotation.Documented;
21  import java.lang.annotation.Retention;
22  
23  
24  /***
25   * Binds a field to a view.
26   * 
27   * @author Martin Vysny
28   */
29  @Documented
30  @Retention(java.lang.annotation.RetentionPolicy.RUNTIME)
31  public @interface Bind {
32  	/***
33  	 * The view resource id to bind the column with.
34  	 */
35  	int viewId();
36  
37  	/***
38  	 * A short descriptive name of the view. May be <code>-1</code> if this view
39  	 * will never contain invalid value (in this case the caption is never
40  	 * shown).
41  	 */
42  	int captionId();
43  
44  	/***
45  	 * (Optional) minimum value if number is specified.
46  	 */
47  	int min() default Integer.MIN_VALUE;
48  
49  	/***
50  	 * (Optional) maximum value if number is specified.
51  	 */
52  	int max() default Integer.MAX_VALUE;
53  
54  	/***
55  	 * (Optional) Escape special characters, like newline etc.
56  	 */
57  	boolean escape() default false;
58  
59  	/***
60  	 * (Optional) The field must be a valid {@link TagFormatter tag format}
61  	 * string.
62  	 */
63  	boolean tagFormat() default false;
64  }