public class SupportForm extends javax.swing.JFrame
Modifier and Type | Class and Description |
---|---|
private class |
SupportForm.CancelListener |
javax.swing.JFrame.AccessibleJFrame
java.awt.Window.AccessibleAWTWindow, java.awt.Window.Type
Modifier and Type | Field and Description |
---|---|
private javax.swing.JTextField |
attachmentOneField |
private javax.swing.JTextField |
attachmentTwoField |
private javax.swing.JCheckBox |
bundleCheckBox |
private javax.swing.JButton |
cancelButton |
private javax.swing.JCheckBox |
ccCheckBox |
private StateCollector |
collector |
private javax.swing.JTextField |
confirmField |
private javax.swing.JPanel |
contentPane |
private javax.swing.JTextArea |
descriptionArea |
private javax.swing.JTextField |
emailField |
private static java.util.concurrent.ExecutorService |
exec |
private static java.lang.String |
HELP_ID |
private javax.swing.JButton |
helpButton |
private SupportForm.CancelListener |
listener |
private static org.slf4j.Logger |
logger |
private javax.swing.JTextField |
organizationField |
static java.lang.String |
PROP_SUPPORTREQ_BUNDLE |
static java.lang.String |
PROP_SUPPORTREQ_CC |
static java.lang.String |
PROP_SUPPORTREQ_CONFIRMEMAIL |
private javax.swing.JButton |
sendButton |
private ucar.unidata.idv.IdvObjectStore |
store |
private javax.swing.JTextField |
subjectField |
private javax.swing.JTextField |
userField |
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 |
---|
SupportForm(ucar.unidata.idv.IdvObjectStore store,
StateCollector collector)
Creates a support request form that collects information about
the current McIDAS-V session.
|
Modifier and Type | Method and Description |
---|---|
private static void |
attachFileToField(javax.swing.JTextField field) |
private void |
attachmentOneButtonActionPerformed(java.awt.event.ActionEvent evt) |
private void |
attachmentOneFieldMouseClicked(java.awt.event.MouseEvent evt) |
private void |
attachmentTwoButtonActionPerformed(java.awt.event.ActionEvent evt) |
private void |
attachmentTwoFieldMouseClicked(java.awt.event.MouseEvent evt) |
boolean |
canBundleState() |
boolean |
canSendLog()
Determine if
mcidasv.log can be sent to the Help Desk. |
boolean |
canSendResolvSrv()
Determine if
RESOLV.SRV can be sent to the Help Desk. |
boolean |
checkEmailAddresses()
Checks
emailField and confirmField to see if they
match (case is ignored). |
java.lang.String |
getAttachmentOne()
Returns whatever file path has monopolized
attachmentOneField . |
java.lang.String |
getAttachmentTwo()
Returns whatever file path has appeared within
attachmentTwoField . |
byte[] |
getBundledState() |
java.lang.String |
getBundledStateName() |
java.lang.String |
getConfirmedEmail()
Returns whatever currently lives in
confirmField . |
java.lang.String |
getDescription()
Returns whatever is ensconced inside
descriptionArea . |
java.lang.String |
getEmail()
Returns whatever currently lives in
emailField . |
byte[] |
getExtraState() |
java.lang.String |
getExtraStateName() |
java.lang.String |
getLogPath()
Get path to where
mcidasv.log should be located. |
java.lang.String |
getOrganization()
Returns whatever has commandeered
organizationField . |
java.lang.String |
getPrefsPath()
Get path to McV prefs file.
|
java.lang.String |
getResolvSrvPath()
Get the path to where the user's
RESOLV.SRV file should
be located. |
boolean |
getSendBundle() |
boolean |
getSendCopy() |
java.lang.String |
getSubject()
Returns whatever resides in
subjectField . |
java.lang.String |
getUser()
Returns whatever occupies
userField . |
boolean |
hasAttachmentOne()
Checks whether or not the user has attached a file in the
"first file" slot.
|
boolean |
hasAttachmentTwo()
Checks whether or not the user has attached a file in the
"second file" slot.
|
void |
initComponents()
Create the frame.
|
static void |
main(java.lang.String[] args)
Launch a test of the Support Request Form.
|
private void |
otherDoFocusThingNow()
Due to some fields persisting user input between McIDAS-V sessions we
set the focus to be on the first of these fields lacking input.
|
private void |
persistInput()
Saves user input for the following: name, email address, email address
confirmation, organization, whether or not to CC the user a copy, and
whether or not a "state" bundle should be included.
|
private void |
sendRequest(java.awt.event.ActionEvent evt) |
void |
showFailure(java.lang.String reason) |
private void |
showInvalidInputs() |
void |
showSuccess() |
private void |
unpersistInput()
Loads user input for the following: name, email address, email address
confirmation, organization, whether or not to CC the user a copy, and
whether or not a "state" bundle should be included.
|
private boolean |
validInput()
Checks to see if there is anything in the name, email,
email confirmation, subject, and description.
|
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 org.slf4j.Logger logger
public static final java.lang.String PROP_SUPPORTREQ_BUNDLE
public static final java.lang.String PROP_SUPPORTREQ_CC
public static final java.lang.String PROP_SUPPORTREQ_CONFIRMEMAIL
private static final java.lang.String HELP_ID
private static java.util.concurrent.ExecutorService exec
private final ucar.unidata.idv.IdvObjectStore store
private final StateCollector collector
private final SupportForm.CancelListener listener
private javax.swing.JPanel contentPane
private javax.swing.JTextField userField
private javax.swing.JTextField emailField
private javax.swing.JTextField confirmField
private javax.swing.JTextField organizationField
private javax.swing.JTextField subjectField
private javax.swing.JTextField attachmentOneField
private javax.swing.JTextField attachmentTwoField
private javax.swing.JTextArea descriptionArea
private javax.swing.JCheckBox bundleCheckBox
private javax.swing.JCheckBox ccCheckBox
private javax.swing.JButton sendButton
private javax.swing.JButton cancelButton
private javax.swing.JButton helpButton
public SupportForm(ucar.unidata.idv.IdvObjectStore store, StateCollector collector)
store
- Storage for persisted user input. Should not be null
.collector
- Collects information about the current session.private void persistInput()
You should initialize the GUI components before calling this method.
private void unpersistInput()
You should initialize the GUI components before calling this method.
public void initComponents()
public boolean checkEmailAddresses()
emailField
and confirmField
to see if they
match (case is ignored).true
if there is a match, false
otherwise.public java.lang.String getUser()
userField
.public java.lang.String getEmail()
emailField
.public java.lang.String getConfirmedEmail()
confirmField
.public java.lang.String getSubject()
subjectField
.public java.lang.String getOrganization()
organizationField
.public java.lang.String getDescription()
descriptionArea
.public boolean hasAttachmentOne()
true
if there's a file, false
otherwise.public boolean hasAttachmentTwo()
true
if there's a file, false
otherwise.public java.lang.String getAttachmentOne()
attachmentOneField
.public java.lang.String getAttachmentTwo()
attachmentTwoField
.public boolean getSendCopy()
public boolean getSendBundle()
public byte[] getExtraState()
public java.lang.String getExtraStateName()
public boolean canBundleState()
public byte[] getBundledState()
public java.lang.String getBundledStateName()
public boolean canSendLog()
mcidasv.log
can be sent to the Help Desk.true
if mcidasv.log
exists, false
otherwise.public java.lang.String getLogPath()
mcidasv.log
should be located.mcidasv.log
. Note: the file may not exist!public boolean canSendResolvSrv()
RESOLV.SRV
can be sent to the Help Desk.true
if RESOLV.SRV
exists, false
otherwise.public java.lang.String getResolvSrvPath()
RESOLV.SRV
file should
be located.RESOLV.SRV
. Note: the file may not exist!public java.lang.String getPrefsPath()
public void showSuccess()
public void showFailure(java.lang.String reason)
private boolean validInput()
true
if all of the required fields have some sort of
input, false
otherwise.private void attachmentOneButtonActionPerformed(java.awt.event.ActionEvent evt)
private void attachmentTwoButtonActionPerformed(java.awt.event.ActionEvent evt)
private void attachmentOneFieldMouseClicked(java.awt.event.MouseEvent evt)
private void attachmentTwoFieldMouseClicked(java.awt.event.MouseEvent evt)
private void showInvalidInputs()
private void sendRequest(java.awt.event.ActionEvent evt)
private void otherDoFocusThingNow()
private static void attachFileToField(javax.swing.JTextField field)
public static void main(java.lang.String[] args)
args
- Ignored.