|
||||||||||
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 javax.swing.JWindow com.isti.util.gui.SplashWindow
Class SplashWindow defines a splash window to be shown while a program is constructing and loading its GUI. The size of the display screen may also be queried via the static 'getDisplayScreenSize()' method. A simple "Program loading..." splash window may be displayed by using the no-parameter constructor and then calling 'show()' in the 'main()' method of the program. The 'close()' method should be called just before the program GUI is made visible. See the various constructors for other possible variations on the window's contents and position.
Nested Class Summary |
Nested classes inherited from class javax.swing.JWindow |
javax.swing.JWindow.AccessibleJWindow |
Nested classes inherited from class java.awt.Window |
java.awt.Window.AccessibleAWTWindow |
Nested classes inherited from class java.awt.Container |
java.awt.Container.AccessibleAWTContainer |
Nested classes inherited from class java.awt.Component |
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
Field Summary | |
static int |
DEF_INC_HEIGHT
Default height increase for splash screen window (25). |
static int |
DEF_INC_WIDTH
Default width increase for splash screen window (100). |
static java.lang.String |
DEF_TEXT_STR
Default text string for splash screen window ("Program loading..."). |
protected static java.awt.Dimension |
screenSizeDimObj
|
Fields inherited from class javax.swing.JWindow |
accessibleContext, rootPane, rootPaneCheckingEnabled |
Fields inherited from class java.awt.Window |
|
Fields inherited from class java.awt.Container |
|
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()
Creates a splash window object using the default text string (see 'DEF_TEXT_STR'). |
|
SplashWindow(java.awt.Component compObj)
Creates a splash window object. |
|
SplashWindow(java.awt.Component compObj,
int incWidth,
int incHeight)
Creates a splash window object. |
|
SplashWindow(java.lang.String textStr)
Creates a splash window object using the given text string. |
|
SplashWindow(java.lang.String textStr,
javax.swing.Icon iconObj)
Creates a splash window object using the given text string and/or icon object. |
|
SplashWindow(java.lang.String textStr,
javax.swing.Icon iconObj,
int horizontalAlignment)
Creates a splash window object using the given text string and/or icon object. |
|
SplashWindow(java.lang.String textStr,
javax.swing.Icon iconObj,
int horizontalAlignment,
int incWidth,
int incHeight)
Creates a splash window object using the given text string and/or icon object. |
|
SplashWindow(java.lang.String textStr,
int horizontalAlignment)
Creates a splash window object using the given text string. |
|
SplashWindow(java.lang.String textStr,
int horizontalAlignment,
int incWidth,
int incHeight)
Creates a splash window object using the given text string. |
|
SplashWindow(java.lang.String textStr,
java.lang.String iconURLStr)
Creates a splash window object using the given text string and/or icon object. |
|
SplashWindow(java.lang.String textStr,
java.lang.String iconURLStr,
boolean textBackupFlag)
Creates a splash window object using the given text string and/or icon object. |
|
SplashWindow(java.lang.String textStr,
java.lang.String iconURLStr,
int horizontalAlignment)
Creates a splash window object using the given text string and/or icon object. |
|
SplashWindow(java.lang.String textStr,
java.lang.String iconURLStr,
int horizontalAlignment,
boolean textBackupFlag)
Creates a splash window object using the given text string and/or icon object. |
|
SplashWindow(java.lang.String textStr,
java.lang.String iconURLStr,
int horizontalAlignment,
int incWidth,
int incHeight)
Creates a splash window object using the given text string and/or icon object. |
|
SplashWindow(java.lang.String textStr,
java.lang.String iconURLStr,
int horizontalAlignment,
int incWidth,
int incHeight,
boolean textBackupFlag)
Creates a splash window object using the given text string and/or icon object. |
Method Summary | |
void |
close()
Hides and disposes the splash screen window. |
protected void |
createComponentWindow(java.awt.Component compObj,
int incWidth,
int incHeight)
Creates the splash window object. |
protected void |
createLabelWindow(java.lang.String textStr,
javax.swing.Icon iconObj,
int horizontalAlignment,
int incWidth,
int incHeight)
Creates the splash window object using the given text string and/or icon object. |
protected void |
createLabelWindow(java.lang.String textStr,
java.lang.String iconURLStr,
int horizontalAlignment,
int incWidth,
int incHeight,
boolean textBackupFlag)
Creates the splash window object using the given text string and/or icon object. |
static java.awt.Dimension |
getDisplayScreenSize()
Returns a 'Dimension' object containing the size of the display screen. |
void |
pack(boolean centerFlag)
Sizes the splash screen window to the size of its contents. |
void |
pack(int incWidth,
int incHeight,
boolean centerFlag)
Sizes the splash screen window to the size of its contents and then increases its size by the given values. |
void |
showWindow()
Displays the splash screen window. |
Methods inherited from class javax.swing.JWindow |
addImpl, createRootPane, getAccessibleContext, getContentPane, getGlassPane, getLayeredPane, getRootPane, isRootPaneCheckingEnabled, paramString, remove, setContentPane, setGlassPane, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, update, windowInit |
Methods inherited from class java.awt.Window |
addNotify, addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, dispose, finalize, 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, processEvent, processWindowEvent, processWindowFocusEvent, processWindowStateEvent, 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, processContainerEvent, remove, removeAll, removeContainerListener, removeNotify, setFocusTraversalKeys, setFocusTraversalPolicy, setFont, transferFocusBackward, transferFocusDownCycle, validate, validateTree |
Methods inherited from class java.awt.Component |
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, 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, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, 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 |
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final int DEF_INC_WIDTH
public static final int DEF_INC_HEIGHT
public static final java.lang.String DEF_TEXT_STR
protected static java.awt.Dimension screenSizeDimObj
Constructor Detail |
public SplashWindow(java.awt.Component compObj, int incWidth, int incHeight)
compObj
- the component to be displayed in the window.incWidth
- the amount to increase the width, in pixels.incHeight
- the amount to increase the height, in pixels.public SplashWindow(java.awt.Component compObj)
compObj
- the component to be displayed in the window.public SplashWindow(java.lang.String textStr, javax.swing.Icon iconObj, int horizontalAlignment, int incWidth, int incHeight)
textStr
- the text to be displayed in the window, or null
or none.iconObj
- the icon to be displayed in the window, or null
or none.horizontalAlignment
- One of the following constants
defined in SwingConstants
:
LEFT
,
CENTER
,
RIGHT
,
LEADING
or
TRAILING
.incWidth
- the amount to increase the width, in pixels.incHeight
- the amount to increase the height, in pixels.public SplashWindow(java.lang.String textStr, javax.swing.Icon iconObj, int horizontalAlignment)
textStr
- the text to be displayed in the window, or null
or none.iconObj
- the icon to be displayed in the window, or null
or none.horizontalAlignment
- One of the following constants
defined in SwingConstants
:
LEFT
,
CENTER
,
RIGHT
,
LEADING
or
TRAILING
.public SplashWindow(java.lang.String textStr, javax.swing.Icon iconObj)
textStr
- the text to be displayed in the window, or null
or none.iconObj
- the icon to be displayed in the window, or null
or none.public SplashWindow(java.lang.String textStr, java.lang.String iconURLStr, int horizontalAlignment, int incWidth, int incHeight, boolean textBackupFlag)
textStr
- the text to be displayed in the window, or null
or none.iconURLStr
- URL or filename for the icon to be displayed in
the window, or null or none.horizontalAlignment
- One of the following constants
defined in SwingConstants
:
LEFT
,
CENTER
,
RIGHT
,
LEADING
or
TRAILING
.incWidth
- the amount to increase the width, in pixels.incHeight
- the amount to increase the height, in pixels.textBackupFlag
- if true then only show the text string if the
icon URL could not be loaded; if false then always show the text
string.public SplashWindow(java.lang.String textStr, java.lang.String iconURLStr, int horizontalAlignment, boolean textBackupFlag)
textStr
- the text to be displayed in the window, or null
or none.iconURLStr
- URL or filename for the icon to be displayed in
the window, or null or none.horizontalAlignment
- One of the following constants
defined in SwingConstants
:
LEFT
,
CENTER
,
RIGHT
,
LEADING
or
TRAILING
.textBackupFlag
- if true then only show the text string if the
icon URL could not be loaded; if false then always show the text
string.public SplashWindow(java.lang.String textStr, java.lang.String iconURLStr, boolean textBackupFlag)
textStr
- the text to be displayed in the window, or null
or none.iconURLStr
- URL or filename for the icon to be displayed in
the window, or null or none.textBackupFlag
- if true then only show the text string if the
icon URL could not be loaded; if false then always show the text
string.public SplashWindow(java.lang.String textStr, java.lang.String iconURLStr, int horizontalAlignment, int incWidth, int incHeight)
textStr
- the text to be displayed in the window, or null
or none.iconURLStr
- URL or filename for the icon to be displayed in
the window, or null or none.horizontalAlignment
- One of the following constants
defined in SwingConstants
:
LEFT
,
CENTER
,
RIGHT
,
LEADING
or
TRAILING
.incWidth
- the amount to increase the width, in pixels.incHeight
- the amount to increase the height, in pixels.public SplashWindow(java.lang.String textStr, java.lang.String iconURLStr, int horizontalAlignment)
textStr
- the text to be displayed in the window, or null
or none.iconURLStr
- URL or filename for the icon to be displayed in
the window, or null or none.horizontalAlignment
- One of the following constants
defined in SwingConstants
:
LEFT
,
CENTER
,
RIGHT
,
LEADING
or
TRAILING
.public SplashWindow(java.lang.String textStr, java.lang.String iconURLStr)
textStr
- the text to be displayed in the window, or null
or none.iconURLStr
- URL or filename for the icon to be displayed in
the window, or null or none.public SplashWindow(java.lang.String textStr, int horizontalAlignment, int incWidth, int incHeight)
textStr
- the text to be displayed in the window, or null
or none.horizontalAlignment
- One of the following constants
defined in SwingConstants
:
LEFT
,
CENTER
,
RIGHT
,
LEADING
or
TRAILING
.incWidth
- the amount to increase the width, in pixels.incHeight
- the amount to increase the height, in pixels.public SplashWindow(java.lang.String textStr, int horizontalAlignment)
textStr
- the text to be displayed in the window, or null
or none.horizontalAlignment
- One of the following constants
defined in SwingConstants
:
LEFT
,
CENTER
,
RIGHT
,
LEADING
or
TRAILING
.public SplashWindow(java.lang.String textStr)
textStr
- the text to be displayed in the window, or null
or none.public SplashWindow()
Method Detail |
protected void createComponentWindow(java.awt.Component compObj, int incWidth, int incHeight)
compObj
- the component to be displayed in the window.incWidth
- the amount to increase the width, in pixels.incHeight
- the amount to increase the height, in pixels.protected void createLabelWindow(java.lang.String textStr, javax.swing.Icon iconObj, int horizontalAlignment, int incWidth, int incHeight)
textStr
- the text to be displayed in the window, or null
or none.iconObj
- the icon to be displayed in the window, or null
or none.horizontalAlignment
- One of the following constants
defined in SwingConstants
:
LEFT
,
CENTER
,
RIGHT
,
LEADING
or
TRAILING
.incWidth
- the amount to increase the width, in pixels.incHeight
- the amount to increase the height, in pixels.protected void createLabelWindow(java.lang.String textStr, java.lang.String iconURLStr, int horizontalAlignment, int incWidth, int incHeight, boolean textBackupFlag)
textStr
- the text to be displayed in the window, or null
or none.iconURLStr
- URL or filename for the icon to be displayed in
the window, or null or none.horizontalAlignment
- One of the following constants
defined in SwingConstants
:
LEFT
,
CENTER
,
RIGHT
,
LEADING
or
TRAILING
.incWidth
- the amount to increase the width, in pixels.incHeight
- the amount to increase the height, in pixels.textBackupFlag
- if true then only show the text string if the
icon URL could not be loaded; if false then always show the text
string.public void pack(int incWidth, int incHeight, boolean centerFlag)
incWidth
- the amount to increase the width, in pixels.incHeight
- the amount to increase the height, in pixels.centerFlag
- true to center the window on the display screen
after it is resized.public void pack(boolean centerFlag)
centerFlag
- true to center the window on the display screen
after it is resized.public void showWindow()
public void close()
public static java.awt.Dimension getDisplayScreenSize()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |