public class WelcomeWindow extends javax.swing.JDialog
WelcomeWindow
is really just intended to try to detect known
hardware problems and inform the user about any problems.
The current implementation does not perform any detection, but expect this to change.
javax.swing.JDialog.AccessibleJDialog
java.awt.Dialog.AccessibleAWTDialog, java.awt.Dialog.ModalExclusionType, java.awt.Dialog.ModalityType
java.awt.Window.AccessibleAWTWindow, java.awt.Window.Type
Modifier and Type | Field and Description |
---|---|
private boolean |
autoQuit
Whether or not the window should automatically close.
|
private long |
autoQuitDelay
Delay in milliseconds for auto-quitting.
|
private javax.swing.JPanel |
buttonPanel |
private java.net.URL |
contents
Java-friendly location of the path to the welcome message.
|
static long |
DEFAULT_QUIT_DELAY
Default auto-quit delay (in milliseconds).
|
private static java.lang.String |
ERROR_MESSAGE
Message to display if there was a problem loading
WELCOME_HTML . |
private static java.lang.String |
LOGO_PATH
Path to "header" image.
|
private javax.swing.JLabel |
logoLabel |
private javax.swing.JPanel |
logoPanel |
private javax.swing.JPanel |
mainPanel |
private javax.swing.JButton |
quitButton |
private javax.swing.JScrollPane |
scrollPane |
private javax.swing.JButton |
startButton |
private javax.swing.JTextPane |
textPane |
private static java.lang.String |
WELCOME_HTML
Path to the HTML to display within
textPane . |
private static java.awt.Dimension |
WINDOW_SIZE
Dimensions of the welcome window frame.
|
accessibleContext, rootPane, rootPaneCheckingEnabled
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
Constructor and Description |
---|
WelcomeWindow()
Creates new form WelcomeWindow.
|
WelcomeWindow(boolean autoQuit,
long delay) |
Modifier and Type | Method and Description |
---|---|
private void |
formWindowClosing(java.awt.event.WindowEvent evt)
Handles the user opting to close the welcome window
JFrame . |
private void |
initComponents()
This method is called from within the constructor to
initialize the form.
|
static void |
main(java.lang.String[] args)
Kick the tires.
|
private void |
quitButtonActionPerformed(java.awt.event.ActionEvent evt)
Handles the user clicking on
quitButton . |
void |
setVisible(boolean visible)
Show or close the Welcome Window.
|
private void |
startButtonActionPerformed(java.awt.event.ActionEvent evt)
Handles the user clicking on
startButton . |
private void |
textPaneHyperlinkUpdate(javax.swing.event.HyperlinkEvent evt)
Listens to
textPane in order to handle the user clicking on
HTML links. |
addImpl, createRootPane, dialogInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getGraphics, getJMenuBar, getLayeredPane, getRootPane, getTransferHandler, isDefaultLookAndFeelDecorated, isRootPaneCheckingEnabled, paramString, processWindowEvent, remove, repaint, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, setTransferHandler, update
addNotify, getModalityType, getTitle, hide, isModal, isResizable, isUndecorated, setBackground, setModal, setModalityType, setOpacity, setResizable, setShape, setTitle, setUndecorated, show, toBack
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, isActive, isAlwaysOnTop, isAlwaysOnTopSupported, isAutoRequestFocus, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isOpaque, isShowing, isValidateRoot, pack, paint, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeNotify, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, reshape, setAlwaysOnTop, setAutoRequestFocus, setBounds, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setIconImage, setIconImages, setLocation, setLocation, setLocationByPlatform, setLocationRelativeTo, setMinimumSize, setModalExclusionType, setSize, setSize, setType, 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, remove, 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 java.lang.String LOGO_PATH
private static final java.lang.String WELCOME_HTML
textPane
.private static final java.lang.String ERROR_MESSAGE
WELCOME_HTML
.private static final java.awt.Dimension WINDOW_SIZE
public static final long DEFAULT_QUIT_DELAY
private final java.net.URL contents
private final boolean autoQuit
private final long autoQuitDelay
private final javax.swing.JPanel buttonPanel
private final javax.swing.JLabel logoLabel
private final javax.swing.JPanel logoPanel
private final javax.swing.JPanel mainPanel
private final javax.swing.JButton quitButton
private final javax.swing.JScrollPane scrollPane
private final javax.swing.JButton startButton
private final javax.swing.JTextPane textPane
public WelcomeWindow()
public WelcomeWindow(boolean autoQuit, long delay)
private void initComponents()
public void setVisible(boolean visible)
Overridden in McV to handle auto-quitting. If we're supposed to
auto-quit, a thread will be started that calls AbstractButton.doClick()
.
setVisible
in class java.awt.Dialog
visible
- Whether or not the dialog should be opened or closed.private void startButtonActionPerformed(java.awt.event.ActionEvent evt)
startButton
.evt
- Event to handle. Currently ignored.private void quitButtonActionPerformed(java.awt.event.ActionEvent evt)
quitButton
. Doesn't do anything
aside from handing off things to
formWindowClosing(WindowEvent)
evt
- Event to handle. Currently ignored.formWindowClosing(WindowEvent)
private void formWindowClosing(java.awt.event.WindowEvent evt)
JFrame
. Executes System.exit(1)
in an
effort to signal to the startup scripts that window terminated
"abnormally".
An abnormal termination will result in the startup script terminating the launch of McIDAS-V.
evt
- Event to handle. Currently ignored.private void textPaneHyperlinkUpdate(javax.swing.event.HyperlinkEvent evt)
textPane
in order to handle the user clicking on
HTML links.evt
- Event to handle. Anything other than
an "ACTIVATED"
HyperlinkEvent.EventType
is ignored.WebBrowser.browse(String)
public static void main(java.lang.String[] args)
args
- Command line arguments