001 /*
002 * SPDX-License-Identifier: Apache-2.0
003 *
004 * Copyright 2008-2017 the original author or authors.
005 *
006 * Licensed under the Apache License, Version 2.0 (the "License");
007 * you may not use this file except in compliance with the License.
008 * You may obtain a copy of the License at
009 *
010 * http://www.apache.org/licenses/LICENSE-2.0
011 *
012 * Unless required by applicable law or agreed to in writing, software
013 * distributed under the License is distributed on an "AS IS" BASIS,
014 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
015 * See the License for the specific language governing permissions and
016 * limitations under the License.
017 */
018 package griffon.pivot.support.adapters;
019
020 import griffon.core.CallableWithArgs;
021
022 /**
023 * @author Andres Almiray
024 * @since 2.0.0
025 */
026 public class ComponentAdapter implements GriffonPivotAdapter, org.apache.pivot.wtk.ComponentListener {
027 private CallableWithArgs<Void> tooltipTextChanged;
028 private CallableWithArgs<Void> parentChanged;
029 private CallableWithArgs<Void> sizeChanged;
030 private CallableWithArgs<Void> preferredSizeChanged;
031 private CallableWithArgs<Void> widthLimitsChanged;
032 private CallableWithArgs<Void> heightLimitsChanged;
033 private CallableWithArgs<Void> locationChanged;
034 private CallableWithArgs<Void> visibleChanged;
035 private CallableWithArgs<Void> cursorChanged;
036 private CallableWithArgs<Void> tooltipDelayChanged;
037 private CallableWithArgs<Void> dragSourceChanged;
038 private CallableWithArgs<Void> dropTargetChanged;
039 private CallableWithArgs<Void> menuHandlerChanged;
040 private CallableWithArgs<Void> nameChanged;
041
042 public CallableWithArgs<Void> getTooltipTextChanged() {
043 return this.tooltipTextChanged;
044 }
045
046 public CallableWithArgs<Void> getParentChanged() {
047 return this.parentChanged;
048 }
049
050 public CallableWithArgs<Void> getSizeChanged() {
051 return this.sizeChanged;
052 }
053
054 public CallableWithArgs<Void> getPreferredSizeChanged() {
055 return this.preferredSizeChanged;
056 }
057
058 public CallableWithArgs<Void> getWidthLimitsChanged() {
059 return this.widthLimitsChanged;
060 }
061
062 public CallableWithArgs<Void> getHeightLimitsChanged() {
063 return this.heightLimitsChanged;
064 }
065
066 public CallableWithArgs<Void> getLocationChanged() {
067 return this.locationChanged;
068 }
069
070 public CallableWithArgs<Void> getVisibleChanged() {
071 return this.visibleChanged;
072 }
073
074 public CallableWithArgs<Void> getCursorChanged() {
075 return this.cursorChanged;
076 }
077
078 public CallableWithArgs<Void> getTooltipDelayChanged() {
079 return this.tooltipDelayChanged;
080 }
081
082 public CallableWithArgs<Void> getDragSourceChanged() {
083 return this.dragSourceChanged;
084 }
085
086 public CallableWithArgs<Void> getDropTargetChanged() {
087 return this.dropTargetChanged;
088 }
089
090 public CallableWithArgs<Void> getMenuHandlerChanged() {
091 return this.menuHandlerChanged;
092 }
093
094 public CallableWithArgs<Void> getNameChanged() {
095 return this.nameChanged;
096 }
097
098
099 public void setTooltipTextChanged(CallableWithArgs<Void> tooltipTextChanged) {
100 this.tooltipTextChanged = tooltipTextChanged;
101 }
102
103 public void setParentChanged(CallableWithArgs<Void> parentChanged) {
104 this.parentChanged = parentChanged;
105 }
106
107 public void setSizeChanged(CallableWithArgs<Void> sizeChanged) {
108 this.sizeChanged = sizeChanged;
109 }
110
111 public void setPreferredSizeChanged(CallableWithArgs<Void> preferredSizeChanged) {
112 this.preferredSizeChanged = preferredSizeChanged;
113 }
114
115 public void setWidthLimitsChanged(CallableWithArgs<Void> widthLimitsChanged) {
116 this.widthLimitsChanged = widthLimitsChanged;
117 }
118
119 public void setHeightLimitsChanged(CallableWithArgs<Void> heightLimitsChanged) {
120 this.heightLimitsChanged = heightLimitsChanged;
121 }
122
123 public void setLocationChanged(CallableWithArgs<Void> locationChanged) {
124 this.locationChanged = locationChanged;
125 }
126
127 public void setVisibleChanged(CallableWithArgs<Void> visibleChanged) {
128 this.visibleChanged = visibleChanged;
129 }
130
131 public void setCursorChanged(CallableWithArgs<Void> cursorChanged) {
132 this.cursorChanged = cursorChanged;
133 }
134
135 public void setTooltipDelayChanged(CallableWithArgs<Void> tooltipDelayChanged) {
136 this.tooltipDelayChanged = tooltipDelayChanged;
137 }
138
139 public void setDragSourceChanged(CallableWithArgs<Void> dragSourceChanged) {
140 this.dragSourceChanged = dragSourceChanged;
141 }
142
143 public void setDropTargetChanged(CallableWithArgs<Void> dropTargetChanged) {
144 this.dropTargetChanged = dropTargetChanged;
145 }
146
147 public void setMenuHandlerChanged(CallableWithArgs<Void> menuHandlerChanged) {
148 this.menuHandlerChanged = menuHandlerChanged;
149 }
150
151 public void setNameChanged(CallableWithArgs<Void> nameChanged) {
152 this.nameChanged = nameChanged;
153 }
154
155
156 public void tooltipTextChanged(org.apache.pivot.wtk.Component arg0, java.lang.String arg1) {
157 if (tooltipTextChanged != null) {
158 tooltipTextChanged.call(arg0, arg1);
159 }
160 }
161
162 public void parentChanged(org.apache.pivot.wtk.Component arg0, org.apache.pivot.wtk.Container arg1) {
163 if (parentChanged != null) {
164 parentChanged.call(arg0, arg1);
165 }
166 }
167
168 public void sizeChanged(org.apache.pivot.wtk.Component arg0, int arg1, int arg2) {
169 if (sizeChanged != null) {
170 sizeChanged.call(arg0, arg1, arg2);
171 }
172 }
173
174 public void preferredSizeChanged(org.apache.pivot.wtk.Component arg0, int arg1, int arg2) {
175 if (preferredSizeChanged != null) {
176 preferredSizeChanged.call(arg0, arg1, arg2);
177 }
178 }
179
180 public void widthLimitsChanged(org.apache.pivot.wtk.Component arg0, int arg1, int arg2) {
181 if (widthLimitsChanged != null) {
182 widthLimitsChanged.call(arg0, arg1, arg2);
183 }
184 }
185
186 public void heightLimitsChanged(org.apache.pivot.wtk.Component arg0, int arg1, int arg2) {
187 if (heightLimitsChanged != null) {
188 heightLimitsChanged.call(arg0, arg1, arg2);
189 }
190 }
191
192 public void locationChanged(org.apache.pivot.wtk.Component arg0, int arg1, int arg2) {
193 if (locationChanged != null) {
194 locationChanged.call(arg0, arg1, arg2);
195 }
196 }
197
198 public void visibleChanged(org.apache.pivot.wtk.Component arg0) {
199 if (visibleChanged != null) {
200 visibleChanged.call(arg0);
201 }
202 }
203
204 public void cursorChanged(org.apache.pivot.wtk.Component arg0, org.apache.pivot.wtk.Cursor arg1) {
205 if (cursorChanged != null) {
206 cursorChanged.call(arg0, arg1);
207 }
208 }
209
210 public void tooltipDelayChanged(org.apache.pivot.wtk.Component arg0, int arg1) {
211 if (tooltipDelayChanged != null) {
212 tooltipDelayChanged.call(arg0, arg1);
213 }
214 }
215
216 public void dragSourceChanged(org.apache.pivot.wtk.Component arg0, org.apache.pivot.wtk.DragSource arg1) {
217 if (dragSourceChanged != null) {
218 dragSourceChanged.call(arg0, arg1);
219 }
220 }
221
222 public void dropTargetChanged(org.apache.pivot.wtk.Component arg0, org.apache.pivot.wtk.DropTarget arg1) {
223 if (dropTargetChanged != null) {
224 dropTargetChanged.call(arg0, arg1);
225 }
226 }
227
228 public void menuHandlerChanged(org.apache.pivot.wtk.Component arg0, org.apache.pivot.wtk.MenuHandler arg1) {
229 if (menuHandlerChanged != null) {
230 menuHandlerChanged.call(arg0, arg1);
231 }
232 }
233
234 public void nameChanged(org.apache.pivot.wtk.Component arg0, java.lang.String arg1) {
235 if (nameChanged != null) {
236 nameChanged.call(arg0, arg1);
237 }
238 }
239
240 }
|