qflib 0.98.1

de.qfs.lib.gui
Class SplashWindow

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--java.awt.Window
                    |
                    +--de.qfs.lib.gui.SplashWindow
All Implemented Interfaces:
javax.accessibility.Accessible, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable

public class SplashWindow
extends java.awt.Window

The SplashWindow is a special window intended to be displayed while an application initializes itself, to inform the user about what is going on. A SplashWindow includes a ProgressBar at its bottom. It should be subclassed and customized for additional display.

Version:
$Revision: 1.6 $
Author:
Gregor Schmid
See Also:
Serialized Form

Inner classes inherited from class java.awt.Window
java.awt.Window.AccessibleAWTWindow
 
Inner classes inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
 
Inner classes inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent
 
Field Summary
protected  javax.swing.JProgressBar bar
          The ProgressBar at the bottom of the window.
protected  javax.swing.JPanel panel
          This panel holds the contents of the window.
 
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
SplashWindow(int width, int height)
          Create a new SplashWindow.
 
Method Summary
static SplashWindow getLastSplashWindow()
          Get the last SplashWindow that was created.
 void remove()
          Remove the SplashWindow from the screen and dispose it.
 void setProgress(java.lang.String text, int current, int max)
          Set information for the ProgressBar of the SplashWindow.
 
Methods inherited from class java.awt.Window
addNotify, addWindowListener, applyResourceBundle, applyResourceBundle, dispose, finalize, getAccessibleContext, getFocusOwner, getGraphicsConfiguration, getInputContext, getListeners, getLocale, getOwnedWindows, getOwner, getToolkit, getWarningString, hide, isShowing, pack, postEvent, processEvent, processWindowEvent, removeWindowListener, setCursor, show, toBack, toFront
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getInsets, getLayout, getMaximumSize, getMinimumSize, getPreferredSize, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paint, paintComponents, paramString, preferredSize, print, printComponents, processContainerEvent, remove, remove, removeAll, removeContainerListener, removeNotify, setFont, setLayout, update, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addPropertyChangeListener, addPropertyChangeListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, getBackground, getBounds, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphics, getHeight, getInputMethodRequests, getLocation, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isDisplayable, isDoubleBuffered, isEnabled, isFocusTraversable, isLightweight, isOpaque, 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, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setDropTarget, setEnabled, setForeground, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, size, toString, transferFocus
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

bar

protected javax.swing.JProgressBar bar
The ProgressBar at the bottom of the window. See setProgress for how to customize it.

panel

protected javax.swing.JPanel panel
This panel holds the contents of the window. It has got a raised border.
Constructor Detail

SplashWindow

public SplashWindow(int width,
                    int height)
Create a new SplashWindow. It will be centered on the screen but not shown yet.
Parameters:
width - The width of the SplashWindow.
height - The height of the SplashWindow
Method Detail

getLastSplashWindow

public static SplashWindow getLastSplashWindow()
Get the last SplashWindow that was created. This is like a floating singleton. Typically there is only one SplashWindow per application and this method simplifies access to it from different places.
Returns:
The last SplashWindow created.

remove

public void remove()
Remove the SplashWindow from the screen and dispose it.

setProgress

public void setProgress(java.lang.String text,
                        int current,
                        int max)
Set information for the ProgressBar of the SplashWindow.
Parameters:
text - The text information to display.
current - The current progress value.
max - The maximum progress value.

qflib 0.98.1