View Javadoc

1   /*
2    * Licensed to the Apache Software Foundation (ASF) under one
3    * or more contributor license agreements.  See the NOTICE file
4    * distributed with this work for additional information
5    * regarding copyright ownership.  The ASF licenses this file
6    * to you under the Apache License, Version 2.0 (the
7    * "License"); you may not use this file except in compliance
8    * with the License.  You may obtain a copy of the License at
9    *
10   *   http://www.apache.org/licenses/LICENSE-2.0
11   *
12   * Unless required by applicable law or agreed to in writing,
13   * software distributed under the License is distributed on an
14   * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15   * KIND, either express or implied.  See the License for the
16   * specific language governing permissions and limitations
17   * under the License.
18   */
19  package org.apache.myfaces.trinidad.model;
20  
21  public abstract class TreeModelDecorator extends TreeModel
22  {
23  
24    @Override
25    public void enterContainer()
26    {
27      getTreeModel().enterContainer();
28    }
29  
30    @Override
31    public void exitContainer()
32    {
33      getTreeModel().exitContainer();
34    }
35  
36    @Override
37    public Object getContainerRowKey(Object childRowKey)
38    {
39      return getTreeModel().getContainerRowKey(childRowKey);
40    }
41  
42    @Override
43    public boolean isContainer()
44    {
45      return     getTreeModel().isContainer();
46    }
47  
48    @Override
49    public Object getRowKey()
50    {
51      return     getTreeModel().getRowKey();
52    }
53  
54    @Override
55    public void setRowKey(Object key)
56    {
57      getTreeModel().setRowKey(key);
58    }
59  
60    @Override
61    public int getRowCount()
62    {
63      return     getTreeModel().getRowCount();
64    }
65  
66    @Override
67    public Object getRowData()
68    {
69      return     getTreeModel().getRowData();
70    }
71  
72    @Override
73    public int getRowIndex()
74    {
75      return     getTreeModel().getRowIndex();
76    }
77  
78    @Override
79    public Object getWrappedData()
80    {
81      return     getTreeModel().getWrappedData();
82    }
83  
84    @Override
85    public boolean isRowAvailable()
86    {
87      return     getTreeModel().isRowAvailable();
88    }
89  
90    @Override
91    public void setRowIndex(int i)
92    {
93      getTreeModel().setRowIndex(i);
94    }
95  
96    @Override
97    public void setWrappedData(Object object)
98    {
99      getTreeModel().setWrappedData(object);
100   }
101   
102   /**
103    * This method returns the wrapped <code>TreeModel</code>. 
104    * 
105    * @return the wrapped TreeModel
106    */
107   protected abstract TreeModel getTreeModel();
108 
109 }