Main Page   Packages   Class Hierarchy   Compound List   File List   Compound Members  

JApplet1 Class Reference

Applet class. More...

Inheritance diagram for JApplet1::

List of all members.

Public Methods

void init ()
 Standard method for an applet. More...

int getQ () throws Exception
 Returns value of D - max. More...

boolean is_dataReady ()
 Indicates whether optimization tables have been built.

int getN ()
 Returns value of N - number of stages.


Private Methods

void stop_actionPerformed ()
 This method stops thread thread.

void calc_actionPerformed ()
 This method starts thread thread.


Private Attributes

Grafikai GrafD
Grafikai GrafU
 Frames for graphics.

int [][] dmas
 array for optimal supply function.

int [][] umas
 array for maximal utility function.

int N = 5
 dafault number of stages.

float Cr = 200
 retail price of one RAM unit.

float Cw = 100
 wholesale price of one RAM unit.

float L = 10
 loss due to short supply of one RAM unit.

int D = 100
 shop warehouse size in RAM units.

int W = 100
 maximal RAM demand.

int lambda = 50
 expected RAM demand.

RAMShop RSh
 class that calculates maximal utility and optimal supply.

JButton calc
 button "Build optimization tables".

JButton stop
 button "Stop" - calculations may be terminated.

JTextField IvedN = new JTextField(3)
 text field for N.

JTextField IvedCr = new JTextField(6)
 text field for Cr.

JTextField IvedCw = new JTextField(6)
 text field for Cw.

JTextField IvedL = new JTextField(6)
 text field for L.

JTextField IvedSand = new JTextField(6)
 text field for D.

JTextField IvedW = new JTextField(6)
 text field for W.

JTextField IvedLambda = new JTextField(6)
 text field for lambda.

JLabel JLabel0 = new JLabel("Settings:", JLabel.CENTER)
JLabel JLabel1 = new JLabel("Number of time stages:",JLabel.RIGHT)
JLabel JLabel2 = new JLabel("Retail price of one RAM unit:",JLabel.RIGHT)
JLabel JLabel3 = new JLabel("Wholesale price of one RAM unit:",JLabel.RIGHT)
JLabel JLabel4 = new JLabel("Loss due to short supply:",JLabel.RIGHT)
JLabel JLabel5 = new JLabel("Warehouse size in RAM units:",JLabel.RIGHT)
JLabel JLabel6 = new JLabel("Maximal RAM demand:",JLabel.RIGHT)
JLabel JLabel7 = new JLabel("Expected RAM demand:",JLabel.RIGHT)
JCheckBox Rodytid = new JCheckBox("Show optimal supply chart", false)
 this CheckBox indicates whether to show optimal supply chart.

JCheckBox Rodytiu = new JCheckBox("Show maximal utility chart", false)
 this CheckBox indicates whether to show maximal utility chart.

UtilGraphListener util_changer
 event listener for Rodytiu.

DGraphListener d_changer
 event listener for Rodytid.

Action actioner = new Action()
 event listener for calc and stop.

GridBagLayout gridbag = new GridBagLayout()
 layout manager for applet.

GridBagConstraints c = new GridBagConstraints()
 constraints for gridbag.

InputPanel inputs = new InputPanel()
 text fields for changing default values are placed on this panel.

ControlPanel controls
 \calc , \stop , Rodytiu and Rodytid are placed on this panel.

ExpertPanel expert
 panel for "expert".

JProgressBar bar = new JProgressBar(JProgressBar.HORIZONTAL)
 progress bar.

Thread thread
 when calc is pressed, this thread is activated. It builds optimization tables.

boolean running
 indicates whether thread is running.

boolean data_ready
 indicates whether optimization tables have been built.


Member Function Documentation

int JApplet1::getQ ( )
 

warehouse size.

void JApplet1::init ( )
 

It is responsible for data initialization and component layout.


The documentation for this class was generated from the following file:
Generated at Mon May 28 15:13:56 2001 by Giedrius Paulikas & Emilis Štuopys, © 2001