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 ButtonBindingAdapter implements GriffonPivotAdapter, org.apache.pivot.wtk.ButtonBindingListener {
025 private CallableWithArgs<Void> buttonDataKeyChanged;
026 private CallableWithArgs<Void> buttonDataBindTypeChanged;
027 private CallableWithArgs<Void> buttonDataBindMappingChanged;
028 private CallableWithArgs<Void> selectedKeyChanged;
029 private CallableWithArgs<Void> selectedBindTypeChanged;
030 private CallableWithArgs<Void> selectedBindMappingChanged;
031 private CallableWithArgs<Void> stateKeyChanged;
032 private CallableWithArgs<Void> stateBindTypeChanged;
033 private CallableWithArgs<Void> stateBindMappingChanged;
034
035 public CallableWithArgs<Void> getButtonDataKeyChanged() {
036 return this.buttonDataKeyChanged;
037 }
038
039 public CallableWithArgs<Void> getButtonDataBindTypeChanged() {
040 return this.buttonDataBindTypeChanged;
041 }
042
043 public CallableWithArgs<Void> getButtonDataBindMappingChanged() {
044 return this.buttonDataBindMappingChanged;
045 }
046
047 public CallableWithArgs<Void> getSelectedKeyChanged() {
048 return this.selectedKeyChanged;
049 }
050
051 public CallableWithArgs<Void> getSelectedBindTypeChanged() {
052 return this.selectedBindTypeChanged;
053 }
054
055 public CallableWithArgs<Void> getSelectedBindMappingChanged() {
056 return this.selectedBindMappingChanged;
057 }
058
059 public CallableWithArgs<Void> getStateKeyChanged() {
060 return this.stateKeyChanged;
061 }
062
063 public CallableWithArgs<Void> getStateBindTypeChanged() {
064 return this.stateBindTypeChanged;
065 }
066
067 public CallableWithArgs<Void> getStateBindMappingChanged() {
068 return this.stateBindMappingChanged;
069 }
070
071
072 public void setButtonDataKeyChanged(CallableWithArgs<Void> buttonDataKeyChanged) {
073 this.buttonDataKeyChanged = buttonDataKeyChanged;
074 }
075
076 public void setButtonDataBindTypeChanged(CallableWithArgs<Void> buttonDataBindTypeChanged) {
077 this.buttonDataBindTypeChanged = buttonDataBindTypeChanged;
078 }
079
080 public void setButtonDataBindMappingChanged(CallableWithArgs<Void> buttonDataBindMappingChanged) {
081 this.buttonDataBindMappingChanged = buttonDataBindMappingChanged;
082 }
083
084 public void setSelectedKeyChanged(CallableWithArgs<Void> selectedKeyChanged) {
085 this.selectedKeyChanged = selectedKeyChanged;
086 }
087
088 public void setSelectedBindTypeChanged(CallableWithArgs<Void> selectedBindTypeChanged) {
089 this.selectedBindTypeChanged = selectedBindTypeChanged;
090 }
091
092 public void setSelectedBindMappingChanged(CallableWithArgs<Void> selectedBindMappingChanged) {
093 this.selectedBindMappingChanged = selectedBindMappingChanged;
094 }
095
096 public void setStateKeyChanged(CallableWithArgs<Void> stateKeyChanged) {
097 this.stateKeyChanged = stateKeyChanged;
098 }
099
100 public void setStateBindTypeChanged(CallableWithArgs<Void> stateBindTypeChanged) {
101 this.stateBindTypeChanged = stateBindTypeChanged;
102 }
103
104 public void setStateBindMappingChanged(CallableWithArgs<Void> stateBindMappingChanged) {
105 this.stateBindMappingChanged = stateBindMappingChanged;
106 }
107
108
109 public void buttonDataKeyChanged(org.apache.pivot.wtk.Button arg0, java.lang.String arg1) {
110 if (buttonDataKeyChanged != null) {
111 buttonDataKeyChanged.call(arg0, arg1);
112 }
113 }
114
115 public void buttonDataBindTypeChanged(org.apache.pivot.wtk.Button arg0, org.apache.pivot.wtk.BindType arg1) {
116 if (buttonDataBindTypeChanged != null) {
117 buttonDataBindTypeChanged.call(arg0, arg1);
118 }
119 }
120
121 public void buttonDataBindMappingChanged(org.apache.pivot.wtk.Button arg0, org.apache.pivot.wtk.Button.ButtonDataBindMapping arg1) {
122 if (buttonDataBindMappingChanged != null) {
123 buttonDataBindMappingChanged.call(arg0, arg1);
124 }
125 }
126
127 public void selectedKeyChanged(org.apache.pivot.wtk.Button arg0, java.lang.String arg1) {
128 if (selectedKeyChanged != null) {
129 selectedKeyChanged.call(arg0, arg1);
130 }
131 }
132
133 public void selectedBindTypeChanged(org.apache.pivot.wtk.Button arg0, org.apache.pivot.wtk.BindType arg1) {
134 if (selectedBindTypeChanged != null) {
135 selectedBindTypeChanged.call(arg0, arg1);
136 }
137 }
138
139 public void selectedBindMappingChanged(org.apache.pivot.wtk.Button arg0, org.apache.pivot.wtk.Button.SelectedBindMapping arg1) {
140 if (selectedBindMappingChanged != null) {
141 selectedBindMappingChanged.call(arg0, arg1);
142 }
143 }
144
145 public void stateKeyChanged(org.apache.pivot.wtk.Button arg0, java.lang.String arg1) {
146 if (stateKeyChanged != null) {
147 stateKeyChanged.call(arg0, arg1);
148 }
149 }
150
151 public void stateBindTypeChanged(org.apache.pivot.wtk.Button arg0, org.apache.pivot.wtk.BindType arg1) {
152 if (stateBindTypeChanged != null) {
153 stateBindTypeChanged.call(arg0, arg1);
154 }
155 }
156
157 public void stateBindMappingChanged(org.apache.pivot.wtk.Button arg0, org.apache.pivot.wtk.Button.StateBindMapping arg1) {
158 if (stateBindMappingChanged != null) {
159 stateBindMappingChanged.call(arg0, arg1);
160 }
161 }
162
163 }
|