Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

Source code: org/integralsource/monsoon/jfc/EditListener.java


1   /*
2    *  Copyright (c) 2001 John Keyes
3    *
4    *  This program is free software; you can redistribute it and/or
5    *  modify it under the terms of the GNU General Public License
6    *  as published by the Free Software Foundation; either version 2
7    *  of the License, or (at your option) any later version.
8    *
9    *  This program is distributed in the hope that it will be useful,
10   *  but WITHOUT ANY WARRANTY; without even the implied warranty of
11   *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12   *  GNU General Public License for more details.
13   *
14   *  You should have received a copy of the GNU General Public License
15   *  along with this program; if not, write to:
16   *  Free Software Foundation, Inc., 59 Temple Place - Suite 330, 
17   *  Boston, MA  02111-1307, USA. 
18   *
19   *  $Id: EditListener.java,v 1.1 2001/06/25 22:34:33 jbjk Exp $
20   */
21  package org.integralsource.monsoon.jfc;
22  
23  public class EditListener implements javax.swing.event.CellEditorListener {
24  
25      /**
26       * Empty implementation
27       */
28      public void editingCanceled(javax.swing.event.ChangeEvent e) {
29      }
30  
31      /**
32       * When editing has finished, select the row that has been
33       * edited
34       */
35      public void editingStopped(javax.swing.event.ChangeEvent e) {
36    org.integralsource.monsoon.jfc.BooleanCellEditor $editor 
37        = (org.integralsource.monsoon.jfc.BooleanCellEditor)e.getSource();
38    $editor.getSelectionModel().setSelectionInterval($editor.getLastRow(),
39                 $editor.getLastRow());
40      }
41  }