MDACC
Biostatistics

org.mdanderson.biostat.util
Class DefaultSplashScreen

java.lang.Object
  extended byjava.awt.Component
      extended byjava.awt.Container
          extended byjava.awt.Window
              extended byjavax.swing.JWindow
                  extended byorg.mdanderson.biostat.util.DefaultSplashScreen
All Implemented Interfaces:
Accessible, ImageObserver, MenuContainer, RootPaneContainer, Serializable
Direct Known Subclasses:
GCSplashScreen

public class DefaultSplashScreen
extends JWindow

DefaultSplashScreen - Creates a generic splash screen for use at application startup

See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class javax.swing.JWindow
JWindow.AccessibleJWindow
 
Nested classes inherited from class java.awt.Window
Window.AccessibleAWTWindow
 
Nested classes inherited from class java.awt.Container
Container.AccessibleAWTContainer
 
Nested classes inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy
 
Field Summary
protected  AboutPanel aboutPanel
           
static long FIVE_SECONDS
           
static long FOUR_SECONDS
           
static long ONE_SECOND
           
protected  JLabel statusLine
           
protected  JPanel statusPanel
           
static long THREE_SECONDS
           
static long TWO_SECONDS
           
 
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
DefaultSplashScreen(AboutPanel aboutPanel, Frame frame, long waitTime)
          Class constructor specifying about panel, frame, and delay
DefaultSplashScreen(ImageIcon image, Frame frame)
          Class constructor specifying image and frame
DefaultSplashScreen(ImageIcon image, Frame frame, long waitTime)
          Class constructor specifying image, frame, and delay
DefaultSplashScreen(String imageFileName, Frame frame)
          Class constructor specifying image filename and frame
DefaultSplashScreen(String imageFileName, Frame frame, long waitTime)
          Class constructor specifying image filename, frame, and delay
 
Method Summary
protected  void centerOnScreen()
          Centers the splashscreen in the middle of the screen
protected  void close()
          Closes the splashscreen and releases all native screen resources
protected  JPanel createStatusPanel()
          Creates a pane for displaying status information
 void display()
          Displays the splashscreen on the screen, centered on its parent
static void main(String[] argv)
          Main entry-point for the DefaultSplashScreen class
 void setBannerLine(String banner)
          Sets the banner to be displayed
 void setCopyrightLine(String copyright)
          Sets the copyright to be displayed
 void setCopyrightVisible(boolean visible)
          Shows or hides the copyright information depending on the value of parameter
 void setLegalitiesLine(String legalities)
          Sets the legal text to be displayed
 void setLegalitiesVisible(boolean visible)
          Shows or hides the legal information depending on the value of parameter
 void setStatusLine(String status)
          Sets the application status text to be displayed
 void setStatusVisible(boolean visible)
          Shows or hides the application status information depending on the value of parameter
 void setTimeOut(long waitTime)
          Sets the amount of time to display the splash screen.
 
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

ONE_SECOND

public static final long ONE_SECOND
See Also:
Constant Field Values

TWO_SECONDS

public static final long TWO_SECONDS
See Also:
Constant Field Values

THREE_SECONDS

public static final long THREE_SECONDS
See Also:
Constant Field Values

FOUR_SECONDS

public static final long FOUR_SECONDS
See Also:
Constant Field Values

FIVE_SECONDS

public static final long FIVE_SECONDS
See Also:
Constant Field Values

aboutPanel

protected AboutPanel aboutPanel

statusPanel

protected JPanel statusPanel

statusLine

protected JLabel statusLine
Constructor Detail

DefaultSplashScreen

public DefaultSplashScreen(String imageFileName,
                           Frame frame)
Class constructor specifying image filename and frame

Parameters:
imageFileName - string containing image filename to display
frame - parent component

DefaultSplashScreen

public DefaultSplashScreen(String imageFileName,
                           Frame frame,
                           long waitTime)
Class constructor specifying image filename, frame, and delay

Parameters:
imageFileName - string containing image filename to display
frame - parent component
waitTime - milliseconds to delay before auto close

DefaultSplashScreen

public DefaultSplashScreen(ImageIcon image,
                           Frame frame)
Class constructor specifying image and frame

Parameters:
image - image to display
frame - parent component

DefaultSplashScreen

public DefaultSplashScreen(ImageIcon image,
                           Frame frame,
                           long waitTime)
Class constructor specifying image, frame, and delay

Parameters:
image - image to display
frame - parent component
waitTime - milliseconds to delay before auto close

DefaultSplashScreen

public DefaultSplashScreen(AboutPanel aboutPanel,
                           Frame frame,
                           long waitTime)
Class constructor specifying about panel, frame, and delay

Parameters:
aboutPanel - instance of AboutPanel object
frame - parent component
waitTime - milliseconds to delay before auto close
Method Detail

display

public void display()
Displays the splashscreen on the screen, centered on its parent


setBannerLine

public void setBannerLine(String banner)
Sets the banner to be displayed

Parameters:
banner - string specifying banner text to be displayed
See Also:
AboutPanel

setCopyrightLine

public void setCopyrightLine(String copyright)
Sets the copyright to be displayed

Parameters:
copyright - string specifying banner text to be displayed
See Also:
AboutPanel

setCopyrightVisible

public void setCopyrightVisible(boolean visible)
Shows or hides the copyright information depending on the value of parameter

Parameters:
visible - if true, shows copyright information; otherwise, hides it
See Also:
AboutPanel

setLegalitiesLine

public void setLegalitiesLine(String legalities)
Sets the legal text to be displayed

Parameters:
legalities - string specifying legal text to be displayed
See Also:
AboutPanel

setLegalitiesVisible

public void setLegalitiesVisible(boolean visible)
Shows or hides the legal information depending on the value of parameter

Parameters:
visible - if true, shows legal information; otherwise, hides it
See Also:
AboutPanel

setStatusLine

public void setStatusLine(String status)
Sets the application status text to be displayed

Parameters:
status - string specifying application status text to be displayed

setStatusVisible

public void setStatusVisible(boolean visible)
Shows or hides the application status information depending on the value of parameter

Parameters:
visible - if true, shows legal information; otherwise, hides it

setTimeOut

public void setTimeOut(long waitTime)
Sets the amount of time to display the splash screen. Must be set prior to display.

Parameters:
waitTime - amount of time in milliseconds

centerOnScreen

protected void centerOnScreen()
Centers the splashscreen in the middle of the screen


close

protected void close()
Closes the splashscreen and releases all native screen resources


createStatusPanel

protected JPanel createStatusPanel()
Creates a pane for displaying status information

Returns:
JPanel representing status panel

main

public static void main(String[] argv)
Main entry-point for the DefaultSplashScreen class

Parameters:
argv - string array containing command line arguments

MDACC
Biostatistics

Copyright © 2002 M.D. Anderson Cancer Center. All Rights Reserved.