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