com.sdm.quasar.client.swing.embedding.features
Class ModalDialogFeature

java.lang.Object
  extended bycom.sdm.quasar.client.core.dialog.AbstractFeature
      extended bycom.sdm.quasar.client.swing.embedding.features.ModalDialogFeature
All Implemented Interfaces:
Feature, SystemInfoProvider

public class ModalDialogFeature
extends AbstractFeature

Feature for dialogs that have modal presentations. It offers convenience access to the parent component needed to create proper modal dialogs.

Version:
1.0
Author:
Martin Haft, sd&m AG, Thomas Wolf, sd&m AG, Bernd Olleck, sd&m AG

Constructor Summary
ModalDialogFeature()
           
 
Method Summary
protected  void dispose()
          Called when the feature or dialog is disposed.
 java.awt.Window getParentWindow()
           
protected  void init()
          Called when the feature is initializing.
 void positionDialogRelativeToParent(java.awt.Window windowToPosition)
          Positions the dialog's window relative to the parent window (i.e. centers it) using Window.setLocationRelativeTo(java.awt.Component)
 
Methods inherited from class com.sdm.quasar.client.core.dialog.AbstractFeature
activate, attachDialogControl, collectSystemInfo, deactivate, disposeFeature, getDialogControl, isInitialized, prepare, release
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ModalDialogFeature

public ModalDialogFeature()
Method Detail

init

protected void init()
Description copied from class: AbstractFeature
Called when the feature is initializing. This is normally done, when the feature is connected to the lifecycle of the DialogControl installed to. To access the DialogControl use the AbstractFeature.getDialogControl() method.

Override this method to perform some action on initialization e.g. register public services.

Specified by:
init in class AbstractFeature

dispose

protected void dispose()
                throws DisposeException
Description copied from class: AbstractFeature
Called when the feature or dialog is disposed. Override this method to clean up resources and free memory when disposing.

Specified by:
dispose in class AbstractFeature
Throws:
DisposeException

getParentWindow

public java.awt.Window getParentWindow()
Returns:
the parent window component that the dialog should be modal to

positionDialogRelativeToParent

public void positionDialogRelativeToParent(java.awt.Window windowToPosition)
Positions the dialog's window relative to the parent window (i.e. centers it) using Window.setLocationRelativeTo(java.awt.Component)

Parameters:
windowToPosition - the window of this dialog