/** * * FILE: SearchActionListener.java * * SearchActionListener listens for the "Search..." button click. * Once the "Search..." button is clicked then the dialog box is displayed * and user input is received and passed back to the "JobSelect" object for * execution. * * Compiled and tested with JDK 1.1.4 * * @author Chad (shod) Darby, darby@j-nine.com * * @version v4.34am, 18 Feb 1998 * */ import java.awt.*; import java.awt.event.*; import DataDialog; public class SearchActionListener implements ActionListener { String searchRateTitle = "Hourly Rate Search"; String searchRateMessage = "Select max hourly rate and job category"; DataDialog myDataDialog; JobSelect parent; public SearchActionListener(JobSelect theParent) { parent = theParent; } public void actionPerformed(ActionEvent event) { // show hourly rate dialog myDataDialog = new DataDialog(parent, searchRateTitle, searchRateMessage); myDataDialog.setVisible(true); // get the data from dialog String searchRateString = myDataDialog.getRate(); String searchJobCategoryString = myDataDialog.getJobCategory(); // send data back to parent if ( searchJobCategoryString.equals("CANCEL") ) { return; } else { parent.executeHourlyRateSearch(searchRateString, searchJobCategoryString); } } }