IcanGui
Class GuiMdbDataMfim

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

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

Encapsulate the behavior of the Material DataBank Multi-Factor Interaction Model (MFIM) data entry.

Since:
1.0;
Version:
1.1.6;
Updated by Louis Handler on Oct 27, 2005, 07:51 EDT (1.1.6).
Updated by Louis Handler on Jul 19, 2005, 07:35 EDT (1.1.5).
Updated by Louis Handler on Mar 25, 2005, 10:33 EST (1.1.0).
Updated by Louis Handler on Apr 13, 2004, 10:45 EDT.
Updated by Louis Handler on Apr 12, 2004, 08:35 EDT.
Updated by Louis Handler on Apr 9, 2004, 13:25 EDT.
Updated by Louis Handler on Apr 9, 2004, 08:54 EDT.
Updated by Louis Handler on Apr 8, 2004, 07:57 EDT.
Updated by Louis Handler on Apr 7, 2004, 16:02 EDT.
Updated by Louis Handler on Oct 15, 2002, 12:33 EDT.
Updated by Louis Handler on Sep 30, 2002, 13:22 EDT.
Updated by Louis Handler on Jul 2, 2002, 15:56 EDT.
Updated by Louis Handler on Jul 2, 2002, 09:27 EDT.
Updated by Louis Handler on Jul 2, 2002, 09:25 EDT.
Updated by Louis Handler on Jul 2, 2002, 09:19 EDT.
Updated by Louis Handler on May 9, 2000, 11:45 EDT.
Updated by Louis Handler on Mar 28, 2000, 13:35 EST.
Updated by Louis Handler on Feb 22, 2000, 15:19 EST.
Updated by Louis Handler on Nov 22, 1999, 09:08 EST.
Updated by Louis Handler on Mar 22, 1999, 14:11 EST.
Updated by Louis Handler on Nov 23, 1998, 10:41 EST.
Updated by Louis Handler on Aug 18, 1998, 07:59 EDT.
Updated by Matthew Der on Jul 20, 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 GuiMdbDataMfim.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.Label descript
          Label containing short DataBank material description to which these MFIM factors apply.
private  java.awt.Label[] factorLabels
          Array of MFIM labels containing description and units.
private  java.lang.String[][] fieldLabelsMFIM
          Field labels displayed at the top of the window on two lines.
private  boolean firstRun
          Variable to test for the first time the frame is displayed.
private  java.awt.GridBagConstraints gbc
          GridBag constraints.
private  java.awt.GridBagLayout gbl
          GridBag Layout manager.
private static int iAccept
          Accept Button will verify the data and complete the processing of this Material DataBank MultiFactor Interaction Model (MFIM) data.
private static int iCancel
          Cancel Button will ignore any data entered on this form.
private static int iClear
          Clear Button will clear (set to blank) any data entered on this form.
private static int iExit
          Exit Button will exit the entire program.
private  int iFocusl
          Index of TextField With Focus
private  int iFocusw
          Index of TextField With Focus
private static int iHelp
          Help Button will display this set of information.
private  boolean lastCancel
          True, if cancel button was clicked and no data from this screen is to be used.
private  java.awt.Label matlCode
          Label containing DataBank material code to which these MFIM factors apply.
private static int maxnExps
          Maximum number of different Multi-Factor Interaction Model (MFIM) exponents.
private static int maxnFields
          Maximum number of Multi-Factor Interaction Model (MFIM) text fields per factor.
private static int nButtons
          Number of action buttons.
private  java.awt.Button[] nextButton
          Skip to next buttons.
private static int nFACTORS
          Number of different Multi-Factor Interaction Model (MFIM) factors.
private static java.lang.String[] notes
          Array of Strings containing a description of how the Multi-Factor Interaction Model factors are used.
private  java.awt.Panel panelFrame
          The Panel that contains the data to be displayed within a scrolling frame.
private  java.awt.Panel panelMdbMfim
          Panel containing the Multi-Factor Interaction Model factors.
private  java.awt.Panel panelMdbMfim2
          Panel containing a description of how the Multi-Factor Interaction Model factors are used.
private  java.awt.Button[] prevButton
          Skip to previous buttons.
private  java.awt.Label propCode
          Label containing DataBank material property code to which these MFIM factors apply.
private  java.lang.String propDirection
          Direction specified for property.
private  java.awt.Label property
          Label containing DataBank material property description to which these MFIM factors apply.
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  MultiFactorInteractionModel[] thisMFIM
          Array of MFIM factors.
private  java.awt.TextField[][] tin
          Array of TextFields in which to input the MFIM factors.
 
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
GuiMdbDataMfim()
          Constructor creates window to display buttons and text entry fields.
 
Method Summary
private  boolean acceptMFIM()
          Check whether Multi-Factor Interaction Model (MFIM) data is valid.
 void actionPerformed(java.awt.event.ActionEvent evt)
          Detect Action Events and process accordingly.
 void changeGuiUnits()
          Change units on GUI for this class.
private  void clearMe()
          Clear all text fields.
 void focusGained(java.awt.event.FocusEvent evt)
          Does Nothing
 void focusLost(java.awt.event.FocusEvent evt)
          Does Nothing
 MultiFactorInteractionModel[] getMFIM()
          Return array containing valid Multi-Factor Interaction Model (MFIM) data.
 int getMFIMsize()
          Return number of valid Multi-Factor Interaction Model (MFIM) data items.
 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 fields.
 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.
 void setCompFocus()
          Set focus to some component.
 void setCompFocus(java.awt.Component cFocus)
          Set focus in current class/frame.
 void setMfimValues(MultiFactorInteractionModel[] theMfim)
          Set MFIM values.
 void setProperties(java.lang.String matl, java.lang.String descr, java.lang.String propcd, java.lang.String propty)
          Set material and Fiber or Particle or Matrix or Binder property descriptions
 
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

panelMdbMfim

private java.awt.Panel panelMdbMfim
Panel containing the Multi-Factor Interaction Model factors.


panelMdbMfim2

private java.awt.Panel panelMdbMfim2
Panel containing a description of how the Multi-Factor Interaction Model factors are used. This is displayed at the bottom of the form so that the user may easily scroll down to see it.


gbl

private java.awt.GridBagLayout gbl
GridBag Layout manager.


gbc

private java.awt.GridBagConstraints gbc
GridBag constraints.


matlCode

private java.awt.Label matlCode
Label containing DataBank material code to which these MFIM factors apply.


descript

private java.awt.Label descript
Label containing short DataBank material description to which these MFIM factors apply.


propCode

private java.awt.Label propCode
Label containing DataBank material property code to which these MFIM factors apply.


property

private java.awt.Label property
Label containing DataBank material property description to which these MFIM factors apply.


propDirection

private java.lang.String propDirection
Direction specified for property. Null if no direction specified.


iAccept

private static final int iAccept
Accept Button will verify the data and complete the processing of this Material DataBank MultiFactor Interaction Model (MFIM) data.

See Also:
Constant Field Values

iCancel

private static final int iCancel
Cancel Button will ignore any data entered on this form.

See Also:
Constant Field Values

iClear

private static final int iClear
Clear Button will clear (set to blank) any data entered on this form.

See Also:
Constant Field Values

iHelp

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

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 or Cancel.

See Also:
Constant Field Values

buttonLabels

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


nButtons

private static final int nButtons
Number of action buttons.


buttons

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


prevButton

private java.awt.Button[] prevButton
Skip to previous buttons.


nextButton

private java.awt.Button[] nextButton
Skip to next buttons.


lastCancel

private boolean lastCancel
True, if cancel button was clicked and no data from this screen is to be used.


nFACTORS

private static final int nFACTORS
Number of different Multi-Factor Interaction Model (MFIM) factors.


maxnExps

private static final int maxnExps
Maximum number of different Multi-Factor Interaction Model (MFIM) exponents.


maxnFields

private static final int maxnFields
Maximum number of Multi-Factor Interaction Model (MFIM) text fields per factor. There is one additional label field at the start which is not included in this value.


fieldLabelsMFIM

private java.lang.String[][] fieldLabelsMFIM
Field labels displayed at the top of the window on two lines. The number of labels displayed at the top of the screen is maxnFields+1, since maxnFields only counts the text fields and the label field at the start is also labeled.


tin

private java.awt.TextField[][] tin
Array of TextFields in which to input the MFIM factors.


thisMFIM

private MultiFactorInteractionModel[] thisMFIM
Array of MFIM factors.


factorLabels

private java.awt.Label[] factorLabels
Array of MFIM labels containing description and units. Used to modify units.


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.


saveCompFocus

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


iFocusl

private int iFocusl
Index of TextField With Focus


iFocusw

private int iFocusw
Index of TextField With Focus


firstRun

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


notes

private static final java.lang.String[] notes
Array of Strings containing a description of how the Multi-Factor Interaction Model factors are used. This is displayed at the bottom of the form so that the user may easily scroll down to see it.

Constructor Detail

GuiMdbDataMfim

public GuiMdbDataMfim()
Constructor creates window to display buttons and text entry fields.

Method Detail

initMe

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

Specified by:
initMe in class GuiWindow

setProperties

public void setProperties(java.lang.String matl,
                          java.lang.String descr,
                          java.lang.String propcd,
                          java.lang.String propty)
Set material and Fiber or Particle or Matrix or Binder property descriptions

Parameters:
matl - Material code.
descr - Material description.
propcd - Property code.
propty - Property description.

setMfimValues

public void setMfimValues(MultiFactorInteractionModel[] theMfim)
Set MFIM values.

Parameters:
theMfim - Array of MultiFactorInteractionModel items.

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent evt)
Detect Action Events and process accordingly.

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

focusLost

public void focusLost(java.awt.event.FocusEvent evt)
Does Nothing

Specified by:
focusLost in interface java.awt.event.FocusListener
Parameters:
evt - Focus event.

focusGained

public void focusGained(java.awt.event.FocusEvent evt)
Does Nothing

Specified by:
focusGained in interface java.awt.event.FocusListener
Parameters:
evt - Focus 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.

clearMe

private void clearMe()
Clear all text fields.


getMFIMsize

public int getMFIMsize()
Return number of valid Multi-Factor Interaction Model (MFIM) data items.

Returns:
Number of valid Multi-Factor Interaction Model (MFIM) data items.

getMFIM

public MultiFactorInteractionModel[] getMFIM()
Return array containing valid Multi-Factor Interaction Model (MFIM) data.

Returns:
Multi-Factor Interaction Model (MFIM) data array.

acceptMFIM

private boolean acceptMFIM()
Check whether Multi-Factor Interaction Model (MFIM) data is valid.

Returns:
True, if Multi-Factor Interaction Model (MFIM) data 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.