|
Videoautomat | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--sale.Shop | +--videoautomat.VideoShop
This is the central class for this application - the Shop
. It contains the
video-catalog and stock of this video-shop, the shop`s money and therefor a currency-catalog
containing which coins this automat accepts and a Timer
for simulation purposes.
Field Summary | |
static String |
C_CURRENCY
Key of the currency - Catalog |
static String |
C_VIDEOS
Key of the video - Catalog |
static String |
CAPTION_AUTOMAT
The Caption of the VideoAutomat |
static String |
CC_VIDEOS
Key of the video - CountingStock |
static String |
FILENAME
The name of the global log file |
static String |
MB_MONEY
Key of the MoneyBag |
static String |
MS_NEW
Label for the menusheet that contains self-defined items |
static String |
MSG_ACCESS
Label for the admin- ActionCapability , if it`s not granted. |
static String |
MSI_AUTOMAT
Label for the button to start the automat |
static String |
MSI_DAY
Label for the time setter button |
Fields inherited from class sale.Shop |
DEAD, LOAD_TAG, m_jfShopFrame, m_lphProcesses, m_lspSalesPoints, m_mpToPersistify, m_rShopFrameBounds, m_sShopFrameTitle, m_trTimer, QUIT_SHOP_TAG, RUNNING, SAVE_TAG, SEPARATOR_ONE_TAG, SEPARATOR_TWO_TAG, SET_CURRENT_SP_TAG, SHOP_MENU_TAG, SUSPENDED |
Constructor Summary | |
VideoShop()
Constructs a new VideoShop and set it as Shop#setTheShop() . |
Method Summary | |
static void |
checkRentedVideos()
Method to iterate over all rented videos and taking out those, which renting costs exceed the purchase price |
protected sale.MenuSheet |
createShopMenuSheet()
|
static data.ooimpl.EUROCurrencyImpl |
getCurrency()
Helper method to avoid to long code-lines. |
static data.ooimpl.MoneyBagImpl |
getMoneyBag()
Helper method to avoid to long code-lines. |
static data.ooimpl.CatalogImpl |
getVideoCatalog()
Helper method to avoid to long code-lines. |
static data.ooimpl.CountingStockImpl |
getVideoStock()
Helper method to avoid to long code-lines. |
void |
quit()
Overidden to avoid the annoying save-query, when quiting the application. |
Methods inherited from class sale.Shop |
addCatalog, addSalesPoint, addStock, canShutdown, clearInternalStructures, createShopFrame, getCatalog, getCurrentSalesPoint, getPersistentObject, getPersistentObjects, getProcessesLock, getSalesPoint, getSalesPoints, getSalesPointsLock, getShopFrame, getShopFrameBounds, getShopFrameTitle, getShopState, getStock, getTheShop, getTimer, isCurrentSalesPointAdjusting, log, makePersistent, onLoadFrames, onSalesPointAdded, onSalesPointRemoved, onSaveFrames, removeCatalog, removeSalesPoint, removeStatusDisplay, removeStock, resetCurrentSalesPointIsAdjusting, restore, resume, retrievePersistenceInStream, retrievePersistenceOutStream, runBackgroundProcess, runProcess, setCurrentSalesPoint, setCurrentSalesPointIsAdjusting, setObjectPersistent, setObjectTransient, setShopFrameBounds, setShopFrameTitle, setTheShop, setTimer, setViewMode, shutdown, start, suspend |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final String C_VIDEOS
Catalog
public static final String C_CURRENCY
Catalog
public static final String CC_VIDEOS
CountingStock
public static final String MB_MONEY
MoneyBag
public static final String FILENAME
public static final String CAPTION_AUTOMAT
VideoAutomat
public static final String MS_NEW
public static final String MSI_AUTOMAT
public static final String MSG_ACCESS
ActionCapability
, if it`s not granted.
public static final String MSI_DAY
Constructor Detail |
public VideoShop()
Shop#setTheShop()
. Also initialize
the global Catalogs
and Stocks
and sets a Timer
.
Method Detail |
protected sale.MenuSheet createShopMenuSheet()
createShopMenuSheet
in class sale.Shop
Shop`s MenuSheet
, containing the default one, a button to start
an automat and a button to switch the time further.Shop.createShopMenuSheet()
public void quit()
quit
in class sale.Shop
Shop.quit()
public static data.ooimpl.CatalogImpl getVideoCatalog()
Catalog
of videos.public static data.ooimpl.CountingStockImpl getVideoStock()
Stock
of videospublic static data.ooimpl.MoneyBagImpl getMoneyBag()
MoneyBag
containing the money of the shop.public static data.ooimpl.EUROCurrencyImpl getCurrency()
EUROCurrencyImpl
-instancepublic static void checkRentedVideos()
|
Videoautomat | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |