IcanGui
Class GuiIcanDataPlotImpact

java.lang.Object
  extended by IcanGui.GuiHierarchy
      extended by IcanGui.GuiWindow
          extended by IcanGui.GuiIcanDataPlotImpact
All Implemented Interfaces:
java.awt.event.ActionListener, java.awt.event.ItemListener, java.awt.event.KeyListener, java.util.EventListener

public class GuiIcanDataPlotImpact
extends GuiWindow
implements java.awt.event.ActionListener, java.awt.event.ItemListener, java.awt.event.KeyListener

Encapsulate the behavior of GUI for ICAN/JAVA data entry of plot data for Impact Variables.

Since:
1.0;
Version:
1.1.5;
Updated by Louis Handler on Jul 13, 2005, 07:42 EDT (1.1.5).
Updated by Louis Handler on Dec 8, 2003, 14:37 EST.
Updated by Louis Handler on Sep 15, 2003, 15:42 EDT.
Updated by Louis Handler on Sep 15, 2003, 11:06 EDT.
Updated by Louis Handler on Aug 27, 2002, 10:41 EDT.
Updated by Louis Handler on Aug 27, 2002, 09:32 EDT.
Updated by Louis Handler on Aug 26, 2002, 11:42 EDT.
Updated by Louis Handler on Dec 20, 2000, 10:34 EST.
Updated by Louis Handler on Nov 21, 2000, 15:50 EST.
Updated by Louis Handler on Sep 27, 2000, 15:24 EDT.
Updated by Louis Handler on Aug 29, 2000, 11:16 EDT.
Updated by Louis Handler on Mar 13, 2000, 10:27 EST.
Updated by Louis Handler on Feb 25, 2000, 15:09 EST.
Updated by Louis Handler on Feb 17, 2000, 15:06 EST.
Author:
Louis Handler
See Also:
GuiWindow

Nested Class Summary
(package private)  class GuiIcanDataPlotImpact.Madapter
          Mouse Adapter Inner Class
 
Field Summary
private static java.lang.String[] buttonLabels
          Labels to display on action buttons.
private  java.awt.Button[] buttons
          Action buttons.
private  java.awt.Checkbox[] cPlotIVX
          Array of Checkboxes corresponding to each X plot variable.
private  java.awt.Checkbox[] cPlotIVY
          Array of Checkboxes corresponding to each Y plot variable.
private  IcanDataSet data
          ICAN/JAVA data set.
private  boolean firstRun
          Variable to test for the first time the frame is displayed.
private  java.awt.GridBagConstraints gbc
          GridBag Layout constraints.
private  java.awt.GridBagLayout gbl
          GridBag Layout manager.
private  PlotPanel gPlotPanel
          Plot Panel used for plotting and printing.
private static int iCancel
          Cancel Button will exit this screen discarding any data entered.
private static int iClear
          Clear Button will clear all checkboxes, discarding any data entered.
private static int iExit
          Exit Button will exit the entire program.
private static int iHelp
          Help Button will display a set of information.
private static java.lang.String[] impactVariables
          Descriptions of Impact variables available to plot.
private static int iPlot
          Plot Button will verify the data and complete the processing of plotting the Impact data.
private  java.awt.Label[] lPlotIVn
          Array of Labels corresponding to each plot variable.
private  java.awt.Label[] lPlotIVs
          Array of Labels corresponding to each plot variable.
private static int nButtons
          Number of action buttons.
private static int nIVs
          Number of Impact variables available to plot.
private  int nIVX
          Number of X variables in plot.
private  int nIVY
          Number of Y variables in plot.
private  int nvs
          Number of velocities for which Impact data is computed/plotted.
private  java.awt.Panel panelFrame
          The Panel that contains the data to be displayed within a scrolling frame.
private  GuiIcanPlotFrame plotWindowFrame
          Plot window.
private  java.awt.Component saveCompFocus
          Component to set focus to.
private  java.awt.ScrollPane scrollFrame
          The scrolling frame in which the data is displayed.
private  int theIVX
          Subscripts of X variables in plot.
private  int theIVY
          Subscripts of X variables in plot.
private  java.awt.Label theTitle
          Label containing the description/title of the ICAN/JAVA run.
 
Fields inherited from class IcanGui.GuiWindow
frameTitle, whatAmI, windowFrame
 
Fields inherited from class IcanGui.GuiHierarchy
IDO_ICAN_DATA, IDO_ICAN_DATA_BOOLEANS, IDO_ICAN_DATA_DAMPING, IDO_ICAN_DATA_IMPACT, IDO_ICAN_DATA_LOADS, IDO_ICAN_DATA_MATERIAL, IDO_ICAN_DATA_OUTPUTS, IDO_ICAN_DATA_PLOT_IMPACT, IDO_ICAN_DATA_PLOTPL, IDO_ICAN_DATA_PLY, IDO_ICAN_DATA_PROCESS, IDO_ICAN_DATA_REACTION, IDO_ICAN_DATA_SLICE, IDO_ICAN_DATA_SLICE_TABLE, IDO_ICAN_DATA_VVI, IDO_ICAN_DATA_VVR, IDO_ICAN_ELECTRICAL_CYCLIC_LOADS, IDO_ICAN_ELECTRICAL_STATIC_LOADS, IDO_ICAN_EXPERT, IDO_ICAN_HYGRAL_CYCLIC_LOADS, IDO_ICAN_HYGRAL_STATIC_LOADS, IDO_ICAN_MECH_CYCLIC_LOADS, IDO_ICAN_MECH_STATIC_DISPLACEMENTS, IDO_ICAN_MECH_STATIC_LOADS, IDO_ICAN_MORE_LOADS, IDO_ICAN_PROMPT, IDO_ICAN_RATE_LOADS, IDO_ICAN_THERMAL_CYCLIC_LOADS, IDO_ICAN_THERMAL_STATIC_LOADS, IDO_MAIN, IDO_MDB_DATA_MFIM, IDO_MDB_DATA_START, IDO_MDB_PROMPT, IDO_MSG_DATA, NDO
 
Constructor Summary
GuiIcanDataPlotImpact()
          Constructor creates window to display buttons and checkboxes.
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent evt)
          Detect an Action Event and Handle it accordingly.
 void changeGuiUnits()
          Change units on GUI for this class.
private  boolean checkPlotIV()
          Test whether to create plot.
private  void doPlotIV()
          Plot the impact data.
 void fixCheckboxes(java.awt.Checkbox checkBox)
          Determine which Checkbox was chosen, whether it was set on or off, and process accordingly.
 java.lang.String getName()
          Get class name.
 void helpMe()
          Display help message.
 void helpMe(java.awt.Component target)
          Display help message for a specified component.
protected  void initMe()
          Create window to display buttons and checkboxes.
 void itemStateChanged(java.awt.event.ItemEvent evt)
          Determine which Checkbox was chosen and process accordingly.
 void keyPressed(java.awt.event.KeyEvent evt)
          Process up/down arrow keys so that they do not work twice.
 void keyReleased(java.awt.event.KeyEvent evt)
          Detects when the following keys are released Tab, up arrow, down arrow, enter, shift+tab, alt+right, alt+left, F1
 void keyTyped(java.awt.event.KeyEvent evt)
          Does Nothing
 void presetData()
          Set title from ICAN/JAVA data.
 void setCompFocus()
          Set focus to some component.
 void setCompFocus(java.awt.Component cFocus)
          Set focus in current class/frame.
 
Methods inherited from class IcanGui.GuiWindow
addGB, askExit, askQuestion, showMessageInfo
 
Methods inherited from class IcanGui.GuiHierarchy
changeAllGuiUnits, exitGui, getCurrent, getFrame, getFrame, getGuiWindowClass, getGuiWindowClass, hideMe, initHierarchy, setCurrent, setNextUp, showMe
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

data

private IcanDataSet data
ICAN/JAVA data set.


nvs

private int nvs
Number of velocities for which Impact data is computed/plotted.


gbl

private java.awt.GridBagLayout gbl
GridBag Layout manager.


gbc

private java.awt.GridBagConstraints gbc
GridBag Layout constraints.


theTitle

private java.awt.Label theTitle
Label containing the description/title of the ICAN/JAVA run.


buttonLabels

private static final java.lang.String[] buttonLabels
Labels to display on action buttons.


iPlot

private static final int iPlot
Plot Button will verify the data and complete the processing of plotting the Impact data.

See Also:
Constant Field Values

iCancel

private static final int iCancel
Cancel Button will exit this screen discarding any data entered.

See Also:
Constant Field Values

iClear

private static final int iClear
Clear Button will clear all checkboxes, discarding any data entered.

See Also:
Constant Field Values

iExit

private static final int iExit
Exit Button will exit the entire program. To exit just this screen, see Cancel.

See Also:
Constant Field Values

iHelp

private static final int iHelp
Help Button will display a set of information.

See Also:
Constant Field Values

nButtons

private static final int nButtons
Number of action buttons.


buttons

private java.awt.Button[] buttons
Action buttons.


impactVariables

private static final java.lang.String[] impactVariables
Descriptions of Impact variables available to plot.


nIVs

private static final int nIVs
Number of Impact variables available to plot.


cPlotIVX

private java.awt.Checkbox[] cPlotIVX
Array of Checkboxes corresponding to each X plot variable.


cPlotIVY

private java.awt.Checkbox[] cPlotIVY
Array of Checkboxes corresponding to each Y plot variable.


lPlotIVn

private java.awt.Label[] lPlotIVn
Array of Labels corresponding to each plot variable. Label is separated from the corresponding checkbox so that the Label can be left justified.


lPlotIVs

private java.awt.Label[] lPlotIVs
Array of Labels corresponding to each plot variable. Label is separated from the corresponding checkbox so that the Label can be left justified.


theIVX

private int theIVX
Subscripts of X variables in plot.


theIVY

private int theIVY
Subscripts of X variables in plot.


nIVX

private int nIVX
Number of X variables in plot.


nIVY

private int nIVY
Number of Y variables in plot.


plotWindowFrame

private GuiIcanPlotFrame plotWindowFrame
Plot window.


gPlotPanel

private PlotPanel gPlotPanel
Plot Panel used for plotting and printing.


scrollFrame

private java.awt.ScrollPane scrollFrame
The scrolling frame in which the data is displayed.


panelFrame

private java.awt.Panel panelFrame
The Panel that contains the data to be displayed within a scrolling frame.


firstRun

private boolean firstRun
Variable to test for the first time the frame is displayed. Used to set focus on entry.


saveCompFocus

private java.awt.Component saveCompFocus
Component to set focus to.

Constructor Detail

GuiIcanDataPlotImpact

public GuiIcanDataPlotImpact()
Constructor creates window to display buttons and checkboxes.

Method Detail

initMe

protected void initMe()
Create window to display buttons and checkboxes.

Specified by:
initMe in class GuiWindow

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent evt)
Detect an Action Event and Handle it accordingly.

Specified by:
actionPerformed in interface java.awt.event.ActionListener
Parameters:
evt - Action event.

keyPressed

public void keyPressed(java.awt.event.KeyEvent evt)
Process up/down arrow keys so that they do not work twice. It often alternates between keyPressed and keyReleased each time the up/down arrow key is pressed. Furthermore, it will begin repeating this alternating pattern if the key is held down.

Specified by:
keyPressed in interface java.awt.event.KeyListener
Parameters:
evt - Key event.

keyTyped

public void keyTyped(java.awt.event.KeyEvent evt)
Does Nothing

Specified by:
keyTyped in interface java.awt.event.KeyListener
Parameters:
evt - Key event.

keyReleased

public void keyReleased(java.awt.event.KeyEvent evt)
Detects when the following keys are released Tab, up arrow, down arrow, enter, shift+tab, alt+right, alt+left, F1

Specified by:
keyReleased in interface java.awt.event.KeyListener
Parameters:
evt - Key event.

itemStateChanged

public void itemStateChanged(java.awt.event.ItemEvent evt)
Determine which Checkbox was chosen and process accordingly.

Specified by:
itemStateChanged in interface java.awt.event.ItemListener
Parameters:
evt - Item event.

fixCheckboxes

public void fixCheckboxes(java.awt.Checkbox checkBox)
Determine which Checkbox was chosen, whether it was set on or off, and process accordingly.

Parameters:
checkBox - The CheckBox that was changed.

helpMe

public void helpMe()
Display help message.


helpMe

public void helpMe(java.awt.Component target)
Display help message for a specified component.

Specified by:
helpMe in class GuiWindow
Parameters:
target - Component for which help is desired.

presetData

public void presetData()
Set title from ICAN/JAVA data.

Specified by:
presetData in class GuiWindow

setCompFocus

public void setCompFocus()
Set focus to some component. Normally used when entering this screen after show()/setVisible(true).

Specified by:
setCompFocus in class GuiHierarchy

setCompFocus

public void setCompFocus(java.awt.Component cFocus)
Set focus in current class/frame.

Specified by:
setCompFocus in class GuiHierarchy
Parameters:
cFocus - Component to save to reset later.

checkPlotIV

private boolean checkPlotIV()
Test whether to create plot.

Returns:
True, if PlotIV are valid; else, false.

doPlotIV

private void doPlotIV()
Plot the impact data.


changeGuiUnits

public void changeGuiUnits()
Change units on GUI for this class. Invoked when user changes units.

Specified by:
changeGuiUnits in class GuiWindow

getName

public java.lang.String getName()
Get class name.

Specified by:
getName in class GuiWindow
Returns:
Class name.