|
Großmarkt | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--sale.Shop | +--market.SMarket
The Shop of this sale-application.
Field Summary | |
static String |
CAT_ARTICLECATALOG
|
static String |
CAT_COMPLETE_SALESSTATS
|
static String |
CAT_CUSTOMER
|
static String |
CAT_OPENPURCHASE
|
static String |
MARKET_CLOSED
|
static String |
MARKET_CLOSES_LONG
|
static String |
MARKET_CLOSES_NOT
|
static String |
MARKET_CLOSES_SHORT
|
static String |
MARKET_OPENED
|
static String |
STK_OFFER
|
static String |
STK_TILLQUEUE
|
static String |
STK_WAREHOUSEQUEUE
|
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 | |
SMarket(Time time)
Creates an SMarket, initiates global Catalogs, Stocks and other settings. |
Method Summary | |
static void |
addEventListener(MarketEventListener e)
Adds a new EventListener to the market. |
void |
addSalesPoint(SalesPoint sp)
Adds a SalesPoint to the market attaches a MarketEventListener to it. |
static void |
addToAccount(Value money)
Adds a Value to the markets account. |
MenuSheet |
createShopMenuSheet()
Creates the MenuSheet of the SMarket |
static void |
fireMarketClosed()
Fires an event to all listeners: The market has just closed. |
static void |
fireMarketClosing()
Fires an event to all listeners: The market is about to close. |
static void |
fireMarketNotClosing()
Fires an event to all listeners: The market isn't about to close anymore. |
static void |
fireMarketOpened()
Fires an event to all listeners: The market has just opened. |
static void |
fireTimeAdvanced()
Fires an event to all listeners: The time has advanced.. |
static void |
fireUpdateWorkerScreen()
Fires an event to all listeners: The number of workers or orders to process has changed. |
static Value |
getAccount()
|
static CArticleCatalog |
getArticleCatalog()
Shortcut for catalog with all articles. |
static Object[] |
getArticleCategories()
Returns Categories of all available Articles. |
static CCompleteStats |
getCompleteSalesStats()
Shortcut to the statistics catalog |
static Catalog |
getCustomers()
Shortcut to the catalog that holds all customers of the market. |
static CCustomerStats |
getCustomerStats()
Shortcut to the customer stats catalog |
static CSalesStats |
getDailySalesStats()
Shortcut to the catalog that holds the current day's statistics. |
static Calendar |
getDateOfOpening()
|
static int |
getMonth()
Convenience method. |
static CSalesStats |
getMonthlySalesStats()
Shortcut to the catalog that holds the current month's statistics. |
static CSOffer |
getOffer()
Shortcut to the market's current stock. |
static COpenPurchaseOrders |
getOpenPurchaseOrder()
Shortcut to the catalog that holds the market's purchases which have not yet arrived. |
static Options |
getOptions()
|
JFrame |
getShopFrame()
Returns the JFrame of the Shop window. |
static SMarket |
getTheMarket()
|
static SSListenable |
getTillQueue()
Shortcut for the queue of customers who want to pay. |
static Calendar |
getTime()
Convenience method |
static SSListenable |
getWarehouseQueue()
Shortcut for the queue of orders waiting at the warehouse. |
static int |
getYear()
Convencience method. |
static boolean |
hasTimeAdvanced()
|
static boolean |
isOpen()
|
static boolean |
isToBeClosed()
|
void |
quit()
Closes the SMarket. |
static void |
removeEventListener(MarketEventListener e)
Removes an EventListener from the market. |
void |
removeSalesPoint(SalesPoint sp)
Removes a SalesPoint to the market detachses its MarketEventListener . |
void |
resume()
Sets the icon when market is loaded from persistence file. |
static void |
setNextDay()
Advances the market's time by 1 day. |
void |
setOpen(int i)
Sets the market's state. |
static void |
setTime(Calendar newTime)
Sets the market's time to a new date. |
void |
start()
Starts the Shop and initializes statistics items. |
static void |
subtractFromAccount(Value money)
Subtracts a Value from the markets account. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final String CAT_ARTICLECATALOG
public static final String CAT_OPENPURCHASE
public static final String CAT_CUSTOMER
public static final String CAT_COMPLETE_SALESSTATS
public static final String STK_OFFER
public static final String STK_TILLQUEUE
public static final String STK_WAREHOUSEQUEUE
public static final String MARKET_CLOSES_SHORT
public static final String MARKET_CLOSES_LONG
public static final String MARKET_CLOSES_NOT
public static final String MARKET_CLOSED
public static final String MARKET_OPENED
Constructor Detail |
public SMarket(Time time)
Method Detail |
public JFrame getShopFrame()
Shop's
getShopFrame()
method is, that this one is public, as the Shop's window is needed by a dialog.
getShopFrame
in class Shop
JDDShowMessage.showMessageDialog(String, String)
public void start()
start
in class Shop
public void quit()
quit
in class Shop
public void resume()
resume
in class Shop
public MenuSheet createShopMenuSheet()
createShopMenuSheet
in class Shop
public void addSalesPoint(SalesPoint sp)
SalesPoint
to the market attaches a MarketEventListener
to it.
addSalesPoint
in class Shop
sp
- the SalesPoint to be added.public void removeSalesPoint(SalesPoint sp)
SalesPoint
to the market detachses its MarketEventListener
.
removeSalesPoint
in class Shop
sp
- the SalesPoint to be removed.public static void addToAccount(Value money)
money
- the Value that will be added.public static void subtractFromAccount(Value money)
money
- the Value that will be substracted.public static Value getAccount()
public static Options getOptions()
public static SMarket getTheMarket()
public static CArticleCatalog getArticleCatalog()
public static CSOffer getOffer()
public static COpenPurchaseOrders getOpenPurchaseOrder()
public static Catalog getCustomers()
public static SSListenable getTillQueue()
public static SSListenable getWarehouseQueue()
public static CSalesStats getDailySalesStats()
public static CSalesStats getMonthlySalesStats()
public static CCompleteStats getCompleteSalesStats()
public static CCustomerStats getCustomerStats()
public static Object[] getArticleCategories()
public void setOpen(int i)
i
- public static boolean isOpen()
public static boolean isToBeClosed()
public static boolean hasTimeAdvanced()
#timeAdvanced
public static Calendar getTime()
public static Calendar getDateOfOpening()
public static int getYear()
public static int getMonth()
public static void setTime(Calendar newTime)
newTime
- the new date to be set.public static void setNextDay()
public static void addEventListener(MarketEventListener e)
public static void removeEventListener(MarketEventListener e)
public static void fireMarketClosing()
public static void fireMarketNotClosing()
public static void fireMarketClosed()
public static void fireMarketOpened()
public static void fireTimeAdvanced()
public static void fireUpdateWorkerScreen()
|
Großmarkt | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |