コード例 #1
0
ファイル: ManualEditPanel.java プロジェクト: sunzhuo1987/wavd
 /**
  * Instantiates a new manual edit panel.
  *
  * @param manualEdit the manual edit
  */
 public ManualEditPanel(ManualEdit manualEdit) {
   _manualEdit = manualEdit;
   initComponents();
   _requestButtonModel = interceptRequestCheckBox.getModel();
   _requestButtonModel.addActionListener(
       new ActionListener() {
         public void actionPerformed(ActionEvent evt) {
           boolean enabled = interceptRequestCheckBox.isSelected();
           interceptIncludeRegexTextField.setEnabled(isEnabled() && enabled);
           interceptExcludeRegexTextField.setEnabled(isEnabled() && enabled);
           interceptMethodList.setEnabled(isEnabled() && enabled);
           _manualEdit.setInterceptRequest(enabled);
         }
       });
   _responseButtonModel = interceptResponseCheckBox.getModel();
   _responseButtonModel.addActionListener(
       new ActionListener() {
         public void actionPerformed(ActionEvent evt) {
           boolean enabled = interceptResponseCheckBox.isSelected();
           interceptResponseTextField.setEnabled(isEnabled() && enabled);
           _manualEdit.setInterceptResponse(enabled);
         }
       });
   configure();
   interceptMethodList.addListSelectionListener(
       new ListSelectionListener() {
         public void valueChanged(ListSelectionEvent evt) {
           interceptMethodListValueChanged(evt);
         }
       });
   _manualEdit.setUI(this);
 }
コード例 #2
0
 /** Creates new form ManualEditPanel */
 public ManualEditPanel(ManualEdit manualEdit) {
   _manualEdit = manualEdit;
   initComponents();
   _requestButtonModel = interceptRequestCheckBox.getModel();
   _requestButtonModel.addActionListener(
       new ActionListener() {
         public void actionPerformed(ActionEvent evt) {
           boolean enabled = interceptRequestCheckBox.isSelected();
           interceptIncludeRegexTextField.setEnabled(isEnabled() && enabled);
           interceptExcludeRegexTextField.setEnabled(isEnabled() && enabled);
           interceptMethodList.setEnabled(isEnabled() && enabled);
           _manualEdit.setInterceptRequest(enabled);
         }
       });
   _responseButtonModel = interceptResponseCheckBox.getModel();
   _responseButtonModel.addActionListener(
       new ActionListener() {
         public void actionPerformed(ActionEvent evt) {
           boolean enabled = interceptResponseCheckBox.isSelected();
           interceptResponseTextField.setEnabled(isEnabled() && enabled);
           _manualEdit.setInterceptResponse(enabled);
         }
       });
   configure();
   interceptMethodList.addListSelectionListener(
       new ListSelectionListener() {
         public void valueChanged(ListSelectionEvent evt) {
           interceptMethodListValueChanged(evt);
         }
       });
   _manualEdit.setUI(this);
   addHierarchyListener(
       new HierarchyListener() {
         public void hierarchyChanged(HierarchyEvent e) {
           SwingUtilities.invokeLater(
               new Runnable() {
                 public void run() {
                   installShortcuts();
                 }
               });
           // disconnect from the hierarchy after installing the shortcuts once
           removeHierarchyListener(this);
         }
       });
   // installShortcuts();
 }
コード例 #3
0
 @Override
 public void addActionListener(ActionListener l) {
   other.addActionListener(l);
 }