public class FHSampleSize
extends javax.swing.JFrame
implements java.awt.event.ActionListener
Modifier and Type | Class and Description |
---|---|
private class |
FHSampleSize.ChartPopClickListener
The pop-up listener for the simulations chart
|
private class |
FHSampleSize.ChartPopupMenu
The pop-up menu for the simulations chart
|
private class |
FHSampleSize.DrawSSIZAnalysisTask
SwingWorker class for handling the calling of the analysis and drawing the progress bar.
|
private static class |
FHSampleSize.ResultPair |
private class |
FHSampleSize.ScrollViewport
TODO
|
private class |
FHSampleSize.TablePopClickListener
The pop-up listener for the simulations data table.
|
private class |
FHSampleSize.TablePopupMenu
The pop-up menu for the simulations data table
|
javax.swing.JFrame.AccessibleJFrame
java.awt.Window.AccessibleAWTWindow, java.awt.Window.Type
Modifier and Type | Field and Description |
---|---|
private FHAESAction |
actionBrowse |
private FHAESAction |
actionClose |
private FHAESAction |
actionExportPDF |
private FHAESAction |
actionExportPNG |
private FHAESAction |
actionRun |
private FHAESAction |
actionSaveAll |
protected JTableSpreadsheetByRowAdapter |
adapter |
private AsymptoteTable |
asymptoteTable |
private javax.swing.JButton |
btnCancelAnalysis |
private javax.swing.JComboBox |
cboChartMetric |
private javax.swing.JComboBox |
cboEventType |
private javax.swing.JComboBox |
cboResampling |
private javax.swing.JComboBox |
cboSegment |
private javax.swing.JComboBox |
cboThresholdType |
private javax.swing.JCheckBox |
chkCommonYears |
private javax.swing.JCheckBox |
chkExcludeSeriesWithNoEvents |
private SSIZCurveChart |
curveChart |
private java.lang.Boolean |
fileDialogWasUsed |
private static org.slf4j.Logger |
log |
private static int |
MAX_DRAW_HEIGHT |
private static int |
MAX_DRAW_WIDTH |
private java.lang.Boolean |
mouseListenersActive |
private javax.swing.JPanel |
panelChart |
private javax.swing.JPanel |
panelProgressBar |
private javax.swing.JProgressBar |
progressBar |
private FHX2FileReader |
reader |
private javax.swing.JScrollPane |
scrollPaneAsymptote |
private javax.swing.JScrollPane |
scrollPaneSimulations |
private SegmentationPanel |
segmentationPanel |
private int |
segmentsDone |
private static long |
serialVersionUID |
private SSIZResultsTable |
simulationsTable |
private javax.swing.JSplitPane |
splitPaneResults |
private javax.swing.JSpinner |
spnSeed |
private javax.swing.JSpinner |
spnSimulations |
private javax.swing.JSpinner |
spnThresholdValue |
private FHSampleSize.DrawSSIZAnalysisTask |
task |
private java.lang.Boolean |
taskWasCancelled |
private javax.swing.JTextField |
txtInputFile |
accessibleContext, EXIT_ON_CLOSE, rootPane, rootPaneCheckingEnabled
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
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
Constructor and Description |
---|
FHSampleSize(java.awt.Window parent)
Standard constructor for the window.
|
Modifier and Type | Method and Description |
---|---|
void |
actionPerformed(java.awt.event.ActionEvent evt)
TODO
|
private void |
copyChartToClipboard()
Copy the simulations chart to the system clip-board.
|
private void |
copyTableToClipboard()
Copy the simulations data currently selected in the table to the system clip-board.
|
private SSIZAnalysisModel |
createSSIZAnalysisModel()
Set up analysis parameters in SSIZController according to the selected settings in the GUI.
|
private void |
displayChartAndTableOutput(SSIZAnalysisModel analysisModel)
Updates and redraws the results table and curve chart on the GUI.
|
private java.lang.Boolean |
filePathHasValidFile(java.lang.String inFilePath)
Checks whether or not the file at the specified path is valid.
|
private java.io.File |
getFileFromSaveDialog(java.lang.String fileTypeToSave)
Open a JFileChooser and return the file that the user specified for saving.
|
private void |
initActions()
Initialize shared actions.
|
private void |
initGUI()
Initialize GUI components.
|
private void |
initMenu()
Set up the Menu bar using actions wherever possible.
|
private java.io.File |
loadFromOpenFileDialog()
Show open file dialog so the user may choose a file to edit.
|
static void |
main(java.lang.String[] args)
Launch as stand-alone application.
|
void |
openFile(java.io.File theFHX2File)
Open the specified file
|
void |
populateFromAnalysisModel(SSIZAnalysisModel model)
Generate the SSIZAnalysisModel representing the data and parameters for this analysis.
|
private void |
runSSIZAnalysisTask()
Run the actual analysis task.
|
void |
saveAll()
Save the results of the analysis to disk.
|
private void |
setCheckBoxesToPrefKeyValues()
Sets up the checkbox values according to the stored preference keys.
|
private void |
setGUIForFHFileReader()
Set up GUI restrictions depending on the current FHFileReader.
|
private void |
updateChart()
Update the chart on the screen using the parameters specified by the user.
|
addImpl, createRootPane, frameInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getGraphics, getJMenuBar, getLayeredPane, getRootPane, getTransferHandler, isDefaultLookAndFeelDecorated, isRootPaneCheckingEnabled, paramString, processWindowEvent, remove, repaint, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setIconImage, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, setTransferHandler, update
addNotify, getCursorType, getExtendedState, getFrames, getIconImage, getMaximizedBounds, getMenuBar, getState, getTitle, isResizable, isUndecorated, remove, removeNotify, setBackground, setCursor, setExtendedState, setMaximizedBounds, setMenuBar, setOpacity, setResizable, setShape, setState, setTitle, setUndecorated
addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, dispose, getBackground, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getIconImages, getInputContext, getListeners, getLocale, getModalExclusionType, getMostRecentFocusOwner, getOpacity, getOwnedWindows, getOwner, getOwnerlessWindows, getShape, getToolkit, getType, getWarningString, getWindowFocusListeners, getWindowListeners, getWindows, getWindowStateListeners, hide, isActive, isAlwaysOnTop, isAlwaysOnTopSupported, isAutoRequestFocus, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isOpaque, isShowing, isValidateRoot, pack, paint, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, reshape, setAlwaysOnTop, setAutoRequestFocus, setBounds, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setIconImages, setLocation, setLocation, setLocationByPlatform, setLocationRelativeTo, setMinimumSize, setModalExclusionType, setSize, setSize, setType, setVisible, show, toBack, toFront
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, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, transferFocusDownCycle, validate, validateTree
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, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, 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, 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, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resize, resize, revalidate, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setMaximumSize, setName, setPreferredSize, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
private static final long serialVersionUID
private static final org.slf4j.Logger log
private static final int MAX_DRAW_HEIGHT
private static final int MAX_DRAW_WIDTH
protected JTableSpreadsheetByRowAdapter adapter
private javax.swing.JScrollPane scrollPaneAsymptote
private javax.swing.JScrollPane scrollPaneSimulations
private javax.swing.JCheckBox chkCommonYears
private javax.swing.JCheckBox chkExcludeSeriesWithNoEvents
private javax.swing.JSpinner spnSeed
private javax.swing.JSpinner spnSimulations
private javax.swing.JSpinner spnThresholdValue
private javax.swing.JSplitPane splitPaneResults
private javax.swing.JPanel panelChart
private javax.swing.JTextField txtInputFile
private javax.swing.JComboBox cboEventType
private javax.swing.JComboBox cboResampling
private javax.swing.JComboBox cboThresholdType
private javax.swing.JComboBox cboChartMetric
private javax.swing.JComboBox cboSegment
private javax.swing.JProgressBar progressBar
private javax.swing.JPanel panelProgressBar
private FHSampleSize.DrawSSIZAnalysisTask task
private javax.swing.JButton btnCancelAnalysis
private java.lang.Boolean taskWasCancelled
private SSIZCurveChart curveChart
private SSIZResultsTable simulationsTable
private AsymptoteTable asymptoteTable
private SegmentationPanel segmentationPanel
private int segmentsDone
private java.lang.Boolean mouseListenersActive
private FHAESAction actionRun
private FHAESAction actionBrowse
private FHAESAction actionSaveAll
private FHAESAction actionExportPDF
private FHAESAction actionExportPNG
private FHAESAction actionClose
private FHX2FileReader reader
private java.lang.Boolean fileDialogWasUsed
public FHSampleSize(java.awt.Window parent)
parent
- public static void main(java.lang.String[] args)
private void initMenu()
private void initActions()
public void openFile(java.io.File theFHX2File)
theFHX2File
- private void initGUI()
public void actionPerformed(java.awt.event.ActionEvent evt)
actionPerformed
in interface java.awt.event.ActionListener
private java.io.File loadFromOpenFileDialog()
private java.io.File getFileFromSaveDialog(java.lang.String fileTypeToSave)
private java.lang.Boolean filePathHasValidFile(java.lang.String inFilePath)
private void setCheckBoxesToPrefKeyValues()
private SSIZAnalysisModel createSSIZAnalysisModel()
private void setGUIForFHFileReader()
private void runSSIZAnalysisTask()
private void displayChartAndTableOutput(SSIZAnalysisModel analysisModel)
public void populateFromAnalysisModel(SSIZAnalysisModel model)
model
- private void updateChart()
private void copyChartToClipboard()
private void copyTableToClipboard()
public void saveAll()