com.notuvy.gui
Class TimedDialog

java.lang.Object
  extended by com.notuvy.gui.TimedDialog
All Implemented Interfaces:
Runnable
Direct Known Subclasses:
TimedNowLaterDialog, TimedWarnDialog

public abstract class TimedDialog
extends Object
implements Runnable

An abstract dialog that is displayed only for a limited amount of time. A separate timeout thread is used to wait and fire after the time limit to close the dialog if the user has not acted on it via the GUI.

Author:
murali

Field Summary
protected static org.apache.log4j.Logger LOG
           
 
Constructor Summary
protected TimedDialog(Component pParent, String pTitle, String pMessage, int pTimeout)
           
 
Method Summary
protected  void closeDialogAndUnblock()
           
protected abstract  JOptionPane createOptionPane()
           
protected  void displayDialogAndBlock()
           
 boolean getClosed()
          Flag indicating whether the displayed dialog has been closed (by either the user or the timeout thread).
protected  String getMessage()
           
protected  Component getParent()
           
protected  String getTitle()
           
 boolean isExpired()
          Flag indicating whether the timeout thread acted to close the dialog.
 boolean isInitialized()
          Flag indicating whether the dialog has been displayed.
 void run()
           
 void show()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOG

protected static final org.apache.log4j.Logger LOG
Constructor Detail

TimedDialog

protected TimedDialog(Component pParent,
                      String pTitle,
                      String pMessage,
                      int pTimeout)
Method Detail

getParent

protected Component getParent()

getTitle

protected String getTitle()

getMessage

protected String getMessage()

getClosed

public boolean getClosed()
Flag indicating whether the displayed dialog has been closed (by either the user or the timeout thread).

Returns:
boolean flag value.

isInitialized

public boolean isInitialized()
Flag indicating whether the dialog has been displayed.

Returns:
boolean flag value.

isExpired

public boolean isExpired()
Flag indicating whether the timeout thread acted to close the dialog.

Returns:
boolean flag value.

show

public void show()

displayDialogAndBlock

protected void displayDialogAndBlock()

closeDialogAndUnblock

protected void closeDialogAndUnblock()

createOptionPane

protected abstract JOptionPane createOptionPane()

run

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


Copyright © 2013. All Rights Reserved.