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 SplitPaneAdapter implements GriffonPivotAdapter, org.apache.pivot.wtk.SplitPaneListener {
025 private CallableWithArgs<Void> topLeftChanged;
026 private CallableWithArgs<Void> bottomRightChanged;
027 private CallableWithArgs<Void> primaryRegionChanged;
028 private CallableWithArgs<Void> splitRatioChanged;
029 private CallableWithArgs<Void> lockedChanged;
030 private CallableWithArgs<Void> resizeModeChanged;
031 private CallableWithArgs<Void> orientationChanged;
032
033 public CallableWithArgs<Void> getTopLeftChanged() {
034 return this.topLeftChanged;
035 }
036
037 public CallableWithArgs<Void> getBottomRightChanged() {
038 return this.bottomRightChanged;
039 }
040
041 public CallableWithArgs<Void> getPrimaryRegionChanged() {
042 return this.primaryRegionChanged;
043 }
044
045 public CallableWithArgs<Void> getSplitRatioChanged() {
046 return this.splitRatioChanged;
047 }
048
049 public CallableWithArgs<Void> getLockedChanged() {
050 return this.lockedChanged;
051 }
052
053 public CallableWithArgs<Void> getResizeModeChanged() {
054 return this.resizeModeChanged;
055 }
056
057 public CallableWithArgs<Void> getOrientationChanged() {
058 return this.orientationChanged;
059 }
060
061
062 public void setTopLeftChanged(CallableWithArgs<Void> topLeftChanged) {
063 this.topLeftChanged = topLeftChanged;
064 }
065
066 public void setBottomRightChanged(CallableWithArgs<Void> bottomRightChanged) {
067 this.bottomRightChanged = bottomRightChanged;
068 }
069
070 public void setPrimaryRegionChanged(CallableWithArgs<Void> primaryRegionChanged) {
071 this.primaryRegionChanged = primaryRegionChanged;
072 }
073
074 public void setSplitRatioChanged(CallableWithArgs<Void> splitRatioChanged) {
075 this.splitRatioChanged = splitRatioChanged;
076 }
077
078 public void setLockedChanged(CallableWithArgs<Void> lockedChanged) {
079 this.lockedChanged = lockedChanged;
080 }
081
082 public void setResizeModeChanged(CallableWithArgs<Void> resizeModeChanged) {
083 this.resizeModeChanged = resizeModeChanged;
084 }
085
086 public void setOrientationChanged(CallableWithArgs<Void> orientationChanged) {
087 this.orientationChanged = orientationChanged;
088 }
089
090
091 public void topLeftChanged(org.apache.pivot.wtk.SplitPane arg0, org.apache.pivot.wtk.Component arg1) {
092 if (topLeftChanged != null) {
093 topLeftChanged.call(arg0, arg1);
094 }
095 }
096
097 public void bottomRightChanged(org.apache.pivot.wtk.SplitPane arg0, org.apache.pivot.wtk.Component arg1) {
098 if (bottomRightChanged != null) {
099 bottomRightChanged.call(arg0, arg1);
100 }
101 }
102
103 public void primaryRegionChanged(org.apache.pivot.wtk.SplitPane arg0) {
104 if (primaryRegionChanged != null) {
105 primaryRegionChanged.call(arg0);
106 }
107 }
108
109 public void splitRatioChanged(org.apache.pivot.wtk.SplitPane arg0, float arg1) {
110 if (splitRatioChanged != null) {
111 splitRatioChanged.call(arg0, arg1);
112 }
113 }
114
115 public void lockedChanged(org.apache.pivot.wtk.SplitPane arg0) {
116 if (lockedChanged != null) {
117 lockedChanged.call(arg0);
118 }
119 }
120
121 public void resizeModeChanged(org.apache.pivot.wtk.SplitPane arg0, org.apache.pivot.wtk.SplitPane.ResizeMode arg1) {
122 if (resizeModeChanged != null) {
123 resizeModeChanged.call(arg0, arg1);
124 }
125 }
126
127 public void orientationChanged(org.apache.pivot.wtk.SplitPane arg0) {
128 if (orientationChanged != null) {
129 orientationChanged.call(arg0);
130 }
131 }
132
133 }
|