| 
001 /*002  * Copyright 2008-2015 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 ListViewAdapter implements GriffonPivotAdapter, org.apache.pivot.wtk.ListViewListener {
 025     private CallableWithArgs<Void> listDataChanged;
 026     private CallableWithArgs<Void> itemRendererChanged;
 027     private CallableWithArgs<Void> disabledItemFilterChanged;
 028     private CallableWithArgs<Void> itemEditorChanged;
 029     private CallableWithArgs<Void> selectModeChanged;
 030     private CallableWithArgs<Void> checkmarksEnabledChanged;
 031     private CallableWithArgs<Void> disabledCheckmarkFilterChanged;
 032
 033     public CallableWithArgs<Void> getListDataChanged() {
 034         return this.listDataChanged;
 035     }
 036
 037     public CallableWithArgs<Void> getItemRendererChanged() {
 038         return this.itemRendererChanged;
 039     }
 040
 041     public CallableWithArgs<Void> getDisabledItemFilterChanged() {
 042         return this.disabledItemFilterChanged;
 043     }
 044
 045     public CallableWithArgs<Void> getItemEditorChanged() {
 046         return this.itemEditorChanged;
 047     }
 048
 049     public CallableWithArgs<Void> getSelectModeChanged() {
 050         return this.selectModeChanged;
 051     }
 052
 053     public CallableWithArgs<Void> getCheckmarksEnabledChanged() {
 054         return this.checkmarksEnabledChanged;
 055     }
 056
 057     public CallableWithArgs<Void> getDisabledCheckmarkFilterChanged() {
 058         return this.disabledCheckmarkFilterChanged;
 059     }
 060
 061
 062     public void setListDataChanged(CallableWithArgs<Void> listDataChanged) {
 063         this.listDataChanged = listDataChanged;
 064     }
 065
 066     public void setItemRendererChanged(CallableWithArgs<Void> itemRendererChanged) {
 067         this.itemRendererChanged = itemRendererChanged;
 068     }
 069
 070     public void setDisabledItemFilterChanged(CallableWithArgs<Void> disabledItemFilterChanged) {
 071         this.disabledItemFilterChanged = disabledItemFilterChanged;
 072     }
 073
 074     public void setItemEditorChanged(CallableWithArgs<Void> itemEditorChanged) {
 075         this.itemEditorChanged = itemEditorChanged;
 076     }
 077
 078     public void setSelectModeChanged(CallableWithArgs<Void> selectModeChanged) {
 079         this.selectModeChanged = selectModeChanged;
 080     }
 081
 082     public void setCheckmarksEnabledChanged(CallableWithArgs<Void> checkmarksEnabledChanged) {
 083         this.checkmarksEnabledChanged = checkmarksEnabledChanged;
 084     }
 085
 086     public void setDisabledCheckmarkFilterChanged(CallableWithArgs<Void> disabledCheckmarkFilterChanged) {
 087         this.disabledCheckmarkFilterChanged = disabledCheckmarkFilterChanged;
 088     }
 089
 090
 091     public void listDataChanged(org.apache.pivot.wtk.ListView arg0, org.apache.pivot.collections.List<?> arg1) {
 092         if (listDataChanged != null) {
 093             listDataChanged.call(arg0, arg1);
 094         }
 095     }
 096
 097     public void itemRendererChanged(org.apache.pivot.wtk.ListView arg0, org.apache.pivot.wtk.ListView.ItemRenderer arg1) {
 098         if (itemRendererChanged != null) {
 099             itemRendererChanged.call(arg0, arg1);
 100         }
 101     }
 102
 103     public void disabledItemFilterChanged(org.apache.pivot.wtk.ListView arg0, org.apache.pivot.util.Filter<?> arg1) {
 104         if (disabledItemFilterChanged != null) {
 105             disabledItemFilterChanged.call(arg0, arg1);
 106         }
 107     }
 108
 109     public void itemEditorChanged(org.apache.pivot.wtk.ListView arg0, org.apache.pivot.wtk.ListView.ItemEditor arg1) {
 110         if (itemEditorChanged != null) {
 111             itemEditorChanged.call(arg0, arg1);
 112         }
 113     }
 114
 115     public void selectModeChanged(org.apache.pivot.wtk.ListView arg0, org.apache.pivot.wtk.ListView.SelectMode arg1) {
 116         if (selectModeChanged != null) {
 117             selectModeChanged.call(arg0, arg1);
 118         }
 119     }
 120
 121     public void checkmarksEnabledChanged(org.apache.pivot.wtk.ListView arg0) {
 122         if (checkmarksEnabledChanged != null) {
 123             checkmarksEnabledChanged.call(arg0);
 124         }
 125     }
 126
 127     public void disabledCheckmarkFilterChanged(org.apache.pivot.wtk.ListView arg0, org.apache.pivot.util.Filter<?> arg1) {
 128         if (disabledCheckmarkFilterChanged != null) {
 129             disabledCheckmarkFilterChanged.call(arg0, arg1);
 130         }
 131     }
 132
 133 }
 |