public class WelcomeWindow extends 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.
JDialog.AccessibleJDialog
Dialog.AccessibleAWTDialog, Dialog.ModalExclusionType, Dialog.ModalityType
Window.AccessibleAWTWindow, Window.Type
Container.AccessibleAWTContainer
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
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 JPanel |
buttonPanel |
private 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 String |
ERROR_MESSAGE
Message to display if there was a problem loading
WELCOME_HTML . |
private static String |
LOGO_PATH
Path to "header" image.
|
private JLabel |
logoLabel |
private JPanel |
logoPanel |
private JPanel |
mainPanel |
private JButton |
quitButton |
private JScrollPane |
scrollPane |
private JButton |
startButton |
private JTextPane |
textPane |
private static String |
WELCOME_HTML
Path to the HTML to display within
textPane . |
private static Dimension |
WINDOW_SIZE
Dimensions of the welcome window frame.
|
accessibleContext, rootPane, rootPaneCheckingEnabled
DEFAULT_MODALITY_TYPE
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, EXIT_ON_CLOSE, HIDE_ON_CLOSE
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor and Description |
---|
WelcomeWindow()
Creates new form WelcomeWindow.
|
WelcomeWindow(boolean autoQuit,
long delay) |
Modifier and Type | Method and Description |
---|---|
private void |
formWindowClosing(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(String[] args)
Kick the tires.
|
private void |
quitButtonActionPerformed(ActionEvent evt)
Handles the user clicking on
quitButton . |
void |
setVisible(boolean visible)
Show or close the Welcome Window.
|
private void |
startButtonActionPerformed(ActionEvent evt)
Handles the user clicking on
startButton . |
private void |
textPaneHyperlinkUpdate(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 String LOGO_PATH
private static final String WELCOME_HTML
textPane
.private static final String ERROR_MESSAGE
WELCOME_HTML
.private static final Dimension WINDOW_SIZE
public static final long DEFAULT_QUIT_DELAY
private final boolean autoQuit
private final long autoQuitDelay
private final JPanel buttonPanel
private final JButton quitButton
private final JScrollPane scrollPane
private final JButton startButton
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 Dialog
visible
- Whether or not the dialog should be opened or closed.private void startButtonActionPerformed(ActionEvent evt)
startButton
.evt
- Event to handle. Currently ignored.private void quitButtonActionPerformed(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(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(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)