| 
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 TableViewAdapter implements GriffonPivotAdapter, org.apache.pivot.wtk.TableViewListener {
 025     private CallableWithArgs<Void> selectModeChanged;
 026     private CallableWithArgs<Void> columnSourceChanged;
 027     private CallableWithArgs<Void> rowEditorChanged;
 028     private CallableWithArgs<Void> tableDataChanged;
 029     private CallableWithArgs<Void> disabledRowFilterChanged;
 030
 031     public CallableWithArgs<Void> getSelectModeChanged() {
 032         return this.selectModeChanged;
 033     }
 034
 035     public CallableWithArgs<Void> getColumnSourceChanged() {
 036         return this.columnSourceChanged;
 037     }
 038
 039     public CallableWithArgs<Void> getRowEditorChanged() {
 040         return this.rowEditorChanged;
 041     }
 042
 043     public CallableWithArgs<Void> getTableDataChanged() {
 044         return this.tableDataChanged;
 045     }
 046
 047     public CallableWithArgs<Void> getDisabledRowFilterChanged() {
 048         return this.disabledRowFilterChanged;
 049     }
 050
 051
 052     public void setSelectModeChanged(CallableWithArgs<Void> selectModeChanged) {
 053         this.selectModeChanged = selectModeChanged;
 054     }
 055
 056     public void setColumnSourceChanged(CallableWithArgs<Void> columnSourceChanged) {
 057         this.columnSourceChanged = columnSourceChanged;
 058     }
 059
 060     public void setRowEditorChanged(CallableWithArgs<Void> rowEditorChanged) {
 061         this.rowEditorChanged = rowEditorChanged;
 062     }
 063
 064     public void setTableDataChanged(CallableWithArgs<Void> tableDataChanged) {
 065         this.tableDataChanged = tableDataChanged;
 066     }
 067
 068     public void setDisabledRowFilterChanged(CallableWithArgs<Void> disabledRowFilterChanged) {
 069         this.disabledRowFilterChanged = disabledRowFilterChanged;
 070     }
 071
 072
 073     public void selectModeChanged(org.apache.pivot.wtk.TableView arg0, org.apache.pivot.wtk.TableView.SelectMode arg1) {
 074         if (selectModeChanged != null) {
 075             selectModeChanged.call(arg0, arg1);
 076         }
 077     }
 078
 079     public void columnSourceChanged(org.apache.pivot.wtk.TableView arg0, org.apache.pivot.wtk.TableView arg1) {
 080         if (columnSourceChanged != null) {
 081             columnSourceChanged.call(arg0, arg1);
 082         }
 083     }
 084
 085     public void rowEditorChanged(org.apache.pivot.wtk.TableView arg0, org.apache.pivot.wtk.TableView.RowEditor arg1) {
 086         if (rowEditorChanged != null) {
 087             rowEditorChanged.call(arg0, arg1);
 088         }
 089     }
 090
 091     public void tableDataChanged(org.apache.pivot.wtk.TableView arg0, org.apache.pivot.collections.List<?> arg1) {
 092         if (tableDataChanged != null) {
 093             tableDataChanged.call(arg0, arg1);
 094         }
 095     }
 096
 097     public void disabledRowFilterChanged(org.apache.pivot.wtk.TableView arg0, org.apache.pivot.util.Filter<?> arg1) {
 098         if (disabledRowFilterChanged != null) {
 099             disabledRowFilterChanged.call(arg0, arg1);
 100         }
 101     }
 102
 103 }
 |