public class JSEAFrame
extends javax.swing.JFrame
implements java.awt.event.ActionListener
javax.swing.JFrame.AccessibleJFrame
java.awt.Window.AccessibleAWTWindow, java.awt.Window.Type
Modifier and Type | Field and Description |
---|---|
private FHAESAction |
actionChartProperties |
private FHAESAction |
actionCopy |
private FHAESAction |
actionFileExit |
private FHAESAction |
actionReset |
private FHAESAction |
actionRun |
private FHAESAction |
actionSaveAll |
private FHAESAction |
actionSaveChart |
private FHAESAction |
actionSaveData |
private FHAESAction |
actionSaveReport |
private JTableSpreadsheetByRowAdapter |
adapterActualTable |
private JTableSpreadsheetByRowAdapter |
adapterSimulationTable |
private JSEABarChart |
barChart |
private javax.swing.JButton |
btnEventListFile |
private javax.swing.JButton |
btnTimeSeriesFile |
protected javax.swing.JComboBox |
cbxPValue |
private javax.swing.JPanel |
chartPanel |
private javax.swing.JCheckBox |
chkAllYears |
private javax.swing.JCheckBox |
chkIncludeIncompleteWindow |
protected java.util.ArrayList<java.lang.Double> |
chronologyActual |
protected java.util.ArrayList<java.lang.Integer> |
chronologyYears |
private javax.swing.JPanel |
contentPanel |
private javax.swing.JPanel |
dataPanel |
protected java.util.ArrayList<java.lang.Integer> |
events |
protected JSEAStatsFunctions |
jsea |
private static org.slf4j.Logger |
log |
static int |
MAX_DRAW_HEIGHT |
static int |
MAX_DRAW_WIDTH |
private javax.swing.JMenu |
mnSave |
private javax.swing.JLabel |
plotSegmentLabel |
private javax.swing.JScrollPane |
scrollPane |
protected SegmentationPanel |
segmentationPanel |
private javax.swing.JComboBox |
segmentComboBox |
private static long |
serialVersionUID |
private javax.swing.JSpinner |
spnFirstYear |
private javax.swing.JSpinner |
spnLagsAfter |
private javax.swing.JSpinner |
spnLagsPrior |
private javax.swing.JSpinner |
spnLastYear |
private javax.swing.JSpinner |
spnSeedNumber |
private javax.swing.JSpinner |
spnSimulationsToRun |
private javax.swing.JPanel |
summaryPanel |
private javax.swing.JTabbedPane |
tabbedPane |
private org.jdesktop.swingx.JXTable |
tblActual |
private org.jdesktop.swingx.JXTable |
tblSimulation |
private javax.swing.JTextField |
txtChartTitle |
private javax.swing.JTextField |
txtEventListFile |
private javax.swing.JTextArea |
txtSummary |
private javax.swing.JTextField |
txtTimeSeriesFile |
private TextComponentWrapper |
txtwrapper |
private javax.swing.JTextField |
txtYAxisLabel |
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 |
---|
JSEAFrame(java.awt.Component parent)
Create the dialog.
|
Modifier and Type | Method and Description |
---|---|
void |
actionPerformed(java.awt.event.ActionEvent event) |
private static void |
addPopup(java.awt.Component component,
javax.swing.JPopupMenu popup)
Show popup menu
|
void |
copyCurrentSelectionToClipboard()
Copy the currently table cells to the clipboard.
|
private char |
getDelimiter(java.lang.String filename,
java.lang.Integer countOfGoodItems)
Read a text file and determine what the delimiter is.
|
private java.lang.Integer |
getGoodLineCount(java.lang.String filename,
char delimiter,
java.lang.Integer countOfGoodItems)
Parse a delimited using the specified filename and delimiter are return how many lines contain the correct number of items
|
private void |
initActions()
Initialize the menu/toolbar actions.
|
java.lang.Boolean |
parseEventListFile()
Parse the events file to extract years with events
|
java.lang.Boolean |
parseTimeSeriesFile()
Parse the specified time series file
|
private void |
populateSegmentComboBoxAndDrawChart(SegmentTableModel tableModel)
Populates the segmentComboBox with the segments from the analysis.
|
private void |
runAnalysis()
Actually perform the Superposed Epoch Analysis
|
private void |
saveChartPDF(java.io.File file)
Save the chart to the specified file in PDF format
|
private void |
saveChartPNG(java.io.File file)
Save the chart to the specified file in PNG format
|
private void |
saveDataCSV(java.io.File folder)
Save the data tables as CSV file
|
private void |
saveDataXLS(java.io.File file)
Save the data tables as XLS file
|
private void |
saveReportPDF(java.io.File file)
Save the report as a PDF
|
private void |
saveReportTXT(java.io.File file)
Save the report as a text file
|
private void |
setAnalysisAvailable(java.lang.Boolean b)
Set up the GUI depending on whether the analysis results are available.
|
private void |
setScrollBarToTop()
Sets the value of the scroll bar to zero.
|
void |
setToDefault()
Reset parameters to the default values
|
private void |
setupGui()
Setup the GUI components
|
private void |
setupMenu()
Setup menu bar
|
private void |
setupToolbar()
Setup toolbar.
|
private void |
setYearRangeGUI()
Set up the year range GUI depending on whether the 'all years' checkbox is ticked
|
private void |
validateForm()
Check whether we have all the info we need to process
|
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
public static final int MAX_DRAW_HEIGHT
public static final int MAX_DRAW_WIDTH
private final javax.swing.JPanel contentPanel
private javax.swing.JTextField txtTimeSeriesFile
private javax.swing.JTextField txtEventListFile
private javax.swing.JTextField txtChartTitle
private javax.swing.JTextField txtYAxisLabel
private javax.swing.JButton btnEventListFile
private javax.swing.JButton btnTimeSeriesFile
private javax.swing.JCheckBox chkIncludeIncompleteWindow
private javax.swing.JSpinner spnSimulationsToRun
protected javax.swing.JComboBox cbxPValue
private javax.swing.JSpinner spnSeedNumber
private javax.swing.JSpinner spnLagsAfter
private javax.swing.JSpinner spnLagsPrior
protected JSEAStatsFunctions jsea
private javax.swing.JTabbedPane tabbedPane
private javax.swing.JMenu mnSave
private TextComponentWrapper txtwrapper
private JTableSpreadsheetByRowAdapter adapterActualTable
private JTableSpreadsheetByRowAdapter adapterSimulationTable
private static final org.slf4j.Logger log
protected java.util.ArrayList<java.lang.Integer> chronologyYears
protected java.util.ArrayList<java.lang.Double> chronologyActual
protected java.util.ArrayList<java.lang.Integer> events
private javax.swing.JSpinner spnFirstYear
private javax.swing.JSpinner spnLastYear
private javax.swing.JCheckBox chkAllYears
private FHAESAction actionFileExit
private FHAESAction actionReset
private FHAESAction actionRun
private FHAESAction actionSaveAll
private FHAESAction actionSaveData
private FHAESAction actionSaveReport
private FHAESAction actionSaveChart
private FHAESAction actionCopy
private FHAESAction actionChartProperties
protected SegmentationPanel segmentationPanel
private javax.swing.JPanel summaryPanel
private javax.swing.JTextArea txtSummary
private javax.swing.JScrollPane scrollPane
private javax.swing.JPanel dataPanel
private org.jdesktop.swingx.JXTable tblActual
private org.jdesktop.swingx.JXTable tblSimulation
private javax.swing.JPanel chartPanel
private JSEABarChart barChart
private javax.swing.JLabel plotSegmentLabel
private javax.swing.JComboBox segmentComboBox
public void copyCurrentSelectionToClipboard()
private void setupToolbar()
private void setupMenu()
private void initActions()
private void saveDataXLS(java.io.File file) throws java.io.IOException
file
- java.io.IOException
private void saveDataCSV(java.io.File folder) throws java.io.IOException
folder
- java.io.IOException
private void saveReportTXT(java.io.File file) throws java.io.IOException
file
- java.io.IOException
private void saveReportPDF(java.io.File file) throws java.io.IOException
file
- java.io.IOException
private void saveChartPNG(java.io.File file) throws java.io.IOException
file
- java.io.IOException
private void saveChartPDF(java.io.File file) throws java.io.IOException
file
- java.io.IOException
private void runAnalysis()
private void setAnalysisAvailable(java.lang.Boolean b)
b
- private void setupGui()
private void setYearRangeGUI()
private void populateSegmentComboBoxAndDrawChart(SegmentTableModel tableModel)
tableModel
- public void actionPerformed(java.awt.event.ActionEvent event)
actionPerformed
in interface java.awt.event.ActionListener
private char getDelimiter(java.lang.String filename, java.lang.Integer countOfGoodItems)
filename
- countOfGoodItems
- private java.lang.Integer getGoodLineCount(java.lang.String filename, char delimiter, java.lang.Integer countOfGoodItems)
filename
- delimiter
- countOfGoodItems
- public java.lang.Boolean parseEventListFile()
public java.lang.Boolean parseTimeSeriesFile()
private void setScrollBarToTop()
public void setToDefault()
private void validateForm()
private static void addPopup(java.awt.Component component, javax.swing.JPopupMenu popup)
component
- popup
-