Exemple #1
0
  /*
   * @see TableModel#getValueAt(int, int)
   */
  @Override
  public Object getValueAt(int rowIndex, int columnIndex) {
    Pack pack = packs.get(rowIndex);
    switch (columnIndex) {
      case 0:
        return checkValues[rowIndex];

      case 1:
        return PackHelper.getPackName(pack, messages);

      case 2:
        return Pack.toByteUnitsString(pack.getSize());

      default:
        return null;
    }
  }
Exemple #2
0
  @Override
  public Object getValueAt(int rowIndex, int columnIndex) {
    Pack pack = packs.get(rowIndex);
    switch (columnIndex) {
      case 0:
        return checkValues[rowIndex];

      case 1:
        Object name = null;
        if (messages != null && pack.getLangPackId() != null && !pack.getLangPackId().equals("")) {
          name = messages.get(pack.getLangPackId());
        }
        if (name == null || "".equals(name)) {
          name = pack.getName();
        }
        return name;

      case 2:
        return Pack.toByteUnitsString(pack.getSize());

      default:
        return null;
    }
  }