| 
001 /*002  * Copyright 2008-2017 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 MovieAdapter implements GriffonPivotAdapter, org.apache.pivot.wtk.media.MovieListener {
 025     private CallableWithArgs<Void> regionUpdated;
 026     private CallableWithArgs<Void> baselineChanged;
 027     private CallableWithArgs<Void> sizeChanged;
 028     private CallableWithArgs<Void> currentFrameChanged;
 029     private CallableWithArgs<Void> loopingChanged;
 030     private CallableWithArgs<Void> movieStarted;
 031     private CallableWithArgs<Void> movieStopped;
 032
 033     public CallableWithArgs<Void> getRegionUpdated() {
 034         return this.regionUpdated;
 035     }
 036
 037     public CallableWithArgs<Void> getBaselineChanged() {
 038         return this.baselineChanged;
 039     }
 040
 041     public CallableWithArgs<Void> getSizeChanged() {
 042         return this.sizeChanged;
 043     }
 044
 045     public CallableWithArgs<Void> getCurrentFrameChanged() {
 046         return this.currentFrameChanged;
 047     }
 048
 049     public CallableWithArgs<Void> getLoopingChanged() {
 050         return this.loopingChanged;
 051     }
 052
 053     public CallableWithArgs<Void> getMovieStarted() {
 054         return this.movieStarted;
 055     }
 056
 057     public CallableWithArgs<Void> getMovieStopped() {
 058         return this.movieStopped;
 059     }
 060
 061
 062     public void setRegionUpdated(CallableWithArgs<Void> regionUpdated) {
 063         this.regionUpdated = regionUpdated;
 064     }
 065
 066     public void setBaselineChanged(CallableWithArgs<Void> baselineChanged) {
 067         this.baselineChanged = baselineChanged;
 068     }
 069
 070     public void setSizeChanged(CallableWithArgs<Void> sizeChanged) {
 071         this.sizeChanged = sizeChanged;
 072     }
 073
 074     public void setCurrentFrameChanged(CallableWithArgs<Void> currentFrameChanged) {
 075         this.currentFrameChanged = currentFrameChanged;
 076     }
 077
 078     public void setLoopingChanged(CallableWithArgs<Void> loopingChanged) {
 079         this.loopingChanged = loopingChanged;
 080     }
 081
 082     public void setMovieStarted(CallableWithArgs<Void> movieStarted) {
 083         this.movieStarted = movieStarted;
 084     }
 085
 086     public void setMovieStopped(CallableWithArgs<Void> movieStopped) {
 087         this.movieStopped = movieStopped;
 088     }
 089
 090
 091     public void regionUpdated(org.apache.pivot.wtk.media.Movie arg0, int arg1, int arg2, int arg3, int arg4) {
 092         if (regionUpdated != null) {
 093             regionUpdated.call(arg0, arg1, arg2, arg3, arg4);
 094         }
 095     }
 096
 097     public void baselineChanged(org.apache.pivot.wtk.media.Movie arg0, int arg1) {
 098         if (baselineChanged != null) {
 099             baselineChanged.call(arg0, arg1);
 100         }
 101     }
 102
 103     public void sizeChanged(org.apache.pivot.wtk.media.Movie arg0, int arg1, int arg2) {
 104         if (sizeChanged != null) {
 105             sizeChanged.call(arg0, arg1, arg2);
 106         }
 107     }
 108
 109     public void currentFrameChanged(org.apache.pivot.wtk.media.Movie arg0, int arg1) {
 110         if (currentFrameChanged != null) {
 111             currentFrameChanged.call(arg0, arg1);
 112         }
 113     }
 114
 115     public void loopingChanged(org.apache.pivot.wtk.media.Movie arg0) {
 116         if (loopingChanged != null) {
 117             loopingChanged.call(arg0);
 118         }
 119     }
 120
 121     public void movieStarted(org.apache.pivot.wtk.media.Movie arg0) {
 122         if (movieStarted != null) {
 123             movieStarted.call(arg0);
 124         }
 125     }
 126
 127     public void movieStopped(org.apache.pivot.wtk.media.Movie arg0) {
 128         if (movieStopped != null) {
 129             movieStopped.call(arg0);
 130         }
 131     }
 132
 133 }
 |