KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > tonbeller > wcf > selection > SelectionModelDecorator


1 /*
2  * ====================================================================
3  * This software is subject to the terms of the Common Public License
4  * Agreement, available at the following URL:
5  * http://www.opensource.org/licenses/cpl.html .
6  * Copyright (C) 2003-2004 TONBELLER AG.
7  * All Rights Reserved.
8  * You must accept the terms of that agreement to use this software.
9  * ====================================================================
10  *
11  *
12  */

13 package com.tonbeller.wcf.selection;
14
15 import java.util.Collection JavaDoc;
16 import java.util.Set JavaDoc;
17
18 import com.tonbeller.wcf.controller.RequestContext;
19
20 /**
21  * decorates a selection model
22  * @author av
23  */

24
25 public abstract class SelectionModelDecorator implements SelectionModel {
26   SelectionModel delegate;
27
28   public SelectionModelDecorator(SelectionModel delegate) {
29     this.delegate = delegate;
30   }
31
32   /**
33    * @param obj
34    */

35   public void add(Object JavaDoc obj) {
36     delegate.add(obj);
37   }
38
39   /**
40    * @param c
41    */

42   public void addAll(Collection JavaDoc c) {
43     delegate.addAll(c);
44   }
45
46   /**
47    * @param l
48    */

49   public void addSelectionListener(SelectionChangeListener l) {
50     delegate.addSelectionListener(l);
51   }
52
53   /**
54    *
55    */

56   public void clear() {
57     delegate.clear();
58   }
59
60   /**
61    * @param obj
62    * @return
63    */

64   public boolean contains(Object JavaDoc obj) {
65     return delegate.contains(obj);
66   }
67
68   /* (non-Javadoc)
69    * @see java.lang.Object#equals(java.lang.Object)
70    */

71   public boolean equals(Object JavaDoc arg0) {
72     return delegate.equals(arg0);
73   }
74
75   /**
76    * @param context
77    */

78   public void fireSelectionChanged(RequestContext context) {
79     delegate.fireSelectionChanged(context);
80   }
81
82   /**
83    * @return
84    */

85   public int getMode() {
86     return delegate.getMode();
87   }
88
89   /**
90    * @return
91    */

92   public Set JavaDoc getSelection() {
93     return delegate.getSelection();
94   }
95
96   /**
97    * @return
98    */

99   public Object JavaDoc getSingleSelection() {
100     return delegate.getSingleSelection();
101   }
102
103   /* (non-Javadoc)
104    * @see java.lang.Object#hashCode()
105    */

106   public int hashCode() {
107     return delegate.hashCode();
108   }
109
110   /**
111    * @param item
112    * @return
113    */

114   public boolean isSelectable(Object JavaDoc item) {
115     return delegate.isSelectable(item);
116   }
117
118   /**
119    * @param obj
120    */

121   public void remove(Object JavaDoc obj) {
122     delegate.remove(obj);
123   }
124
125   /**
126    * @param l
127    */

128   public void removeSelectionListener(SelectionChangeListener l) {
129     delegate.removeSelectionListener(l);
130   }
131
132   /**
133    * @param selectedObject
134    */

135   public void setSingleSelection(Object JavaDoc selectedObject) {
136     delegate.setSingleSelection(selectedObject);
137   }
138
139   public String JavaDoc toString() {
140     return delegate.toString();
141   }
142
143   public boolean isEmpty() {
144     return delegate.isEmpty();
145   }
146
147 }
148
Popular Tags