/**
   * Method deleteRow.
   *
   * @param selectedRow int
   */
  public void deleteRow(int selectedRow) {

    Integer orderKey = ((Quantity) this.getValueAt(selectedRow, 1)).getIntegerValue();
    for (final TradeOrder tradeOrder : getData().getTradeOrders()) {
      if (CoreUtils.nullSafeComparator(tradeOrder.getOrderKey(), orderKey) == 0) {
        getData().getTradeOrders().remove(tradeOrder);
        final Vector<Object> currRow = rows.get(selectedRow);
        rows.remove(currRow);
        this.fireTableRowsDeleted(selectedRow, selectedRow);
        break;
      }
    }
  }
Ejemplo n.º 2
0
  /**
   * Method deleteRow.
   *
   * @param selectedRow int
   */
  public void deleteRow(int selectedRow) {

    String name = (String) this.getValueAt(selectedRow, 0);
    for (final Aspect element : getData().getAspect()) {
      if (CoreUtils.nullSafeComparator(((Strategy) element).getName(), name) == 0) {
        getData().remove(element);
        getData().setDirty(true);
        final Vector<Object> currRow = rows.get(selectedRow);
        rows.remove(currRow);
        this.fireTableRowsDeleted(selectedRow, selectedRow);
        break;
      }
    }
  }