IcanGui
Class GuiIcanData

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

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

Encapsulate the behavior of GUI for top level of ICAN/JAVA data entry. Enter a title and pick the next level of data entry.

Since:
1.0;
Version:
1.1.17;
Updated by Louis Handler on Feb 4, 2011, 11:53 EST (1.1.17).
Updated by Louis Handler on Jan 17, 2006, 10:54 EST (1.1.7).
Updated by Louis Handler on Dec 29, 2005, 10:21 EST (1.1.6).
Updated by Louis Handler on Apr 15, 2005, 15:27 EDT (1.1.0).
Updated by Louis Handler on Sep 8, 2003, 08:26 EDT.
Updated by Louis Handler on Oct 22, 2002, 08:21 EDT.
Updated by Louis Handler on Oct 21, 2002, 16:14 EDT.
Updated by Louis Handler on Oct 21, 2002, 09:22 EDT.
Updated by Louis Handler on Oct 11, 2002, 15:23 EDT.
Updated by Louis Handler on Jun 28, 2002, 09:54 EDT.
Updated by Louis Handler on Jun 28, 2002, 08:25 EDT.
Updated by Louis Handler on May 16, 2000, 07:59 EDT.
Updated by Louis Handler on Feb 22, 2000, 14:56 EST.
Updated by Louis Handler on Nov 29, 1999, 09:02 EST.
Updated by Louis Handler on Mar 23, 1999, 08:27 EST.
Updated by Louis Handler on Dec 31, 1998, 13:18 EST.
Updated by Louis Handler on Dec 14, 1998, 11:08 EST.
Updated by Louis Handler on Nov 23, 1998, 10:33 EST.
Updated by Louis Handler on Nov 2, 1998, 08:12 EST.
Updated by Louis Handler on Oct 30, 1998, 13:12 EST.
Updated by Matthew Der on Jul 10, 1998.
Updated by Louis Handler on Jul 2, 1998, 13:43 EDT.
Updated by Louis Handler on Jun 18, 1998.
Author:
Louis Handler
See Also:
GuiWindow

Nested Class Summary
(package private)  class GuiIcanData.Madapter
          Mouse Adapter Inner Class
 
Field Summary
private  java.awt.Button[] bButton
          Buttons corresponding to Labels in button table.
private static java.lang.String[] buttonLabels
          The words displayed on the buttons for each type of input data.
private  IcanDataSet data
          ICAN/JAVA data set.
private  boolean firstRun
          Variable to test for the first time the frame is displayed.
private  GuiIcanDataDamping gIDD
          Damping class instantiated and used to obtain damping data.
private  GuiIcanDataReaction gIDR
          Reaction class instantiated and used to obtain reaction data.
private  GuiIcanVoidVolumeRatios gIVVR
          Void Volume Ratio class instantiated and used to obtain void volume ratio data.
private static int iAccept
          Accept button will verify the data and complete the processing of ICAN/JAVA data.
private static int iBooleans
          Subscript in button table equals button number for booleans.
private static int iCancel
          Cancel button will erase the current data before trying to get new input data.
private static int iConstant
          Subscript in button table equals button number for Output data.
private static int iDamping
          Subscript in button table equals button number for Damping data.
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 int iImpact
          Subscript in button table equals button number for Impact data.
private static int iLoads
          Subscript in button table equals button number for Load data.
private static int iMatlSys
          Subscript in button table equals button number for Material DataBank data.
private static int iMFILoads
          Subscript in button table equals button number for MFIM Load data.
private static int iOutputs
          Subscript in button table equals button number for Output data.
private static int iPly
          Subscript in button table equals button number for Ply data.
private static int iReaction
          Subscript in button table equals button number for Reaction data.
private static int iVVR
          Subscript in button table equals button number for Void Volume Ratio data.
private  MaterialDataBankSet mdb
          Material DataBank data set.
private static int nButtons
          Number of items/buttons in button table.
private static int NHZ
          Number of buttons that are horizontal at the bottom.
private  java.awt.Color oldColorB
          Old background color used to reset highlighted background color.
private  java.awt.Color oldColorF
          Old foreground color used to reset highlighted foreground color.
private  java.awt.Component saveCompFocus
          Component to set focus to.
private  java.awt.TextField theTitle
          TextField containing the description/title of the ICAN/JAVA run.
private static java.lang.String titleMessage
          Error message display when theTitle was not filled in.
 
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
GuiIcanData()
          Constructor creates window to display buttons and text entry field.
 
Method Summary
 boolean acceptIcan()
          Check validity of ICAN/JAVA data entered.
 void actionPerformed(java.awt.event.ActionEvent evt)
          Detect an Action Event and Handle it accordingly.
 boolean anyMaterialSystemData()
          Check validity of Material System data entered.
 boolean anyPlyData()
          Check validity of Ply data entered.
 void changeGuiUnits()
          Change units on GUI for this class.
 void doConstant(int iwhc)
          Display constant chosen and allow the user to modify it.
 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 text entry field.
 void keyPressed(java.awt.event.KeyEvent evt)
          Does Nothing
 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.
 void resetColors()
          Reset colors when new data read in.
 void setAcceptColors(java.lang.String whb)
          Set colors when accept button clicked in called method.
 void setCompFocus()
          Set focus to some component.
 void setCompFocus(java.awt.Component cFocus)
          Set focus in current class/frame.
private  boolean setDataAndGo(int phase)
          If the title was entered, set it in related classes.
 int whichConstant()
          Determine which constant to obtain/modify.
 
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.


mdb

private MaterialDataBankSet mdb
Material DataBank data set.


gIDD

private GuiIcanDataDamping gIDD
Damping class instantiated and used to obtain damping data.


gIDR

private GuiIcanDataReaction gIDR
Reaction class instantiated and used to obtain reaction data.


gIVVR

private GuiIcanVoidVolumeRatios gIVVR
Void Volume Ratio class instantiated and used to obtain void volume ratio data.


theTitle

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


titleMessage

private static final java.lang.String titleMessage
Error message display when theTitle was not filled in.

See Also:
Constant Field Values

buttonLabels

private static final java.lang.String[] buttonLabels
The words displayed on the buttons for each type of input data.


NHZ

private static final int NHZ
Number of buttons that are horizontal at the bottom.

See Also:
Constant Field Values

nButtons

private static final int nButtons
Number of items/buttons in button table.


bButton

private java.awt.Button[] bButton
Buttons corresponding to Labels in button table.


iBooleans

private static final int iBooleans
Subscript in button table equals button number for booleans.

See Also:
Constant Field Values

iPly

private static final int iPly
Subscript in button table equals button number for Ply data.

See Also:
Constant Field Values

iMatlSys

private static final int iMatlSys
Subscript in button table equals button number for Material DataBank data.

See Also:
Constant Field Values

iVVR

private static final int iVVR
Subscript in button table equals button number for Void Volume Ratio data.

See Also:
Constant Field Values

iLoads

private static final int iLoads
Subscript in button table equals button number for Load data.

See Also:
Constant Field Values

iMFILoads

private static final int iMFILoads
Subscript in button table equals button number for MFIM Load data.

See Also:
Constant Field Values

iDamping

private static final int iDamping
Subscript in button table equals button number for Damping data.

See Also:
Constant Field Values

iReaction

private static final int iReaction
Subscript in button table equals button number for Reaction data.

See Also:
Constant Field Values

iImpact

private static final int iImpact
Subscript in button table equals button number for Impact data.

See Also:
Constant Field Values

iConstant

private static final int iConstant
Subscript in button table equals button number for Output data.

See Also:
Constant Field Values

iOutputs

private static final int iOutputs
Subscript in button table equals button number for Output data.

See Also:
Constant Field Values

iAccept

private static final int iAccept
Accept button will verify the data and complete the processing of ICAN/JAVA data.

See Also:
Constant Field Values

iHelp

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

See Also:
Constant Field Values

iCancel

private static final int iCancel
Cancel button will erase the current data before trying to get new input data.

See Also:
Constant Field Values

iExit

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

See Also:
Constant Field Values

oldColorB

private java.awt.Color oldColorB
Old background color used to reset highlighted background color.


oldColorF

private java.awt.Color oldColorF
Old foreground color used to reset highlighted foreground color.


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

GuiIcanData

public GuiIcanData()
Constructor creates window to display buttons and text entry field.

Method Detail

initMe

protected void initMe()
Create window to display buttons and text entry field.

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.

whichConstant

public int whichConstant()
Determine which constant to obtain/modify.

Returns:
Subscript of constant type chosen to modify.

doConstant

public void doConstant(int iwhc)
Display constant chosen and allow the user to modify it.

Parameters:
iwhc - Subscript of constant type chosen to modify.

keyPressed

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

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.

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.

setCompFocus

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

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.

presetData

public void presetData()
Set title. If ICAN/JAVA data was initialized, use it to initialize the title inputs.

Specified by:
presetData in class GuiWindow

resetColors

public void resetColors()
Reset colors when new data read in. Color is used to indicate which items were entered.


setAcceptColors

public void setAcceptColors(java.lang.String whb)
Set colors when accept button clicked in called method. Color is used to indicate which items were entered.

Parameters:
whb - Indicator of which method was called and wants its corresponding color set to highlight it. The items highlighted show the user what has been completed.

setDataAndGo

private boolean setDataAndGo(int phase)
If the title was entered, set it in related classes.

Returns:
True, if title was entered; else, false.
See Also:
GuiIcanDataBooleans.presetData(), GuiIcanDataPly.presetData(), GuiIcanDataMaterial.presetData(), GuiIcanDataLoads.presetData(), GuiIcanDataDamping.presetData(), GuiIcanDataReaction.presetData(), GuiIcanDataImpact.presetData(), GuiIcanDataOutputs.presetData(), GuiIcanDataPlotImpact.presetData(), GuiIcanDataPlotPL.presetData(), GuiIcanDataProcess.presetData(), GuiIcanDataReaction.presetData(), GuiIcanDataSlice.presetData(), GuiIcanDataSliceTable.presetData(), GuiIcanDataSubslice.presetData(), GuiIcanDataSubsliceTable.presetData(), GuiIcanElectricalCyclicLoads.presetData(), GuiIcanElectricalStaticLoads.presetData(), GuiIcanHygralCyclicLoads.presetData(), GuiIcanHygralStaticLoads.presetData(), GuiIcanMechCyclicLoads.presetData(), GuiIcanMechStaticDisplacements.presetData(), GuiIcanMechStaticLoads.presetData(), GuiIcanMoreLoads.presetData(), GuiIcanRateLoads.presetData(), GuiIcanThermalCyclicLoads.presetData(), GuiIcanThermalStaticLoads.presetData()

anyPlyData

public boolean anyPlyData()
Check validity of Ply data entered.

Returns:
True, if ICAN/JAVA Ply data is valid.

anyMaterialSystemData

public boolean anyMaterialSystemData()
Check validity of Material System data entered.

Returns:
True, if ICAN/JAVA Material System data is valid.

acceptIcan

public boolean acceptIcan()
Check validity of ICAN/JAVA data entered.

Returns:
True, if ICAN/JAVA data is valid.

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.