예제 #1
0
 // invoked in DrinkDisplayListener;
 public void displayDrinks(int idx) {
   StoreController sctrl = mCtrl.getStoreController();
   DrinksStoreItem item;
   try {
     item = (DrinksStoreItem) sctrl.getStoreItem(Store.DRINK, idx);
     DrinksBrand db = (DrinksBrand) item.getContent();
     mpanel.getDrinksDisplay().displayQty(idx, item.getQuantity());
     mpanel.displayPrice(db.getPrice());
   } catch (VMCSException e) {
     System.out.println("MaintenanceController.displayDrink:" + e);
   }
 }
예제 #2
0
 // invoked by PriceDisplayListener
 public void setPrice(int pr) {
   StoreController sctrl = mCtrl.getStoreController();
   int curIdx = mpanel.getCurIdx();
   sctrl.setPrice(curIdx, pr);
   mpanel.getDrinksDisplay().getPriceDisplay().setValue(pr + "C");
 }