public class SampleInputPanel
extends javax.swing.JPanel
implements javax.swing.event.ChangeListener, java.beans.PropertyChangeListener
Modifier and Type | Class and Description |
---|---|
private class |
SampleInputPanel.DrawEventPanelTask
DrawEventPanelTask Class.
|
private class |
SampleInputPanel.ScrollViewport
ScrollViewport Class.
|
javax.swing.JPanel.AccessibleJPanel
javax.swing.JComponent.AccessibleJComponent
Modifier and Type | Field and Description |
---|---|
private javax.swing.JButton |
addEventButton |
private javax.swing.JButton |
addRecordingButton |
private javax.swing.JButton |
autoPopulateButton |
private static javax.swing.JCheckBox |
barkCheckBox |
private javax.swing.JPanel |
buttonsPanel |
private javax.swing.JButton |
consolidateButton |
private javax.swing.JButton |
deleteEventButton |
private javax.swing.JButton |
deleteRecordingButton |
private javax.swing.JButton |
deleteSampleButton |
private boolean |
done |
private javax.swing.JScrollPane |
eventScrollPane |
private EventTable |
eventTable |
static int |
FIRST_YEAR_ASCENDING |
static int |
FIRST_YEAR_DESCENDING |
private boolean |
firstTimeLoading |
private javax.swing.JLabel |
firstYearLabel |
private BCADYearSpinner |
firstYearSpinner |
private javax.swing.JPanel |
headerPanel |
private boolean |
ignoreEventsFlag |
private FHX2_FileRequiredPart |
inReqPart |
private javax.swing.JMenuItem |
jMenuItem1 |
private javax.swing.JMenuItem |
jMenuItem2 |
private javax.swing.JPopupMenu |
jPopupMenu1 |
static int |
LAST_YEAR_ASCENDING |
static int |
LAST_YEAR_DESCENDING |
private javax.swing.JLabel |
lastYearLabel |
private BCADYearSpinner |
lastYearSpinner |
private static org.slf4j.Logger |
log |
static int |
MANUAL_SORTING |
static int |
MAXIMUM_SAMPLE_NAME_LENGTH |
static int |
MINIMUM_SAMPLE_NAME_LENGTH |
static java.lang.String |
MINIMUM_SAMPLE_NAME_LENGTH_MESSAGE |
private javax.swing.JButton |
moveDownButton |
private javax.swing.JButton |
moveUpButton |
static int |
NAME_ASCENDING |
static int |
NAME_DESCENDING |
private boolean |
needToRefreshPanel |
private javax.swing.JButton |
newSampleButton |
private static int |
NUM_SAMPLES_REQURIED_FOR_MANUAL_SORT |
private static javax.swing.JCheckBox |
pithCheckBox |
private javax.swing.JProgressBar |
progressBar |
private javax.swing.JPanel |
progressBarContainer |
private javax.swing.JScrollPane |
recordingScrollPane |
private RecordingTable |
recordingTable |
private javax.swing.JPanel |
sampleDataPanel |
protected javax.swing.JList |
sampleListBox |
private javax.swing.JPanel |
sampleListPanel |
private javax.swing.JPanel |
sampleNameContainer |
private javax.swing.JLabel |
sampleNameLabel |
private javax.swing.JTextField |
sampleNameTextBox |
private javax.swing.JScrollPane |
sampleScrollPane |
private boolean |
selectedSampleIndexChanged |
private static long |
serialVersionUID |
private javax.swing.JComboBox |
sortByComboBox |
private javax.swing.JLabel |
sortByLabel |
private javax.swing.JPanel |
sortSamplesPanel |
private javax.swing.JSplitPane |
splitPane |
private SampleInputPanel.DrawEventPanelTask |
task |
listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
Constructor and Description |
---|
SampleInputPanel()
Constructor for SampleinputPanel.
|
SampleInputPanel(FHX2_FileRequiredPart inReqPart)
Alternative constructor for SampleInputPanel.
|
Modifier and Type | Method and Description |
---|---|
private void |
addEventButtonActionPerformed(java.awt.event.ActionEvent evt)
Handles when the "Add Event" button is clicked.
|
private void |
addRecordingButtonActionPerformed(java.awt.event.ActionEvent evt)
Handles when the "Add Recording" button is clicked.
|
private void |
autoPopulateButtonActionPerformed(java.awt.event.ActionEvent evt)
Automatically populate the recording years, either from the first event or the beginning of the sample depending on input from the
user.
|
private void |
createSampleHeaderPanel()
Generates the header panel and the components it contains.
|
private void |
deleteEventButtonActionPerformed(java.awt.event.ActionEvent evt)
Handles when the "Delete Event" button is clicked.
|
private void |
deleteRecordingButtonActionPerformed(java.awt.event.ActionEvent evt)
Handles when the "Delete Recording" button is clicked.
|
private void |
deleteSampleButtonActionPerformed(java.awt.event.ActionEvent evt)
Handles when the "Delete Sample" button is clicked.
|
private void |
disableAndHideDataPanelComponents()
Disables and hides specific components on the sampleDataPanel.
|
private void |
displaySampleName(java.lang.String name)
Updates the border text according to the name of the sample that is currently loaded.
|
private void |
enableAndShowDataPanelComponents()
Enables and shows specific components on the sampleDataPanel.
|
private void |
handleUpdatedIndex()
Handles updating of the SampleInputPanel's internal control flags when the selected sample index is changed.
|
private void |
initGUI()
Initializes the GUI.
|
private void |
mergeRecordingsButtonActionPerformed(java.awt.event.ActionEvent evt)
Handles when the "Merge Recordings" button is clicked.
|
private void |
newSampleButtonActionPerformed(java.awt.event.ActionEvent evt)
Handles when the "New Sample" button is clicked.
|
void |
propertyChange(java.beans.PropertyChangeEvent evt)
Updates the progress bar whenever the PropertyChangeEvent is triggered.
|
void |
redrawSampleDataPanel(int selectedSampleIndex)
Repaints the header, event, and recording panels.
|
void |
redrawSampleListPanel()
Repaints the sample list.
|
static void |
setCheckBoxEnabledValues()
Enables or disables the pith and bark check-boxes according to whether or not the sample starts or ends with an event.
|
private void |
setEventBorderText(java.lang.String text)
Updates the text that is displayed on the border of the event panel.
|
void |
setSortByComboBoxValue(int index)
Sets the index of the sortByComboBox according to the input index.
|
void |
stateChanged(javax.swing.event.ChangeEvent e)
Redraws the sample list panel unless the ignore events flag is set.
|
private void |
updateSampleNameInData()
Updates the sample name in the data.
|
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate, validateTree
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
private static final long serialVersionUID
private static final org.slf4j.Logger log
public static final java.lang.String MINIMUM_SAMPLE_NAME_LENGTH_MESSAGE
public static final int MAXIMUM_SAMPLE_NAME_LENGTH
public static final int MINIMUM_SAMPLE_NAME_LENGTH
private static final int NUM_SAMPLES_REQURIED_FOR_MANUAL_SORT
public static final int MANUAL_SORTING
public static final int NAME_ASCENDING
public static final int NAME_DESCENDING
public static final int FIRST_YEAR_ASCENDING
public static final int FIRST_YEAR_DESCENDING
public static final int LAST_YEAR_ASCENDING
public static final int LAST_YEAR_DESCENDING
private EventTable eventTable
private RecordingTable recordingTable
private javax.swing.JButton deleteSampleButton
private javax.swing.JMenuItem jMenuItem1
private javax.swing.JMenuItem jMenuItem2
private javax.swing.JPopupMenu jPopupMenu1
private javax.swing.JButton newSampleButton
private javax.swing.JPanel sampleListPanel
private javax.swing.JPanel sampleDataPanel
private javax.swing.JSplitPane splitPane
private javax.swing.JPanel buttonsPanel
private javax.swing.JScrollPane sampleScrollPane
private javax.swing.JPanel sortSamplesPanel
private javax.swing.JLabel sortByLabel
private javax.swing.JButton moveDownButton
private javax.swing.JButton moveUpButton
private javax.swing.JPanel headerPanel
private javax.swing.JPanel sampleNameContainer
private javax.swing.JLabel sampleNameLabel
private javax.swing.JTextField sampleNameTextBox
private javax.swing.JLabel firstYearLabel
private javax.swing.JLabel lastYearLabel
private FHX2_FileRequiredPart inReqPart
private javax.swing.JPanel progressBarContainer
private javax.swing.JProgressBar progressBar
private SampleInputPanel.DrawEventPanelTask task
private javax.swing.JScrollPane eventScrollPane
private javax.swing.JScrollPane recordingScrollPane
private javax.swing.JButton addEventButton
private javax.swing.JButton addRecordingButton
private javax.swing.JButton deleteEventButton
private javax.swing.JButton deleteRecordingButton
private javax.swing.JButton consolidateButton
private javax.swing.JButton autoPopulateButton
private BCADYearSpinner firstYearSpinner
private BCADYearSpinner lastYearSpinner
protected javax.swing.JList sampleListBox
private javax.swing.JComboBox sortByComboBox
private static javax.swing.JCheckBox pithCheckBox
private static javax.swing.JCheckBox barkCheckBox
private boolean firstTimeLoading
private boolean ignoreEventsFlag
private boolean needToRefreshPanel
private boolean selectedSampleIndexChanged
private boolean done
public SampleInputPanel()
public SampleInputPanel(FHX2_FileRequiredPart inReqPart)
inReqPart
- private void autoPopulateButtonActionPerformed(java.awt.event.ActionEvent evt)
evt
- private void createSampleHeaderPanel()
private void newSampleButtonActionPerformed(java.awt.event.ActionEvent evt)
evt
- private void deleteSampleButtonActionPerformed(java.awt.event.ActionEvent evt)
evt
- private void addEventButtonActionPerformed(java.awt.event.ActionEvent evt)
evt
- private void deleteEventButtonActionPerformed(java.awt.event.ActionEvent evt)
evt
- private void addRecordingButtonActionPerformed(java.awt.event.ActionEvent evt)
evt
- private void deleteRecordingButtonActionPerformed(java.awt.event.ActionEvent evt)
evt
- private void mergeRecordingsButtonActionPerformed(java.awt.event.ActionEvent evt)
evt
- private void setEventBorderText(java.lang.String text)
text
- public void setSortByComboBoxValue(int index)
index
- private void displaySampleName(java.lang.String name)
name
- public void propertyChange(java.beans.PropertyChangeEvent evt)
propertyChange
in interface java.beans.PropertyChangeListener
private void updateSampleNameInData()
public void redrawSampleListPanel()
public void redrawSampleDataPanel(int selectedSampleIndex)
selectedSampleIndex
- public static void setCheckBoxEnabledValues()
private void enableAndShowDataPanelComponents()
private void disableAndHideDataPanelComponents()
private void handleUpdatedIndex()
public void stateChanged(javax.swing.event.ChangeEvent e)
stateChanged
in interface javax.swing.event.ChangeListener
private void initGUI()