jap
Class JAPSplash

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by java.awt.Window
              extended by jap.JAPSplash
All Implemented Interfaces:
ISplashResponse, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, javax.accessibility.Accessible

public final class JAPSplash
extends java.awt.Window
implements ISplashResponse

Shows the splash screen on startup Dimensions and other attributes of the image used can not be dynamically determined (old java version), change the private static final variables at the beginning of the class if you replace the image used

See Also:
Serialized Form

Nested Class Summary
 
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
private static java.lang.String BUSY_FILE
           
private static int BUSY_FILESIZE
           
private static int BUSY_POSITION_X
           
private static int BUSY_POSITION_Y
           
private static java.lang.String IMGPATHHICOLOR
           
private static java.lang.String IMGPATHLOWCOLOR
           
private  java.lang.String m_currentText
           
private  java.awt.Font m_fntFont
           
private  java.awt.Image m_imgBusy
           
private  java.awt.Image m_imgOffScreen
           
private  java.awt.Image m_imgSplash
           
private  int m_iXVersion
           
private  int m_iYVersion
           
private  java.lang.String m_strLoading
           
private  java.lang.String m_strVersion
           
private static int MESSAGE_POSITION_X
           
private static int MESSAGE_POSITION_Y
           
private static long serialVersionUID
          serial version UID
private static java.lang.String SPLASH_FILE
           
private static int SPLASH_FILESIZE
           
private static int SPLASH_HEIGHT
           
private static int SPLASH_WIDTH
           
private static int VERSION_OFFSET_X
           
private static int VERSION_OFFSET_Y
           
 
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
JAPSplash(java.awt.Frame a_frmParent)
           
JAPSplash(java.awt.Frame frmParent, java.lang.String a_message)
           
 
Method Summary
 void centerOnScreen()
           
private static void centerOnScreen(java.awt.Window a_window)
          Centers a window relative to the screen.
 java.lang.String getText()
           
private  boolean isHighColor()
           
private  java.awt.Image loadImage(java.lang.String pathToFile, int filesize, java.awt.MediaTracker imageTracker)
           
private  void loadImages(java.awt.MediaTracker imageTracker)
           
 void paint(java.awt.Graphics g)
           
 void setText(java.lang.String a_text)
           
 void update(java.awt.Graphics g)
           
 
Methods inherited from class java.awt.Window
addNotify, addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, dispose, getAccessibleContext, 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, 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, addImpl, 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, paramString, preferredSize, print, printComponents, processContainerEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, setLayout, 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, getGraphics, 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, 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

serialVersionUID

private static final long serialVersionUID
serial version UID

See Also:
Constant Field Values

IMGPATHHICOLOR

private static final java.lang.String IMGPATHHICOLOR
See Also:
Constant Field Values

IMGPATHLOWCOLOR

private static final java.lang.String IMGPATHLOWCOLOR
See Also:
Constant Field Values

SPLASH_FILE

private static final java.lang.String SPLASH_FILE
See Also:
Constant Field Values

BUSY_FILE

private static final java.lang.String BUSY_FILE
See Also:
Constant Field Values

SPLASH_WIDTH

private static final int SPLASH_WIDTH
See Also:
Constant Field Values

SPLASH_HEIGHT

private static final int SPLASH_HEIGHT
See Also:
Constant Field Values

SPLASH_FILESIZE

private static final int SPLASH_FILESIZE
See Also:
Constant Field Values

BUSY_FILESIZE

private static final int BUSY_FILESIZE
See Also:
Constant Field Values

VERSION_OFFSET_X

private static final int VERSION_OFFSET_X
See Also:
Constant Field Values

VERSION_OFFSET_Y

private static final int VERSION_OFFSET_Y
See Also:
Constant Field Values

BUSY_POSITION_X

private static final int BUSY_POSITION_X
See Also:
Constant Field Values

BUSY_POSITION_Y

private static final int BUSY_POSITION_Y
See Also:
Constant Field Values

MESSAGE_POSITION_X

private static final int MESSAGE_POSITION_X
See Also:
Constant Field Values

MESSAGE_POSITION_Y

private static final int MESSAGE_POSITION_Y
See Also:
Constant Field Values

m_imgSplash

private java.awt.Image m_imgSplash

m_imgBusy

private java.awt.Image m_imgBusy

m_imgOffScreen

private java.awt.Image m_imgOffScreen

m_fntFont

private java.awt.Font m_fntFont

m_strLoading

private java.lang.String m_strLoading

m_currentText

private java.lang.String m_currentText

m_strVersion

private java.lang.String m_strVersion

m_iXVersion

private int m_iXVersion

m_iYVersion

private int m_iYVersion
Constructor Detail

JAPSplash

public JAPSplash(java.awt.Frame a_frmParent)

JAPSplash

public JAPSplash(java.awt.Frame frmParent,
                 java.lang.String a_message)
Method Detail

loadImage

private java.awt.Image loadImage(java.lang.String pathToFile,
                                 int filesize,
                                 java.awt.MediaTracker imageTracker)

isHighColor

private boolean isHighColor()

loadImages

private void loadImages(java.awt.MediaTracker imageTracker)

setText

public void setText(java.lang.String a_text)
Specified by:
setText in interface ISplashResponse

getText

public java.lang.String getText()
Specified by:
getText in interface ISplashResponse

update

public void update(java.awt.Graphics g)
Overrides:
update in class java.awt.Container

paint

public void paint(java.awt.Graphics g)
Overrides:
paint in class java.awt.Container

centerOnScreen

public void centerOnScreen()

centerOnScreen

private static void centerOnScreen(java.awt.Window a_window)
Centers a window relative to the screen.

Parameters:
a_window - a Window