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 TreeViewAdapter implements GriffonPivotAdapter, org.apache.pivot.wtk.TreeViewListener {
025 private CallableWithArgs<Void> selectModeChanged;
026 private CallableWithArgs<Void> checkmarksEnabledChanged;
027 private CallableWithArgs<Void> disabledCheckmarkFilterChanged;
028 private CallableWithArgs<Void> nodeRendererChanged;
029 private CallableWithArgs<Void> treeDataChanged;
030 private CallableWithArgs<Void> nodeEditorChanged;
031 private CallableWithArgs<Void> showMixedCheckmarkStateChanged;
032 private CallableWithArgs<Void> disabledNodeFilterChanged;
033
034 public CallableWithArgs<Void> getSelectModeChanged() {
035 return this.selectModeChanged;
036 }
037
038 public CallableWithArgs<Void> getCheckmarksEnabledChanged() {
039 return this.checkmarksEnabledChanged;
040 }
041
042 public CallableWithArgs<Void> getDisabledCheckmarkFilterChanged() {
043 return this.disabledCheckmarkFilterChanged;
044 }
045
046 public CallableWithArgs<Void> getNodeRendererChanged() {
047 return this.nodeRendererChanged;
048 }
049
050 public CallableWithArgs<Void> getTreeDataChanged() {
051 return this.treeDataChanged;
052 }
053
054 public CallableWithArgs<Void> getNodeEditorChanged() {
055 return this.nodeEditorChanged;
056 }
057
058 public CallableWithArgs<Void> getShowMixedCheckmarkStateChanged() {
059 return this.showMixedCheckmarkStateChanged;
060 }
061
062 public CallableWithArgs<Void> getDisabledNodeFilterChanged() {
063 return this.disabledNodeFilterChanged;
064 }
065
066
067 public void setSelectModeChanged(CallableWithArgs<Void> selectModeChanged) {
068 this.selectModeChanged = selectModeChanged;
069 }
070
071 public void setCheckmarksEnabledChanged(CallableWithArgs<Void> checkmarksEnabledChanged) {
072 this.checkmarksEnabledChanged = checkmarksEnabledChanged;
073 }
074
075 public void setDisabledCheckmarkFilterChanged(CallableWithArgs<Void> disabledCheckmarkFilterChanged) {
076 this.disabledCheckmarkFilterChanged = disabledCheckmarkFilterChanged;
077 }
078
079 public void setNodeRendererChanged(CallableWithArgs<Void> nodeRendererChanged) {
080 this.nodeRendererChanged = nodeRendererChanged;
081 }
082
083 public void setTreeDataChanged(CallableWithArgs<Void> treeDataChanged) {
084 this.treeDataChanged = treeDataChanged;
085 }
086
087 public void setNodeEditorChanged(CallableWithArgs<Void> nodeEditorChanged) {
088 this.nodeEditorChanged = nodeEditorChanged;
089 }
090
091 public void setShowMixedCheckmarkStateChanged(CallableWithArgs<Void> showMixedCheckmarkStateChanged) {
092 this.showMixedCheckmarkStateChanged = showMixedCheckmarkStateChanged;
093 }
094
095 public void setDisabledNodeFilterChanged(CallableWithArgs<Void> disabledNodeFilterChanged) {
096 this.disabledNodeFilterChanged = disabledNodeFilterChanged;
097 }
098
099
100 public void selectModeChanged(org.apache.pivot.wtk.TreeView arg0, org.apache.pivot.wtk.TreeView.SelectMode arg1) {
101 if (selectModeChanged != null) {
102 selectModeChanged.call(arg0, arg1);
103 }
104 }
105
106 public void checkmarksEnabledChanged(org.apache.pivot.wtk.TreeView arg0) {
107 if (checkmarksEnabledChanged != null) {
108 checkmarksEnabledChanged.call(arg0);
109 }
110 }
111
112 public void disabledCheckmarkFilterChanged(org.apache.pivot.wtk.TreeView arg0, org.apache.pivot.util.Filter<?> arg1) {
113 if (disabledCheckmarkFilterChanged != null) {
114 disabledCheckmarkFilterChanged.call(arg0, arg1);
115 }
116 }
117
118 public void nodeRendererChanged(org.apache.pivot.wtk.TreeView arg0, org.apache.pivot.wtk.TreeView.NodeRenderer arg1) {
119 if (nodeRendererChanged != null) {
120 nodeRendererChanged.call(arg0, arg1);
121 }
122 }
123
124 public void treeDataChanged(org.apache.pivot.wtk.TreeView arg0, org.apache.pivot.collections.List<?> arg1) {
125 if (treeDataChanged != null) {
126 treeDataChanged.call(arg0, arg1);
127 }
128 }
129
130 public void nodeEditorChanged(org.apache.pivot.wtk.TreeView arg0, org.apache.pivot.wtk.TreeView.NodeEditor arg1) {
131 if (nodeEditorChanged != null) {
132 nodeEditorChanged.call(arg0, arg1);
133 }
134 }
135
136 public void showMixedCheckmarkStateChanged(org.apache.pivot.wtk.TreeView arg0) {
137 if (showMixedCheckmarkStateChanged != null) {
138 showMixedCheckmarkStateChanged.call(arg0);
139 }
140 }
141
142 public void disabledNodeFilterChanged(org.apache.pivot.wtk.TreeView arg0, org.apache.pivot.util.Filter<?> arg1) {
143 if (disabledNodeFilterChanged != null) {
144 disabledNodeFilterChanged.call(arg0, arg1);
145 }
146 }
147
148 }
|