コード例 #1
0
    @Override
    boolean applyOptions() {
      List<String> list = filterTable.getFilterModel().getModel();

      FilterSettings.WHITE_LISTED_IP_ADDRESSES.set(list.toArray(new String[list.size()]));
      spamManager.reloadIPFilter();
      return false;
    }
コード例 #2
0
    @Override
    public void initOptions() {
      String[] bannedIps = FilterSettings.BLACK_LISTED_IP_ADDRESSES.get();
      FilterModel model = new FilterModel(new ArrayList<String>(Arrays.asList(bannedIps)));
      filterTable.setModel(model);

      backListCheckBox.setSelected(FilterSettings.USE_NETWORK_FILTER.getValue());
    }
コード例 #3
0
    @Override
    boolean applyOptions() {
      List<String> list = filterTable.getFilterModel().getModel();

      FilterSettings.USE_NETWORK_FILTER.setValue(backListCheckBox.isSelected());
      FilterSettings.BLACK_LISTED_IP_ADDRESSES.set(list.toArray(new String[list.size()]));
      spamManager.reloadIPFilter();
      return false;
    }
コード例 #4
0
 @Override
 public void actionPerformed(ActionEvent e) {
   if (textField.getText() != null && textField.getText().length() > 0) {
     try {
       new IP(textField.getText());
       table.addIp(textField.getText());
     } catch (IllegalArgumentException iae) {
     }
     textField.setText("");
   }
 }
コード例 #5
0
 @Override
 public void initOptions() {
   String[] allowedIps = FilterSettings.WHITE_LISTED_IP_ADDRESSES.get();
   FilterModel model = new FilterModel(new ArrayList<String>(Arrays.asList(allowedIps)));
   filterTable.setModel(model);
 }
コード例 #6
0
 @Override
 boolean hasChanged() {
   List model = Arrays.asList(FilterSettings.WHITE_LISTED_IP_ADDRESSES.get());
   return !model.equals(filterTable.getFilterModel().getModel());
 }
コード例 #7
0
 @Override
 boolean hasChanged() {
   List model = Arrays.asList(FilterSettings.BLACK_LISTED_IP_ADDRESSES.get());
   return backListCheckBox.isSelected() != FilterSettings.USE_NETWORK_FILTER.getValue()
       || !model.equals(filterTable.getFilterModel().getModel());
 }