KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > opensubsystems > patterns > thickclient > application > swt > TableResizeAdapter


1 /*
2  * Copyright (c) 2003 - 2007 OpenSubsystems s.r.o. Slovak Republic. All rights reserved.
3  *
4  * Project: OpenSubsystems
5  *
6  * $Id: TableResizeAdapter.java,v 1.2 2007/01/07 06:14:15 bastafidli Exp $
7  *
8  * This program is free software; you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License as published by
10  * the Free Software Foundation; version 2 of the License.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program; if not, write to the Free Software
19  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20  */

21  
22 package org.opensubsystems.patterns.thickclient.application.swt;
23
24 import org.eclipse.swt.events.ControlAdapter;
25 import org.eclipse.swt.widgets.Table;
26
27 /**
28  * Adapter used when table should be resized. The main purpose is that
29  * it tracks what table is it for.
30  *
31  * @version $Id: TableResizeAdapter.java,v 1.2 2007/01/07 06:14:15 bastafidli Exp $
32  * @author Miro Halas
33  * @code.reviewer Miro Halas
34  * @code.reviewed Initial revision
35  */

36 public class TableResizeAdapter extends ControlAdapter
37 {
38    // Attributes ///////////////////////////////////////////////////////////////
39

40    /**
41     * What table is this adapter watching.
42     */

43    private Table m_table;
44    
45    // Constructors /////////////////////////////////////////////////////////////
46

47    /**
48     * Constructor.
49     *
50     * @param source - what table is the adapter for.
51     */

52    public TableResizeAdapter(
53       Table source
54    )
55    {
56       m_table = source;
57    }
58    
59    // Public methods ///////////////////////////////////////////////////////////
60

61    /**
62     * @return Table - table which is watched by this adapter.
63     */

64    public Table getTable()
65    {
66       return m_table;
67    }
68 }
69
Popular Tags