Ontimize 5.2072EN

com.ontimize.gui
Class TopWindow

java.lang.Object
  extended byjava.awt.Component
      extended byjava.awt.Container
          extended byjava.awt.Window
              extended byjavax.swing.JWindow
                  extended bycom.ontimize.gui.TopWindow
All Implemented Interfaces:
javax.accessibility.Accessible, java.awt.image.ImageObserver, Internationalization, ISplash, java.awt.MenuContainer, javax.swing.RootPaneContainer, java.io.Serializable
Direct Known Subclasses:
SearchTopWindow

public class TopWindow
extends javax.swing.JWindow
implements Internationalization, ISplash

Implements a 'splash window', or a window without buttons bar to show images, messages, etc.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class javax.swing.JWindow
javax.swing.JWindow.AccessibleJWindow
 
Nested classes inherited from class java.awt.Window
java.awt.Window.AccessibleAWTWindow
 
Nested classes inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
 
Nested classes inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
 
Field Summary
protected  com.ontimize.gui.TopWindow.RepaintThread repaintThread
           
protected  int repaintTime
           
 
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 com.ontimize.gui.i18n.Internationalization
DEBUG_LANGUAGE
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
TopWindow(java.awt.Frame owner, java.lang.String message, java.util.ResourceBundle res, javax.swing.ImageIcon image, javax.swing.ImageIcon image2)
           
TopWindow(java.awt.Frame owner, java.lang.String message, java.util.ResourceBundle res, javax.swing.ImageIcon image, javax.swing.ImageIcon image2, javax.swing.border.Border border)
           
TopWindow(javax.swing.JPanel panel)
           
TopWindow(java.util.ResourceBundle res)
           
TopWindow(java.lang.String message)
           
TopWindow(java.lang.String message, javax.swing.ImageIcon image, javax.swing.ImageIcon image2)
           
TopWindow(java.lang.String message, java.util.ResourceBundle res)
           
TopWindow(java.lang.String message, java.util.ResourceBundle res, javax.swing.ImageIcon image, javax.swing.ImageIcon image2)
           
TopWindow(java.lang.String message, java.util.ResourceBundle res, javax.swing.ImageIcon image, javax.swing.ImageIcon image2, javax.swing.border.Border border)
           
TopWindow(java.awt.Window owner, java.lang.String message, java.util.ResourceBundle res, javax.swing.ImageIcon image, javax.swing.ImageIcon image2)
           
TopWindow(java.awt.Window owner, java.lang.String message, java.util.ResourceBundle res, javax.swing.ImageIcon image, javax.swing.ImageIcon image2, javax.swing.border.Border border)
           
 
Method Summary
protected  void center()
           
static TopWindow createSearchingWindow(java.util.ResourceBundle res)
           
static TopWindow createWorkingWindow(java.util.ResourceBundle res)
           
 java.util.Vector getTextsToTranslate()
          Returns all the texts in the element suitable for being translated.
 void hide()
           
 void pack()
           
 void setComponentLocale(java.util.Locale l)
           
 void setRepaintTime(int repaintTime)
           
 void setResourceBundle(java.util.ResourceBundle res)
          Sets the language resource bundle.
 void setTextColor(java.awt.Color color)
           
 void show()
           
 void show(boolean repaint)
          repaint specifies that the window must be painted each repaintTime milliseconds using a high priority thread, but this painting does not happen if the event dispatcher thread is busy
 void show(int milliseconds)
          Show the window during the specified time.
 void update()
          Repaint the window
 void updateIcon(javax.swing.ImageIcon icon)
           
 void updateText(java.lang.String text)
          Update the text in the window if this window shows a text, in other case does nothing.
 
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, isActive, isFocusableWindow, isFocusCycleRoot, isFocused, isShowing, postEvent, processEvent, processWindowEvent, processWindowFocusEvent, processWindowStateEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, setCursor, setFocusableWindowState, setFocusCycleRoot, setLocationRelativeTo, 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, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.ontimize.gui.ISplash
dispose
 

Field Detail

repaintTime

protected int repaintTime

repaintThread

protected com.ontimize.gui.TopWindow.RepaintThread repaintThread
Constructor Detail

TopWindow

public TopWindow(java.util.ResourceBundle res)

TopWindow

public TopWindow(java.lang.String message)

TopWindow

public TopWindow(java.lang.String message,
                 java.util.ResourceBundle res)

TopWindow

public TopWindow(java.lang.String message,
                 javax.swing.ImageIcon image,
                 javax.swing.ImageIcon image2)

TopWindow

public TopWindow(java.awt.Frame owner,
                 java.lang.String message,
                 java.util.ResourceBundle res,
                 javax.swing.ImageIcon image,
                 javax.swing.ImageIcon image2,
                 javax.swing.border.Border border)

TopWindow

public TopWindow(java.awt.Window owner,
                 java.lang.String message,
                 java.util.ResourceBundle res,
                 javax.swing.ImageIcon image,
                 javax.swing.ImageIcon image2,
                 javax.swing.border.Border border)

TopWindow

public TopWindow(java.lang.String message,
                 java.util.ResourceBundle res,
                 javax.swing.ImageIcon image,
                 javax.swing.ImageIcon image2,
                 javax.swing.border.Border border)

TopWindow

public TopWindow(java.lang.String message,
                 java.util.ResourceBundle res,
                 javax.swing.ImageIcon image,
                 javax.swing.ImageIcon image2)

TopWindow

public TopWindow(java.awt.Window owner,
                 java.lang.String message,
                 java.util.ResourceBundle res,
                 javax.swing.ImageIcon image,
                 javax.swing.ImageIcon image2)

TopWindow

public TopWindow(java.awt.Frame owner,
                 java.lang.String message,
                 java.util.ResourceBundle res,
                 javax.swing.ImageIcon image,
                 javax.swing.ImageIcon image2)

TopWindow

public TopWindow(javax.swing.JPanel panel)
Method Detail

center

protected void center()

show

public void show()
Specified by:
show in interface ISplash

setRepaintTime

public void setRepaintTime(int repaintTime)
Specified by:
setRepaintTime in interface ISplash

show

public void show(boolean repaint)
repaint specifies that the window must be painted each repaintTime milliseconds using a high priority thread, but this painting does not happen if the event dispatcher thread is busy

Specified by:
show in interface ISplash

show

public void show(int milliseconds)
Show the window during the specified time. If this time is 0, then shows the window until the next call to the hide method. If the window is already visible then does nothing

Parameters:
milliseconds -

hide

public void hide()
Specified by:
hide in interface ISplash

updateText

public void updateText(java.lang.String text)
Update the text in the window if this window shows a text, in other case does nothing.

Specified by:
updateText in interface ISplash
Parameters:
text -

updateIcon

public void updateIcon(javax.swing.ImageIcon icon)

update

public void update()
Repaint the window


setResourceBundle

public void setResourceBundle(java.util.ResourceBundle res)
Description copied from interface: Internationalization
Sets the language resource bundle. When the application changes the configured language, for all the objects that implement this interface this method must be called with the new file.
The method must translate all the elements that have texts in the GUI

Specified by:
setResourceBundle in interface Internationalization
Parameters:
res - the new language bundle.

getTextsToTranslate

public java.util.Vector getTextsToTranslate()
Description copied from interface: Internationalization
Returns all the texts in the element suitable for being translated.

Specified by:
getTextsToTranslate in interface Internationalization
Returns:
all the texts in the element suitable for being translated.

setComponentLocale

public void setComponentLocale(java.util.Locale l)
Specified by:
setComponentLocale in interface Internationalization

pack

public void pack()

setTextColor

public void setTextColor(java.awt.Color color)

createSearchingWindow

public static TopWindow createSearchingWindow(java.util.ResourceBundle res)

createWorkingWindow

public static TopWindow createWorkingWindow(java.util.ResourceBundle res)

Ontimize