Class DRE_Rslt
java.lang.Object
|
+----java.awt.Component
|
+----java.awt.Container
|
+----java.awt.Panel
|
+----java.applet.Applet
|
+----DRE_Rslt
- public class DRE_Rslt
- extends Applet
- implements ActionListener
The main class of the DRE_Rslt applet.
-
calcResultsArea
- TextArea that is used to display results of the calculation or status.
-
colors
- Array that contains colors that is used when a color selection is made from the pop-up menu.
-
iMemSize
- Preset size of the memory use in recalling the previous DRE Calculations.
-
lightBlue
- User-defined color to match the colorscheme in the Data area of the HTML page.
-
menu
- Name of the pop-up menu.
-
menuNames
- Array that contain items that are present when the pop-up menu is invoked.
-
numColors
- Preset qty of colors that is available in changing the background of the applet.
-
numErrAfter
- Input (E2 = faults after project/activity is finished) from HTML page.
-
numErrBefore
- Input (E1 = faults during project/activity) from HTML page.
-
numSubmitted
- Variable to check applet has just been created if value is zero.
-
projectName
- Input from the HTML page the describes the project/activity.
-
vDREMemory
- Vector used to contain various objects with corresponding DRE data.
-
DRE_Rslt()
-
-
actionPerformed(ActionEvent)
- Interpret command from pop-up menu based on the index value of the item
selected.
-
clearContents()
- Method that clears the calcResultsArea TextArea contents.
-
computeDRE(float, float)
- Method that computes the DRE value based on the data passed by showResults().
-
createPopUpMenu()
- Method that is called to create the pop-up menu.
-
findIndex(String)
- Method that finds the equivalent index of the command from menuNames array based on
the string passed during the mouse event (selection from pop-up menu).
-
getVal(String, int, int)
- Method that is called from the HTML document.
-
init()
- Method that is called to initialize layout when applet is created.
-
noResults()
- Method that is called when there's no useful information that can be displayed in
the calcResulsArea TextArea by displaying a " No info..." message.
-
processMouseEvent(MouseEvent)
- Method that is called to process a mouse event.
-
showResults(String, int, int)
- Show calculation results in calcResultsArea TextArea.
-
storeData()
- Save the current data from the HTML in memory, i.e., in memObject, which is then
stored in Vector vDREMemory.
projectName
private String projectName
- Input from the HTML page the describes the project/activity.
numErrBefore
private int numErrBefore
- Input (E1 = faults during project/activity) from HTML page.
numErrAfter
private int numErrAfter
- Input (E2 = faults after project/activity is finished) from HTML page.
numSubmitted
private int numSubmitted
- Variable to check applet has just been created if value is zero.
iMemSize
private int iMemSize
- Preset size of the memory use in recalling the previous DRE Calculations.
vDREMemory
private Vector vDREMemory
- Vector used to contain various objects with corresponding DRE data.
calcResultsArea
private TextArea calcResultsArea
- TextArea that is used to display results of the calculation or status.
numColors
private int numColors
- Preset qty of colors that is available in changing the background of the applet.
menuNames
private String menuNames[]
- Array that contain items that are present when the pop-up menu is invoked.
lightBlue
private Color lightBlue
- User-defined color to match the colorscheme in the Data area of the HTML page.
colors
private Color colors[]
- Array that contains colors that is used when a color selection is made from the pop-up menu.
menu
private PopupMenu menu
- Name of the pop-up menu.
DRE_Rslt
public DRE_Rslt()
init
public void init()
- Method that is called to initialize layout when applet is created.
- Overrides:
- init in class Applet
getVal
public void getVal(String desc1,
int val1,
int val2)
- Method that is called from the HTML document.
- Parameters:
- desc1 - Input from the HTML page the describes the project/activity.
- val1 - Input (E1 = faults during project/activity) from HTML page.
- val2 - Input (E2 = faults after project/activity is finished) from HTML page.
storeData
private void storeData()
- Save the current data from the HTML in memory, i.e., in memObject, which is then
stored in Vector vDREMemory.
showResults
private void showResults(String pName,
int err1,
int err2)
- Show calculation results in calcResultsArea TextArea.
- Parameters:
- pName - Input description of the project or activity.
- err1 - Input E1, which is the qty of discovered faults within project/activity.
- err2 - Input E2, which is the qty of discovered faullts after project/activity is finished.
computeDRE
private float computeDRE(float errBefore,
float errAfter)
- Method that computes the DRE value based on the data passed by showResults().
- Parameters:
- errBefore - Input E1, which is the qty of discovered faults within project/activity.
- errAfter - Input E2, which is the qty of discovered faullts after project/activity is finished.
- Returns:
- The Defect Removal Efficiency of a certain project/activity.
createPopUpMenu
private void createPopUpMenu()
- Method that is called to create the pop-up menu.
processMouseEvent
public void processMouseEvent(MouseEvent event)
- Method that is called to process a mouse event.
- Overrides:
- processMouseEvent in class Component
actionPerformed
public void actionPerformed(ActionEvent event)
- Interpret command from pop-up menu based on the index value of the item
selected.
findIndex
private int findIndex(String itemName)
- Method that finds the equivalent index of the command from menuNames array based on
the string passed during the mouse event (selection from pop-up menu).
- Parameters:
- itemName - String returned from the pop-up menu by a mouse event.
- Returns:
- The index of the item in the menuNames array.
clearContents
private void clearContents()
- Method that clears the calcResultsArea TextArea contents.
noResults
public void noResults()
- Method that is called when there's no useful information that can be displayed in
the calcResulsArea TextArea by displaying a " No info..." message.