de.fhg.igd.ui
Class Warning

java.lang.Object
  extended byde.fhg.igd.ui.Warning
All Implemented Interfaces:
Listener, Runnable

public class Warning
extends Object
implements Runnable, Listener

Shows a simple warning dialog, beautified with a fancy image.

Version:
"$Id: Warning.java 1913 2007-08-08 02:41:53Z jpeters $"
Author:
Volker Roth

Field Summary
static String ANAME
          The name of the sound to play in case of warnings.
protected  JFrame frame_
          The JFrame used to show warnings.
static String INAME
          The name of the image to show in warnings.
static int IWIDTH
          The width of the warning window.
private static AsyncListener listener_
          The listener used to receive event notification.
private static Object lock_
          The private static lock.
protected  JTextArea text_
          The JLabel used to display the warning message.
 
Constructor Summary
private Warning()
           
 
Method Summary
private  void clear()
           
 void displayMessage(String message)
          Displays the given message in the warning window.
protected  void init()
          Initializes the frame if it isn't already.
private  boolean launch()
           
static void main(String[] argv)
           
 void notifiedOf(Object o)
          This method is called with the event that caused the notification.
static void popup(String message)
           
 void run()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

lock_

private static Object lock_
The private static lock.


listener_

private static AsyncListener listener_
The listener used to receive event notification.


INAME

public static final String INAME
The name of the image to show in warnings.

See Also:
Constant Field Values

ANAME

public static final String ANAME
The name of the sound to play in case of warnings.

See Also:
Constant Field Values

IWIDTH

public static final int IWIDTH
The width of the warning window. Scaling of the warning image preserves the aspect ratio.

See Also:
Constant Field Values

frame_

protected transient JFrame frame_
The JFrame used to show warnings.


text_

protected transient JTextArea text_
The JLabel used to display the warning message.

Constructor Detail

Warning

private Warning()
Method Detail

popup

public static void popup(String message)

init

protected void init()
             throws IOException,
                    ImageException,
                    InterruptedException
Initializes the frame if it isn't already.

Throws:
IOException
ImageException
InterruptedException

displayMessage

public void displayMessage(String message)
Displays the given message in the warning window.

Parameters:
message - The warning message.

launch

private boolean launch()

clear

private void clear()

notifiedOf

public void notifiedOf(Object o)
Description copied from interface: Listener
This method is called with the event that caused the notification.

Specified by:
notifiedOf in interface Listener
Parameters:
o - The object describing the event.

run

public void run()
Specified by:
run in interface Runnable

main

public static void main(String[] argv)


Copyright © Fraunhofer Gesellschaft. All Rights Reserved.