com.droplets.api
Class Dialog

java.lang.Object
  |
  +--com.droplets.api.InvalidationEventSource
        |
        +--com.droplets.api.Window
              |
              +--com.droplets.api.Dialog
Direct Known Subclasses:
DateChooserWindow

public abstract class Dialog
extends Window

The base class of all Dialogs in Droplet applications.

Use Dialog if you do NOT want (1)your application sub-windows to maximize and minimize independent of the main window; and (2) windows to maximize and minimize independent of one another.

Note that there is a restriction on the usage of Window objects. After the Droplet Client corresponding to an Application object is no longer connected to the Server, all open windows that belong to that Application may be deallocated, either immediately when the Client disconnects or after a specified period of time. In addition, Windows are always deallocated after they are closed. When a Window is deallocated, the Java object that represents it is said to become "invalid." All subsequent public method calls will throw an IllegalStateException. Any other objects that hold a reference to this one should register using InvalidationEventSource.addInvalidationListener(com.droplets.api.event.ObjectInvalidationListener) to be notified when the object becomes invalid so that they can release their references. In all cases, this notification will come after a call to stop().

Note that in the ObjectInvalidationListener's event handling code, you must not rely on the fact that the Window's Application object is still valid. However, the Window's Components are guaranteed to be valid.

There are some concepts that you must understand about how Droplet Windows work. Refer to the Droplet SDK's Hello World and Sub-windows tutorials for a full explanation.


Fields inherited from class com.droplets.api.Window
m_token, m_windowComp
 
Constructor Summary
Dialog(Application application)
          Constructs a new Dialog.
 
Method Summary
 boolean isModal()
          Determines whether this dialog is Modal.
 void setModal(boolean modal)
          Sets the dialog modal state.
 
Methods inherited from class com.droplets.api.Window
addAllComponents, addCloseListener, addComponent, addOpenDialogListener, close, doRetrieve, doStore, fireWindowClosedEvent, flush, generateTypeString, getApplication, getComponentByName, getMainPanel, getMenuBar, getProtocolVersion, getTitle, isMainWindow, isWindowTypeCacheable, locate, print, removeCloseListener, removeOpenDialogListener, setMenuBar, setTitle, signalAttentionRequired, start, stop
 
Methods inherited from class com.droplets.api.InvalidationEventSource
addInvalidationListener, ensureValid, fireInvalidationEvent, invalidate, isValid, removeInvalidationListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Dialog

public Dialog(Application application)
Constructs a new Dialog.
Parameters:
application - the application object representing the user session in which this window will appear
Method Detail

isModal

public boolean isModal()
Determines whether this dialog is Modal.
Returns:
true if this dialog is modal, false if it is modeless.

setModal

public void setModal(boolean modal)
Sets the dialog modal state. Note this should be called, at the latest, from your dialog's addAllComponents method.
Parameters:
modal - specifies whether this dialog should be modal.


Copyright © Droplets, 2001. All Rights Reserved.