|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.awt.Component java.awt.Container java.awt.Window java.awt.Frame javax.swing.JFrame edu.wisc.ssec.mcidasv.supportform.SupportForm
public class SupportForm
This class handles all the GUI elements of a McIDAS-V support request.
Nested Class Summary | |
---|---|
private class |
SupportForm.CancelListener
|
Nested classes/interfaces inherited from class javax.swing.JFrame |
---|
JFrame.AccessibleJFrame |
Nested classes/interfaces inherited from class java.awt.Frame |
---|
Frame.AccessibleAWTFrame |
Nested classes/interfaces inherited from class java.awt.Window |
---|
Window.AccessibleAWTWindow |
Nested classes/interfaces inherited from class java.awt.Container |
---|
Container.AccessibleAWTContainer |
Nested classes/interfaces inherited from class java.awt.Component |
---|
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy |
Field Summary | |
---|---|
private JTextField |
attachmentOneField
|
private JTextField |
attachmentTwoField
|
private JCheckBox |
bundleCheckBox
|
private JButton |
cancelButton
|
private JCheckBox |
ccCheckBox
|
private StateCollector |
collector
|
private JTextField |
confirmField
|
private JPanel |
contentPane
|
private JTextArea |
descriptionArea
|
private JTextField |
emailField
|
private static ExecutorService |
exec
|
private static String |
HELP_ID
|
private JButton |
helpButton
|
private SupportForm.CancelListener |
listener
|
private JTextField |
organizationField
|
static String |
PROP_SUPPORTREQ_BUNDLE
|
static String |
PROP_SUPPORTREQ_CC
|
static String |
PROP_SUPPORTREQ_CONFIRMEMAIL
|
private JButton |
sendButton
|
private IdvObjectStore |
store
|
private JTextField |
subjectField
|
private JTextField |
userField
|
Fields inherited from class javax.swing.JFrame |
---|
accessibleContext, EXIT_ON_CLOSE, rootPane, rootPaneCheckingEnabled |
Fields inherited from class java.awt.Frame |
---|
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 |
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, HIDE_ON_CLOSE |
Fields inherited from interface java.awt.image.ImageObserver |
---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
---|---|
SupportForm(IdvObjectStore store,
StateCollector collector)
Creates a support request form that collects information about the current McIDAS-V session. |
Method Summary | |
---|---|
private static void |
attachFileToField(JTextField field)
|
private void |
attachmentOneButtonActionPerformed(ActionEvent evt)
|
private void |
attachmentOneFieldMouseClicked(MouseEvent evt)
|
private void |
attachmentTwoButtonActionPerformed(ActionEvent evt)
|
private void |
attachmentTwoFieldMouseClicked(MouseEvent evt)
|
boolean |
canBundleState()
|
boolean |
canSendLog()
|
boolean |
checkEmailAddresses()
Checks emailField and confirmField to see if they
match (case is ignored). |
String |
getAttachmentOne()
Returns whatever file path has monopolized attachmentOneField . |
String |
getAttachmentTwo()
Returns whatever file path has appeared within attachmentTwoField . |
byte[] |
getBundledState()
|
String |
getBundledStateName()
|
String |
getConfirmedEmail()
Returns whatever currently lives in confirmField . |
String |
getDescription()
Returns whatever is ensconced inside descriptionArea . |
String |
getEmail()
Returns whatever currently lives in emailField . |
byte[] |
getExtraState()
|
String |
getExtraStateName()
|
String |
getLogPath()
|
String |
getOrganization()
Returns whatever has commandeered organizationField . |
boolean |
getSendBundle()
|
boolean |
getSendCopy()
|
String |
getSubject()
Returns whatever resides in subjectField . |
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(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(ActionEvent evt)
|
void |
showFailure(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. |
Methods inherited from class java.awt.Frame |
---|
addNotify, getCursorType, getExtendedState, getFrames, getIconImage, getMaximizedBounds, getMenuBar, getState, getTitle, isResizable, isUndecorated, remove, removeNotify, setCursor, setExtendedState, setMaximizedBounds, setMenuBar, setResizable, setState, setTitle, setUndecorated |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.awt.MenuContainer |
---|
getFont, postEvent |
Field Detail |
---|
public static final String PROP_SUPPORTREQ_BUNDLE
public static final String PROP_SUPPORTREQ_CC
public static final String PROP_SUPPORTREQ_CONFIRMEMAIL
private static final String HELP_ID
private static ExecutorService exec
private final IdvObjectStore store
private final StateCollector collector
private final SupportForm.CancelListener listener
private JPanel contentPane
private JTextField userField
private JTextField emailField
private JTextField confirmField
private JTextField organizationField
private JTextField subjectField
private JTextField attachmentOneField
private JTextField attachmentTwoField
private JTextArea descriptionArea
private JCheckBox bundleCheckBox
private JCheckBox ccCheckBox
private JButton sendButton
private JButton cancelButton
private JButton helpButton
Constructor Detail |
---|
public SupportForm(IdvObjectStore store, StateCollector collector)
store
- Storage for persisted user input. Should not be null
.collector
- Collects information about the current session.Method Detail |
---|
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 String getUser()
userField
.
public String getEmail()
emailField
.
public String getConfirmedEmail()
confirmField
.
public String getSubject()
subjectField
.
public String getOrganization()
organizationField
.
public 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 String getAttachmentOne()
attachmentOneField
.
public String getAttachmentTwo()
attachmentTwoField
.
public boolean getSendCopy()
public boolean getSendBundle()
public byte[] getExtraState()
public String getExtraStateName()
public boolean canBundleState()
public byte[] getBundledState()
public String getBundledStateName()
public boolean canSendLog()
public String getLogPath()
public void showSuccess()
public void showFailure(String reason)
private boolean validInput()
true
if all of the required fields have some sort of
input, false
otherwise.private void attachmentOneButtonActionPerformed(ActionEvent evt)
private void attachmentTwoButtonActionPerformed(ActionEvent evt)
private void attachmentOneFieldMouseClicked(MouseEvent evt)
private void attachmentTwoFieldMouseClicked(MouseEvent evt)
private void showInvalidInputs()
private void sendRequest(ActionEvent evt)
private void otherDoFocusThingNow()
private static void attachFileToField(JTextField field)
public static void main(String[] args)
args
- Ignored.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |