|
|||||||||
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
public class 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/interfaces inherited from class javax.swing.JWindow |
---|
javax.swing.JWindow.AccessibleJWindow |
Nested classes/interfaces inherited from class java.awt.Window |
---|
java.awt.Window.AccessibleAWTWindow |
Nested classes/interfaces inherited from class java.awt.Container |
---|
java.awt.Container.AccessibleAWTContainer |
Nested classes/interfaces inherited from class java.awt.Component |
---|
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
Field Summary | |
---|---|
static boolean |
createOwnerFlag
Create the owner flag is true to create the splash window owner, false otherwise. |
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.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. |
protected |
SplashWindow(java.awt.Frame owner)
Creates a splash window object using the specified frame. |
|
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. |
protected static java.awt.Frame |
createOwner()
Creates the owner. |
void |
dispose()
Hides and disposes the splash screen window. |
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, getGraphics, getLayeredPane, getRootPane, getTransferHandler, isRootPaneCheckingEnabled, paramString, remove, repaint, setContentPane, setGlassPane, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, setTransferHandler, update, windowInit |
Methods inherited from class java.awt.Window |
---|
addNotify, addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getGraphicsConfiguration, getIconImages, getInputContext, getListeners, getLocale, getModalExclusionType, getMostRecentFocusOwner, getOwnedWindows, getOwner, getOwnerlessWindows, getToolkit, getWarningString, getWindowFocusListeners, getWindowListeners, getWindows, getWindowStateListeners, hide, isActive, isAlwaysOnTop, isAlwaysOnTopSupported, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isShowing, pack, paint, postEvent, processEvent, processWindowEvent, processWindowFocusEvent, processWindowStateEvent, removeNotify, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, reshape, setAlwaysOnTop, setBounds, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setIconImage, setIconImages, setLocationByPlatform, setLocationRelativeTo, setMinimumSize, setModalExclusionType, setSize, setSize, setVisible, 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, 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, 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, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, 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, isOpaque, 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, setBackground, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setName, setPreferredSize, show, size, toString, transferFocus, transferFocusUpCycle |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static boolean createOwnerFlag
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()
protected SplashWindow(java.awt.Frame owner)
owner
- the owner.Method Detail |
---|
protected static final java.awt.Frame createOwner()
protected final 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 final 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 final 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 void dispose()
dispose
in class java.awt.Window
public static java.awt.Dimension getDisplayScreenSize()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |