コード例 #1
0
 @Override
 public boolean include(
     RowFilter.Entry<? extends PersonnelTableModel, ? extends Integer> entry) {
   Person p = entry.getModel().getPerson(entry.getIdentifier().intValue());
   if (!p.isActive()) {
     return false;
   }
   if (!prisoners && (p.isPrisoner() || p.isBondsman())) {
     return false;
   }
   if ((null != primaryRole) && (p.getPrimaryRole() != primaryRole.intValue())) {
     return false;
   }
   if ((null != expLevel) && (p.getExperienceLevel(false) != expLevel.intValue())) {
     return false;
   }
   if ((null != skill)) {
     Skill s = p.getSkill(skill);
     if (null == s) {
       int cost = SkillType.getType(skill).getCost(0);
       return (cost >= 0) && (cost <= p.getXp());
     } else {
       int cost = s.getCostToImprove();
       return (s.getLevel() < maxSkillLevel) && (cost >= 0) && (cost <= p.getXp());
     }
   }
   return true;
 }
コード例 #2
0
 private boolean entryContainsWord(RowFilter.Entry entry, String word) {
   for (int i = 0; i < entry.getValueCount(); i++) {
     Object entryValue = entry.getValue(i);
     if (entryValue != null && Utils.containsIgnoreCase(entry.getValue(i).toString(), word)) {
       return true;
     }
   }
   return false;
 }
コード例 #3
0
ファイル: RegExRowFilter.java プロジェクト: tfreese/mediathek
  /**
   * @see
   *     de.freese.mediathek.kodi.swing.components.rowfilter.AbstractRowFilterIndexed#include(javax.swing.RowFilter.Entry,
   *     int)
   */
  @Override
  protected boolean include(
      final javax.swing.RowFilter.Entry<? extends Object, ? extends Object> value,
      final int index) {
    this.matcher.reset(value.getStringValue(index));

    return this.matcher.find();
  }
コード例 #4
0
 @Override
 public boolean include(RowFilter.Entry<? extends TableModel, ? extends Integer> entry) {
   int index = entry.getIdentifier();
   ThrustCurveMotorSet m = model.getMotorSet(index);
   return filterManufacturers(m)
       && filterUsed(m)
       && filterBySize(m)
       && filterByString(m)
       && filterByImpulseClass(m);
 }