]> git.mxchange.org Git - addressbook-lib.git/blob - src/org/mxchange/addressbook/model/address/AddressTableModel.java
Project relocated (a bit better now?) + continued with Swing client
[addressbook-lib.git] / src / org / mxchange / addressbook / model / address / AddressTableModel.java
1 /*\r
2  * Copyright (C) 2015 Roland Haeder\r
3  *\r
4  * This program is free software: you can redistribute it and/or modify\r
5  * it under the terms of the GNU General Public License as published by\r
6  * the Free Software Foundation, either version 3 of the License, or\r
7  * (at your option) any later version.\r
8  *\r
9  * This program is distributed in the hope that it will be useful,\r
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
12  * GNU General Public License for more details.\r
13  *\r
14  * You should have received a copy of the GNU General Public License\r
15  * along with this program.  If not, see <http://www.gnu.org/licenses/>.\r
16  */\r
17 package org.mxchange.addressbook.model.address;\r
18 \r
19 import javax.swing.table.TableModel;\r
20 import org.mxchange.addressbook.client.Client;\r
21 import org.mxchange.addressbook.model.BaseModel;\r
22 \r
23 /**\r
24  *\r
25  * @author Roland Haeder\r
26  */\r
27 public class AddressTableModel extends BaseModel implements TableModel {\r
28 \r
29     /**\r
30      * Constructor with Client instance which holds the contact manager\r
31      *\r
32      * @param client Client instance\r
33      */\r
34     public AddressTableModel (final Client client) {\r
35         // Parent super constructor\r
36         super();\r
37 \r
38         // Set client\r
39         this.setClient(client);\r
40     }\r
41 \r
42     @Override\r
43     public Class<?> getColumnClass (final int columnIndex) {\r
44         throw new UnsupportedOperationException("Not supported yet. columnIndex=" + columnIndex); //To change body of generated methods, choose Tools | Templates.\r
45     }\r
46 \r
47     @Override\r
48     public int getColumnCount () {\r
49         // Deligate this call to the contact manager\r
50         return this.getClient().getContactManager().size();\r
51     }\r
52 \r
53     @Override\r
54     public String getColumnName (final int columnIndex) {\r
55         throw new UnsupportedOperationException("Not supported yet. columnIndex=" + columnIndex); //To change body of generated methods, choose Tools | Templates.\r
56     }\r
57 \r
58     @Override\r
59     public int getRowCount () {\r
60         throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.\r
61     }\r
62 \r
63     @Override\r
64     public Object getValueAt (final int rowIndex, final int columnIndex) {\r
65         throw new UnsupportedOperationException("Not supported yet. rowIndex=" + rowIndex + ",columnIndex=" + columnIndex); //To change body of generated methods, choose Tools | Templates.\r
66     }\r
67 \r
68     @Override\r
69     public boolean isCellEditable (final int rowIndex, final int columnIndex) {\r
70         throw new UnsupportedOperationException("Not supported yet. rowIndex=" + rowIndex + ",columnIndex=" + columnIndex); //To change body of generated methods, choose Tools | Templates.\r
71     }\r
72 \r
73     @Override\r
74     public void setValueAt (final Object value, final int rowIndex, final int columnIndex) {\r
75         throw new UnsupportedOperationException("Not supported yet. value=" + value + ",rowIndex=" + rowIndex + ",columnIndex=" + columnIndex); //To change body of generated methods, choose Tools | Templates.\r
76     }\r
77 }\r