1   /*
2    * Copyright 2002-2004 the original author or authors.
3    *
4    * Licensed under the Apache License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    *
8    *      http://www.apache.org/licenses/LICENSE-2.0
9    *
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
15   */
16  package org.springframework.richclient.form.binding.swing;
17  
18  import java.util.Map;
19  
20  import javax.swing.JComponent;
21  
22  import org.springframework.binding.form.FormModel;
23  import org.springframework.richclient.form.binding.Binding;
24  
25  /**
26   * @author Oliver Hutchison
27   */
28  public class TestableBinding implements Binding {
29  
30      private Class controlType;
31  
32      private FormModel formModel;
33  
34      private String property;
35  
36      private JComponent control;
37  
38      private Map context;
39  
40      public TestableBinding(Class controlType, JComponent control, FormModel formModel, String property, Map context) {
41          this.controlType = controlType;
42          this.control = control;
43          this.formModel = formModel;
44          this.property = property;
45          this.context = context;
46      }
47      
48      public Class getControlType() {
49          return controlType;
50      }
51  
52      public FormModel getFormModel() {
53          return formModel;
54      }
55  
56      public String getProperty() {
57          return property;
58      }
59  
60      public JComponent getControl() {
61          return control;
62      }
63  
64      public Map getContext() {
65          return context;
66      }
67  
68  }