01: /*
02: * ToUpperCaseCommand.java
03: *
04: * Copyright (C) 2002, 2003, 2004, 2005, 2006 Takis Diakoumis
05: *
06: * This program is free software; you can redistribute it and/or
07: * modify it under the terms of the GNU General Public License
08: * as published by the Free Software Foundation; either version 2
09: * of the License, or any later version.
10: *
11: * This program is distributed in the hope that it will be useful,
12: * but WITHOUT ANY WARRANTY; without even the implied warranty of
13: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14: * GNU General Public License for more details.
15: *
16: * You should have received a copy of the GNU General Public License
17: * along with this program; if not, write to the Free Software
18: * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19: *
20: */
21:
22: package org.executequery.actions.editcommands;
23:
24: import java.awt.event.ActionEvent;
25: import org.executequery.GUIUtilities;
26: import org.underworldlabs.swing.actions.BaseCommand;
27: import org.executequery.gui.text.TextEditor;
28:
29: /* ----------------------------------------------------------
30: * CVS NOTE: Changes to the CVS repository prior to the
31: * release of version 3.0.0beta1 has meant a
32: * resetting of CVS revision numbers.
33: * ----------------------------------------------------------
34: */
35:
36: /**
37: * To Upper Case command execution.
38: *
39: * @author Takis Diakoumis
40: * @version $Revision: 1.4 $
41: * @date $Date: 2006/05/14 06:56:54 $
42: */
43: public class ToUpperCaseCommand implements BaseCommand {
44:
45: /**
46: *
47: * Executes the to-upper-case command on the <code>TextEditor</code>.
48: *
49: * @param the originating event
50: */
51: public void execute(ActionEvent e) {
52: TextEditor textFunction = (TextEditor) GUIUtilities
53: .getTextEditorInFocus();
54: if (textFunction != null) {
55: textFunction.changeSelectionCase(true);
56: }
57: textFunction = null;
58: }
59:
60: }
|