001: package org.apache.ojb.tools.mapping.reversedb.gui.actions;
002:
003: /* Copyright 2002-2005 The Apache Software Foundation
004: *
005: * Licensed under the Apache License, Version 2.0 (the "License");
006: * you may not use this file except in compliance with the License.
007: * You may obtain a copy of the License at
008: *
009: * http://www.apache.org/licenses/LICENSE-2.0
010: *
011: * Unless required by applicable law or agreed to in writing, software
012: * distributed under the License is distributed on an "AS IS" BASIS,
013: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014: * See the License for the specific language governing permissions and
015: * limitations under the License.
016: */
017:
018: /**
019: *
020: * @author <a href="mailto:bfl@florianbruckner.com">Florian Bruckner</a>
021: * @version $Id: DisableClassesWithRegexAction.java,v 1.1.2.1 2005/12/21 22:32:06 tomdz Exp $
022: */
023: public class DisableClassesWithRegexAction extends
024: javax.swing.AbstractAction {
025: org.apache.ojb.tools.mapping.reversedb.gui.JFrmMainFrame mainFrame;
026:
027: /** Creates a new instance of SetPackageAction */
028: public DisableClassesWithRegexAction(
029: org.apache.ojb.tools.mapping.reversedb.gui.JFrmMainFrame pmainFrame) {
030: super ();
031: mainFrame = pmainFrame;
032: this .putValue(NAME, "Disable Classes");
033: }
034:
035: public void actionPerformed(java.awt.event.ActionEvent actionEvent) {
036: String strRegex = javax.swing.JOptionPane.showInputDialog(
037: mainFrame, "Enter a regular expression",
038: "Disable Classes",
039: javax.swing.JOptionPane.QUESTION_MESSAGE);
040: try {
041: if (strRegex != null)
042: mainFrame.getDBMeta().disableClassesWithRegex(
043: new org.apache.regexp.RE(strRegex));
044: } catch (org.apache.regexp.RESyntaxException ree) {
045: ree.printStackTrace();
046: }
047: }
048: }
049:
050: /***************************** Changelog *****************************
051: // $Log: DisableClassesWithRegexAction.java,v $
052: // Revision 1.1.2.1 2005/12/21 22:32:06 tomdz
053: // Updated license
054: //
055: // Revision 1.1 2004/05/05 16:38:25 arminw
056: // fix fault
057: // wrong package structure used:
058: // org.apache.ojb.tools.reversdb
059: // org.apache.ojb.tools.reversdb2
060: //
061: // instead of
062: // org.apache.ojb.tools.mapping.reversdb
063: // org.apache.ojb.tools.mapping.reversdb2
064: //
065: // Revision 1.1 2004/05/04 13:44:59 arminw
066: // move reverseDB stuff
067: //
068: // Revision 1.6 2004/04/05 12:16:24 tomdz
069: // Fixed/updated license in files leftover from automatic license transition
070: //
071: // Revision 1.5 2004/04/04 23:53:42 brianm
072: // Fixed initial copyright dates to match cvs repository
073: //
074: // Revision 1.4 2004/03/11 18:16:23 brianm
075: // ASL 2.0
076: //
077: // Revision 1.3 2002/11/08 13:47:38 brj
078: // corrected some compiler warnings
079: //
080: // Revision 1.2 2002/06/17 19:34:34 jvanzyl
081: // Correcting all the package references.
082: // PR:
083: // Obtained from:
084: // Submitted by:
085: // Reviewed by:
086: //
087: // Revision 1.1.1.1 2002/06/17 18:16:54 jvanzyl
088: // Initial OJB import
089: //
090: // Revision 1.3 2002/05/16 11:47:09 florianbruckner
091: // fix CR/LF issue, change license to ASL
092: //
093: // Revision 1.2 2002/05/16 10:43:59 florianbruckner
094: // use jakarta-regexp instead of gnu-regexp due to the move to jakarta.
095: //
096: // Revision 1.1 2002/04/18 11:44:16 mpoeschl
097: //
098: // move files to new location
099: //
100: // Revision 1.2 2002/04/07 09:05:17 thma
101: // *** empty log message ***
102: //
103: // Revision 1.1.1.1 2002/02/20 13:35:25 Administrator
104: // initial import
105: //
106: /***************************** Changelog *****************************/
|