Exemplo n.º 1
0
  public void addStock(int i, Stock stock) {
    if (i == -1) return;

    this.stocks.getStockList().add(i, stock);
    this.state.add(i, stock.isTriggered());
    this.fireTableRowsInserted(i, i);
    selector.select(i);
  }
Exemplo n.º 2
0
  public Stock removeStock(int i) {
    if (i == -1) return null;

    selector.deselect(i);
    Stock stock = stocks.getStockList().remove(i);
    state.remove(i);
    this.fireTableRowsDeleted(i, i);
    return stock;
  }
Exemplo n.º 3
0
 public void addLastStock(Stock stock) {
   stocks.add(stock);
   state.add(stock.isTriggered());
   this.fireTableRowsInserted(stocks.getStockList().size() - 1, stocks.getStockList().size() - 1);
   selector.select(stocks.getStockList().size() - 1);
 }