private boolean isMatching(HypervisorLoaderOut hlo, Object origin) {
    if (vendorData.getSelectedIndex() != -1
        && !hlo.getVendor().equals(vendorData.getSelectedItem())) {
      return false;
    }
    if (vendorData.equals(origin)) {
      return true;
    }

    if (productData.getSelectedIndex() != -1
        && !hlo.getProduct().equals(productData.getSelectedItem())) {
      return false;
    }
    if (productData.equals(origin)) {
      return true;
    }

    if (versionData.getSelectedIndex() != -1
        && !hlo.getVersion().equals(versionData.getSelectedItem())) {
      return false;
    }
    if (versionData.equals(origin)) {
      return true;
    }

    if (typeData.getSelectedIndex() != -1 && !hlo.getTypeId().equals(typeData.getSelectedItem())) {
      return false;
    }

    return true;
  }
示例#2
0
  public void actionPerformed(ActionEvent e) {
    String result;
    JComboBox cb = (JComboBox) e.getSource();
    result = (String) cb.getSelectedItem();
    if (cb.equals(areaDrop)) {
      areaName = result;
      System.out.println(result);
    } else if (cb.equals(lapDrop)) {
      if (result.equals("Laptop")) {
        lapDropChoice = 1;
        System.out.println(result);
      } else if (result.equals("Desktop")) {
        lapDropChoice = 0;
        System.out.println(result);
      }
    } else if (cb.equals(processorDrop)) {
      processorDropChoice = result;
      System.out.println(result);

    } else if (cb.equals(diskDrop)) {
      diskDropChoice = result;
      System.out.println(result);
    } else if (cb.equals(motherDrop)) {
      motherDropChoice = result;
      System.out.println(result);
    } else if (cb.equals(mouseDrop)) {
      mouseDropChoice = result;
      System.out.println(result);
    }
  }
示例#3
0
 private void processFilterAction(final ActionEvent e) {
   if (jColumn.equals(e.getSource())) {
     updateNumeric(true);
   }
   if (jCompare.equals(e.getSource())) {
     updateCompare(true);
   }
   if (jEnabled.isSelected()) {
     jText.setBackground(Color.WHITE);
   } else {
     jText.setBackground(new Color(255, 200, 200));
   }
   timer.stop();
   refilter();
 }