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 import org.apache.pivot.wtk.media.Image; 
020  
021 /** 
022  * @author Andres Almiray 
023  * @since 2.0.0 
024  */ 
025 public class WindowAdapter implements GriffonPivotAdapter, org.apache.pivot.wtk.WindowListener { 
026     private CallableWithArgs<Void> iconAdded; 
027     private CallableWithArgs<Void> iconInserted; 
028     private CallableWithArgs<Void> iconsRemoved; 
029     private CallableWithArgs<Void> titleChanged; 
030     private CallableWithArgs<Void> contentChanged; 
031     private CallableWithArgs<Void> activeChanged; 
032     private CallableWithArgs<Void> maximizedChanged; 
033  
034     public CallableWithArgs<Void> getIconAdded() { 
035         return this.iconAdded; 
036     } 
037  
038     public CallableWithArgs<Void> getIconInserted() { 
039         return this.iconInserted; 
040     } 
041  
042     public CallableWithArgs<Void> getIconsRemoved() { 
043         return this.iconsRemoved; 
044     } 
045  
046     public CallableWithArgs<Void> getTitleChanged() { 
047         return this.titleChanged; 
048     } 
049  
050     public CallableWithArgs<Void> getContentChanged() { 
051         return this.contentChanged; 
052     } 
053  
054     public CallableWithArgs<Void> getActiveChanged() { 
055         return this.activeChanged; 
056     } 
057  
058     public CallableWithArgs<Void> getMaximizedChanged() { 
059         return this.maximizedChanged; 
060     } 
061  
062  
063     public void setIconAdded(CallableWithArgs<Void> iconAdded) { 
064         this.iconAdded = iconAdded; 
065     } 
066  
067     public void setIconInserted(CallableWithArgs<Void> iconInserted) { 
068         this.iconInserted = iconInserted; 
069     } 
070  
071     public void setIconsRemoved(CallableWithArgs<Void> iconsRemoved) { 
072         this.iconsRemoved = iconsRemoved; 
073     } 
074  
075     public void setTitleChanged(CallableWithArgs<Void> titleChanged) { 
076         this.titleChanged = titleChanged; 
077     } 
078  
079     public void setContentChanged(CallableWithArgs<Void> contentChanged) { 
080         this.contentChanged = contentChanged; 
081     } 
082  
083     public void setActiveChanged(CallableWithArgs<Void> activeChanged) { 
084         this.activeChanged = activeChanged; 
085     } 
086  
087     public void setMaximizedChanged(CallableWithArgs<Void> maximizedChanged) { 
088         this.maximizedChanged = maximizedChanged; 
089     } 
090  
091  
092     public void iconAdded(org.apache.pivot.wtk.Window arg0, org.apache.pivot.wtk.media.Image arg1) { 
093         if (iconAdded != null) { 
094             iconAdded.call(arg0, arg1); 
095         } 
096     } 
097  
098     public void iconInserted(org.apache.pivot.wtk.Window arg0, org.apache.pivot.wtk.media.Image arg1, int arg2) { 
099         if (iconInserted != null) { 
100             iconInserted.call(arg0, arg1, arg2); 
101         } 
102     } 
103  
104     public void iconsRemoved(org.apache.pivot.wtk.Window arg0, int arg1, org.apache.pivot.collections.Sequence<Image> arg2) { 
105         if (iconsRemoved != null) { 
106             iconsRemoved.call(arg0, arg1, arg2); 
107         } 
108     } 
109  
110     public void titleChanged(org.apache.pivot.wtk.Window arg0, java.lang.String arg1) { 
111         if (titleChanged != null) { 
112             titleChanged.call(arg0, arg1); 
113         } 
114     } 
115  
116     public void contentChanged(org.apache.pivot.wtk.Window arg0, org.apache.pivot.wtk.Component arg1) { 
117         if (contentChanged != null) { 
118             contentChanged.call(arg0, arg1); 
119         } 
120     } 
121  
122     public void activeChanged(org.apache.pivot.wtk.Window arg0, org.apache.pivot.wtk.Window arg1) { 
123         if (activeChanged != null) { 
124             activeChanged.call(arg0, arg1); 
125         } 
126     } 
127  
128     public void maximizedChanged(org.apache.pivot.wtk.Window arg0) { 
129         if (maximizedChanged != null) { 
130             maximizedChanged.call(arg0); 
131         } 
132     } 
133  
134 }
    
    |