| 
001 /*002  * Copyright 2008-2015 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 ComponentAdapter implements GriffonPivotAdapter, org.apache.pivot.wtk.ComponentListener {
 025     private CallableWithArgs<Void> tooltipTextChanged;
 026     private CallableWithArgs<Void> parentChanged;
 027     private CallableWithArgs<Void> sizeChanged;
 028     private CallableWithArgs<Void> preferredSizeChanged;
 029     private CallableWithArgs<Void> widthLimitsChanged;
 030     private CallableWithArgs<Void> heightLimitsChanged;
 031     private CallableWithArgs<Void> locationChanged;
 032     private CallableWithArgs<Void> visibleChanged;
 033     private CallableWithArgs<Void> cursorChanged;
 034     private CallableWithArgs<Void> tooltipDelayChanged;
 035     private CallableWithArgs<Void> dragSourceChanged;
 036     private CallableWithArgs<Void> dropTargetChanged;
 037     private CallableWithArgs<Void> menuHandlerChanged;
 038     private CallableWithArgs<Void> nameChanged;
 039
 040     public CallableWithArgs<Void> getTooltipTextChanged() {
 041         return this.tooltipTextChanged;
 042     }
 043
 044     public CallableWithArgs<Void> getParentChanged() {
 045         return this.parentChanged;
 046     }
 047
 048     public CallableWithArgs<Void> getSizeChanged() {
 049         return this.sizeChanged;
 050     }
 051
 052     public CallableWithArgs<Void> getPreferredSizeChanged() {
 053         return this.preferredSizeChanged;
 054     }
 055
 056     public CallableWithArgs<Void> getWidthLimitsChanged() {
 057         return this.widthLimitsChanged;
 058     }
 059
 060     public CallableWithArgs<Void> getHeightLimitsChanged() {
 061         return this.heightLimitsChanged;
 062     }
 063
 064     public CallableWithArgs<Void> getLocationChanged() {
 065         return this.locationChanged;
 066     }
 067
 068     public CallableWithArgs<Void> getVisibleChanged() {
 069         return this.visibleChanged;
 070     }
 071
 072     public CallableWithArgs<Void> getCursorChanged() {
 073         return this.cursorChanged;
 074     }
 075
 076     public CallableWithArgs<Void> getTooltipDelayChanged() {
 077         return this.tooltipDelayChanged;
 078     }
 079
 080     public CallableWithArgs<Void> getDragSourceChanged() {
 081         return this.dragSourceChanged;
 082     }
 083
 084     public CallableWithArgs<Void> getDropTargetChanged() {
 085         return this.dropTargetChanged;
 086     }
 087
 088     public CallableWithArgs<Void> getMenuHandlerChanged() {
 089         return this.menuHandlerChanged;
 090     }
 091
 092     public CallableWithArgs<Void> getNameChanged() {
 093         return this.nameChanged;
 094     }
 095
 096
 097     public void setTooltipTextChanged(CallableWithArgs<Void> tooltipTextChanged) {
 098         this.tooltipTextChanged = tooltipTextChanged;
 099     }
 100
 101     public void setParentChanged(CallableWithArgs<Void> parentChanged) {
 102         this.parentChanged = parentChanged;
 103     }
 104
 105     public void setSizeChanged(CallableWithArgs<Void> sizeChanged) {
 106         this.sizeChanged = sizeChanged;
 107     }
 108
 109     public void setPreferredSizeChanged(CallableWithArgs<Void> preferredSizeChanged) {
 110         this.preferredSizeChanged = preferredSizeChanged;
 111     }
 112
 113     public void setWidthLimitsChanged(CallableWithArgs<Void> widthLimitsChanged) {
 114         this.widthLimitsChanged = widthLimitsChanged;
 115     }
 116
 117     public void setHeightLimitsChanged(CallableWithArgs<Void> heightLimitsChanged) {
 118         this.heightLimitsChanged = heightLimitsChanged;
 119     }
 120
 121     public void setLocationChanged(CallableWithArgs<Void> locationChanged) {
 122         this.locationChanged = locationChanged;
 123     }
 124
 125     public void setVisibleChanged(CallableWithArgs<Void> visibleChanged) {
 126         this.visibleChanged = visibleChanged;
 127     }
 128
 129     public void setCursorChanged(CallableWithArgs<Void> cursorChanged) {
 130         this.cursorChanged = cursorChanged;
 131     }
 132
 133     public void setTooltipDelayChanged(CallableWithArgs<Void> tooltipDelayChanged) {
 134         this.tooltipDelayChanged = tooltipDelayChanged;
 135     }
 136
 137     public void setDragSourceChanged(CallableWithArgs<Void> dragSourceChanged) {
 138         this.dragSourceChanged = dragSourceChanged;
 139     }
 140
 141     public void setDropTargetChanged(CallableWithArgs<Void> dropTargetChanged) {
 142         this.dropTargetChanged = dropTargetChanged;
 143     }
 144
 145     public void setMenuHandlerChanged(CallableWithArgs<Void> menuHandlerChanged) {
 146         this.menuHandlerChanged = menuHandlerChanged;
 147     }
 148
 149     public void setNameChanged(CallableWithArgs<Void> nameChanged) {
 150         this.nameChanged = nameChanged;
 151     }
 152
 153
 154     public void tooltipTextChanged(org.apache.pivot.wtk.Component arg0, java.lang.String arg1) {
 155         if (tooltipTextChanged != null) {
 156             tooltipTextChanged.call(arg0, arg1);
 157         }
 158     }
 159
 160     public void parentChanged(org.apache.pivot.wtk.Component arg0, org.apache.pivot.wtk.Container arg1) {
 161         if (parentChanged != null) {
 162             parentChanged.call(arg0, arg1);
 163         }
 164     }
 165
 166     public void sizeChanged(org.apache.pivot.wtk.Component arg0, int arg1, int arg2) {
 167         if (sizeChanged != null) {
 168             sizeChanged.call(arg0, arg1, arg2);
 169         }
 170     }
 171
 172     public void preferredSizeChanged(org.apache.pivot.wtk.Component arg0, int arg1, int arg2) {
 173         if (preferredSizeChanged != null) {
 174             preferredSizeChanged.call(arg0, arg1, arg2);
 175         }
 176     }
 177
 178     public void widthLimitsChanged(org.apache.pivot.wtk.Component arg0, int arg1, int arg2) {
 179         if (widthLimitsChanged != null) {
 180             widthLimitsChanged.call(arg0, arg1, arg2);
 181         }
 182     }
 183
 184     public void heightLimitsChanged(org.apache.pivot.wtk.Component arg0, int arg1, int arg2) {
 185         if (heightLimitsChanged != null) {
 186             heightLimitsChanged.call(arg0, arg1, arg2);
 187         }
 188     }
 189
 190     public void locationChanged(org.apache.pivot.wtk.Component arg0, int arg1, int arg2) {
 191         if (locationChanged != null) {
 192             locationChanged.call(arg0, arg1, arg2);
 193         }
 194     }
 195
 196     public void visibleChanged(org.apache.pivot.wtk.Component arg0) {
 197         if (visibleChanged != null) {
 198             visibleChanged.call(arg0);
 199         }
 200     }
 201
 202     public void cursorChanged(org.apache.pivot.wtk.Component arg0, org.apache.pivot.wtk.Cursor arg1) {
 203         if (cursorChanged != null) {
 204             cursorChanged.call(arg0, arg1);
 205         }
 206     }
 207
 208     public void tooltipDelayChanged(org.apache.pivot.wtk.Component arg0, int arg1) {
 209         if (tooltipDelayChanged != null) {
 210             tooltipDelayChanged.call(arg0, arg1);
 211         }
 212     }
 213
 214     public void dragSourceChanged(org.apache.pivot.wtk.Component arg0, org.apache.pivot.wtk.DragSource arg1) {
 215         if (dragSourceChanged != null) {
 216             dragSourceChanged.call(arg0, arg1);
 217         }
 218     }
 219
 220     public void dropTargetChanged(org.apache.pivot.wtk.Component arg0, org.apache.pivot.wtk.DropTarget arg1) {
 221         if (dropTargetChanged != null) {
 222             dropTargetChanged.call(arg0, arg1);
 223         }
 224     }
 225
 226     public void menuHandlerChanged(org.apache.pivot.wtk.Component arg0, org.apache.pivot.wtk.MenuHandler arg1) {
 227         if (menuHandlerChanged != null) {
 228             menuHandlerChanged.call(arg0, arg1);
 229         }
 230     }
 231
 232     public void nameChanged(org.apache.pivot.wtk.Component arg0, java.lang.String arg1) {
 233         if (nameChanged != null) {
 234             nameChanged.call(arg0, arg1);
 235         }
 236     }
 237
 238 }
 |