KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > ojb > tools > mapping > reversedb > gui > actions > DisableClassesWithRegexAction


1 package org.apache.ojb.tools.mapping.reversedb.gui.actions;
2
3 /* Copyright 2002-2005 The Apache Software Foundation
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  */

17
18 /**
19  *
20  * @author <a HREF="mailto:bfl@florianbruckner.com">Florian Bruckner</a>
21  * @version $Id: DisableClassesWithRegexAction.java,v 1.1.2.1 2005/12/21 22:32:06 tomdz Exp $
22  */

23 public class DisableClassesWithRegexAction extends javax.swing.AbstractAction JavaDoc
24 {
25   org.apache.ojb.tools.mapping.reversedb.gui.JFrmMainFrame mainFrame;
26   
27   /** Creates a new instance of SetPackageAction */
28   public DisableClassesWithRegexAction (org.apache.ojb.tools.mapping.reversedb.gui.JFrmMainFrame pmainFrame)
29   {
30     super();
31     mainFrame = pmainFrame;
32     this.putValue(NAME, "Disable Classes");
33   }
34   
35   public void actionPerformed (java.awt.event.ActionEvent JavaDoc actionEvent)
36   {
37     String JavaDoc strRegex = javax.swing.JOptionPane.showInputDialog(
38       mainFrame, "Enter a regular expression",
39       "Disable Classes", javax.swing.JOptionPane.QUESTION_MESSAGE);
40     try
41     {
42       if (strRegex != null)
43         mainFrame.getDBMeta().disableClassesWithRegex(new org.apache.regexp.RE(strRegex));
44     }
45     catch (org.apache.regexp.RESyntaxException ree)
46     {
47       ree.printStackTrace();
48     }
49   }
50 }
51
52 /***************************** Changelog *****************************
53 // $Log: DisableClassesWithRegexAction.java,v $
54 // Revision 1.1.2.1 2005/12/21 22:32:06 tomdz
55 // Updated license
56 //
57 // Revision 1.1 2004/05/05 16:38:25 arminw
58 // fix fault
59 // wrong package structure used:
60 // org.apache.ojb.tools.reversdb
61 // org.apache.ojb.tools.reversdb2
62 //
63 // instead of
64 // org.apache.ojb.tools.mapping.reversdb
65 // org.apache.ojb.tools.mapping.reversdb2
66 //
67 // Revision 1.1 2004/05/04 13:44:59 arminw
68 // move reverseDB stuff
69 //
70 // Revision 1.6 2004/04/05 12:16:24 tomdz
71 // Fixed/updated license in files leftover from automatic license transition
72 //
73 // Revision 1.5 2004/04/04 23:53:42 brianm
74 // Fixed initial copyright dates to match cvs repository
75 //
76 // Revision 1.4 2004/03/11 18:16:23 brianm
77 // ASL 2.0
78 //
79 // Revision 1.3 2002/11/08 13:47:38 brj
80 // corrected some compiler warnings
81 //
82 // Revision 1.2 2002/06/17 19:34:34 jvanzyl
83 // Correcting all the package references.
84 // PR:
85 // Obtained from:
86 // Submitted by:
87 // Reviewed by:
88 //
89 // Revision 1.1.1.1 2002/06/17 18:16:54 jvanzyl
90 // Initial OJB import
91 //
92 // Revision 1.3 2002/05/16 11:47:09 florianbruckner
93 // fix CR/LF issue, change license to ASL
94 //
95 // Revision 1.2 2002/05/16 10:43:59 florianbruckner
96 // use jakarta-regexp instead of gnu-regexp due to the move to jakarta.
97 //
98 // Revision 1.1 2002/04/18 11:44:16 mpoeschl
99 //
100 // move files to new location
101 //
102 // Revision 1.2 2002/04/07 09:05:17 thma
103 // *** empty log message ***
104 //
105 // Revision 1.1.1.1 2002/02/20 13:35:25 Administrator
106 // initial import
107 //
108 /***************************** Changelog *****************************/

109  
110
Popular Tags