org.olat.core.gui.control.generic.modal
Class DialogBoxController

java.lang.Object
  extended by org.olat.core.gui.control.DefaultController
      extended by org.olat.core.gui.control.controller.BasicController
          extended by org.olat.core.gui.control.generic.modal.DialogBoxController
All Implemented Interfaces:
Controller, ControllerEventListener, Disposable

public class DialogBoxController
extends BasicController

Description:

The dialog box controller creates a modal dialog box that blocks the user interface until the user clicked on any of the buttons. In most cases developers will use the DialogBoxControllerFactory and not use the generic constructor here.

Note that this controller will activate the modal panel itself and also remove the modal panel when the dialog is finished.

Events thrown by this controller:

Initial Date: 26.11.2007

Author:
Florian Gnaegi, frentix GmbH, http://www.frentix.com

Method Summary
 void activate()
           
 void deactivate()
          only needed if you want to remove the dialog without having the user clicking one of the buttons or the close icon!
 java.lang.Object getUserObject()
          retrieve attached user object.
 void setCloseWindowEnabled(boolean closeWindowEnabled)
           
 void setCssClass(java.lang.String cssClass)
           
 void setUserObject(java.lang.Object userObject)
          attach a object to the dialog which you later retrieve.
 
Methods inherited from class org.olat.core.gui.control.DefaultController
addControllerListener, addLoggingResourceable, dispatchEvent, dispatchEvent, dispose, getControllerCount, getInitialComponent, getUserActivityLogger, getWindowControlForDebug, isDisposed, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

setCloseWindowEnabled

public void setCloseWindowEnabled(boolean closeWindowEnabled)

setCssClass

public void setCssClass(java.lang.String cssClass)

setUserObject

public void setUserObject(java.lang.Object userObject)
attach a object to the dialog which you later retrieve. TODO:pb:example for this

Parameters:
userObject -

getUserObject

public java.lang.Object getUserObject()
retrieve attached user object.

Returns:
null if no user object was previously set

activate

public void activate()

deactivate

public void deactivate()
only needed if you want to remove the dialog without having the user clicking one of the buttons or the close icon!