All Packages Class Hierarchy This Package Previous Next Index
Class MyPackage.MyApplet
java.lang.Object
|
+----java.awt.Component
|
+----java.awt.Container
|
+----java.awt.Panel
|
+----java.applet.Applet
|
+----MyPackage.MyApplet
- public class MyApplet
- extends Applet
This class implements the Graphical User Interface and the function to
perform the various operation
- Version:
- 1.0
- Author:
- Vicky Shiv
-
arandom
- Varible for the Randon number
-
b_reload
- Awt Componet Button for Reloading the number
-
b_return
- Awt Componet Button for Closing the Applet
-
b_start
- Awt Componet Button for Starting the Execution of the Thread
-
choicemode
- Awt Componet Choice of the Mode
-
choicethread
- Awt Componet Choice of the number of Thread
-
currentpos
- Varible for the Current Postion being executed by Thread
-
firsttextfield
- Awt Componet TextField for storing first Vector
-
firsttime
- Awt Componet TextField for storing Synchronous Time
-
l_async
- Awt Componet Label for Asynchronous Time
-
l_first
- Awt Componet Label for first Vector
-
l_mode
- Awt Componet Label for the Mode
-
l_output
- Awt Componet Label for output Vector
-
l_product
- Awt Componet Label for Scalar Product
-
l_second
- Awt Componet Label for second Vector
-
l_sync
- Awt Componet Label for Synchronous Time
-
l_thread
- Awt Componet Label for the Thread
-
mstring
- Variable to store the mode of execution
-
outputtextfield
- Awt Componet TextField for storing output Vector
-
scalarproduct
- Varible for the Storing Scalar Product in Synchronous mode
-
secondtextfield
- Awt Componet TextField for storing second Vector
-
secondtime
- Awt Componet TextField for storing Asynchronous Time
-
tf_scalarproduct
- Awt Componet TextField for scalar Product
-
tstring
- Varible to Store the no of Threads
-
MyApplet()
-
-
b_reload_MousePress(MouseEvent)
- A Method for the MouseAdapater.
-
b_return_MousePress(MouseEvent)
- A Method for the MouseAdapater.
-
b_start_MousePress(MouseEvent)
- A Method for the MouseAdapater.
-
CalculateProduct(Color)
- This Function will Calculate the Product of two Vector field.
-
GenerateColor(int)
- This will assign a unique color to the each Thread
-
init()
- This Function Initalized the Applet
choicemode
private Choice choicemode
- Awt Componet Choice of the Mode
choicethread
private Choice choicethread
- Awt Componet Choice of the number of Thread
l_thread
private Label l_thread
- Awt Componet Label for the Thread
l_mode
private Label l_mode
- Awt Componet Label for the Mode
b_reload
public Button b_reload
- Awt Componet Button for Reloading the number
b_return
public Button b_return
- Awt Componet Button for Closing the Applet
b_start
public Button b_start
- Awt Componet Button for Starting the Execution of the Thread
firsttextfield
private TextField firsttextfield[]
- Awt Componet TextField for storing first Vector
secondtextfield
private TextField secondtextfield[]
- Awt Componet TextField for storing second Vector
outputtextfield
private TextField outputtextfield[]
- Awt Componet TextField for storing output Vector
firsttime
private TextField firsttime[]
- Awt Componet TextField for storing Synchronous Time
secondtime
private TextField secondtime[]
- Awt Componet TextField for storing Asynchronous Time
l_first
private Label l_first
- Awt Componet Label for first Vector
l_second
private Label l_second
- Awt Componet Label for second Vector
l_output
private Label l_output
- Awt Componet Label for output Vector
l_sync
private Label l_sync
- Awt Componet Label for Synchronous Time
l_async
private Label l_async
- Awt Componet Label for Asynchronous Time
tf_scalarproduct
private TextField tf_scalarproduct
- Awt Componet TextField for scalar Product
l_product
private Label l_product
- Awt Componet Label for Scalar Product
arandom
private Random arandom
- Varible for the Randon number
tstring
private String tstring
- Varible to Store the no of Threads
mstring
private String mstring
- Variable to store the mode of execution
currentpos
private static int currentpos
- Varible for the Current Postion being executed by Thread
scalarproduct
private int scalarproduct
- Varible for the Storing Scalar Product in Synchronous mode
MyApplet
public MyApplet()
init
public void init()
- This Function Initalized the Applet
- Overrides:
- init in class Applet
b_start_MousePress
public void b_start_MousePress(MouseEvent event)
- A Method for the MouseAdapater. Invoke When user
Pressed the Start Button
b_reload_MousePress
public void b_reload_MousePress(MouseEvent event)
- A Method for the MouseAdapater. Invoke When user
Pressed the Load Button
b_return_MousePress
void b_return_MousePress(MouseEvent event)
- A Method for the MouseAdapater. Invoke When user
Pressed the Return Button
CalculateProduct
public synchronized boolean CalculateProduct(Color c)
- This Function will Calculate the Product of two Vector field.
Only one thread at a time can enter this Function
- Parameters:
- Color - Specific Color assign to each thread
- Returns:
- boolean It will return true if all the Vector field are not Calculated
else return False
GenerateColor
public Color GenerateColor(int i)
- This will assign a unique color to the each Thread
- Parameters:
- integer - the no value represented by thread
- Returns:
- Color Unique Color assign to the Thread
All Packages Class Hierarchy This Package Previous Next Index