01: /*
02: * Copyright (c) 2000, Jacob Smullyan.
03: *
04: * This is part of SkunkDAV, a WebDAV client. See http://skunkdav.sourceforge.net/
05: * for the latest version.
06: *
07: * SkunkDAV is free software; you can redistribute it and/or
08: * modify it under the terms of the GNU General Public License as published
09: * by the Free Software Foundation; either version 2, or (at your option)
10: * any later version.
11: *
12: * SkunkDAV is distributed in the hope that it will be useful,
13: * but WITHOUT ANY WARRANTY; without even the implied warranty of
14: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15: * General Public License for more details.
16: *
17: * You should have received a copy of the GNU General Public License
18: * along with SkunkDAV; see the file COPYING. If not, write to the Free
19: * Software Foundation, 59 Temple Place - Suite 330, Boston, MA
20: * 02111-1307, USA.
21: */
22:
23: package org.skunk.dav.client.gui.editor;
24:
25: import java.awt.Font;
26: import java.awt.event.ActionEvent;
27: import java.awt.event.ActionListener;
28: import java.awt.event.KeyAdapter;
29: import java.awt.event.KeyEvent;
30: import java.util.ArrayList;
31: import java.util.Enumeration;
32: import java.util.Iterator;
33: import javax.swing.AbstractButton;
34: import javax.swing.Box;
35: import javax.swing.BoxLayout;
36: import javax.swing.ButtonGroup;
37: import javax.swing.ButtonModel;
38: import javax.swing.JCheckBox;
39: import javax.swing.JLabel;
40: import javax.swing.JPanel;
41: import javax.swing.JTextField;
42: import javax.swing.JRadioButton;
43: import javax.swing.event.DocumentEvent;
44: import javax.swing.event.DocumentListener;
45: import org.skunk.dav.client.gui.ResourceManager;
46: import org.skunk.trace.Debug;
47:
48: /**
49: * a panel for performing searches
50: */
51: public class IncrementalSearchPanel extends AbstractSearchPanel {
52: public IncrementalSearchPanel() {
53: super ();
54: }
55:
56: protected void initComponents() {
57: //obtain or create initialized widgets
58: JLabel findLabel = new JLabel(ResourceManager
59: .getMessage(ResourceManager.FIND_PROMPT));
60: createEntryField();
61: createReverseCheckBox();
62: createIncrementalCheckBox();
63: createSearchModeButtonGroup();
64:
65: //add widgets to panel
66: this .setLayout(new BoxLayout(this , BoxLayout.X_AXIS));
67: this .add(findLabel);
68: this .add(entryField);
69: this .add(Box.createHorizontalStrut(5));
70: this .add(reverseButton);
71: this .add(literalButton);
72: this .add(caseButton);
73: this .add(regexpButton);
74: this .add(incrementalButton);
75: this .add(Box.createHorizontalStrut(40));
76: }
77: }
|