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 TableViewBindingAdapter implements GriffonPivotAdapter, org.apache.pivot.wtk.TableViewBindingListener {
025 private CallableWithArgs<Void> tableDataKeyChanged;
026 private CallableWithArgs<Void> tableDataBindTypeChanged;
027 private CallableWithArgs<Void> tableDataBindMappingChanged;
028 private CallableWithArgs<Void> selectedRowKeyChanged;
029 private CallableWithArgs<Void> selectedRowBindTypeChanged;
030 private CallableWithArgs<Void> selectedRowBindMappingChanged;
031 private CallableWithArgs<Void> selectedRowsKeyChanged;
032 private CallableWithArgs<Void> selectedRowsBindTypeChanged;
033 private CallableWithArgs<Void> selectedRowsBindMappingChanged;
034
035 public CallableWithArgs<Void> getTableDataKeyChanged() {
036 return this.tableDataKeyChanged;
037 }
038
039 public CallableWithArgs<Void> getTableDataBindTypeChanged() {
040 return this.tableDataBindTypeChanged;
041 }
042
043 public CallableWithArgs<Void> getTableDataBindMappingChanged() {
044 return this.tableDataBindMappingChanged;
045 }
046
047 public CallableWithArgs<Void> getSelectedRowKeyChanged() {
048 return this.selectedRowKeyChanged;
049 }
050
051 public CallableWithArgs<Void> getSelectedRowBindTypeChanged() {
052 return this.selectedRowBindTypeChanged;
053 }
054
055 public CallableWithArgs<Void> getSelectedRowBindMappingChanged() {
056 return this.selectedRowBindMappingChanged;
057 }
058
059 public CallableWithArgs<Void> getSelectedRowsKeyChanged() {
060 return this.selectedRowsKeyChanged;
061 }
062
063 public CallableWithArgs<Void> getSelectedRowsBindTypeChanged() {
064 return this.selectedRowsBindTypeChanged;
065 }
066
067 public CallableWithArgs<Void> getSelectedRowsBindMappingChanged() {
068 return this.selectedRowsBindMappingChanged;
069 }
070
071
072 public void setTableDataKeyChanged(CallableWithArgs<Void> tableDataKeyChanged) {
073 this.tableDataKeyChanged = tableDataKeyChanged;
074 }
075
076 public void setTableDataBindTypeChanged(CallableWithArgs<Void> tableDataBindTypeChanged) {
077 this.tableDataBindTypeChanged = tableDataBindTypeChanged;
078 }
079
080 public void setTableDataBindMappingChanged(CallableWithArgs<Void> tableDataBindMappingChanged) {
081 this.tableDataBindMappingChanged = tableDataBindMappingChanged;
082 }
083
084 public void setSelectedRowKeyChanged(CallableWithArgs<Void> selectedRowKeyChanged) {
085 this.selectedRowKeyChanged = selectedRowKeyChanged;
086 }
087
088 public void setSelectedRowBindTypeChanged(CallableWithArgs<Void> selectedRowBindTypeChanged) {
089 this.selectedRowBindTypeChanged = selectedRowBindTypeChanged;
090 }
091
092 public void setSelectedRowBindMappingChanged(CallableWithArgs<Void> selectedRowBindMappingChanged) {
093 this.selectedRowBindMappingChanged = selectedRowBindMappingChanged;
094 }
095
096 public void setSelectedRowsKeyChanged(CallableWithArgs<Void> selectedRowsKeyChanged) {
097 this.selectedRowsKeyChanged = selectedRowsKeyChanged;
098 }
099
100 public void setSelectedRowsBindTypeChanged(CallableWithArgs<Void> selectedRowsBindTypeChanged) {
101 this.selectedRowsBindTypeChanged = selectedRowsBindTypeChanged;
102 }
103
104 public void setSelectedRowsBindMappingChanged(CallableWithArgs<Void> selectedRowsBindMappingChanged) {
105 this.selectedRowsBindMappingChanged = selectedRowsBindMappingChanged;
106 }
107
108
109 public void tableDataKeyChanged(org.apache.pivot.wtk.TableView arg0, java.lang.String arg1) {
110 if (tableDataKeyChanged != null) {
111 tableDataKeyChanged.call(arg0, arg1);
112 }
113 }
114
115 public void tableDataBindTypeChanged(org.apache.pivot.wtk.TableView arg0, org.apache.pivot.wtk.BindType arg1) {
116 if (tableDataBindTypeChanged != null) {
117 tableDataBindTypeChanged.call(arg0, arg1);
118 }
119 }
120
121 public void tableDataBindMappingChanged(org.apache.pivot.wtk.TableView arg0, org.apache.pivot.wtk.TableView.TableDataBindMapping arg1) {
122 if (tableDataBindMappingChanged != null) {
123 tableDataBindMappingChanged.call(arg0, arg1);
124 }
125 }
126
127 public void selectedRowKeyChanged(org.apache.pivot.wtk.TableView arg0, java.lang.String arg1) {
128 if (selectedRowKeyChanged != null) {
129 selectedRowKeyChanged.call(arg0, arg1);
130 }
131 }
132
133 public void selectedRowBindTypeChanged(org.apache.pivot.wtk.TableView arg0, org.apache.pivot.wtk.BindType arg1) {
134 if (selectedRowBindTypeChanged != null) {
135 selectedRowBindTypeChanged.call(arg0, arg1);
136 }
137 }
138
139 public void selectedRowBindMappingChanged(org.apache.pivot.wtk.TableView arg0, org.apache.pivot.wtk.TableView.SelectedRowBindMapping arg1) {
140 if (selectedRowBindMappingChanged != null) {
141 selectedRowBindMappingChanged.call(arg0, arg1);
142 }
143 }
144
145 public void selectedRowsKeyChanged(org.apache.pivot.wtk.TableView arg0, java.lang.String arg1) {
146 if (selectedRowsKeyChanged != null) {
147 selectedRowsKeyChanged.call(arg0, arg1);
148 }
149 }
150
151 public void selectedRowsBindTypeChanged(org.apache.pivot.wtk.TableView arg0, org.apache.pivot.wtk.BindType arg1) {
152 if (selectedRowsBindTypeChanged != null) {
153 selectedRowsBindTypeChanged.call(arg0, arg1);
154 }
155 }
156
157 public void selectedRowsBindMappingChanged(org.apache.pivot.wtk.TableView arg0, org.apache.pivot.wtk.TableView.SelectedRowBindMapping arg1) {
158 if (selectedRowsBindMappingChanged != null) {
159 selectedRowsBindMappingChanged.call(arg0, arg1);
160 }
161 }
162
163 }
|