org.PingOO.DLAI.lib.appli
Class LogoWindow

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--java.awt.Window
                    |
                    +--javax.swing.JWindow
                          |
                          +--org.PingOO.DLAI.lib.PWidget.PWindow
                                |
                                +--org.PingOO.DLAI.lib.appli.LogoWindow

public class LogoWindow
extends PWindow
implements java.lang.Runnable

Creates a new splash screen window.
Logo windows are used right before the start of a program or a slave.
Creating a new instace of this class will automatically start a logo in its own thread.

Since:
PingOO 2.0
Version:
2.0
Author:
Fabrice Bouyé (bouye@cur-archamps.fr)
See Also:
PWindow, Serialized Form

Inner classes inherited from class javax.swing.JWindow
javax.swing.JWindow.AccessibleJWindow
 
Inner classes inherited from class java.awt.Component
java.awt.Component.AWTTreeLock
 
Field Summary
protected  boolean autoClose
          Auto close or close by click.
static java.lang.String DEFAULT_IMAGE_KEY
          The default image key.
static long DEFAULT_TIMEOUT
          The default time out.
protected  javax.swing.ImageIcon logoIcon
          The image to display.
private  PThread logoThread
          The thread used to display the logo.
protected  long timeout
          The waiting delay.
 
Fields inherited from class org.PingOO.DLAI.lib.PWidget.PWindow
manager, module
 
Fields inherited from class javax.swing.JWindow
accessibleContext, rootPane, rootPaneCheckingEnabled
 
Fields inherited from class java.awt.Window
active, base, focusMgr, inputContext, nameCounter, OPENED, ownedWindowList, serialVersionUID, state, warningString, weakThis, windowListener, windowSerializedDataVersion
 
Fields inherited from class java.awt.Container
component, containerListener, containerSerializedDataVersion, dispatcher, layoutMgr, maxSize, ncomponents, serialVersionUID
 
Fields inherited from class java.awt.Component
actionListenerK, adjustmentListenerK, appContext, assert, background, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, changeSupport, componentListener, componentListenerK, componentOrientation, componentSerializedDataVersion, containerListenerK, cursor, dropTarget, enabled, eventMask, focusListener, focusListenerK, font, foreground, hasFocus, height, incRate, inputMethodListener, inputMethodListenerK, isInc, isPacked, itemListenerK, keyListener, keyListenerK, LEFT_ALIGNMENT, locale, LOCK, minSize, mouseListener, mouseListenerK, mouseMotionListener, mouseMotionListenerK, name, nameExplicitlySet, newEventsOnly, ownedWindowK, parent, peer, peerFont, popups, prefSize, RIGHT_ALIGNMENT, serialVersionUID, textListenerK, TOP_ALIGNMENT, valid, visible, width, windowListenerK, x, y
 
Constructor Summary
LogoWindow()
          Creates a new splash screen window using the default DLAI Logo.
LogoWindow(java.lang.String module)
          Creates a new splash screen window.
LogoWindow(java.lang.String module, long timeout)
          Creates a new splash screen window.
LogoWindow(java.lang.String module, long timeout, boolean autoClose)
          Creates a new splash screen window.
LogoWindow(java.lang.String module, long timeout, boolean autoClose, java.lang.String imageKey)
          Creates a new splash screen window.
 
Method Summary
 void paint(java.awt.Graphics g)
          Paints the logo inside the graphics.
 void run()
          Action to execute.
 void start()
          Starts the logo.
 void stop()
          Stops the running logo.
 
Methods inherited from class org.PingOO.DLAI.lib.PWidget.PWindow
getManager, getModule, getTextKey, getToolTipKey, setManager, setModule, updateFont, updateLanguage, updateLanguage
 
Methods inherited from class javax.swing.JWindow
addImpl, createRootPane, createRootPaneException, getAccessibleContext, getContentPane, getGlassPane, getLayeredPane, getRootPane, isRootPaneCheckingEnabled, paramString, setContentPane, setGlassPane, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, windowInit
 
Methods inherited from class java.awt.Window
, addNotify, addOwnedWindow, addWindowListener, applyResourceBundle, applyResourceBundle, connectOwnedWindow, constructComponentName, dispatchEventImpl, dispose, eventEnabled, finalize, getFocusOwner, getInputContext, getLocale, getOwnedWindows, getOwner, getToolkit, getWarningString, initIDs, isActive, isShowing, nextFocus, ownedInit, pack, postEvent, postProcessKeyEvent, postWindowEvent, preProcessKeyEvent, processEvent, processWindowEvent, readObject, removeOwnedWindow, removeWindowListener, setFocusOwner, setWarningString, show, toBack, toFront, transferFocus, writeObject
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, applyOrientation, countComponents, deliverEvent, dispatchEventToSelf, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents_NoClientCode, getComponents, getInsets, getLayout, getMaximumSize, getMinimumSize, getMouseEventTarget, getPreferredSize, getWindow, insets, invalidate, invalidateTree, isAncestorOf, layout, lightweightPrint, list, list, locate, minimumSize, paintComponents, postsOldMouseEvents, preferredSize, print, printComponents, printOneComponent, processContainerEvent, proxyEnableEvents, proxyRequestFocus, remove, remove, removeAll, removeContainerListener, removeNotify, setFont, update, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addPropertyChangeListener, addPropertyChangeListener, areInputMethodsEnabled, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, getBackground, getBounds, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont_NoClientCode, getFont, getFontMetrics, getForeground, getGraphics, getHeight, getInputMethodRequests, getLocation, getLocation, getLocationOnScreen, getName, getNativeContainer, getParent_NoClientCode, getParent, getPeer, getSize, getSize, getToolkitImpl, getTreeLock, getWidth, getWindowForObject, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isDisplayable, isDoubleBuffered, isEnabled, isEnabledImpl, 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, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, remove, removeComponentListener, removeFocusListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, 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, registerNatives, wait, wait, wait
 

Field Detail

logoThread

private PThread logoThread
The thread used to display the logo.

DEFAULT_TIMEOUT

public static final long DEFAULT_TIMEOUT
The default time out.

DEFAULT_IMAGE_KEY

public static final java.lang.String DEFAULT_IMAGE_KEY
The default image key.
Needed to retreive the image to use as logo.

logoIcon

protected javax.swing.ImageIcon logoIcon
The image to display.

timeout

protected long timeout
The waiting delay.

autoClose

protected boolean autoClose
Auto close or close by click.
Constructor Detail

LogoWindow

public LogoWindow()
Creates a new splash screen window using the default DLAI Logo.
It waits at least during 5s.

LogoWindow

public LogoWindow(java.lang.String module)
Creates a new splash screen window.
It waits at least during 5s.
Parameters:
module - The caller's module.

LogoWindow

public LogoWindow(java.lang.String module,
                  long timeout)
Creates a new splash screen window.
Parameters:
module - The caller's module.
timeout - The time the window will wait.

LogoWindow

public LogoWindow(java.lang.String module,
                  long timeout,
                  boolean autoClose)
Creates a new splash screen window.
Parameters:
module - The caller's module.
timeout - The time the window will wait in milliseconds.
autoClose - if true the user will have to click in order to close the window, if false the window will automatically be disgarded after timout.

LogoWindow

public LogoWindow(java.lang.String module,
                  long timeout,
                  boolean autoClose,
                  java.lang.String imageKey)
Creates a new splash screen window.
The logo will automatically starts itselef.
Parameters:
module - The caller's module.
timeout - The time the window will wait in milliseconds.
autoClose - If true the user will have to click in order to close the window, if false the window will automatically be disgarded after timout.
imageKey - The key needed to retreive the logo image in the appli resources directories.
Method Detail

start

public void start()
Starts the logo.

run

public void run()
Action to execute.
Specified by:
run in interface java.lang.Runnable

stop

public void stop()
Stops the running logo.

paint

public void paint(java.awt.Graphics g)
Paints the logo inside the graphics.
Parameters:
g - The graphics used to paint.
Overrides:
paint in class java.awt.Container