IcanGui
Class GuiMdbPrompt

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

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

Prompt whether to read the Material DataBank data from a file or enter it on-line.

Since:
1.0;
Version:
1.1.14;
Updated by Louis Handler on Jan 4, 2007, 07:50 EST (1.1.14).
Updated by Louis Handler on Oct 11, 2005, 08:14 EDT (1.1.6).
Updated by Louis Handler on Oct 23, 2002, 14:42 EDT.
Updated by Louis Handler on Aug 30, 2002, 10:34 EDT.
Updated by Louis Handler on Jul 27, 2000, 13:53 EDT.
Updated by Louis Handler on Mar 29, 2000, 11:37 EST.
Updated by Louis Handler on Feb 22, 2000, 15:19 EST.
Updated by Louis Handler on Dec 3, 1999, 10:16 EST.
Updated by Louis Handler on Dec 9, 1998, 16:12 EST.
Updated by Louis Handler on Dec 1, 1998, 09:30 EST.
Updated by Louis Handler on Nov 23, 1998, 10:41 EST.
Updated by Louis Handler on Aug 10, 1998, 09:34 EDT.
Updated by Matthew Der on Jul 10, 1998.
Updated by Matthew Der on Jun 24, 1998.
Updated by Louis Handler on Jun 18, 1998.
Author:
Louis Handler
See Also:
GuiWindow

Nested Class Summary
(package private)  class GuiMdbPrompt.Madapter
          Mouse Adapter Inner Class
 
Field Summary
private  java.awt.Button bMdbRead
          Button to read Standard Material DataBank from Web server file.
private  java.awt.Button bMdbReadmy
          Button to read my Material DataBank File from Web server file.
private  java.awt.Button[] bMdbType
          Button used to enter Data for Material DataBank, using appropriate interactive form, one Button per material type.
private static java.lang.String[] buttonLabels
          Labels to display on action buttons.
private  java.awt.Button[] buttons
          Buttons corresponding to Labels in button table.
private  boolean firstRun
          Variable to test for the first time the frame is displayed.
private static int iAccept
          Subscript in button table for Accept Button used to verify the data and complete the processing of ICAN/JAVA data.
private static int iExit
          Subscript in button table for Exit Button used to exit the entire program.
private static int iHelp
          Subscript in button table for Help Button used to display this set of information.
private static int iSave
          Subscript in button table for Save Button used to save Material DataBank data to Web server file.
private  MaterialDataBankSet mdb
          Material DataBank data set.
private static int nButtons
          Number of items/buttons in button table.
private  int nMdbTypes
          Number of Material DataBank data types, including fiber, matrix, particle, etc.
private  java.awt.Component saveCompFocus
          Component to set focus to.
private  MaterialDataBankItem thisMdbi
          Material DataBank data item.
private  MultiFactorInteractionModel thisMFIM
          Material DataBank data item property MFIM.
private  MaterialProperty thisProp
          Material DataBank data item property.
 
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
GuiMdbPrompt()
          Constructor creates window to display buttons to control operation of Material DataBank entry.
 
Method Summary
 boolean acceptMdb()
          Check whether Material DataBank is valid.
 void actionPerformed(java.awt.event.ActionEvent evt)
          Detects an Action Event and handles it accordingly
 void changeGuiUnits()
          Change units on GUI for this class.
private  java.lang.String getMdbFileName()
          Display file dialog and get Material DataBank input data filename.
 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 to control operation of Material DataBank entry.
 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 and other ICAN/JAVA data.
 boolean saveMdb()
          Save Material DataBank data into a file.
 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

mdb

private MaterialDataBankSet mdb
Material DataBank data set.


thisMdbi

private MaterialDataBankItem thisMdbi
Material DataBank data item.


thisProp

private MaterialProperty thisProp
Material DataBank data item property.


thisMFIM

private MultiFactorInteractionModel thisMFIM
Material DataBank data item property MFIM.


nMdbTypes

private int nMdbTypes
Number of Material DataBank data types, including fiber, matrix, particle, etc.


bMdbRead

private java.awt.Button bMdbRead
Button to read Standard Material DataBank from Web server file.


bMdbReadmy

private java.awt.Button bMdbReadmy
Button to read my Material DataBank File from Web server file.


bMdbType

private java.awt.Button[] bMdbType
Button used to enter Data for Material DataBank, using appropriate interactive form, one Button per material type.


buttonLabels

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


iAccept

private static final int iAccept
Subscript in button table for Accept Button used to verify the data and complete the processing of ICAN/JAVA data.

See Also:
Constant Field Values

iExit

private static final int iExit
Subscript in button table for Exit Button used to exit the entire program. To exit just this screen, see Accept.

See Also:
Constant Field Values

iHelp

private static final int iHelp
Subscript in button table for Help Button used to display this set of information.

See Also:
Constant Field Values

iSave

private static final int iSave
Subscript in button table for Save Button used to save Material DataBank data to Web server file.

See Also:
Constant Field Values

nButtons

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


buttons

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


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

GuiMdbPrompt

public GuiMdbPrompt()
Constructor creates window to display buttons to control operation of Material DataBank entry.

Method Detail

initMe

protected void initMe()
Create window to display buttons to control operation of Material DataBank entry.

Specified by:
initMe in class GuiWindow

getMdbFileName

private java.lang.String getMdbFileName()
Display file dialog and get Material DataBank input data filename.

Returns:
Material DataBank input data filename.
See Also:
FileDialog

actionPerformed

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

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

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.

saveMdb

public boolean saveMdb()
Save Material DataBank data into a file.

Returns:
True, if Material DataBank data is saved into a file; else, false.

acceptMdb

public boolean acceptMdb()
Check whether Material DataBank is valid.

Returns:
True, if Material DataBank is valid; else, false.

presetData

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

Specified by:
presetData in class GuiWindow

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.