statdialog
Class AbstractDialog

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by java.awt.Window
              extended by java.awt.Dialog
                  extended by javax.swing.JDialog
                      extended by statdialog.AbstractDialog
All Implemented Interfaces:
java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, javax.accessibility.Accessible, javax.swing.RootPaneContainer, javax.swing.WindowConstants
Direct Known Subclasses:
AbstractDataAnalysisDialog, ComponentArgumentDialog, CoxRegressionDialog, DataManipulationDialog, DiscriminantAnalysisDialog, KaplanMeierEstimateDialog, KMeansDialog, LinearRegressionDialog, PCADialog, PluggableMenuDialog, PSplineRegressionDialog, StatDialogFactory, SurvivalTestDialog

public abstract class AbstractDialog
extends javax.swing.JDialog

The base class for the dialogs used in statistical analysis. A number of classes for creating statistical dialogs can inherit from this class.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class javax.swing.JDialog
javax.swing.JDialog.AccessibleJDialog
 
Nested classes/interfaces inherited from class java.awt.Dialog
java.awt.Dialog.AccessibleAWTDialog, java.awt.Dialog.ModalExclusionType, java.awt.Dialog.ModalityType
 
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.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
 
Field Summary
 javax.swing.JTabbedPane argumentPane
          The tabbed pane, including the optional tabs and the required tab.
 javax.swing.JButton cancelButton
          The Cancel buttion within the dialog.
 java.lang.String[] componentPanelTexts
          The title of the tabbed pane,
componentPanelTexts[i]: the title for the (i+1)'th tab.
static java.util.Hashtable<java.lang.String,java.lang.String> dialogInfoTable
          The hashtable contains information about the components in the dialog.
 javax.swing.JLabel dialogLabel
          The label for the dialog.
 java.lang.String dialogLabelText
          The text of the label for the dialog.
 java.awt.Frame frame
          The frame from which the dialog is displayed.
 javax.swing.JList inputList
          The list the input items can be selected from.
 javax.swing.JScrollPane inputPane
          The scroll pane the list (inputlist) is added to.
 boolean modal
          True for a modal dialog, false for one that allows other windows to be active at the same time.
 javax.swing.JButton oKButton
          The O.K. buttion within the dialog.
 javax.swing.JPanel oKCancelPane
          The pane on which both O.K. button and Cancel button are placed.
 DefaultArgumentPanel[] optionalArgumentPane
          The panel includes the components used to specify the optional arguments.
 java.lang.Object[][][] optionalComboboxTexts
          The texts the comboboxes display with in the optional tabs (specifying optional arguments),
optionalComboboxTexts[i]: the text for the (i+1)'th combobox.
 int[][] optionalComponentNames
          The array of integer indicess which specifies the components added to the optional tabs (specifying optional arguments).
 java.lang.String[][] optionalComponentTexts
          The texts the components display with in the optional tabs (specifying optional arguments),
optionalComponentTexts[i]: the text for the (i+1)'th component.
 DefaultArgumentPanel requiredArgumentPane
          The panel includes the components used to specify the required arguments.
 javax.swing.JSplitPane requiredArgumentSplitPane
          The split pane, including a scroll pane and the required tab.
 java.lang.Object[][] requiredComboboxTexts
          The texts the comboboxes display with in the required tab (specifying required arguments),
requiredComboboxTexts[i]: the text for the (i+1)'th combobox.
 int[] requiredComponentNames
          The array of integer indices which specifies the components added to the required tab (specifying required arguments).
 java.lang.String[] requiredComponentTexts
          The texts the components display with in the required tab (specifying required arguments),
requiredComponentTexts[i]: the text for the (i+1)'th component.
 java.lang.String[] selectedVariables
          The texts to be selected in the list,
selectedVariables[i]: the text for the (i+1)'th variable.
 java.lang.String title
          The string to be displayed in the dialog's title bar.
 
Fields inherited from class javax.swing.JDialog
accessibleContext, rootPane, rootPaneCheckingEnabled
 
Fields inherited from class java.awt.Dialog
DEFAULT_MODALITY_TYPE
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface javax.swing.WindowConstants
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, EXIT_ON_CLOSE, HIDE_ON_CLOSE
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
AbstractDialog()
          Default AbstractDialog constructor.
AbstractDialog(java.awt.Frame frame, java.lang.String title, boolean modal, java.lang.String dialogLabelText, java.lang.String[] componentPanelTexts, int[] requiredComponentNames, java.lang.String[] requiredComponentTexts, java.lang.Object[][] requiredComboboxTexts, int[][] optionalComponentNames, java.lang.String[][] optionalComponentTexts, java.lang.Object[][][] optionalComboboxTexts, java.lang.String[] selectedVariables)
          Constructs the base dialog for the use in statistical analysis.
 
Method Summary
 void argumentButton_actionPerformed(java.awt.event.ActionEvent e, DefaultArgumentPanel defaultArgumentPanel)
          Invoked when the buttons in the tabbed pane are pushed.
 void argumentPane_actionPerformed(java.awt.event.ActionEvent e)
          Invoked when an action in the tabbed pane occurs.
static java.util.Hashtable createDialogInfo(java.lang.String[] statComponentKey, java.lang.String[] statBLTexts)
          Creates a hashtable containing information about the components in the dialog.
 DefaultArgumentPanel getRequiredArgumentPane()
          Returns the required tab.
 void oKButton_actionPerformed(DefaultArgumentPanel defaultArgumentPanel)
          Invoked when O.K. button is pushed.
 
Methods inherited from class javax.swing.JDialog
addImpl, createRootPane, dialogInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getGraphics, getJMenuBar, getLayeredPane, getRootPane, getTransferHandler, isDefaultLookAndFeelDecorated, isRootPaneCheckingEnabled, paramString, processWindowEvent, remove, repaint, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, setTransferHandler, update
 
Methods inherited from class java.awt.Dialog
addNotify, getModalityType, getTitle, hide, isModal, isResizable, isUndecorated, setModal, setModalityType, setResizable, setTitle, setUndecorated, setVisible, show, toBack
 
Methods inherited from class java.awt.Window
addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, dispose, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getGraphicsConfiguration, getIconImages, getInputContext, getListeners, getLocale, getModalExclusionType, getMostRecentFocusOwner, getOwnedWindows, getOwner, getOwnerlessWindows, getToolkit, getWarningString, getWindowFocusListeners, getWindowListeners, getWindows, getWindowStateListeners, isActive, isAlwaysOnTop, isAlwaysOnTopSupported, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isShowing, pack, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeNotify, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, reshape, setAlwaysOnTop, setBounds, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setIconImage, setIconImages, setLocationByPlatform, setLocationRelativeTo, setMinimumSize, setModalExclusionType, setSize, setSize, toFront
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, transferFocusBackward, transferFocusDownCycle, 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, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, 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, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resize, resize, setBackground, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setName, setPreferredSize, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

frame

public java.awt.Frame frame
The frame from which the dialog is displayed.


title

public java.lang.String title
The string to be displayed in the dialog's title bar.


modal

public boolean modal
True for a modal dialog, false for one that allows other windows to be active at the same time.


dialogLabelText

public java.lang.String dialogLabelText
The text of the label for the dialog.


componentPanelTexts

public java.lang.String[] componentPanelTexts
The title of the tabbed pane,
componentPanelTexts[i]: the title for the (i+1)'th tab.


requiredComponentNames

public int[] requiredComponentNames
The array of integer indices which specifies the components added to the required tab (specifying required arguments).
requiredComponentNames[i]: the index for the (i+1)'th component,
requiredComponentNames[i] = 0 or ComponentAttributeSet.SEPARATOR: separator;
requiredComponentNames[i] = 1 or ComponentAttributeSet.BUTTON_TEXTFIELD: button v.s. textfield;
requiredComponentNames[i] = 2 or ComponentAttributeSet.BUTTON_LIST: button v.s. list;
requiredComponentNames[i] = 3 or ComponentAttributeSet.LABEL_TEXTFIELD: label v.s. textfield;
requiredComponentNames[i] = 4 or ComponentAttributeSet.LABEL_COMBOBOX: label v.s. combobox;
requiredComponentNames[i] = 5 or ComponentAttributeSet.LABEL_CHECKBOX: label v.s. checkbox.


requiredComponentTexts

public java.lang.String[] requiredComponentTexts
The texts the components display with in the required tab (specifying required arguments),
requiredComponentTexts[i]: the text for the (i+1)'th component.


requiredComboboxTexts

public java.lang.Object[][] requiredComboboxTexts
The texts the comboboxes display with in the required tab (specifying required arguments),
requiredComboboxTexts[i]: the text for the (i+1)'th combobox.


optionalComponentNames

public int[][] optionalComponentNames
The array of integer indicess which specifies the components added to the optional tabs (specifying optional arguments).
optionalComponentNames[i]: the index for the (i+1)'th component,
optionalComponentNames[i] = 0 or ComponentAttributeSet.SEPARATOR: separator;
optionalComponentNames[i] = 1 or ComponentAttributeSet.BUTTON_TEXTFIELD: button v.s. textfield;
optionalComponentNames[i] = 2 or ComponentAttributeSet.BUTTON_LIST: button v.s. list;
optionalComponentNames[i] = 3 or ComponentAttributeSet.LABEL_TEXTFIELD: label v.s. textfield;
optionalComponentNames[i] = 4 or ComponentAttributeSet.LABEL_COMBOBOX: label v.s. combobox;
optionalComponentNames[i] = 5 or ComponentAttributeSet.LABEL_CHECKBOX: label v.s. checkbox.


optionalComponentTexts

public java.lang.String[][] optionalComponentTexts
The texts the components display with in the optional tabs (specifying optional arguments),
optionalComponentTexts[i]: the text for the (i+1)'th component.


optionalComboboxTexts

public java.lang.Object[][][] optionalComboboxTexts
The texts the comboboxes display with in the optional tabs (specifying optional arguments),
optionalComboboxTexts[i]: the text for the (i+1)'th combobox.


selectedVariables

public java.lang.String[] selectedVariables
The texts to be selected in the list,
selectedVariables[i]: the text for the (i+1)'th variable.


dialogInfoTable

public static java.util.Hashtable<java.lang.String,java.lang.String> dialogInfoTable
The hashtable contains information about the components in the dialog. The key specifies the components while the values are the texts displayed within the components.


dialogLabel

public javax.swing.JLabel dialogLabel
The label for the dialog.


oKButton

public javax.swing.JButton oKButton
The O.K. buttion within the dialog.


cancelButton

public javax.swing.JButton cancelButton
The Cancel buttion within the dialog.


oKCancelPane

public javax.swing.JPanel oKCancelPane
The pane on which both O.K. button and Cancel button are placed.


argumentPane

public javax.swing.JTabbedPane argumentPane
The tabbed pane, including the optional tabs and the required tab.


requiredArgumentSplitPane

public javax.swing.JSplitPane requiredArgumentSplitPane
The split pane, including a scroll pane and the required tab.


inputList

public javax.swing.JList inputList
The list the input items can be selected from.


inputPane

public javax.swing.JScrollPane inputPane
The scroll pane the list (inputlist) is added to.


requiredArgumentPane

public DefaultArgumentPanel requiredArgumentPane
The panel includes the components used to specify the required arguments.


optionalArgumentPane

public DefaultArgumentPanel[] optionalArgumentPane
The panel includes the components used to specify the optional arguments.

Constructor Detail

AbstractDialog

public AbstractDialog()
Default AbstractDialog constructor.


AbstractDialog

public AbstractDialog(java.awt.Frame frame,
                      java.lang.String title,
                      boolean modal,
                      java.lang.String dialogLabelText,
                      java.lang.String[] componentPanelTexts,
                      int[] requiredComponentNames,
                      java.lang.String[] requiredComponentTexts,
                      java.lang.Object[][] requiredComboboxTexts,
                      int[][] optionalComponentNames,
                      java.lang.String[][] optionalComponentTexts,
                      java.lang.Object[][][] optionalComboboxTexts,
                      java.lang.String[] selectedVariables)
Constructs the base dialog for the use in statistical analysis.

Parameters:
frame - the frame from which the dialog is displayed.
title - the string to be displayed in the dialog's title bar.
modal - true for a modal dialog, false for one that allows other windows to be active at the same time.
dialogLabelText - the text of the label for the dialog.
componentPanelTexts - The title of the tabbed pane,
    componentPanelTexts[i]: the title for the (i+1)'th tab.
requiredComponentNames - the array of integer indices which specifies the components added to the required tab (specifying required arguments),
    requiredComponentNames[i]: the index for the (i+1)'th component,
    requiredComponentNames[i] = 0 or ComponentAttributeSet.SEPARATOR: separator;
    requiredComponentNames[i] = 1 or ComponentAttributeSet.BUTTON_TEXTFIELD: button v.s. textfield;
    requiredComponentNames[i] = 2 or ComponentAttributeSet.BUTTON_LIST: button v.s. list;
    requiredComponentNames[i] = 3 or ComponentAttributeSet.LABEL_TEXTFIELD: label v.s. textfield;
    requiredComponentNames[i] = 4 or ComponentAttributeSet.LABEL_COMBOBOX: label v.s. combobox;
    requiredComponentNames[i] = 5 or ComponentAttributeSet.LABEL_CHECKBOX: label v.s. checkbox.
requiredComponentTexts - the texts the components display with in the required tab (specifying required arguments),
    requiredComponentTexts[i]: the text for the (i+1)'th component.
requiredComboboxTexts - the texts the comboboxes display with in the required tab (specifying required arguments),
    requiredComboboxTexts[i]: the text for the (i+1)'th combobox.
optionalComponentNames - the array of integer indices which specifies the components added to the optional tabs (specifying optional arguments),
    optionalComponentNames[i]: the index for the (i+1)'th component,
    optionalComponentNames[i] = 0 or ComponentAttributeSet.SEPARATOR: separator;
    optionalComponentNames[i] = 1 or ComponentAttributeSet.BUTTON_TEXTFIELD: button v.s. textfield;
    optionalComponentNames[i] = 2 or ComponentAttributeSet.BUTTON_LIST: button v.s. list;
    optionalComponentNames[i] = 3 or ComponentAttributeSet.LABEL_TEXTFIELD: label v.s. textfield;
    optionalComponentNames[i] = 4 or ComponentAttributeSet.LABEL_COMBOBOX: label v.s. combobox;
    optionalComponentNames[i] = 5 or ComponentAttributeSet.LABEL_CHECKBOX: label v.s. checkbox.
optionalComponentTexts - the texts the components display with in the optional tabs (specifying optional arguments),
    optionalComponentTexts[i]: the text for the (i+1)'th component.
optionalComboboxTexts - the texts the comboboxes display with in the optional tabs (specifying optional arguments),
    optionalComboboxTexts[i]: the text for the (i+1)'th combobox.
selectedVariables - the texts to be selected in the list,
    selectedVariables[i]: the text for the (i+1)'th variable.
Throws:
java.lang.IllegalArgumentException - the vector of selected variables can not be empty.
Method Detail

argumentPane_actionPerformed

public void argumentPane_actionPerformed(java.awt.event.ActionEvent e)
Invoked when an action in the tabbed pane occurs.

Parameters:
e - action event.

argumentButton_actionPerformed

public void argumentButton_actionPerformed(java.awt.event.ActionEvent e,
                                           DefaultArgumentPanel defaultArgumentPanel)
Invoked when the buttons in the tabbed pane are pushed.

Parameters:
e - action event.
defaultArgumentPanel - the required tab or the optional tab.

oKButton_actionPerformed

public void oKButton_actionPerformed(DefaultArgumentPanel defaultArgumentPanel)
Invoked when O.K. button is pushed.

Parameters:
defaultArgumentPanel - the required tab or the optional tab.

getRequiredArgumentPane

public DefaultArgumentPanel getRequiredArgumentPane()
Returns the required tab.

Returns:
the required tab.

createDialogInfo

public static java.util.Hashtable createDialogInfo(java.lang.String[] statComponentKey,
                                                   java.lang.String[] statBLTexts)
Creates a hashtable containing information about the components in the dialog.

Parameters:
statComponentKey - the key specifies the type of pair component,
    statComponentKey[i]: the key for the (i+1)'th component.
statBLTexts - the values in the hashtable which are the texts displayed within the components,
    statBLTexts[i]: the texts for the (i+1)'th component.
Returns:
the hashtable containing the types of pair components and the texts displayed within the components.