View Javadoc

1   package com.silvermindsoftware.hitch.config;
2   
3   /**
4    * Copyright 2007 Brandon Goodin
5    *
6    * Licensed under the Apache License, Version 2.0 (the "License");
7    * you may not use this file except in compliance with the License.
8    * You may obtain a copy of the License at
9    *
10   *   http://www.apache.org/licenses/LICENSE-2.0
11   *
12   * Unless required by applicable law or agreed to in writing, software
13   * distributed under the License is distributed on an "AS IS" BASIS,
14   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15   * See the License for the specific language governing permissions and
16   * limitations under the License.
17   */
18  
19  import com.silvermindsoftware.hitch.ReadOnly;
20  
21  /**
22   * @svnLink $Revision: 3873 $;$Date: 2009-08-04 13:59:45 +0200 (Di, 04. Aug 2009) $;$Author: swismer $;$URL: https://el4j.svn.sourceforge.net/svnroot/el4j/branches/el4j_3_1/el4j/framework/modules/swing/src/main/java/com/silvermindsoftware/hitch/config/BoundComponentConfig.java $
23   */
24  public class BoundComponentConfig {
25  
26  	private Class type = void.class;
27  	private String componentFieldName;
28  	private String modelPropertyName;
29  	private Class handlerClass = void.class;
30  	private String[] handlerParameters = new String[]{};
31  	private ReadOnly readOnly = ReadOnly.DEFAULT;
32  
33  	public BoundComponentConfig(String sharedPropertyName) {
34  
35  		this.componentFieldName = sharedPropertyName;
36  		this.modelPropertyName = sharedPropertyName;
37  
38  	}
39  
40  	public BoundComponentConfig(String sharedPropertyName, Class handlerClass) {
41  
42  		this.componentFieldName = sharedPropertyName;
43  		this.modelPropertyName = sharedPropertyName;
44  		this.handlerClass = handlerClass;
45  
46  	}
47  
48  	public BoundComponentConfig(String sharedPropertyName, String[] handlerParameters) {
49  
50  		this.componentFieldName = sharedPropertyName;
51  		this.modelPropertyName = sharedPropertyName;
52  		this.handlerParameters = handlerParameters;
53  
54  	}
55  
56  	public BoundComponentConfig(String sharedPropertyName, Class handlerClass, String[] handlerParameters) {
57  
58  		this.componentFieldName = sharedPropertyName;
59  		this.modelPropertyName = sharedPropertyName;
60  		this.handlerClass = handlerClass;
61  		this.handlerParameters = handlerParameters;
62  
63  	}
64  
65  	public BoundComponentConfig(String componentFieldName, String modelPropertyName) {
66  
67  		this.componentFieldName = componentFieldName;
68  		this.modelPropertyName = modelPropertyName;
69  
70  	}
71  
72  	public BoundComponentConfig(String componentFieldName, String modelPropertyName, Class handlerClass) {
73  
74  		this.componentFieldName = componentFieldName;
75  		this.modelPropertyName = modelPropertyName;
76  		this.handlerClass = handlerClass;
77  
78  	}
79  
80  	public BoundComponentConfig(String componentFieldName, String modelPropertyName, String[] handlerParameters) {
81  
82  		this.componentFieldName = componentFieldName;
83  		this.modelPropertyName = modelPropertyName;
84  		this.handlerParameters = handlerParameters;
85  
86  	}
87  
88  	public BoundComponentConfig(String componentFieldName, String modelPropertyName, Class handlerClass, String[] handlerParameters) {
89  
90  		this.componentFieldName = componentFieldName;
91  		this.modelPropertyName = modelPropertyName;
92  		this.handlerClass = handlerClass;
93  		this.handlerParameters = handlerParameters;
94  
95  	}
96  
97  	public BoundComponentConfig(String componentFieldName, String modelPropertyName, Class handlerClass, String[] handlerParameters, ReadOnly readOnly, Class type) {
98  
99  		this.componentFieldName = componentFieldName;
100 		this.modelPropertyName = modelPropertyName;
101 		this.handlerClass = handlerClass;
102 		this.handlerParameters = handlerParameters;
103 		this.readOnly = readOnly;
104 		this.type = type;
105 
106 	}
107 
108 	public String getComponentFieldName() {
109 		return componentFieldName;
110 	}
111 
112 	public String getModelPropertyName() {
113 		return modelPropertyName;
114 	}
115 
116 	public Class getHandlerClass() {
117 		return handlerClass;
118 	}
119 
120 	public String[] getHandlerParameters() {
121 		return handlerParameters;
122 	}
123 
124 	public ReadOnly getReadOnly() {
125 		return readOnly;
126 	}
127 
128 	public Class getType() {
129 		return type;
130 	}
131 
132 }