com.valhalla.gui
Class DialogTracker

java.lang.Object
  extended byjava.util.AbstractCollection
      extended byjava.util.AbstractList
          extended byjava.util.ArrayList
              extended bycom.valhalla.gui.DialogTracker
All Implemented Interfaces:
java.lang.Cloneable, java.util.Collection, java.util.List, java.util.RandomAccess, java.io.Serializable

public class DialogTracker
extends java.util.ArrayList

Tracks the different dialogs in JBother. Keeps track of dialogs that should only be opened one at a time or dialogs that should be killed when the connection is lost

Version:
1.0
Author:
Adam Olsen
See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class java.util.AbstractList
 
Field Summary
 
Fields inherited from class java.util.AbstractList
modCount
 
Method Summary
static void addDialog(java.awt.Window dialog)
          Adds a dialog
static void addDialog(java.awt.Window dialog, boolean signOffKill, boolean addCloseHandler)
          Adds a dialog to the tracker
static boolean containsDialog(java.lang.Class dialog)
          Checks to see if the tracker is tracking a specific dialog
static DialogTracker getInstance()
          Returns the dialog tracker's instance
static void kill()
          Kills all the dialogs that are supposed to be killed when the connection is lost
static void removeDialog(java.awt.Window dialog)
          Removes a dialog from the tracker, and calls it's dispose() method
 
Methods inherited from class java.util.ArrayList
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, get, indexOf, isEmpty, lastIndexOf, remove, removeRange, set, size, toArray, toArray, trimToSize
 
Methods inherited from class java.util.AbstractList
equals, hashCode, iterator, listIterator, listIterator, subList
 
Methods inherited from class java.util.AbstractCollection
containsAll, remove, removeAll, retainAll, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.List
containsAll, equals, hashCode, iterator, listIterator, listIterator, remove, removeAll, retainAll, subList
 

Method Detail

getInstance

public static DialogTracker getInstance()
Returns the dialog tracker's instance

Returns:
The instance value

containsDialog

public static boolean containsDialog(java.lang.Class dialog)
Checks to see if the tracker is tracking a specific dialog

Parameters:
dialog - the dialog class to check
Returns:
true if the dialog tracker is tracking the dialog

kill

public static void kill()
Kills all the dialogs that are supposed to be killed when the connection is lost


removeDialog

public static void removeDialog(java.awt.Window dialog)
Removes a dialog from the tracker, and calls it's dispose() method

Parameters:
dialog - the dialog to remove

addDialog

public static void addDialog(java.awt.Window dialog,
                             boolean signOffKill,
                             boolean addCloseHandler)
Adds a dialog to the tracker

Parameters:
dialog - the dialog to add
signOffKill - set to true if you want the dialog to be destroyed when the connection is lost
addCloseHandler - set to true if you want a default close handler that will remove the dialog to be added

addDialog

public static void addDialog(java.awt.Window dialog)
Adds a dialog

Parameters:
dialog - the dialog to add