O2Plib.gui
Class PopupOptions

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by java.awt.Window
              extended by java.awt.Frame
                  extended by O2Plib.gui.PopupOptions
All Implemented Interfaces:
java.awt.event.ActionListener, java.awt.event.AdjustmentListener, java.awt.event.ItemListener, java.awt.event.MouseListener, java.awt.event.WindowListener, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, java.util.EventListener, javax.accessibility.Accessible

public class PopupOptions
extends java.awt.Frame
implements java.awt.event.ActionListener, java.awt.event.ItemListener, java.awt.event.AdjustmentListener, java.awt.event.MouseListener, java.awt.event.WindowListener

Class PopupOptions creates and displays a popup window of pairs of (-options, data) and scrollbars for assigning command line switches and threshold parameters for some of the switches. This code was derived from Open2Dprot's Seg2Dgel options GUI program.

 It requires the following arrays of information.

 String swOptData[0:(3*nData)-1] is triples of 
          (optionPrompt, guiBuilderSpec, helpStr) data for all 
          switches. If the optionPrompt data has a "-", then make a
          CheckBox (swOptcCBvalue), else it is a Label with the prompt
          data. If the user data is not null, then make a TextField with
          this user (swOptValue) data on the right else make an empty
          Label.
 boolean swOptCBvalue[0:nData-1] are checkbox values of the switches.
 String  swOptValue[0:nData-1] are option data added after the ':' of
          the switch.

 If the user data is not null, then make a TextField with this
 user data on the right else make an empty Label.

 [TODO] need to add list of arg list constraints to guiBuilderSpec as list
   e.g. (1<2) so [a1

This work was produced by Peter Lemkin of the National Cancer Institute, an agency of the United States Government. As a work of the United States Government there is no associated copyright. It is offered as open source software under the Mozilla Public License (version 1.1) subject to the limitations noted in the accompanying LEGAL file. This notice must be included with the code. The Open2Dprot Mozilla and Legal files are available on http://Open2Dprot.sourceforge.net/.

Version:
$Date: 2005/10/21 15:42:54 $ $Revision: 1.18 $
Author:
P. Lemkin, NCI-Frederick, Frederick, MD, 21702
See Also:
Open2Dprot Home, Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class java.awt.Frame
java.awt.Frame.AccessibleAWTFrame
 
Nested classes/interfaces inherited from class java.awt.Window
java.awt.Window.AccessibleAWTWindow
 
Nested classes/interfaces inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
 
Nested classes/interfaces inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
 
Field Summary
 boolean cancelFlag
          pressed Cancel
 java.lang.String[] changedUserData
          Changed user data [0:nData-1] if not null, then make a TextField with this data on the right else empty Label.
private  java.awt.Panel checkBoxPanel
           
private  java.awt.Panel controlPanel
           
private  java.awt.Checkbox[] dataCheckbox
          Left [0:nData-1] checkboxes
private  java.awt.Choice[] dataChoice
          Left [0:nChoices-1] Choices
private  int[] dataChoiceSwitchIdx
          Left [0:nChoices-1] is the index of corresponding switch option
private  int[] dataChoiceVarNbr
          Left [0:nChoices-1] is the variable number for this choice
private  java.awt.Button[] dataDirDButton
          Left [0:nData-1] Directory dialog buttons
private  java.awt.Button[] dataFileDButton
          Left [0:nData-1] File dialog buttons
private  java.awt.Label[] dataLabel
          Left [0:nData-1] labels if not using checkbox
private  java.awt.Scrollbar[] dataSlider
          Right [0:nSliders-1] Sliders
private  java.awt.Label[] dataSliderLabel
          Right [0:nSliders-1] is the Label associated with this Slider
private  int[] dataSliderMax
          Right [0:nSliders-1] is the Maximum scroller value
private  int[] dataSliderMin
          Right [0:nSliders-1] is the Minimum scroller value
private  int[] dataSliderPrecision
          Right [0:nSliders-1] is the precision in format statement 0 means cvi2s() else cvf2s(,precision)
private  float[] dataSliderScale
          Right [0:nSliders-1] is the scale factor to map back to user space
private  int[] dataSliderSwitchIdx
          Right [0:nSliders-1] is the index of the corresponding switch option
private  java.lang.String[] dataSliderText
          Right [0:nSliders-1] is the text label associated with this Slider
private  int[] dataSliderVarNbr
          Right [0:nSliders-1] is the variable number for this Slider
private  java.awt.TextField[] dataTextField
          Right [0:nData-1] TextFields if used
 int[] dirDBindex
          The index of dataXXX[index] associated with the file browswer button prompt list dirDBPrompt[].
 java.lang.String[] dirDBPrompt
          The file browswer button prompt list [0:nDirDBPrompt-1] but allocated [0:nData-1].
 int[] fileDBindex
          The index of dataXXX[index] associated with the file browswer button prompt list fileDBindex[].
 java.lang.String[] fileDBPrompt
          The file browswer button prompt list [0:nFileDBPrompt-1] but allocated [0:nData-1].
 java.lang.String[] guiBuilderSpec
          Gui Builder Spec data [0:nData-1] if not "".
 java.lang.String[] helpData
          Prompt help data [0:nData-1] if not null, then make a TextField with this data on the right else empty Label.
private  java.awt.TextArea helpTextArea
          Text area for help for individual switch entries
private  int MAX_CHOICES
           
private  int MAX_SLIDERS
           
private  int MAX_TEXT_FIELD_WIDTH
           
private  int nChoices
          # of choices
 int nData
          # of data items
 int nDirDBPrompt
          # of active dirDBPrompt[] prompts
 int nFileDBPrompt
          # of active fileDBindex[] prompts
private  int nSliders
          # of slider Scrollbar
 java.lang.String projDir
          project directory
 java.lang.String[] promptData
          Prompt data [0:nData-1] has a "-", then make a CheckBox, else a Label with the data.
 boolean[] resetStatusData
          Default checkbox data [0:nData-1] is set by analyzing the switches.
private  java.awt.ScrollPane scrPane
          Scroll pane to hold the panel
(package private) static long serialVersionUID
          frame id
 boolean setNewDefaultFlag
          pressed "Done"
private  java.awt.Panel sliderPanel
           
 boolean[] statusData
          The values set initially to resetStatusData[] and then modified by the user.
private  java.awt.Panel stuffPanel
          Panel to put "stuff" and will be put into ScrollPane
private  java.awt.Font textFont
          text font
private  java.lang.String textFontFamily
          text font family
private  int textFontSize
          font size
private  int THICKNESS
           
 java.lang.String title
          Title for popup
 java.lang.String[] userData
          Prompt user data [0:nData-1] if not null, then make a TextField with this data on the right else empty Label.
 int VIEW_HEIGHT
           
 int VIEW_WIDTH
          Size of the frame
 
Fields inherited from class java.awt.Frame
CROSSHAIR_CURSOR, DEFAULT_CURSOR, E_RESIZE_CURSOR, HAND_CURSOR, ICONIFIED, MAXIMIZED_BOTH, MAXIMIZED_HORIZ, MAXIMIZED_VERT, MOVE_CURSOR, N_RESIZE_CURSOR, NE_RESIZE_CURSOR, NORMAL, NW_RESIZE_CURSOR, S_RESIZE_CURSOR, SE_RESIZE_CURSOR, SW_RESIZE_CURSOR, TEXT_CURSOR, W_RESIZE_CURSOR, WAIT_CURSOR
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
PopupOptions(java.lang.String[] swOptData, boolean[] swOptCBvalue, java.lang.String[] swOptValue, java.lang.String projDir, java.lang.String title)
          PopupOptions() - constructor for popup options selector
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent e)
          actionPerformed() - Handle button clicks
private  int addChoicesList(int i, java.awt.Panel fdbPanel)
          addChoicesList() - add Choices lists add Choice list "{A|B|C...Z}1,{A|B|C...Z}2,..."
private  int addSlidersList(int i, java.awt.Panel fdbPanel)
          addSlidersList() - add slider triple(s).
 void adjustmentValueChanged(java.awt.event.AdjustmentEvent e)
          adjustmentValueChanged() - handle ImageScroller scroll events.
 void buildOptionsGUI(java.lang.String[] swOptData, boolean[] swOptCBvalue, java.lang.String[] swOptValue, java.lang.String title)
          buildOptionsGUI() - build the popup selector.
 void clearFlags()
          clearFlags() - clear all of the return status flags
 void getChangedUserData()
          getChangedUserData() get the changed user data from text fields into local array so caller can get it.
 java.awt.Dimension getPreferredSize()
          getPreferredSize() - getPreferredSize, needed for sizing frame and ScrollPane correctly.
 java.lang.String[] getResults()
          getResults() - get results array by returning an array of switches merging promptData with userData and setting the "-no" switch accordingly.
 boolean[] getUserSwitchData()
          getUserSwitchData() - get user data array
 java.lang.String[] getUserTextData()
          getUserTextData() - get user text field data array
 void itemStateChanged(java.awt.event.ItemEvent e)
          itemStateChanged() - handle item state changed events NOTE: need to implement radio groups here since AWT only implements radio groups for Checkboxes, and CheckboxMenuItems.
 void mouseClicked(java.awt.event.MouseEvent mouseEvent)
           
 void mouseEntered(java.awt.event.MouseEvent mouseEvent)
           
 void mouseExited(java.awt.event.MouseEvent mouseEvent)
           
 void mousePressed(java.awt.event.MouseEvent e)
          mousePressed() - display data
 void mouseReleased(java.awt.event.MouseEvent mouseEvent)
           
 void quit()
          close() - kill this frame
 void setChangeTextData(java.lang.String switchName, java.lang.String newData)
          setChangeTextData() set the changed user data in the text fields if the promptData matches
 void setHelpText(java.lang.String strRep)
          setHelpText() - set the help text area
 void updateOptionsGUI(java.lang.String[] swOptData, boolean[] swOptCBvalue, java.lang.String[] swOptValue, java.lang.String title)
          updateOptionsGUI() - update the popup selector String swOptData[0:(3*nData)-1] is triples of (optionPrompt, guiBuilderSpec, helpStr) data for all switches.
 void windowActivated(java.awt.event.WindowEvent e)
           
 void windowClosed(java.awt.event.WindowEvent e)
           
 void windowClosing(java.awt.event.WindowEvent e)
          windowClosing() - close down the window.
 void windowDeactivated(java.awt.event.WindowEvent e)
           
 void windowDeiconified(java.awt.event.WindowEvent e)
           
 void windowIconified(java.awt.event.WindowEvent e)
           
 void windowOpened(java.awt.event.WindowEvent e)
           
 
Methods inherited from class java.awt.Frame
addNotify, finalize, getAccessibleContext, getCursorType, getExtendedState, getFrames, getIconImage, getMaximizedBounds, getMenuBar, getState, getTitle, isResizable, isUndecorated, paramString, remove, removeNotify, setCursor, setExtendedState, setIconImage, setMaximizedBounds, setMenuBar, setResizable, setState, setTitle, setUndecorated
 
Methods inherited from class java.awt.Window
addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, dispose, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getGraphicsConfiguration, getInputContext, getListeners, getLocale, getMostRecentFocusOwner, getOwnedWindows, getOwner, getToolkit, getWarningString, getWindowFocusListeners, getWindowListeners, getWindowStateListeners, hide, isActive, isAlwaysOnTop, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isShowing, pack, postEvent, processEvent, processWindowEvent, processWindowFocusEvent, processWindowStateEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, setAlwaysOnTop, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setLocationByPlatform, setLocationRelativeTo, show, toBack, toFront
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, setLayout, transferFocusBackward, transferFocusDownCycle, update, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, resize, resize, setBackground, setBounds, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setMinimumSize, setName, setPreferredSize, setSize, setSize, setVisible, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.awt.MenuContainer
getFont, postEvent
 

Field Detail

serialVersionUID

static final long serialVersionUID
frame id

See Also:
Constant Field Values

projDir

public java.lang.String projDir
project directory


VIEW_WIDTH

public final int VIEW_WIDTH
Size of the frame

See Also:
Constant Field Values

VIEW_HEIGHT

public final int VIEW_HEIGHT
See Also:
Constant Field Values

THICKNESS

private final int THICKNESS
See Also:
Constant Field Values

MAX_TEXT_FIELD_WIDTH

private final int MAX_TEXT_FIELD_WIDTH
See Also:
Constant Field Values

MAX_CHOICES

private final int MAX_CHOICES
See Also:
Constant Field Values

MAX_SLIDERS

private final int MAX_SLIDERS
See Also:
Constant Field Values

scrPane

private java.awt.ScrollPane scrPane
Scroll pane to hold the panel


stuffPanel

private java.awt.Panel stuffPanel
Panel to put "stuff" and will be put into ScrollPane


checkBoxPanel

private java.awt.Panel checkBoxPanel

controlPanel

private java.awt.Panel controlPanel

sliderPanel

private java.awt.Panel sliderPanel

helpTextArea

private java.awt.TextArea helpTextArea
Text area for help for individual switch entries


dataCheckbox

private java.awt.Checkbox[] dataCheckbox
Left [0:nData-1] checkboxes


nChoices

private int nChoices
# of choices


dataChoice

private java.awt.Choice[] dataChoice
Left [0:nChoices-1] Choices


dataChoiceSwitchIdx

private int[] dataChoiceSwitchIdx
Left [0:nChoices-1] is the index of corresponding switch option


dataChoiceVarNbr

private int[] dataChoiceVarNbr
Left [0:nChoices-1] is the variable number for this choice


nSliders

private int nSliders
# of slider Scrollbar


dataSlider

private java.awt.Scrollbar[] dataSlider
Right [0:nSliders-1] Sliders


dataSliderMin

private int[] dataSliderMin
Right [0:nSliders-1] is the Minimum scroller value


dataSliderMax

private int[] dataSliderMax
Right [0:nSliders-1] is the Maximum scroller value


dataSliderScale

private float[] dataSliderScale
Right [0:nSliders-1] is the scale factor to map back to user space


dataSliderPrecision

private int[] dataSliderPrecision
Right [0:nSliders-1] is the precision in format statement 0 means cvi2s() else cvf2s(,precision)


dataSliderSwitchIdx

private int[] dataSliderSwitchIdx
Right [0:nSliders-1] is the index of the corresponding switch option


dataSliderVarNbr

private int[] dataSliderVarNbr
Right [0:nSliders-1] is the variable number for this Slider


dataSliderText

private java.lang.String[] dataSliderText
Right [0:nSliders-1] is the text label associated with this Slider


dataSliderLabel

private java.awt.Label[] dataSliderLabel
Right [0:nSliders-1] is the Label associated with this Slider


dataFileDButton

private java.awt.Button[] dataFileDButton
Left [0:nData-1] File dialog buttons


dataDirDButton

private java.awt.Button[] dataDirDButton
Left [0:nData-1] Directory dialog buttons


dataLabel

private java.awt.Label[] dataLabel
Left [0:nData-1] labels if not using checkbox


dataTextField

private java.awt.TextField[] dataTextField
Right [0:nData-1] TextFields if used


textFontFamily

private java.lang.String textFontFamily
text font family


textFontSize

private int textFontSize
font size


textFont

private java.awt.Font textFont
text font


nData

public int nData
# of data items


promptData

public java.lang.String[] promptData
Prompt data [0:nData-1] has a "-", then make a CheckBox, else a Label with the data. If it is a CheckBox, use default value


userData

public java.lang.String[] userData
Prompt user data [0:nData-1] if not null, then make a TextField with this data on the right else empty Label.


changedUserData

public java.lang.String[] changedUserData
Changed user data [0:nData-1] if not null, then make a TextField with this data on the right else empty Label.


guiBuilderSpec

public java.lang.String[] guiBuilderSpec
Gui Builder Spec data [0:nData-1] if not "".
 Use of the guiBuilderSpec
 -------------------------
 If the guiBuilderSpec has a "#", then it is a file browser.
 If the guiBuilderSpec has a "$", then it is a directory browser.
 If the guiBuilderSpec has a
   "@1Text[min,max,scale,precision],@2Text[min,max,scale,precision],@3...", 
    then it is set of Sliders
 If the guiBuilderSpec has a "{A|B|C...Z}1,{A|B|C...Z}2,...",
    then it is set of Choices (i.e., between the {...}


helpData

public java.lang.String[] helpData
Prompt help data [0:nData-1] if not null, then make a TextField with this data on the right else empty Label.


resetStatusData

public boolean[] resetStatusData
Default checkbox data [0:nData-1] is set by analyzing the switches. If a switch j is "-noXXXX", then set resetStatusData[j] to false and set the promptData[j] to "-XXXX" else set resetStatusData[j] to true.


statusData

public boolean[] statusData
The values set initially to resetStatusData[] and then modified by the user.


fileDBPrompt

public java.lang.String[] fileDBPrompt
The file browswer button prompt list [0:nFileDBPrompt-1] but allocated [0:nData-1]. Data is "Browse: '"+promptData[i].substring(1)+"'";


fileDBindex

public int[] fileDBindex
The index of dataXXX[index] associated with the file browswer button prompt list fileDBindex[].


nFileDBPrompt

public int nFileDBPrompt
# of active fileDBindex[] prompts


dirDBPrompt

public java.lang.String[] dirDBPrompt
The file browswer button prompt list [0:nDirDBPrompt-1] but allocated [0:nData-1]. Data is "Browse: '"+promptData[i].substring(1)+"'";


dirDBindex

public int[] dirDBindex
The index of dataXXX[index] associated with the file browswer button prompt list dirDBPrompt[].


nDirDBPrompt

public int nDirDBPrompt
# of active dirDBPrompt[] prompts


title

public java.lang.String title
Title for popup


setNewDefaultFlag

public boolean setNewDefaultFlag
pressed "Done"


cancelFlag

public boolean cancelFlag
pressed Cancel

Constructor Detail

PopupOptions

public PopupOptions(java.lang.String[] swOptData,
                    boolean[] swOptCBvalue,
                    java.lang.String[] swOptValue,
                    java.lang.String projDir,
                    java.lang.String title)
PopupOptions() - constructor for popup options selector

Parameters:
swOptData[0:(3*nData)-1] - is triples of (optionPrompt, guiBuilderSpec, helpStr) data for all switches. If the optionPrompt data has a "-", then make a CheckBox (swOptcCBvalue), else it is a Label with the prompt data. If the user data is not null, then make a TextField with this user (swOptValue) data on the right else make an empty Label.
swOptCBvalue[0:nData-1] - is used by the O2pReportPopup that in turn may call PopupOptions. It contains boolean values of switch data use for Checkboxes.
swOptValue[0:nData-1] - is used by the O2pReportPopup that in turn may call PopupOptions. It contains String values of associated switch data.
projDir - is the default project directory
title - is the title for the window.
Method Detail

getPreferredSize

public java.awt.Dimension getPreferredSize()
getPreferredSize() - getPreferredSize, needed for sizing frame and ScrollPane correctly.

Overrides:
getPreferredSize in class java.awt.Container
Returns:
frame size

buildOptionsGUI

public void buildOptionsGUI(java.lang.String[] swOptData,
                            boolean[] swOptCBvalue,
                            java.lang.String[] swOptValue,
                            java.lang.String title)
buildOptionsGUI() - build the popup selector. Note that if a guiBuilderSpec is ill-formed, it does not build that GUI component. The user could still enter the data in the text area.

Parameters:
swOptData[0:(3*nData)-1] - is triples of (optionPrompt, guiBuilderSpec, helpStr) data for all switches. If the optionPrompt data has a "-", then make a CheckBox (swOptcCBvalue), else it is a Label with the prompt data. If the user data is not null, then make a TextField with this user (swOptValue) data on the right else make an empty Label.
swOptcCBvalue[0:nData-1] - is used by the O2pReportPopup that in turn may call PopupOptions. It contains boolean values of switch data use for Checkboxes.
swOptValue[0:nData-1] - is used by the csreportPopup that in turn may call PopupOptions. It contains String values of associated switch data.
title - is the title for the window.

addChoicesList

private int addChoicesList(int i,
                           java.awt.Panel fdbPanel)
addChoicesList() - add Choices lists add Choice list "{A|B|C...Z}1,{A|B|C...Z}2,..."

Parameters:
i - - is the ith row
fdbPanel - to use if add the triples
Returns:
number of Choices added

addSlidersList

private int addSlidersList(int i,
                           java.awt.Panel fdbPanel)
addSlidersList() - add slider triple(s). add Slider list "@1slider[min,max,scale,precision],@2slider..."

Parameters:
i - - is the ith row
fdbPanel - to use if add the triples
Returns:
number of slider triples added

updateOptionsGUI

public void updateOptionsGUI(java.lang.String[] swOptData,
                             boolean[] swOptCBvalue,
                             java.lang.String[] swOptValue,
                             java.lang.String title)
updateOptionsGUI() - update the popup selector String swOptData[0:(3*nData)-1] is triples of (optionPrompt, guiBuilderSpec, helpStr) data for all switches. If the optionPrompt data has a "-", then make a CheckBox (swOptcCBvalue), else it is a Label with the prompt data. If the user data is not null, then make a TextField with this user (swOptValue) data on the right else make an empty Label.

Parameters:
swOptcCBvalue[0:nData-1] - is used by the cmpReportPopup that in turn may call PopupOptions. It contains boolean values of switch data use for Checkboxes.
swOptValue[0:nData-1] - is used by the O2pReportPopup that in turn may call PopupOptions. It contains String values of associated switch data.
title - is the title for the window.

getResults

public java.lang.String[] getResults()
getResults() - get results array by returning an array of switches merging promptData with userData and setting the "-no" switch accordingly. The options with no switches just return the results.


getUserTextData

public java.lang.String[] getUserTextData()
getUserTextData() - get user text field data array


getUserSwitchData

public boolean[] getUserSwitchData()
getUserSwitchData() - get user data array


clearFlags

public void clearFlags()
clearFlags() - clear all of the return status flags


getChangedUserData

public void getChangedUserData()
getChangedUserData() get the changed user data from text fields into local array so caller can get it.


setChangeTextData

public void setChangeTextData(java.lang.String switchName,
                              java.lang.String newData)
setChangeTextData() set the changed user data in the text fields if the promptData matches


setHelpText

public void setHelpText(java.lang.String strRep)
setHelpText() - set the help text area

Parameters:
strRep - is string to put into help window

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent e)
actionPerformed() - Handle button clicks

Specified by:
actionPerformed in interface java.awt.event.ActionListener

quit

public void quit()
close() - kill this frame


windowClosing

public void windowClosing(java.awt.event.WindowEvent e)
windowClosing() - close down the window.

Specified by:
windowClosing in interface java.awt.event.WindowListener
Parameters:
e - is WindowEvent when close

windowClosed

public void windowClosed(java.awt.event.WindowEvent e)
Specified by:
windowClosed in interface java.awt.event.WindowListener

windowOpened

public void windowOpened(java.awt.event.WindowEvent e)
Specified by:
windowOpened in interface java.awt.event.WindowListener

windowActivated

public void windowActivated(java.awt.event.WindowEvent e)
Specified by:
windowActivated in interface java.awt.event.WindowListener

windowDeactivated

public void windowDeactivated(java.awt.event.WindowEvent e)
Specified by:
windowDeactivated in interface java.awt.event.WindowListener

windowDeiconified

public void windowDeiconified(java.awt.event.WindowEvent e)
Specified by:
windowDeiconified in interface java.awt.event.WindowListener

windowIconified

public void windowIconified(java.awt.event.WindowEvent e)
Specified by:
windowIconified in interface java.awt.event.WindowListener

itemStateChanged

public void itemStateChanged(java.awt.event.ItemEvent e)
itemStateChanged() - handle item state changed events NOTE: need to implement radio groups here since AWT only implements radio groups for Checkboxes, and CheckboxMenuItems.

Specified by:
itemStateChanged in interface java.awt.event.ItemListener
Parameters:
e - is ItemEvent

adjustmentValueChanged

public void adjustmentValueChanged(java.awt.event.AdjustmentEvent e)
adjustmentValueChanged() - handle ImageScroller scroll events. Handle ImageScroller scroll events & cause repaint of canvas. If we are using the scroll bar for this canvas, then set the obj position for use by other canvas for the same image. Handle the delay scrollbar as well if it exists.

Specified by:
adjustmentValueChanged in interface java.awt.event.AdjustmentListener
Parameters:
e - is adjustment event for scroll bars

mousePressed

public void mousePressed(java.awt.event.MouseEvent e)
mousePressed() - display data

Specified by:
mousePressed in interface java.awt.event.MouseListener
Parameters:
e - is MouseEvent

mouseClicked

public void mouseClicked(java.awt.event.MouseEvent mouseEvent)
Specified by:
mouseClicked in interface java.awt.event.MouseListener

mouseEntered

public void mouseEntered(java.awt.event.MouseEvent mouseEvent)
Specified by:
mouseEntered in interface java.awt.event.MouseListener

mouseExited

public void mouseExited(java.awt.event.MouseEvent mouseEvent)
Specified by:
mouseExited in interface java.awt.event.MouseListener

mouseReleased

public void mouseReleased(java.awt.event.MouseEvent mouseEvent)
Specified by:
mouseReleased in interface java.awt.event.MouseListener