|
@@ -0,0 +1,124 @@
|
|
|
+package ui.view;
|
|
|
+
|
|
|
+import java.awt.BorderLayout;
|
|
|
+
|
|
|
+import javax.swing.JDialog;
|
|
|
+import javax.swing.JPanel;
|
|
|
+import javax.swing.border.EmptyBorder;
|
|
|
+import javax.swing.JLabel;
|
|
|
+
|
|
|
+import java.awt.Font;
|
|
|
+
|
|
|
+import javax.swing.ButtonGroup;
|
|
|
+import javax.swing.JTextField;
|
|
|
+import javax.swing.JRadioButton;
|
|
|
+import javax.swing.JButton;
|
|
|
+
|
|
|
+import ui.controller.MultiPurposeController;
|
|
|
+
|
|
|
+import java.awt.event.ActionListener;
|
|
|
+import java.awt.event.ActionEvent;
|
|
|
+
|
|
|
+public class searchPopUp extends JDialog {
|
|
|
+ private final JPanel contentPanel = new JPanel();
|
|
|
+ private JTextField replaceTextField;
|
|
|
+ private JTextField findTextField;
|
|
|
+ private MultiPurposeController multiController;
|
|
|
+
|
|
|
+ searchPopUp(MultiPurposeController multiCont){
|
|
|
+ super((java.awt.Frame) null, true);
|
|
|
+ setModalityType(java.awt.Dialog.ModalityType.APPLICATION_MODAL);
|
|
|
+ this.setTitle("Search for Objects");
|
|
|
+ setBounds(100, 100, 238, 360);
|
|
|
+ getContentPane().setLayout(new BorderLayout());
|
|
|
+ contentPanel.setBorder(new EmptyBorder(5, 5, 5, 5));
|
|
|
+ getContentPane().add(contentPanel, BorderLayout.CENTER);
|
|
|
+ contentPanel.setLayout(null);
|
|
|
+
|
|
|
+ multiController = multiCont;
|
|
|
+
|
|
|
+ JLabel lblFind = new JLabel("Find:");
|
|
|
+ lblFind.setFont(new Font("Tahoma", Font.PLAIN, 13));
|
|
|
+ lblFind.setBounds(10, 11, 46, 19);
|
|
|
+ contentPanel.add(lblFind);
|
|
|
+
|
|
|
+ JLabel lblReplace = new JLabel("Replace:");
|
|
|
+ lblReplace.setFont(new Font("Tahoma", Font.PLAIN, 13));
|
|
|
+ lblReplace.setBounds(10, 41, 56, 14);
|
|
|
+ contentPanel.add(lblReplace);
|
|
|
+
|
|
|
+ replaceTextField = new JTextField();
|
|
|
+ replaceTextField.setBounds(76, 39, 101, 20);
|
|
|
+ contentPanel.add(replaceTextField);
|
|
|
+ replaceTextField.setColumns(10);
|
|
|
+
|
|
|
+ findTextField = new JTextField();
|
|
|
+ findTextField.setBounds(76, 11, 101, 20);
|
|
|
+ contentPanel.add(findTextField);
|
|
|
+ findTextField.setColumns(10);
|
|
|
+
|
|
|
+ JLabel lblNewLabel = new JLabel("Direction");
|
|
|
+ lblNewLabel.setFont(new Font("Tahoma", Font.BOLD, 13));
|
|
|
+ lblNewLabel.setBounds(10, 90, 82, 14);
|
|
|
+ contentPanel.add(lblNewLabel);
|
|
|
+
|
|
|
+ JRadioButton rdbtnForward = new JRadioButton("Forward");
|
|
|
+ rdbtnForward.setFont(new Font("Tahoma", Font.PLAIN, 13));
|
|
|
+ rdbtnForward.setBounds(10, 111, 109, 23);
|
|
|
+ contentPanel.add(rdbtnForward);
|
|
|
+
|
|
|
+ JRadioButton rdbtnBackward = new JRadioButton("Backward");
|
|
|
+ rdbtnBackward.setFont(new Font("Tahoma", Font.PLAIN, 13));
|
|
|
+ rdbtnBackward.setBounds(10, 137, 109, 23);
|
|
|
+ contentPanel.add(rdbtnBackward);
|
|
|
+
|
|
|
+ JLabel lblScope = new JLabel("Scope");
|
|
|
+ lblScope.setFont(new Font("Tahoma", Font.BOLD, 13));
|
|
|
+ lblScope.setBounds(122, 90, 46, 14);
|
|
|
+ contentPanel.add(lblScope);
|
|
|
+
|
|
|
+ JRadioButton rdbtnAll = new JRadioButton("All");
|
|
|
+ rdbtnAll.setFont(new Font("Tahoma", Font.PLAIN, 13));
|
|
|
+ rdbtnAll.setBounds(121, 112, 109, 23);
|
|
|
+ contentPanel.add(rdbtnAll);
|
|
|
+
|
|
|
+ JRadioButton rdbtnSingle = new JRadioButton("Single");
|
|
|
+ rdbtnSingle.setFont(new Font("Tahoma", Font.PLAIN, 13));
|
|
|
+ rdbtnSingle.setBounds(121, 138, 109, 23);
|
|
|
+ contentPanel.add(rdbtnSingle);
|
|
|
+
|
|
|
+ JButton btnFind = new JButton("Find");
|
|
|
+ btnFind.setFont(new Font("Tahoma", Font.PLAIN, 13));
|
|
|
+ btnFind.setBounds(10, 186, 89, 23);
|
|
|
+ contentPanel.add(btnFind);
|
|
|
+
|
|
|
+ JButton btnReplace = new JButton("Replace");
|
|
|
+ btnReplace.setFont(new Font("Tahoma", Font.PLAIN, 13));
|
|
|
+ btnReplace.setBounds(110, 187, 89, 23);
|
|
|
+ contentPanel.add(btnReplace);
|
|
|
+
|
|
|
+ JButton btnReplaceAll = new JButton("Replace All");
|
|
|
+ btnReplaceAll.setFont(new Font("Tahoma", Font.PLAIN, 11));
|
|
|
+ btnReplaceAll.setBounds(110, 218, 89, 23);
|
|
|
+ contentPanel.add(btnReplaceAll);
|
|
|
+
|
|
|
+ JButton btnClose = new JButton("Close");
|
|
|
+ btnClose.addActionListener(new ActionListener() {
|
|
|
+ public void actionPerformed(ActionEvent arg0) {
|
|
|
+ dispose();
|
|
|
+ }
|
|
|
+ });
|
|
|
+ btnClose.setFont(new Font("Tahoma", Font.PLAIN, 13));
|
|
|
+ btnClose.setBounds(110, 287, 89, 23);
|
|
|
+ contentPanel.add(btnClose);
|
|
|
+
|
|
|
+ ButtonGroup directionbtns = new ButtonGroup();
|
|
|
+ ButtonGroup scopebtns = new ButtonGroup();
|
|
|
+
|
|
|
+ directionbtns.add(rdbtnBackward);
|
|
|
+ directionbtns.add(rdbtnForward);
|
|
|
+ scopebtns.add(rdbtnSingle);
|
|
|
+ scopebtns.add(rdbtnAll);
|
|
|
+
|
|
|
+ }
|
|
|
+}
|