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 ScrollPaneAdapter implements GriffonPivotAdapter, org.apache.pivot.wtk.ScrollPaneListener {
025 private CallableWithArgs<Void> horizontalScrollBarPolicyChanged;
026 private CallableWithArgs<Void> rowHeaderChanged;
027 private CallableWithArgs<Void> verticalScrollBarPolicyChanged;
028 private CallableWithArgs<Void> columnHeaderChanged;
029 private CallableWithArgs<Void> cornerChanged;
030
031 public CallableWithArgs<Void> getHorizontalScrollBarPolicyChanged() {
032 return this.horizontalScrollBarPolicyChanged;
033 }
034
035 public CallableWithArgs<Void> getRowHeaderChanged() {
036 return this.rowHeaderChanged;
037 }
038
039 public CallableWithArgs<Void> getVerticalScrollBarPolicyChanged() {
040 return this.verticalScrollBarPolicyChanged;
041 }
042
043 public CallableWithArgs<Void> getColumnHeaderChanged() {
044 return this.columnHeaderChanged;
045 }
046
047 public CallableWithArgs<Void> getCornerChanged() {
048 return this.cornerChanged;
049 }
050
051
052 public void setHorizontalScrollBarPolicyChanged(CallableWithArgs<Void> horizontalScrollBarPolicyChanged) {
053 this.horizontalScrollBarPolicyChanged = horizontalScrollBarPolicyChanged;
054 }
055
056 public void setRowHeaderChanged(CallableWithArgs<Void> rowHeaderChanged) {
057 this.rowHeaderChanged = rowHeaderChanged;
058 }
059
060 public void setVerticalScrollBarPolicyChanged(CallableWithArgs<Void> verticalScrollBarPolicyChanged) {
061 this.verticalScrollBarPolicyChanged = verticalScrollBarPolicyChanged;
062 }
063
064 public void setColumnHeaderChanged(CallableWithArgs<Void> columnHeaderChanged) {
065 this.columnHeaderChanged = columnHeaderChanged;
066 }
067
068 public void setCornerChanged(CallableWithArgs<Void> cornerChanged) {
069 this.cornerChanged = cornerChanged;
070 }
071
072
073 public void horizontalScrollBarPolicyChanged(org.apache.pivot.wtk.ScrollPane arg0, org.apache.pivot.wtk.ScrollPane.ScrollBarPolicy arg1) {
074 if (horizontalScrollBarPolicyChanged != null) {
075 horizontalScrollBarPolicyChanged.call(arg0, arg1);
076 }
077 }
078
079 public void rowHeaderChanged(org.apache.pivot.wtk.ScrollPane arg0, org.apache.pivot.wtk.Component arg1) {
080 if (rowHeaderChanged != null) {
081 rowHeaderChanged.call(arg0, arg1);
082 }
083 }
084
085 public void verticalScrollBarPolicyChanged(org.apache.pivot.wtk.ScrollPane arg0, org.apache.pivot.wtk.ScrollPane.ScrollBarPolicy arg1) {
086 if (verticalScrollBarPolicyChanged != null) {
087 verticalScrollBarPolicyChanged.call(arg0, arg1);
088 }
089 }
090
091 public void columnHeaderChanged(org.apache.pivot.wtk.ScrollPane arg0, org.apache.pivot.wtk.Component arg1) {
092 if (columnHeaderChanged != null) {
093 columnHeaderChanged.call(arg0, arg1);
094 }
095 }
096
097 public void cornerChanged(org.apache.pivot.wtk.ScrollPane arg0, org.apache.pivot.wtk.Component arg1) {
098 if (cornerChanged != null) {
099 cornerChanged.call(arg0, arg1);
100 }
101 }
102
103 }
|