Пример #1
0
  public void setNoteName(String noteName) {
    int idx = 0;
    int i = 0;
    for (int c = _lstFile.getElementCount() - 1; i < c; i++) {
      ListElement le = (ListElement) _lstFile.getElement(i);
      if (StringUtil.equalsIgnoreCase(le.getName(), noteName)) idx = i;
    }

    _lstFile.setSelectedIndex(idx);
    super.btnOk.setEnabled(idx != -1);
  }
Пример #2
0
 public String toString() {
   if (StringUtil.isEmptyString(alias)) return name;
   if (isShowFileName()) {
     StringBuffer sb = new StringBuffer();
     sb.append(alias);
     sb.append("(");
     sb.append(name);
     sb.append(")");
     return sb.toString();
   } else {
     return alias;
   }
 }