コード例 #1
0
 /** Set a new filter */
 public void setFilter(SOAPMonitorFilter filter) {
   // Save new filter criteria
   filter_include = filter.getFilterIncludeList();
   filter_exclude = filter.getFilterExcludeList();
   filter_active = filter.getFilterActive();
   filter_complete = filter.getFilterComplete();
   applyFilter();
 }
コード例 #2
0
 /** Listener to handle button actions */
 public void actionPerformed(ActionEvent e) {
   // Check if the user pressed the remove button
   if (e.getSource() == remove_button) {
     int row = table.getSelectedRow();
     model.removeRow(row);
     table.clearSelection();
     table.repaint();
     valueChanged(null);
   }
   // Check if the user pressed the remove all button
   if (e.getSource() == remove_all_button) {
     model.clearAll();
     table.setRowSelectionInterval(0, 0);
     table.repaint();
     valueChanged(null);
   }
   // Check if the user pressed the filter button
   if (e.getSource() == filter_button) {
     filter.showDialog();
     if (filter.okPressed()) {
       // Update the display with new filter
       model.setFilter(filter);
       table.repaint();
     }
   }
   // Check if the user pressed the start button
   if (e.getSource() == start_button) {
     start();
   }
   // Check if the user pressed the stop button
   if (e.getSource() == stop_button) {
     stop();
   }
   // Check if the user wants to switch layout
   if (e.getSource() == layout_button) {
     details_panel.remove(details_soap);
     details_soap.removeAll();
     if (details_soap.getOrientation() == JSplitPane.HORIZONTAL_SPLIT) {
       details_soap = new JSplitPane(JSplitPane.VERTICAL_SPLIT);
     } else {
       details_soap = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT);
     }
     details_soap.setTopComponent(request_panel);
     details_soap.setRightComponent(response_panel);
     details_soap.setResizeWeight(.5);
     details_panel.add(details_soap, BorderLayout.CENTER);
     details_panel.validate();
     details_panel.repaint();
   }
   // Check if the user is changing the reflow option
   if (e.getSource() == reflow_xml) {
     request_text.setReflowXML(reflow_xml.isSelected());
     response_text.setReflowXML(reflow_xml.isSelected());
   }
 }