SOURCECODE |
How to... change Shopīs quit behavior
Description:
If the Shop is going to be shutted down, it will ask to make itīs state persistant.
Sometimes this feature makes no sense, therefore it can be modified.
(See also: HowTo..incorporate a Shop )
ToDo's:
- Open Shop where you want to change behavior while quitting.
Usually the Shop will ask for serialization before shutting down.
- Implement
public void quit()
method to change Shopīs quit behavior.
Uses:
Shop
1
// Main Class
public class MyShop extends Shop
{
// Constructor
public MyShop()
{
super();
}
2
// Method has to be overwritten to change quit behavior
public void quit()
{
if (Shop.getTheShop().shutdown (false)) {
System.exit (0);
}
}
}