01: package tijmp.actions;
02:
03: import java.awt.event.ActionEvent;
04: import tijmp.filter.RecursiveFilter;
05: import tijmp.ui.FilterConfig;
06:
07: /** A class that sets the current filter to show one package
08: * and its sub packages.
09: */
10: public class OnlyPackage extends FilterAction {
11: private String pname;
12:
13: public OnlyPackage(FilterConfig fc, String pname) {
14: super ("Show " + pname + " and sub package", fc);
15: this .pname = pname;
16: }
17:
18: public void actionPerformed(ActionEvent e) {
19: RecursiveFilter rf = new RecursiveFilter(pname);
20: getFilterConfig().setFilter(rf);
21: }
22: }
|