View Javadoc

1   package org.paneris.jammyjoes.mvp;
2   
3   import java.util.ArrayList;
4   
5   import org.melati.poem.Selectable;
6   
7   public class CatalogueEntryPresenter extends AbstractPresenter implements Presenter {
8     
9     Selectable _productTable;
10    Context _context;
11    ArrayList _list;
12    
13    public CatalogueEntryPresenter(Selectable productTable, Context context) {
14      _productTable = productTable;
15      _context = context;
16      _list = new ArrayList();
17      context.put("items", _list);
18    }
19  
20    public Selection createSelection() {
21      return new ProductSelectionFromContext(_productTable, _context);
22    }
23  
24    public Command createCommand() {
25      return new CollectOverTheTopCommand(_list, 8, _context);
26    }
27  
28  }