01: package org.jsqltool.gui.panel;
02:
03: import javax.swing.*;
04: import javax.swing.event.*;
05:
06: /**
07: * <p>Title: JSqlTool Project</p>
08: * <p>Description: This class extends JTable to listener table model changes.
09: * </p>
10: * <p>Copyright: Copyright (C) 2006 Mauro Carniel</p>
11: *
12: * <p> This file is part of JSqlTool project.
13: * This library is free software; you can redistribute it and/or
14: * modify it under the terms of the (LGPL) Lesser General Public
15: * License as published by the Free Software Foundation;
16: *
17: * GNU LESSER GENERAL PUBLIC LICENSE
18: * Version 2.1, February 1999
19: *
20: * This library is distributed in the hope that it will be useful,
21: * but WITHOUT ANY WARRANTY; without even the implied warranty of
22: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
23: * Library General Public License for more details.
24: *
25: * You should have received a copy of the GNU Library General Public
26: * License along with this library; if not, write to the Free
27: * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
28: *
29: * The author may be contacted at:
30: * maurocarniel@tin.it</p>
31: *
32: * @author Mauro Carniel
33: * @version 1.0
34: */
35: public class Table extends JTable {
36:
37: private ListSelectionListener selListener = null;
38:
39: public Table() {
40: setRowHeight(24);
41: }
42:
43: public void valueChanged(ListSelectionEvent e) {
44: super .valueChanged(e);
45: try {
46: if (selListener != null) {
47: selListener.valueChanged(e);
48: }
49: } catch (Exception ex) {
50: }
51: }
52:
53: public final void setListSelectionListener(
54: ListSelectionListener selListener) {
55: this.selListener = selListener;
56: }
57:
58: }
|