IcanGui
Class GuiIcanVoidVolumeRatios

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

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

Encapsulate the behavior of GUI for control of ICAN/JAVA data entry for Void Volume Ratio Override data. This chooses a Void Volume Ratio Override data type, for a particular ply and its primary or secondary material, instantiates a window to enter the corresponding data, and colors its buttons to allow the user to see what Void Volume Ratio Override data types were used.

Since:
1.1.0;
Version:
1.1.17;
Updated by Louis Handler on Feb 4, 2011, 14:09 EST (1.1.17).
Updated by Louis Handler on Dec 12, 2007, 13:58 EST (1.1.15).
Updated by Louis Handler on Dec 19, 2006, 10:32 EST (1.1.14).
Updated by Louis Handler on Aug 11, 2006, 09:37 EDT (1.1.12).
Updated by Louis Handler on Jul 10, 2006, 10:45 EDT (1.1.8).
Updated by Louis Handler on Dec 29, 2005, 11:42 EST (1.1.6).
Updated by Louis Handler on Jul 5, 2005, 08:07 EDT (1.1.5).
Updated by Louis Handler on Apr 18, 2005, 14:14 EDT (1.1.0).
Author:
Louis Handler
See Also:
GuiWindow

Nested Class Summary
(package private)  class GuiIcanVoidVolumeRatios.Madapter
          Mouse Adapter Inner Class
 
Field Summary
private  java.awt.Button[] bLoads
          Array of Buttons for each type or sub-type as well as buttons used to enter corresponding Multi-Factor Interaction Model (MFIM) factors.
private static java.lang.String[] buttonLabels
          Labels to display on action buttons.
private  java.awt.Button[] buttons
          Action buttons.
private  GuiMdbDataMfim classMFIM
          Instance of class GuiMdbDataMfim, used to obtain MFIM data.
private  int currentButton
          The Current Button Index.
private  IcanDataSet data
          Input ICAN/JAVA data set.
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  GuiIcanVoidVolumeItems gilVVI
          Instance of GUI Void Volume Ratio classes.
private static int iAccept
          Accept Button will verify the data and complete the processing of Void Volume Ratio Override data.
private  int ibPut
          Subscript of MFIM Button used.
private static int iCancel
          Exit Button will exit the entire program.
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 jVVRF
          Subscript of porosity data in MFIM.
private  int[] listPly
          Array of void volume ratio ply numbers.
private  int[] listPS
          Array of void volume ratio primary/secondary subscripts.
private  java.awt.Label[] lLoads
          Array of Labels for each type having sub-types.
private static int maxWarningsMissing
          Maximum number of warnings printed before quiting to print them.
private  MaterialDataBankSet mdb
          Material DataBank data set.
private static int NACTIVEFACTORS
          Maximum number of usable MFIM factors allowed to be entered.
private static int nB
          Number of Buttons = sum of number of Buttons for each type, including sub-types.
private static int nbperline
          Number of buttons per ply/layer/material(primary/secondary).
private static int nButtons
          Number of action buttons.
private static int NFACTORS
          Number of MFIM factors.
private  int nPlyPS
          Number of ply materials (primary and/or secondary) in the list.
private  int nPlys
          Number of plys in laminate.
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 static double ONE
          The constant one.
private  java.awt.Panel panelFrame
          The Panel that contains the data to be displayed within a scrolling frame.
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[][] theMfim
          Array of Multi-Factor Interaction Model factors used to save the MFIM values.
private  VoidVolumeRatioItem[] theProp
          Array of Void Volume Ratio Override items, containing the MFIM factors, to be added to the Material DataBank when accepted.
private  java.awt.Label theTitle
          Label containing the description/title of the ICAN/JAVA run.
private  VoidVolumeRatioItem thisVVRI
          Current void volume ratio override item, containing 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
GuiIcanVoidVolumeRatios()
          Constructor creates window to display buttons and text entry fields.
 
Method Summary
private  boolean acceptLoads()
          Check whether loads are valid.
 void actionPerformed(java.awt.event.ActionEvent evt)
          Detect Action Events and process accordingly.
 boolean canShowDetail(int thePly, int iPS)
          Can Void Volume Ratio Override computed data be displayed for each subslice?
 boolean canShowDetailInInterphase(int thePly, int iPS)
          Can Void Volume Ratio Override computed data be displayed for each subslice? This is based on the radial distance from the center of the fiber or particle within the interphase.
 void changeGuiUnits()
          Change units on GUI for this class.
private  void clearMe()
          Clear all MFIM buttons and text fields.
 void fixAllMfimLabels()
          Set Label on MFIM buttons.
 void fixMfimLabel(int iB)
          Set Label on MFIM button.
 void focusGained(java.awt.event.FocusEvent evt)
          Listens for Events when a component gains focus.
 void focusLost(java.awt.event.FocusEvent evt)
          Does Nothing.
 java.lang.String getName()
          Get class name.
private  int getNumberOfPlys()
          Get number of plys in laminate.
 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)
          Makes sure that keys are not processed 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 and enable buttons from ICAN/JAVA data.
 void saveVVRI(VoidVolumeRatioItem theVVRI)
          Save void volume ratio override from accept button in GuiIcanVoidVolumeItems where detail is input.
private  void setColors()
          Set color to highlight items previously chosen.
 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
Input ICAN/JAVA data set.


mdb

private MaterialDataBankSet mdb
Material DataBank data set.


gbl

private java.awt.GridBagLayout gbl
GridBag Layout manager.


gbc

private java.awt.GridBagConstraints gbc
GridBag constraints.


theTitle

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


nbperline

private static final int nbperline
Number of buttons per ply/layer/material(primary/secondary). There are buttons for constant, linear, parabolic, hyperbolic, and user defined, as well as one for a corresponding MFIM factor.


nPlys

private int nPlys
Number of plys in laminate.


nPlyPS

private int nPlyPS
Number of ply materials (primary and/or secondary) in the list. There will be a set of void volume ratio data for each such ply material.


nB

private static int nB
Number of Buttons = sum of number of Buttons for each type, including sub-types.


bLoads

private java.awt.Button[] bLoads
Array of Buttons for each type or sub-type as well as buttons used to enter corresponding Multi-Factor Interaction Model (MFIM) factors.


lLoads

private java.awt.Label[] lLoads
Array of Labels for each type having sub-types.


listPly

private int[] listPly
Array of void volume ratio ply numbers.


listPS

private int[] listPS
Array of void volume ratio primary/secondary subscripts.


thisVVRI

private VoidVolumeRatioItem thisVVRI
Current void volume ratio override item, containing the MFIM factors.


iAccept

private static final int iAccept
Accept Button will verify the data and complete the processing of Void Volume Ratio Override 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
Exit Button will exit the entire program. To exit just this screen, see Accept.

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

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.


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.


gilVVI

private GuiIcanVoidVolumeItems gilVVI
Instance of GUI Void Volume Ratio classes.


classMFIM

private GuiMdbDataMfim classMFIM
Instance of class GuiMdbDataMfim, used to obtain MFIM data.


theProp

private VoidVolumeRatioItem[] theProp
Array of Void Volume Ratio Override items, containing the MFIM factors, to be added to the Material DataBank when accepted.


theMfim

private MultiFactorInteractionModel[][] theMfim
Array of Multi-Factor Interaction Model factors used to save the MFIM values.


ibPut

private int ibPut
Subscript of MFIM Button used. Used to reset Button Label to display number of MFIM factors entered.


saveCompFocus

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


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.


currentButton

private int currentButton
The Current Button Index.


firstRun

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


NFACTORS

private static final int NFACTORS
Number of MFIM factors.


NACTIVEFACTORS

private static final int NACTIVEFACTORS
Maximum number of usable MFIM factors allowed to be entered.


jVVRF

private static final int jVVRF
Subscript of porosity data in MFIM.

See Also:
MultiFactorInteractionModel.MFIM_FACTOR_LIST

maxWarningsMissing

private static int maxWarningsMissing
Maximum number of warnings printed before quiting to print them.


ONE

private static final double ONE
The constant one.

See Also:
Constant Field Values
Constructor Detail

GuiIcanVoidVolumeRatios

public GuiIcanVoidVolumeRatios()
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

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.

canShowDetail

public boolean canShowDetail(int thePly,
                             int iPS)
Can Void Volume Ratio Override computed data be displayed for each subslice?

Parameters:
thePly - Ply number.
iPS - 0 for primary, 1 for secondary.
Returns:
True, if can display subslice data; else, false, if no subslice data.

canShowDetailInInterphase

public boolean canShowDetailInInterphase(int thePly,
                                         int iPS)
Can Void Volume Ratio Override computed data be displayed for each subslice? This is based on the radial distance from the center of the fiber or particle within the interphase.

Parameters:
thePly - Ply number.
iPS - 0 for primary, 1 for secondary.
Returns:
True, if can display subslice data; else, false, if no subslice data.

focusGained

public void focusGained(java.awt.event.FocusEvent evt)
Listens for Events when a component gains focus.

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

keyPressed

public void keyPressed(java.awt.event.KeyEvent evt)
Makes sure that keys are not processed twice.

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.

clearMe

private void clearMe()
Clear all MFIM buttons and text fields.


presetData

public void presetData()
Set title and enable buttons from ICAN/JAVA data. If ICAN/JAVA data initialized, use it to initialize the loads inputs.

Specified by:
presetData in class GuiWindow

getNumberOfPlys

private int getNumberOfPlys()
Get number of plys in laminate.

Returns:
number of plys in laminate.

setColors

private void setColors()
Set color to highlight items previously chosen.


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.

fixMfimLabel

public void fixMfimLabel(int iB)
Set Label on MFIM button.

Parameters:
iB - Number (subscript) of MFIM button for which to fix Label.

fixAllMfimLabels

public void fixAllMfimLabels()
Set Label on MFIM buttons.


saveVVRI

public void saveVVRI(VoidVolumeRatioItem theVVRI)
Save void volume ratio override from accept button in GuiIcanVoidVolumeItems where detail is input.

Parameters:
theVVRI - The void volume ratio override to save.

acceptLoads

private boolean acceptLoads()
Check whether loads are valid.

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

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.