01: package net.ar.webonswing.petstore.actions;
02:
03: import java.awt.event.*;
04: import java.util.*;
05:
06: import javax.swing.*;
07:
08: import net.ar.webonswing.*;
09: import net.ar.webonswing.petstore.*;
10:
11: public final class SearchAction implements ActionListener {
12: protected ApplicationFrame frame;
13: protected JTextField keywordTextField;
14:
15: public SearchAction(ApplicationFrame aFrame,
16: JTextField aKeywordTextField) {
17: this .frame = aFrame;
18: keywordTextField = aKeywordTextField;
19: }
20:
21: public void actionPerformed(ActionEvent e) {
22: List products = frame.getDao().searchProducts(
23: keywordTextField.getText());
24:
25: WosFramework.showChildWindow(((JComponent) e.getSource())
26: .getTopLevelAncestor(), new Search(products,
27: keywordTextField.getText()));
28: }
29: }
|