Exemplo n.º 1
0
 protected void rendererKitchenTickets() {
   updatePanelCount();
   for (int i = currentBlockIndex; i < nextBlockIndex; i++) {
     if (i == existingTickets.size()) {
       break;
     }
     KitchenTicket item = (KitchenTicket) existingTickets.toArray()[i];
     super.add(new KitchenTicketView(item), "growy"); // $NON-NLS-1$
   }
   updateButton();
 }
Exemplo n.º 2
0
  public boolean addTicket(KitchenTicket ticket) {
    if (existingTickets.contains(ticket)) {
      return false;
    }

    existingTickets.add(ticket);
    updateButton();

    if (nextBlockIndex < existingTickets.size()) {
      return false;
    }
    super.add(new KitchenTicketView(ticket), "growy"); // $NON-NLS-1$

    return true;
  }