001 /*
002 * Copyright 2008-2014 the original author or authors.
003 *
004 * Licensed under the Apache License, Version 2.0 (the "License");
005 * you may not use this file except in compliance with the License.
006 * You may obtain a copy of the License at
007 *
008 * http://www.apache.org/licenses/LICENSE-2.0
009 *
010 * Unless required by applicable law or agreed to in writing, software
011 * distributed under the License is distributed on an "AS IS" BASIS,
012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013 * See the License for the specific language governing permissions and
014 * limitations under the License.
015 */
016 package griffon.pivot.support.adapters;
017
018 import griffon.core.CallableWithArgs;
019
020 /**
021 * @author Andres Almiray
022 * @since 2.0.0
023 */
024 public class ListViewBindingAdapter implements GriffonPivotAdapter, org.apache.pivot.wtk.ListViewBindingListener {
025 private CallableWithArgs<Void> listDataKeyChanged;
026 private CallableWithArgs<Void> listDataBindTypeChanged;
027 private CallableWithArgs<Void> listDataBindMappingChanged;
028 private CallableWithArgs<Void> selectedItemKeyChanged;
029 private CallableWithArgs<Void> selectedItemBindTypeChanged;
030 private CallableWithArgs<Void> selectedItemBindMappingChanged;
031 private CallableWithArgs<Void> selectedItemsKeyChanged;
032 private CallableWithArgs<Void> selectedItemsBindTypeChanged;
033 private CallableWithArgs<Void> selectedItemsBindMappingChanged;
034 private CallableWithArgs<Void> checkedItemsKeyChanged;
035 private CallableWithArgs<Void> checkedItemsBindTypeChanged;
036 private CallableWithArgs<Void> checkedItemsBindMappingChanged;
037
038 public CallableWithArgs<Void> getListDataKeyChanged() {
039 return this.listDataKeyChanged;
040 }
041
042 public CallableWithArgs<Void> getListDataBindTypeChanged() {
043 return this.listDataBindTypeChanged;
044 }
045
046 public CallableWithArgs<Void> getListDataBindMappingChanged() {
047 return this.listDataBindMappingChanged;
048 }
049
050 public CallableWithArgs<Void> getSelectedItemKeyChanged() {
051 return this.selectedItemKeyChanged;
052 }
053
054 public CallableWithArgs<Void> getSelectedItemBindTypeChanged() {
055 return this.selectedItemBindTypeChanged;
056 }
057
058 public CallableWithArgs<Void> getSelectedItemBindMappingChanged() {
059 return this.selectedItemBindMappingChanged;
060 }
061
062 public CallableWithArgs<Void> getSelectedItemsKeyChanged() {
063 return this.selectedItemsKeyChanged;
064 }
065
066 public CallableWithArgs<Void> getSelectedItemsBindTypeChanged() {
067 return this.selectedItemsBindTypeChanged;
068 }
069
070 public CallableWithArgs<Void> getSelectedItemsBindMappingChanged() {
071 return this.selectedItemsBindMappingChanged;
072 }
073
074 public CallableWithArgs<Void> getCheckedItemsKeyChanged() {
075 return this.checkedItemsKeyChanged;
076 }
077
078 public CallableWithArgs<Void> getCheckedItemsBindTypeChanged() {
079 return this.checkedItemsBindTypeChanged;
080 }
081
082 public CallableWithArgs<Void> getCheckedItemsBindMappingChanged() {
083 return this.checkedItemsBindMappingChanged;
084 }
085
086
087 public void setListDataKeyChanged(CallableWithArgs<Void> listDataKeyChanged) {
088 this.listDataKeyChanged = listDataKeyChanged;
089 }
090
091 public void setListDataBindTypeChanged(CallableWithArgs<Void> listDataBindTypeChanged) {
092 this.listDataBindTypeChanged = listDataBindTypeChanged;
093 }
094
095 public void setListDataBindMappingChanged(CallableWithArgs<Void> listDataBindMappingChanged) {
096 this.listDataBindMappingChanged = listDataBindMappingChanged;
097 }
098
099 public void setSelectedItemKeyChanged(CallableWithArgs<Void> selectedItemKeyChanged) {
100 this.selectedItemKeyChanged = selectedItemKeyChanged;
101 }
102
103 public void setSelectedItemBindTypeChanged(CallableWithArgs<Void> selectedItemBindTypeChanged) {
104 this.selectedItemBindTypeChanged = selectedItemBindTypeChanged;
105 }
106
107 public void setSelectedItemBindMappingChanged(CallableWithArgs<Void> selectedItemBindMappingChanged) {
108 this.selectedItemBindMappingChanged = selectedItemBindMappingChanged;
109 }
110
111 public void setSelectedItemsKeyChanged(CallableWithArgs<Void> selectedItemsKeyChanged) {
112 this.selectedItemsKeyChanged = selectedItemsKeyChanged;
113 }
114
115 public void setSelectedItemsBindTypeChanged(CallableWithArgs<Void> selectedItemsBindTypeChanged) {
116 this.selectedItemsBindTypeChanged = selectedItemsBindTypeChanged;
117 }
118
119 public void setSelectedItemsBindMappingChanged(CallableWithArgs<Void> selectedItemsBindMappingChanged) {
120 this.selectedItemsBindMappingChanged = selectedItemsBindMappingChanged;
121 }
122
123 public void setCheckedItemsKeyChanged(CallableWithArgs<Void> checkedItemsKeyChanged) {
124 this.checkedItemsKeyChanged = checkedItemsKeyChanged;
125 }
126
127 public void setCheckedItemsBindTypeChanged(CallableWithArgs<Void> checkedItemsBindTypeChanged) {
128 this.checkedItemsBindTypeChanged = checkedItemsBindTypeChanged;
129 }
130
131 public void setCheckedItemsBindMappingChanged(CallableWithArgs<Void> checkedItemsBindMappingChanged) {
132 this.checkedItemsBindMappingChanged = checkedItemsBindMappingChanged;
133 }
134
135
136 public void listDataKeyChanged(org.apache.pivot.wtk.ListView arg0, java.lang.String arg1) {
137 if (listDataKeyChanged != null) {
138 listDataKeyChanged.call(arg0, arg1);
139 }
140 }
141
142 public void listDataBindTypeChanged(org.apache.pivot.wtk.ListView arg0, org.apache.pivot.wtk.BindType arg1) {
143 if (listDataBindTypeChanged != null) {
144 listDataBindTypeChanged.call(arg0, arg1);
145 }
146 }
147
148 public void listDataBindMappingChanged(org.apache.pivot.wtk.ListView arg0, org.apache.pivot.wtk.ListView.ListDataBindMapping arg1) {
149 if (listDataBindMappingChanged != null) {
150 listDataBindMappingChanged.call(arg0, arg1);
151 }
152 }
153
154 public void selectedItemKeyChanged(org.apache.pivot.wtk.ListView arg0, java.lang.String arg1) {
155 if (selectedItemKeyChanged != null) {
156 selectedItemKeyChanged.call(arg0, arg1);
157 }
158 }
159
160 public void selectedItemBindTypeChanged(org.apache.pivot.wtk.ListView arg0, org.apache.pivot.wtk.BindType arg1) {
161 if (selectedItemBindTypeChanged != null) {
162 selectedItemBindTypeChanged.call(arg0, arg1);
163 }
164 }
165
166 public void selectedItemBindMappingChanged(org.apache.pivot.wtk.ListView arg0, org.apache.pivot.wtk.ListView.ItemBindMapping arg1) {
167 if (selectedItemBindMappingChanged != null) {
168 selectedItemBindMappingChanged.call(arg0, arg1);
169 }
170 }
171
172 public void selectedItemsKeyChanged(org.apache.pivot.wtk.ListView arg0, java.lang.String arg1) {
173 if (selectedItemsKeyChanged != null) {
174 selectedItemsKeyChanged.call(arg0, arg1);
175 }
176 }
177
178 public void selectedItemsBindTypeChanged(org.apache.pivot.wtk.ListView arg0, org.apache.pivot.wtk.BindType arg1) {
179 if (selectedItemsBindTypeChanged != null) {
180 selectedItemsBindTypeChanged.call(arg0, arg1);
181 }
182 }
183
184 public void selectedItemsBindMappingChanged(org.apache.pivot.wtk.ListView arg0, org.apache.pivot.wtk.ListView.ItemBindMapping arg1) {
185 if (selectedItemsBindMappingChanged != null) {
186 selectedItemsBindMappingChanged.call(arg0, arg1);
187 }
188 }
189
190 public void checkedItemsKeyChanged(org.apache.pivot.wtk.ListView arg0, java.lang.String arg1) {
191 if (checkedItemsKeyChanged != null) {
192 checkedItemsKeyChanged.call(arg0, arg1);
193 }
194 }
195
196 public void checkedItemsBindTypeChanged(org.apache.pivot.wtk.ListView arg0, org.apache.pivot.wtk.BindType arg1) {
197 if (checkedItemsBindTypeChanged != null) {
198 checkedItemsBindTypeChanged.call(arg0, arg1);
199 }
200 }
201
202 public void checkedItemsBindMappingChanged(org.apache.pivot.wtk.ListView arg0, org.apache.pivot.wtk.ListView.ItemBindMapping arg1) {
203 if (checkedItemsBindMappingChanged != null) {
204 checkedItemsBindMappingChanged.call(arg0, arg1);
205 }
206 }
207
208 }
|