net.sourceforge.pavlov.startup
Class StartupWindow

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by java.awt.Window
              extended by net.sourceforge.pavlov.startup.StartupWindow
All Implemented Interfaces:
WindowListener, ImageObserver, MenuContainer, Serializable, EventListener, Accessible, AbstractStartupWindow

public class StartupWindow
extends Window
implements AbstractStartupWindow, WindowListener

Shows an unbordered window with an image that closes itself when the main application becomes visible.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class java.awt.Window
Window.AccessibleAWTWindow
 
Nested classes/interfaces inherited from class java.awt.Container
Container.AccessibleAWTContainer
 
Nested classes/interfaces inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy
 
Field Summary
protected  JProgressBar pbar
          Describe variable pbar here.
protected  int progress
          Describe variable progress here.
protected  String text
          Progress status message text.
 
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
StartupWindow(String imageURL, JFrame who)
          Creates a new StartupWindow instance.
 
Method Summary
 void incrementStatus(int i, String msg)
          Increments progress bar value by i and sets message.
 void killme()
          Close the window and free up my resources.
 void setMainApp(JFrame mainApp)
          Describe setMainApp method here.
 void setProgress(int i)
          Sets the progress bar value to i.
 void setStatus(int i, String msg)
          Sets progress bar value and message.
 void setText(String msg)
          Describe setText method here.
 void windowActivated(WindowEvent e)
          Called when main application is activated.
 void windowClosed(WindowEvent e)
          Describe windowClosed method here.
 void windowClosing(WindowEvent e)
          Describe windowClosing method here.
 void windowDeactivated(WindowEvent e)
          Describe windowDeactivated method here.
 void windowDeiconified(WindowEvent e)
          Describe windowDeiconified method here.
 void windowIconified(WindowEvent e)
          Describe windowIconified method here.
 void windowOpened(WindowEvent e)
          Called when main application is opened.
 
Methods inherited from class java.awt.Window
addNotify, addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, dispose, finalize, getAccessibleContext, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getGraphicsConfiguration, getInputContext, getListeners, getLocale, getMostRecentFocusOwner, getOwnedWindows, getOwner, getToolkit, getWarningString, getWindowFocusListeners, getWindowListeners, getWindowStateListeners, hide, isActive, isAlwaysOnTop, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isShowing, pack, postEvent, processEvent, processWindowEvent, processWindowFocusEvent, processWindowStateEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, setAlwaysOnTop, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setLocationByPlatform, setLocationRelativeTo, 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, paint, paintComponents, paramString, preferredSize, print, printComponents, processContainerEvent, remove, remove, removeAll, removeContainerListener, removeNotify, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, setLayout, transferFocusBackward, transferFocusDownCycle, update, 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, 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, reshape, resize, resize, setBackground, setBounds, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setMinimumSize, setName, setPreferredSize, 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

text

protected String text
Progress status message text.


pbar

protected JProgressBar pbar
Describe variable pbar here.


progress

protected int progress
Describe variable progress here.

Constructor Detail

StartupWindow

public StartupWindow(String imageURL,
                     JFrame who)
Creates a new StartupWindow instance.

Parameters:
imageURL - a String value
who - a Frame value
Method Detail

setText

public void setText(String msg)
Describe setText method here.

Specified by:
setText in interface AbstractStartupWindow
Parameters:
msg - a String value FIXME: should be protected

setProgress

public void setProgress(int i)
Sets the progress bar value to i.

Specified by:
setProgress in interface AbstractStartupWindow
Parameters:
i - an int value

setStatus

public void setStatus(int i,
                      String msg)
Sets progress bar value and message.

Specified by:
setStatus in interface AbstractStartupWindow
Parameters:
i - an int value
msg - a String value

incrementStatus

public void incrementStatus(int i,
                            String msg)
Increments progress bar value by i and sets message.

Specified by:
incrementStatus in interface AbstractStartupWindow
Parameters:
i - an int value
msg - a String value

setMainApp

public void setMainApp(JFrame mainApp)
Describe setMainApp method here.

Specified by:
setMainApp in interface AbstractStartupWindow
Parameters:
mainApp - a JFrame value

killme

public void killme()
Close the window and free up my resources.


windowActivated

public void windowActivated(WindowEvent e)
Called when main application is activated. I call die().

Specified by:
windowActivated in interface WindowListener
Parameters:
e - a WindowEvent value

windowClosed

public void windowClosed(WindowEvent e)
Describe windowClosed method here.

Specified by:
windowClosed in interface WindowListener
Parameters:
e - a WindowEvent value

windowClosing

public void windowClosing(WindowEvent e)
Describe windowClosing method here.

Specified by:
windowClosing in interface WindowListener
Parameters:
e - a WindowEvent value

windowDeactivated

public void windowDeactivated(WindowEvent e)
Describe windowDeactivated method here.

Specified by:
windowDeactivated in interface WindowListener
Parameters:
e - a WindowEvent value

windowDeiconified

public void windowDeiconified(WindowEvent e)
Describe windowDeiconified method here.

Specified by:
windowDeiconified in interface WindowListener
Parameters:
e - a WindowEvent value

windowIconified

public void windowIconified(WindowEvent e)
Describe windowIconified method here.

Specified by:
windowIconified in interface WindowListener
Parameters:
e - a WindowEvent value

windowOpened

public void windowOpened(WindowEvent e)
Called when main application is opened. I call die().

Specified by:
windowOpened in interface WindowListener
Parameters:
e - a WindowEvent value