01: /*
02: * $Id: AbstractToolbar.java 458270 2005-12-09 07:43:11Z ivaynberg $
03: * $Revision: 458270 $
04: * $Date: 2005-12-09 08:43:11 +0100 (Fri, 09 Dec 2005) $
05: *
06: * ====================================================================
07: * Licensed under the Apache License, Version 2.0 (the "License");
08: * you may not use this file except in compliance with the License.
09: * You may obtain a copy of the License at
10: *
11: * http://www.apache.org/licenses/LICENSE-2.0
12: *
13: * Unless required by applicable law or agreed to in writing, software
14: * distributed under the License is distributed on an "AS IS" BASIS,
15: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16: * See the License for the specific language governing permissions and
17: * limitations under the License.
18: */
19: package wicket.extensions.markup.html.repeater.data.table;
20:
21: import wicket.markup.html.panel.Panel;
22: import wicket.model.IModel;
23:
24: /**
25: * A base class for data table toolbars
26: *
27: * @see DefaultDataTable
28: *
29: * @author Igor Vaynberg (ivaynberg)
30: *
31: */
32: public abstract class AbstractToolbar extends Panel {
33: private static final long serialVersionUID = 1L;
34:
35: private DataTable table;
36:
37: /**
38: * Constructor
39: *
40: * @param model
41: * model
42: * @param table
43: * data table this toolbar will be attached to
44: */
45: public AbstractToolbar(IModel model, DataTable table) {
46: super (DataTable.TOOLBAR_COMPONENT_ID, model);
47: this .table = table;
48: }
49:
50: /**
51: * Constructor
52: *
53: * @param table
54: * data table this toolbar will be attached to
55: */
56: public AbstractToolbar(DataTable table) {
57: super (DataTable.TOOLBAR_COMPONENT_ID);
58: this .table = table;
59: }
60:
61: /**
62: * @return DataTable this toolbar is attached to
63: */
64: protected DataTable getTable() {
65: return table;
66: }
67: }
|