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(); }
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; }