Class PopupEditRscript

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--java.awt.Window
                    |
                    +--java.awt.Frame
                          |
                          +--PopupEditRscript
All Implemented Interfaces:
javax.accessibility.Accessible, java.awt.event.ActionListener, java.util.EventListener, java.awt.image.ImageObserver, java.awt.event.ItemListener, java.awt.event.KeyListener, java.awt.MenuContainer, java.io.Serializable, java.awt.event.TextListener, java.awt.event.WindowListener

class PopupEditRscript
extends java.awt.Frame
implements java.awt.event.ActionListener, java.awt.event.ItemListener, java.awt.event.TextListener, java.awt.event.KeyListener, java.awt.event.WindowListener

The PopupEditRscript class creates a popup window for editing the current RLO by invoking editRLO(), or creating a new RLO by the newRLO() method. The Demo RLOs (rloID < nDemoAnalyses) have the GenR checkboxes activated.

See Also:
Serialized Form

Inner classes inherited from class java.awt.Frame
java.awt.Frame.AccessibleAWTFrame
 
Inner classes inherited from class java.awt.Window
java.awt.Window.AccessibleAWTWindow
 
Inner classes inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
 
Inner classes inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.AWTTreeLock
 
Field Summary
(package private)  java.awt.Button cancelButton
          "Cancel" window button
(package private)  java.awt.Panel centerPanel
          Center Panel to hold the text area and the wizard panel.
(package private)  java.awt.Button closeButton
          "Close" window button
(package private)  java.awt.Button closeGenRButton
          "Close" window button for DEMO GenR edit
(package private)  java.awt.Panel controlPanel
          Control Panel to hold buttons and GenR checkboxes in popup window.
(package private)  int cursorLoc
          keep track of cursor location within textarea
(package private)  int[] demoWizardList
          List of wizards for Demo Wizard of pre-constructed RLOs
private static int EDIT_WINDOW_HEIGHT
           
private static int EDIT_WINDOW_WIDTH
          MIN size of scrollable Canvas
(package private)  java.awt.Panel editButtonsPanel
          Control Panel to hold buttons in popup window.
(package private)  java.lang.String editedRscriptFile
          edited Load .R script File
(package private)  boolean editingRLOflag
          Flag set if editing a RLO
(package private)  java.lang.String editRscriptText
          .R text or help message
(package private)  java.awt.TextArea editRscriptTextArea
          Text area to draw editRscriptText in popup window.
(package private) static java.lang.String EPILOGUE_END
          fixed epilogue end string
(package private) static java.lang.String EPILOGUE_START
          fixed epilogue start string
(package private)  int[] fullWizardList
          List of wizards for full Wizard of new RLOs
(package private)  java.awt.Button generateTemplateButton
          Generate R template code button
(package private)  int genRbits
          GenR Bits is a bit pattern of selected (R_GENR_xxxx) options used during .R script generation.
(package private)  java.lang.String helpStr
          The help message
(package private)  java.awt.Button importRfileButton
          "Import .R file"
(package private)  java.lang.String[] inputDataFileNames
          Name of input file if any (if not null)
(package private)  int[] inputDataTypes
          R_DATA_TYPE_xxxx type of input file if any
(package private)  java.awt.Choice[] inputTypesChoice
          Input data type Choices [0:MAX_WIZ_CHOICES-1]
(package private)  java.lang.String[] inputTypesChoiceNames
          Input data types Choice names [0:nInputTypes-1]
(package private)  int[] inputTypesChoiceValues
          data types Choice values [0:nInputTypes-1].
(package private)  boolean isNewRLOflag
          Flag that indicates we are editing a new RLO or editing an old one
(package private)  java.awt.Label[] labelWizard
          Wizard title labels [0:MAX_WIZ_ROWS-1]
(package private)  int lastWizardNbr
           
(package private)  java.lang.String[] legalMenuStubNames
           
(package private)  java.awt.Panel mainWizardPanel
          main wizard panel, separates top label from grid of TF and labels
(package private)  java.awt.Label mainWizardPanelLabel
          main label for wizard panel
(package private) static int MAX_WIZ_INPUT_CHOICES
          Maximum # rows of Input Choices in the wizard grid
(package private) static int MAX_WIZ_OUTPUT_CHOICES
          Maximum # rows of Input Choices in the wizard grid
(package private) static int MAX_WIZ_R2M
          Maximum # rows of R2Client Choices in the wizard grid
(package private) static int MAX_WIZ_ROWS
          Maximum # rows in the wizard grid ([#rows,2]
(package private) static int MAXRLO
          Maximum # of array slots for editing
(package private)  java.lang.String menuName
          Analysis menu name
(package private)  java.awt.Choice menuStubChoice
          menu stub choice widget
(package private)  java.lang.String menuStubName
          Desired Client menu stub.
(package private)  MJAutil mjaUtil
           
(package private)  MJAReval mr
          short form instance of mjaReval
(package private)  java.awt.TextField msgTextField
          Text field to hold popup edit messages.
(package private)  java.awt.Button nextButton
          "Next" wizard button
(package private)  int nInputFiles
          # of input files if any, 0 if none
(package private)  int nInputTypesValues
          # of input data type values
(package private)  int nMenuStubNames
          # of menu stub names
(package private)  int nOutputFiles
          # of output files if any, 0 if none
(package private)  int nOutputTypeValues
          # of input data types
(package private)  int nProcessCB
          # of Process checkbox entries
(package private)  int nr2ClientActionValues
          # of R2Client action Choice values
(package private)  int nSetR2ClientFiles
          # of output files used to set R to client data if any, 0 if none
private  int nUseGenRCB
          Rscript generation GUI for DEMO only: # of entries
(package private)  int nWizards
          # of wizards
(package private)  java.lang.String[] outputDataFileNames
          List of output files if any, null if none
(package private)  int[] outputDataTypes
          List of R_FILE_TYPE_xxxx types of output files if any, null if none.
(package private)  java.awt.Choice[] outputTypesChoice
          Output data type Choices [0:MAX_WIZ_CHOICES-1]
(package private)  java.lang.String[] outputTypesChoiceNames
          Output data types Choice names [0:nOutputTypes-1]
(package private)  int[] outputTypesChoiceValues
          Output data types Choice values [0:nOutputTypes-1].
(package private)  java.lang.String outsideLoadRscriptFile
          outside Load .R script File
private  int preferredHeight
          preferred height size of frame
private  int preferredWidth
          preferred width size of frame
(package private)  java.awt.Button prevButton
          "Prev" wizard button
(package private)  int processBits
          Process Bits is a bit pattern of selected (R_PB_xxxx) options used during processing
(package private)  int[] processCBbits
          Process checkbox processBits [0:nProcessCB-1] from R_PB_xxxx.
(package private)  java.lang.String[] processCBname
          Process checkbox names [0:nProcessCB-1]
(package private)  java.awt.Checkbox[] processCheckbox
          Process bits checkboxes [0:nProcessCB-1]
(package private) static java.lang.String PROLOGUE_END
          fixed prologue end string
(package private) static java.lang.String PROLOGUE_START
          fixed prologue start string
(package private)  java.awt.Choice[] r2ClientActionChoice
          R2Client action Choices [0:MAX_WIZ_CHOICES-1]
(package private)  java.lang.String[] r2ClientActionChoiceNames
          R2Client action Choice names [0:nr2ClientActions-1]
(package private)  int[] R2ClientTypesChoiceValues
          R2Client action Choice values [0:nr2ClientActions-1]
(package private)  int relWizardNbr
          relative index through either fullWizardList[] or demoWizardList[] to then access wizardNames[].
(package private)  RgenDemo rgd
          R demo code generator
(package private)  int rloID
          sequence # of description
(package private)  java.awt.Label rloMenuNameLabel
          current RLO being edited
(package private)  java.lang.String rloMenuNameMsg
          RLO edit menuName msg
(package private)  java.awt.Label rloTitleLabel
          title label
(package private)  java.lang.String rloTitleMsg
          RLO edit title label msg
(package private)  java.lang.String RscriptName
          Name of .R script file
(package private)  java.lang.String RscriptText
          .R text
(package private)  RtestBase rtb
          instance of the parent
(package private)  java.awt.Button saveRLOButton
          "Save RLO" window button
(package private)  java.lang.String scriptSpecificRoptions
          Optional script Specific R startup options.
(package private)  java.lang.String[] setR2ClientFileNames
          List of output file names used to set R to client data if any, null if none
(package private)  java.lang.String[] setR2ClientObjNames
          List of Client object names used to set R to client data if any, null if none.
(package private)  int[] setR2ClientObjTypes
          List of R_SET_R2Client_xxxx types of output files if any, null if none.
(package private)  java.awt.Checkbox showHelpCheckbox
          Show Help message text box.
(package private)  boolean showHelpFlag
          Flag to display help message
(package private)  int templateValue
          selected template value # from R_DATA_TYPE_xxxx Note: this is the type of the 1st input file
(package private)  java.awt.TextField[] textFieldWizard
          Wizard title text fields [0:MAX_WIZ_ROWS-1]
(package private)  java.awt.Panel topEditPanel
           
(package private)  int[] useGenRbit
          Rscript generation GUI for DEMO only: add separate method generators
private  java.awt.Checkbox[] useGenRcheckbox
          Rscript generation GUI for DEMO only: add separate method generators
private  java.lang.String[] useGenRname
          Rscript generation GUI for DEMO only: add separate method generators
(package private)  java.awt.Choice wizardChoice
          Wizard choice widget
(package private)  java.lang.String[] wizardNames
          List of Wizard options
(package private)  int wizardNbr
          default wizard to use at startup index wizardNames[]
(package private)  java.awt.Panel wizardPanel
          Wizard Panel
 
Fields inherited from class java.awt.Frame
base, CROSSHAIR_CURSOR, DEFAULT_CURSOR, E_RESIZE_CURSOR, frameSerializedDataVersion, HAND_CURSOR, icon, ICONIFIED, mbManagement, menuBar, MOVE_CURSOR, N_RESIZE_CURSOR, nameCounter, NE_RESIZE_CURSOR, NORMAL, NW_RESIZE_CURSOR, ownedWindows, resizable, S_RESIZE_CURSOR, SE_RESIZE_CURSOR, serialVersionUID, state, SW_RESIZE_CURSOR, TEXT_CURSOR, title, W_RESIZE_CURSOR, WAIT_CURSOR, weakThis
 
Fields inherited from class java.awt.Window
active, dbg, focusMgr, inputContext, inputContextLock, OPENED, ownedWindowList, showWithParent, warningString, windowListener, windowSerializedDataVersion
 
Fields inherited from class java.awt.Container
component, containerListener, containerSerializedDataVersion, dispatcher, layoutMgr, listeningBoundsChildren, listeningChildren, maxSize, ncomponents, printing, printingThreads
 
Fields inherited from class java.awt.Component
accessibleContext, actionListenerK, adjustmentListenerK, appContext, background, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, changeSupport, componentListener, componentListenerK, componentOrientation, componentSerializedDataVersion, containerListenerK, cursor, dropTarget, enabled, eventMask, focusListener, focusListenerK, font, foreground, graphicsConfig, hasFocus, height, hierarchyBoundsListener, hierarchyBoundsListenerK, hierarchyListener, hierarchyListenerK, incRate, inputMethodListener, inputMethodListenerK, isInc, isPacked, itemListenerK, keyListener, keyListenerK, LEFT_ALIGNMENT, locale, LOCK, metrics, minSize, mouseListener, mouseListenerK, mouseMotionListener, mouseMotionListenerK, name, nameExplicitlySet, newEventsOnly, ownedWindowK, parent, peer, peerFont, popups, prefSize, privateKey, RIGHT_ALIGNMENT, textListenerK, TOP_ALIGNMENT, valid, visible, width, windowClosingException, windowListenerK, x, y
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
(package private) PopupEditRscript(RtestBase rtb)
          PopupEditRscript() - build the popup window to edit R scripts
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent e)
          actionPerformed() - Handle Control panel button clicks
(package private)  void allocLocalRLOstate()
          allocLocalRLOstate() - create empty local edit state variables for the RLO database.
(package private)  void changeWizardMenuMode(boolean demoModeFlag)
          changeWizardMenuMode() - change Wizard menu between Demo or non-demo RLO.
(package private)  boolean checkWellFormedEditRLO()
          checkWellFormedEditRLO() - check if current edit RLO is well formed
(package private)  void closeRLOedit(boolean saveRLOflag)
          closeRLOedit() - popdown the window and clear the edit state.
(package private)  void editRLO(int rloId)
          editRLO() - edit an existing RLO database entry.
 java.lang.String extractUserRscript(java.lang.String completeRscript)
          extractUserRscript() - extract user R script from center of complete.
(package private)  java.lang.String genEpilogue()
          genEpilogue() - generate epilogue R script to write data commands to put R created data into Temp/ folder for reading by MAExplorer when required by actions in the RLO specification.
(package private)  java.lang.String genPrologue()
          genPrologue() - generate prologue R script to read data commands.
(package private)  java.lang.String getHelpStr()
          getHelpStr() - get popup edit help message.
 java.awt.Dimension getPreferredSize()
          getPreferredSize() - get the preferred size
(package private)  java.lang.String getRscriptByRLOid(int rloID)
          getRscriptByRLOid() - generate or read the current Rscript into RscriptText.
 boolean handleEvent(java.awt.Event evt)
          handleEvent() - process special events
 void itemStateChanged(java.awt.event.ItemEvent e)
          itemStateChanged() - handle item state changed eventsms.
 void keyPressed(java.awt.event.KeyEvent e)
          keyPressed() - key pressed in TextField
 void keyReleased(java.awt.event.KeyEvent e)
          keyReleased() - key released in TextField
 void keyTyped(java.awt.event.KeyEvent e)
          keyTyped() - key typed in TextField
(package private)  int newRLO()
          newRLO() - create a new local RLO instance.
 java.lang.String onlyOnePrologueEpilogueTag(java.lang.String str)
          onlyOnePrologueEpilogueTag() - Omit extra prologue/epilogue tags, save only the first one encountered.
 void paint(java.awt.Graphics g)
          paint() - update window
private  boolean rebuildWizardPanel(int newWizardNbr)
          rebuildWizardPanel() - rebuild Wizard elements and the new wizardLabel in the wizardPanel.
(package private)  void resetEditRLObuttons(boolean flag)
          resetEditRLObuttons() - enable/disable Edit Buttons.
(package private)  void setPopupEditVisible(boolean flag)
          setPopupEditVisible() - enable/disable popup edit RLO window
(package private)  boolean setRLOdbFromRLOedit()
          setRLOdbFromRLOedit() - set the RLO database from the edit state for current RLO.
(package private)  void setRLOeditFromRLOdb()
          setRLOeditFromRLOdb() - set the local RLO edit state from current RLO.
(package private)  void setupGenRcheckboxesStates()
          setupGenRcheckboxesStates() - set all genRbits checkbox states based on RLO state
(package private)  void setupProcessCheckboxesStates()
          setupProcessCheckboxesStates() - set all processBits checkbox states based on RLO state
(package private)  void showPEmsg(java.lang.String msg)
          showPEmsg() - draw text in Popup Edit message line
(package private)  void showPEmsg(java.lang.String msg, java.awt.Color fgColor, java.awt.Color bgColor)
          showPEmsg() - draw text in Popup Edit message line
 void textValueChanged(java.awt.event.TextEvent e)
          textValueChanged() - event handler for TextArea
 void update(java.awt.Graphics g)
          update() - update window
(package private)  void updateTitleMsgs()
          updateTitleMsgs() - update the title messages
private  void validateInFileListsSize(int size)
          validateInFileListsSize() - grow or create RLO Input File lists size
private  void validateOutFileListsSize(int size)
          validateOutFileListsSize() - grow or create RLO Output File lists Sizes
private  void validateR2ClientlistsSize(int size)
          validateR2ClientlistsSize() - grow or create R2Client lists Sizes
 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 after saving the RLO
 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, addToFrameList, constructComponentName, finalize, getAccessibleContext, getCursorType, getFrames, getIconImage, getMenuBar, getState, getTitle, initIDs, isResizable, paramString, postProcessKeyEvent, readObject, remove, removeFromFrameList, removeNotify, setCursor, setIconImage, setMenuBar, setResizable, setState, setTitle, writeObject
 
Methods inherited from class java.awt.Window
addOwnedWindow, addWindowListener, adjustListeningChildren, applyResourceBundle, applyResourceBundle, connectOwnedWindow, dispatchEventImpl, dispose, eventEnabled, getFocusOwner, getGraphicsConfiguration, getInputContext, getListeners, getLocale, getOwnedWindows, getOwner, getToolkit, getWarningString, hide, isActive, isShowing, nextFocus, ownedInit, pack, postEvent, postWindowEvent, preProcessKeyEvent, processEvent, processWindowEvent, removeOwnedWindow, removeWindowListener, resetGC, setCursor, setFocusOwner, setWarningString, show, toBack, toFront, transferFocus
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, applyOrientation, checkGD, countComponents, createChildHierarchyEvents, createHierarchyEvents, deliverEvent, dispatchEventToSelf, doLayout, findComponentAt, findComponentAt, findComponentAt, getAccessibleAt, getAccessibleChild, getAccessibleChildrenCount, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents_NoClientCode, getComponents, getInsets, getLayout, getMaximumSize, getMinimumSize, getMouseEventTarget, getWindow, insets, invalidate, invalidateTree, isAncestorOf, layout, lightweightPaint, lightweightPrint, list, list, locate, minimumSize, numListening, paintComponents, paintHeavyweightComponents, postsOldMouseEvents, preferredSize, print, printComponents, printHeavyweightComponents, processContainerEvent, proxyEnableEvents, proxyRequestFocus, remove, remove, removeAll, removeContainerListener, setFont, setLayout, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addPropertyChangeListener, addPropertyChangeListener, areInputMethodsEnabled, bounds, checkImage, checkImage, checkWindowClosingException, coalesceEvents, contains, contains, createImage, createImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, getAccessibleIndexInParent, getAccessibleStateSet, getBackground, getBounds, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont_NoClientCode, getFont, getFontMetrics, getForeground, getGraphics, getHeight, getInputMethodRequests, getLocation, getLocation, getLocationOnScreen_NoTreeLock, getLocationOnScreen, getName, getNativeContainer, getParent_NoClientCode, getParent, getPeer, getSize, getSize, getToolkitImpl, getTreeLock, getWidth, getWindowForObject, getX, getY, gotFocus, hasFocus, imageUpdate, inside, isDisplayable, isDoubleBuffered, isEnabled, isEnabledImpl, isFocusTraversable, isLightweight, isOpaque, isRecursivelyVisible, 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, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setDropTarget, setEnabled, setForeground, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, size, toString, transferFocus
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, registerNatives, wait, wait, wait
 
Methods inherited from interface java.awt.MenuContainer
getFont, postEvent
 

Field Detail

rtb

RtestBase rtb
instance of the parent

mr

MJAReval mr
short form instance of mjaReval

mjaUtil

MJAutil mjaUtil

rgd

RgenDemo rgd
R demo code generator

MAXRLO

static final int MAXRLO
Maximum # of array slots for editing

MAX_WIZ_ROWS

static final int MAX_WIZ_ROWS
Maximum # rows in the wizard grid ([#rows,2]

MAX_WIZ_INPUT_CHOICES

static final int MAX_WIZ_INPUT_CHOICES
Maximum # rows of Input Choices in the wizard grid

MAX_WIZ_OUTPUT_CHOICES

static final int MAX_WIZ_OUTPUT_CHOICES
Maximum # rows of Input Choices in the wizard grid

MAX_WIZ_R2M

static final int MAX_WIZ_R2M
Maximum # rows of R2Client Choices in the wizard grid

EDIT_WINDOW_WIDTH

private static final int EDIT_WINDOW_WIDTH
MIN size of scrollable Canvas

EDIT_WINDOW_HEIGHT

private static final int EDIT_WINDOW_HEIGHT

preferredHeight

private int preferredHeight
preferred height size of frame

preferredWidth

private int preferredWidth
preferred width size of frame

PROLOGUE_START

static final java.lang.String PROLOGUE_START
fixed prologue start string

PROLOGUE_END

static final java.lang.String PROLOGUE_END
fixed prologue end string

EPILOGUE_START

static final java.lang.String EPILOGUE_START
fixed epilogue start string

EPILOGUE_END

static final java.lang.String EPILOGUE_END
fixed epilogue end string

editingRLOflag

boolean editingRLOflag
Flag set if editing a RLO

editRscriptTextArea

java.awt.TextArea editRscriptTextArea
Text area to draw editRscriptText in popup window.

msgTextField

java.awt.TextField msgTextField
Text field to hold popup edit messages.

showHelpCheckbox

java.awt.Checkbox showHelpCheckbox
Show Help message text box.

showHelpFlag

boolean showHelpFlag
Flag to display help message

helpStr

java.lang.String helpStr
The help message

topEditPanel

java.awt.Panel topEditPanel

centerPanel

java.awt.Panel centerPanel
Center Panel to hold the text area and the wizard panel.

controlPanel

java.awt.Panel controlPanel
Control Panel to hold buttons and GenR checkboxes in popup window.

editButtonsPanel

java.awt.Panel editButtonsPanel
Control Panel to hold buttons in popup window.

mainWizardPanel

java.awt.Panel mainWizardPanel
main wizard panel, separates top label from grid of TF and labels

wizardPanel

java.awt.Panel wizardPanel
Wizard Panel

lastWizardNbr

int lastWizardNbr

mainWizardPanelLabel

java.awt.Label mainWizardPanelLabel
main label for wizard panel

labelWizard

java.awt.Label[] labelWizard
Wizard title labels [0:MAX_WIZ_ROWS-1]

textFieldWizard

java.awt.TextField[] textFieldWizard
Wizard title text fields [0:MAX_WIZ_ROWS-1]

wizardChoice

java.awt.Choice wizardChoice
Wizard choice widget

fullWizardList

int[] fullWizardList
List of wizards for full Wizard of new RLOs

demoWizardList

int[] demoWizardList
List of wizards for Demo Wizard of pre-constructed RLOs

wizardNames

java.lang.String[] wizardNames
List of Wizard options

nWizards

int nWizards
# of wizards

wizardNbr

int wizardNbr
default wizard to use at startup index wizardNames[]

relWizardNbr

int relWizardNbr
relative index through either fullWizardList[] or demoWizardList[] to then access wizardNames[].

menuStubChoice

java.awt.Choice menuStubChoice
menu stub choice widget

legalMenuStubNames

java.lang.String[] legalMenuStubNames

nMenuStubNames

int nMenuStubNames
# of menu stub names

generateTemplateButton

java.awt.Button generateTemplateButton
Generate R template code button

templateValue

int templateValue
selected template value # from R_DATA_TYPE_xxxx Note: this is the type of the 1st input file

importRfileButton

java.awt.Button importRfileButton
"Import .R file"

saveRLOButton

java.awt.Button saveRLOButton
"Save RLO" window button

prevButton

java.awt.Button prevButton
"Prev" wizard button

nextButton

java.awt.Button nextButton
"Next" wizard button

cancelButton

java.awt.Button cancelButton
"Cancel" window button

closeButton

java.awt.Button closeButton
"Close" window button

rloTitleLabel

java.awt.Label rloTitleLabel
title label

rloMenuNameLabel

java.awt.Label rloMenuNameLabel
current RLO being edited

rloTitleMsg

java.lang.String rloTitleMsg
RLO edit title label msg

rloMenuNameMsg

java.lang.String rloMenuNameMsg
RLO edit menuName msg

inputTypesChoice

java.awt.Choice[] inputTypesChoice
Input data type Choices [0:MAX_WIZ_CHOICES-1]

inputTypesChoiceNames

java.lang.String[] inputTypesChoiceNames
Input data types Choice names [0:nInputTypes-1]

inputTypesChoiceValues

int[] inputTypesChoiceValues
data types Choice values [0:nInputTypes-1]. All values >= 1

nInputTypesValues

int nInputTypesValues
# of input data type values

outputTypesChoice

java.awt.Choice[] outputTypesChoice
Output data type Choices [0:MAX_WIZ_CHOICES-1]

outputTypesChoiceNames

java.lang.String[] outputTypesChoiceNames
Output data types Choice names [0:nOutputTypes-1]

outputTypesChoiceValues

int[] outputTypesChoiceValues
Output data types Choice values [0:nOutputTypes-1]. All values >= 1

nOutputTypeValues

int nOutputTypeValues
# of input data types

r2ClientActionChoice

java.awt.Choice[] r2ClientActionChoice
R2Client action Choices [0:MAX_WIZ_CHOICES-1]

r2ClientActionChoiceNames

java.lang.String[] r2ClientActionChoiceNames
R2Client action Choice names [0:nr2ClientActions-1]

R2ClientTypesChoiceValues

int[] R2ClientTypesChoiceValues
R2Client action Choice values [0:nr2ClientActions-1]

nr2ClientActionValues

int nr2ClientActionValues
# of R2Client action Choice values

processCheckbox

java.awt.Checkbox[] processCheckbox
Process bits checkboxes [0:nProcessCB-1]

processCBname

java.lang.String[] processCBname
Process checkbox names [0:nProcessCB-1]

processCBbits

int[] processCBbits
Process checkbox processBits [0:nProcessCB-1] from R_PB_xxxx. All values >= 1

nProcessCB

int nProcessCB
# of Process checkbox entries

useGenRcheckbox

private java.awt.Checkbox[] useGenRcheckbox
Rscript generation GUI for DEMO only: add separate method generators

useGenRname

private java.lang.String[] useGenRname
Rscript generation GUI for DEMO only: add separate method generators

useGenRbit

int[] useGenRbit
Rscript generation GUI for DEMO only: add separate method generators

nUseGenRCB

private int nUseGenRCB
Rscript generation GUI for DEMO only: # of entries

closeGenRButton

java.awt.Button closeGenRButton
"Close" window button for DEMO GenR edit

isNewRLOflag

boolean isNewRLOflag
Flag that indicates we are editing a new RLO or editing an old one

outsideLoadRscriptFile

java.lang.String outsideLoadRscriptFile
outside Load .R script File

editedRscriptFile

java.lang.String editedRscriptFile
edited Load .R script File

editRscriptText

java.lang.String editRscriptText
.R text or help message

RscriptText

java.lang.String RscriptText
.R text

rloID

int rloID
sequence # of description

menuName

java.lang.String menuName
Analysis menu name

menuStubName

java.lang.String menuStubName
Desired Client menu stub. If null or "", then put in (Plugins | RLO methods submenu)

RscriptName

java.lang.String RscriptName
Name of .R script file

nInputFiles

int nInputFiles
# of input files if any, 0 if none

inputDataFileNames

java.lang.String[] inputDataFileNames
Name of input file if any (if not null)

inputDataTypes

int[] inputDataTypes
R_DATA_TYPE_xxxx type of input file if any

processBits

int processBits
Process Bits is a bit pattern of selected (R_PB_xxxx) options used during processing

genRbits

int genRbits
GenR Bits is a bit pattern of selected (R_GENR_xxxx) options used during .R script generation.

nOutputFiles

int nOutputFiles
# of output files if any, 0 if none

outputDataFileNames

java.lang.String[] outputDataFileNames
List of output files if any, null if none

outputDataTypes

int[] outputDataTypes
List of R_FILE_TYPE_xxxx types of output files if any, null if none.

nSetR2ClientFiles

int nSetR2ClientFiles
# of output files used to set R to client data if any, 0 if none

setR2ClientFileNames

java.lang.String[] setR2ClientFileNames
List of output file names used to set R to client data if any, null if none

setR2ClientObjNames

java.lang.String[] setR2ClientObjNames
List of Client object names used to set R to client data if any, null if none. E.g., If the object is a gene set (condition list), then this is the gene set (condition list) name

setR2ClientObjTypes

int[] setR2ClientObjTypes
List of R_SET_R2Client_xxxx types of output files if any, null if none.

cursorLoc

int cursorLoc
keep track of cursor location within textarea

scriptSpecificRoptions

java.lang.String scriptSpecificRoptions
Optional script Specific R startup options. These can include things like "--vsize=20M", or "--nsize=200k", etc. See the R reference manual for specific options.
Constructor Detail

PopupEditRscript

PopupEditRscript(RtestBase rtb)
PopupEditRscript() - build the popup window to edit R scripts
Method Detail

getPreferredSize

public java.awt.Dimension getPreferredSize()
getPreferredSize() - get the preferred size
Overrides:
getPreferredSize in class java.awt.Container
Returns:
preferred size of window

showPEmsg

void showPEmsg(java.lang.String msg,
               java.awt.Color fgColor,
               java.awt.Color bgColor)
showPEmsg() - draw text in Popup Edit message line
Parameters:
msg - tod display
fgColor - foreground color
bgColor - background color

showPEmsg

void showPEmsg(java.lang.String msg)
showPEmsg() - draw text in Popup Edit message line
Parameters:
msg - tod display

getHelpStr

java.lang.String getHelpStr()
getHelpStr() - get popup edit help message.

allocLocalRLOstate

void allocLocalRLOstate()
allocLocalRLOstate() - create empty local edit state variables for the RLO database.

editRLO

void editRLO(int rloId)
editRLO() - edit an existing RLO database entry.
Parameters:
rloID - to edit (existing RLO)
See Also:
MJAReval.setCurrentRLO(int), changeWizardMenuMode(boolean), resetEditRLObuttons(boolean), setRLOeditFromRLOdb()

newRLO

int newRLO()
newRLO() - create a new local RLO instance. This will be populated by the "Edit RLO" wizard interaction. Note: the RLO is not added to the RLO database until the user does a "Save RLO" or "Close".
See Also:
MJAReval.newRLO(), allocLocalRLOstate(), changeWizardMenuMode(boolean), resetEditRLObuttons(boolean), setPopupEditVisible(boolean)

setRLOeditFromRLOdb

void setRLOeditFromRLOdb()
setRLOeditFromRLOdb() - set the local RLO edit state from current RLO.
See Also:
MJAReval.getCurrentRLOid(), MJAReval.getCurrentRLOmenuName(), MJAReval.getInputDataFileNames(), MJAReval.getInputDataTypes(), MJAReval.getAllProcessBits(), MJAReval.getOutputDataFileNames(), MJAReval.getOutputDataTypes(), MJAReval.getSetR2ClientFileNames(), MJAReval.getSetR2ClientObjNames(), MJAReval.getSetR2ClientObjTypes(), MJAReval.getRstartupOptions(), MJAReval.getRscriptBasePath(), MJAReport#readTextToFile, Rtest#createDemoRscript

getRscriptByRLOid

java.lang.String getRscriptByRLOid(int rloID)
getRscriptByRLOid() - generate or read the current Rscript into RscriptText. Also set the editRLOflag to false. If it is a demo script, it will regenerate it and write it to the installRscriptBase path.
Parameters:
rloID - - of script to get
Returns:
RscriptText if succeed

updateTitleMsgs

void updateTitleMsgs()
updateTitleMsgs() - update the title messages

setRLOdbFromRLOedit

boolean setRLOdbFromRLOedit()
setRLOdbFromRLOedit() - set the RLO database from the edit state for current RLO. Only set the database if the RLO is well formed, else no-op.
Returns:
true if succeed in update, false if failed or no update required.
See Also:
MJAReval.setRLO(int, java.lang.String, java.lang.String, java.lang.String, java.lang.String[], int[], int, int, java.lang.String[], int[], java.lang.String[], java.lang.String[], int[], java.lang.String)

checkWellFormedEditRLO

boolean checkWellFormedEditRLO()
checkWellFormedEditRLO() - check if current edit RLO is well formed
 1. The RscriptName must be defined and well formed (".R" ext).
 2. The Menu name must be defined
 3. [TODO] check rest of RLO fields if necessary
Returns:
true if well formed

setPopupEditVisible

void setPopupEditVisible(boolean flag)
setPopupEditVisible() - enable/disable popup edit RLO window
Parameters:
flag - to enable/disable

paint

public void paint(java.awt.Graphics g)
paint() - update window
Overrides:
paint in class java.awt.Container

update

public void update(java.awt.Graphics g)
update() - update window
Overrides:
update in class java.awt.Container

handleEvent

public boolean handleEvent(java.awt.Event evt)
handleEvent() - process special events
Overrides:
handleEvent in class java.awt.Component

closeRLOedit

void closeRLOedit(boolean saveRLOflag)
closeRLOedit() - popdown the window and clear the edit state.
Parameters:
saveRLOflag - save RLO to file if set
See Also:
setPopupEditVisible(boolean)

onlyOnePrologueEpilogueTag

public java.lang.String onlyOnePrologueEpilogueTag(java.lang.String str)
onlyOnePrologueEpilogueTag() - Omit extra prologue/epilogue tags, save only the first one encountered. [TODO] this is being redone to take into account the actual way nested P/Es are used.
 For example:
  if the input is P1E1P2codeE2 it will return P1E1, 
  if the input is P1P2codeE2E1 it will return P1E1,
Note: Must input string str must not contain '\r's so the must be remapped to '\n's prior to this call.

Parameters:
str - String to be checked for extra starts/ends
Returns:
String, filtered of extra starts/ends

genPrologue

java.lang.String genPrologue()
genPrologue() - generate prologue R script to read data commands. Generate the Rscript. It calls genClientReaderPrologue() to generate the code.
Returns:
Rscript if OK, else null. Then sMsg contains error message
See Also:
#genClientReaderPrologue

genEpilogue

java.lang.String genEpilogue()
genEpilogue() - generate epilogue R script to write data commands to put R created data into Temp/ folder for reading by MAExplorer when required by actions in the RLO specification.

If tabDelimReportFile exists and an objAction is specified, then it will write out the following R object with write.table().

It calls genClientEpilogue() to generate the code.

Returns:
Rscript if OK, else null. Then sMsg contains error message
See Also:
#genClientEpilogue

extractUserRscript

public java.lang.String extractUserRscript(java.lang.String completeRscript)
extractUserRscript() - extract user R script from center of complete.
 R script. It is defined as the code between
   PROLOGUE_END
 and
   EPILOGUE_START
If no template code is there, just return what is there.
Parameters:
completeRscript - is complete R script with (prologue, userRscript,epilogue)
Returns:
user R script from complete R script

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent e)
actionPerformed() - Handle Control panel button clicks
Specified by:
actionPerformed in interface java.awt.event.ActionListener
See Also:
MJAReport#readTextToFile, showPEmsg(java.lang.String, java.awt.Color, java.awt.Color), closeRLOedit(boolean), setRLOdbFromRLOedit()

itemStateChanged

public void itemStateChanged(java.awt.event.ItemEvent e)
itemStateChanged() - handle item state changed eventsms.
Specified by:
itemStateChanged in interface java.awt.event.ItemListener
Parameters:
e - is ItemEvent
See Also:
MJAReval.clearGenRbit(int), MJAReval.setGenRbit(int), MJAReval.getCurrentRLOid(), Rtest#createDemoRscript

textValueChanged

public void textValueChanged(java.awt.event.TextEvent e)
textValueChanged() - event handler for TextArea
Specified by:
textValueChanged in interface java.awt.event.TextListener

rebuildWizardPanel

private boolean rebuildWizardPanel(int newWizardNbr)
rebuildWizardPanel() - rebuild Wizard elements and the new wizardLabel in the wizardPanel.
Parameters:
newWizardNbr - (1 to 8) to specify elements to set in wizardPanel We use the numbering (1 to 8) of the wizards in the wizardName[] array.
Returns:
true if succeed

setupProcessCheckboxesStates

void setupProcessCheckboxesStates()
setupProcessCheckboxesStates() - set all processBits checkbox states based on RLO state
See Also:
MJAReval.isProcessBit(int)

setupGenRcheckboxesStates

void setupGenRcheckboxesStates()
setupGenRcheckboxesStates() - set all genRbits checkbox states based on RLO state
See Also:
MJAReval.isGenRbit(int)

changeWizardMenuMode

void changeWizardMenuMode(boolean demoModeFlag)
changeWizardMenuMode() - change Wizard menu between Demo or non-demo RLO. If demo mode, just make wizard7Panel active and disable the choice. If non-demo mode, start with wizard0Panel active and activate choice.
Parameters:
demoModeFlag - to set the checkboxes

resetEditRLObuttons

void resetEditRLObuttons(boolean flag)
resetEditRLObuttons() - enable/disable Edit Buttons. Do NOT disable close button.
Parameters:
flag - to set the buttons

keyPressed

public void keyPressed(java.awt.event.KeyEvent e)
keyPressed() - key pressed in TextField
Specified by:
keyPressed in interface java.awt.event.KeyListener

keyReleased

public void keyReleased(java.awt.event.KeyEvent e)
keyReleased() - key released in TextField
Specified by:
keyReleased in interface java.awt.event.KeyListener

keyTyped

public void keyTyped(java.awt.event.KeyEvent e)
keyTyped() - key typed in TextField
Specified by:
keyTyped in interface java.awt.event.KeyListener

validateInFileListsSize

private void validateInFileListsSize(int size)
validateInFileListsSize() - grow or create RLO Input File lists size
Parameters:
size - is new size for the list

validateOutFileListsSize

private void validateOutFileListsSize(int size)
validateOutFileListsSize() - grow or create RLO Output File lists Sizes
Parameters:
size - is new size for the list

validateR2ClientlistsSize

private void validateR2ClientlistsSize(int size)
validateR2ClientlistsSize() - grow or create R2Client lists Sizes
Parameters:
size - is new size for the list

windowClosing

public void windowClosing(java.awt.event.WindowEvent e)
windowClosing() - close down the window after saving the RLO
Specified by:
windowClosing in interface java.awt.event.WindowListener
See Also:
closeRLOedit(boolean)

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

windowClosed

public void windowClosed(java.awt.event.WindowEvent e)
Specified by:
windowClosed 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