All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class examples.warehouse.GUI.Wrhsaplt

java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.Container
                   |
                   +----java.awt.Panel
                           |
                           +----java.applet.Applet
                                   |
                                   +----examples.warehouse.GUI.Wrhsaplt

public class Wrhsaplt
extends Applet
implements ActionListener, WindowListener, Observer
Graphical UI for Warehouse simulation, example for JSL 2.0


Constructor Index

 o Wrhsaplt()

Method Index

 o actionPerformed(ActionEvent)
Method to handle events for the ActionListener interface.
 o getAppletInfo()
Gets the applet information.
 o init()
Handle the Applet init method.
 o interrupt()
Stop the eimulation and kill all active thread.
 o isapplet()
Am I an applet or an autonomous program ?
 o isapplet(boolean)
Am I an applet or an autonomous program ?
 o isnotapplet()
Am I an applet or an autonomous program ?
 o main(String[])
main entrypoint - starts the part when it is run as an application
 o simulate(double, double, int, int, int, int, int, double, int)
Start the simulation
 o termina()
Ends the execution of the program
 o update(Observable, Object)
Called by observables (Simulation).
 o windowActivated(WindowEvent)
Method to handle events for the WindowListener interface.
 o windowClosed(WindowEvent)
Method to handle events for the WindowListener interface.
 o windowClosing(WindowEvent)
Method to handle events for the WindowListener interface.
 o windowDeactivated(WindowEvent)
Method to handle events for the WindowListener interface.
 o windowDeiconified(WindowEvent)
Method to handle events for the WindowListener interface.
 o windowIconified(WindowEvent)
Method to handle events for the WindowListener interface.
 o windowOpened(WindowEvent)
Method to handle events for the WindowListener interface.

Constructors

 o Wrhsaplt
 public Wrhsaplt()

Methods

 o actionPerformed
 public void actionPerformed(ActionEvent e)
Method to handle events for the ActionListener interface.

Parameters:
e - java.awt.event.ActionEvent
 o getAppletInfo
 public String getAppletInfo()
Gets the applet information.

Returns:
java.lang.String
Overrides:
getAppletInfo in class Applet
 o init
 public void init()
Handle the Applet init method.

Overrides:
init in class Applet
 o interrupt
 public void interrupt()
Stop the eimulation and kill all active thread. Can't be used in an applet for security restrictions

 o isapplet
 public boolean isapplet()
Am I an applet or an autonomous program ?

Returns:
boolean True if not started from main
 o isapplet
 public void isapplet(boolean isapplet)
Am I an applet or an autonomous program ?

Parameters:
isapplet - True to set the status as applet
 o isnotapplet
 public boolean isnotapplet()
Am I an applet or an autonomous program ?

Returns:
boolean True if started from main
 o main
 public static void main(String args[])
main entrypoint - starts the part when it is run as an application

Parameters:
args - java.lang.String[]
 o simulate
 public void simulate(double arr,
                      double rem,
                      int in1,
                      int in2,
                      int out1,
                      int out2,
                      int m,
                      double simperiod,
                      int seed)
Start the simulation

Parameters:
arr - double Arrivals frequency
rem - double Removals frequency
in1 - int Lower boud for incoming batches
in2 - int Upper boud for incoming batches
out1 - int Lowerer boud for outgoing batches
out2 - int Upper boud for outgoing batches
m - int Warehouse size
simperiod - double Simulation length
seed - int Seed for random generator
 o termina
 public void termina()
Ends the execution of the program

 o update
 public void update(Observable o,
                    Object arg)
Called by observables (Simulation).

Parameters:
o - Caller
arg - Parameter. If the caller is a Simulation, arg is the active process
 o windowActivated
 public void windowActivated(WindowEvent e)
Method to handle events for the WindowListener interface.

Parameters:
e - java.awt.event.WindowEvent
 o windowClosed
 public void windowClosed(WindowEvent e)
Method to handle events for the WindowListener interface.

Parameters:
e - java.awt.event.WindowEvent
 o windowClosing
 public void windowClosing(WindowEvent e)
Method to handle events for the WindowListener interface.

Parameters:
e - java.awt.event.WindowEvent
 o windowDeactivated
 public void windowDeactivated(WindowEvent e)
Method to handle events for the WindowListener interface.

Parameters:
e - java.awt.event.WindowEvent
 o windowDeiconified
 public void windowDeiconified(WindowEvent e)
Method to handle events for the WindowListener interface.

Parameters:
e - java.awt.event.WindowEvent
 o windowIconified
 public void windowIconified(WindowEvent e)
Method to handle events for the WindowListener interface.

Parameters:
e - java.awt.event.WindowEvent
 o windowOpened
 public void windowOpened(WindowEvent e)
Method to handle events for the WindowListener interface.

Parameters:
e - java.awt.event.WindowEvent

All Packages  Class Hierarchy  This Package  Previous  Next  Index