com.glaivestone.javax.swing
Class SplashScreenWindow

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--java.awt.Window
                    |
                    +--javax.swing.JWindow
                          |
                          +--com.glaivestone.javax.swing.SplashScreenWindow
All Implemented Interfaces:
javax.accessibility.Accessible, java.awt.image.ImageObserver, java.awt.MenuContainer, javax.swing.RootPaneContainer, java.io.Serializable

public class SplashScreenWindow
extends javax.swing.JWindow

A main window which displays an image such as an application startup splash screen.

Several flavors of static convenience openOn methods are provided to simplify the standard case of displaying a splash screen image centered on the desktop screen region. The client is responsible for arranging to close the splash screen, since there is no provision (or desire) for the user to do so.

Author:
Deb Lewis
See Also:
Serialized Form

Field Summary
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
SplashScreenWindow(javax.swing.Icon anImage)
           
SplashScreenWindow(javax.swing.Icon anImage, javax.swing.border.Border aBorder)
           
 
Method Summary
 void centerOnScreen()
          Set the window's location so that it is centered on the screen.
static javax.swing.border.Border defaultBorder()
          Answer the default border for a splash screen.
static SplashScreenWindow openOn(java.io.File aFile)
          Open a splash screen window containing the image in the specified file.
static SplashScreenWindow openOn(javax.swing.Icon anImage)
          Open a splash screen window containing the given image.
static SplashScreenWindow openOn(javax.swing.Icon anImage, javax.swing.border.Border aBorder)
          Open a splash screen window containing the given image.
static SplashScreenWindow openOn(java.lang.String aPathName)
          Open a splash screen window containing the image in the specified file.
 
Methods inherited from class javax.swing.JWindow
getAccessibleContext, getContentPane, getGlassPane, getLayeredPane, getRootPane, remove, setContentPane, setGlassPane, setLayeredPane, setLayout, update
 
Methods inherited from class java.awt.Window
addNotify, addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, dispose, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getGraphicsConfiguration, getInputContext, getListeners, getLocale, getMostRecentFocusOwner, getOwnedWindows, getOwner, getToolkit, getWarningString, getWindowFocusListeners, getWindowListeners, getWindowStateListeners, hide, isActive, isFocusableWindow, isFocusCycleRoot, isFocused, isShowing, pack, postEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, setCursor, setFocusableWindowState, setFocusCycleRoot, setLocationRelativeTo, show, toBack, toFront
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint, paintComponents, preferredSize, print, printComponents, remove, removeAll, removeContainerListener, removeNotify, setFocusTraversalKeys, setFocusTraversalPolicy, setFont, transferFocusBackward, transferFocusDownCycle, validate
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, dispatchEvent, enable, enable, enableInputMethods, getBackground, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, 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, isOpaque, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocusInWindow, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SplashScreenWindow

public SplashScreenWindow(javax.swing.Icon anImage)

SplashScreenWindow

public SplashScreenWindow(javax.swing.Icon anImage,
                          javax.swing.border.Border aBorder)
Method Detail

defaultBorder

public static javax.swing.border.Border defaultBorder()
Answer the default border for a splash screen.


openOn

public static SplashScreenWindow openOn(java.io.File aFile)
Open a splash screen window containing the image in the specified file.

The image file pathname must use the Internet-standard forward-slash ("/") as the path element separator.


openOn

public static SplashScreenWindow openOn(javax.swing.Icon anImage)
Open a splash screen window containing the given image.


openOn

public static SplashScreenWindow openOn(javax.swing.Icon anImage,
                                        javax.swing.border.Border aBorder)
Open a splash screen window containing the given image.


openOn

public static SplashScreenWindow openOn(java.lang.String aPathName)
Open a splash screen window containing the image in the specified file.

The image file pathname must use the Internet-standard forward-slash ("/") as the path element separator.


centerOnScreen

public void centerOnScreen()
Set the window's location so that it is centered on the screen.


GFL 1.1 API