org.olat.core.gui.control.generic.closablewrapper
Class CloseableModalController

java.lang.Object
  extended by org.olat.core.gui.control.DefaultController
      extended by org.olat.core.gui.control.generic.closablewrapper.CloseableModalController
All Implemented Interfaces:
Controller, ControllerEventListener, Disposable

Deprecated. don't use this anymore. Use BasicController methods or controllers from org.core.gui.control.modal package

public class CloseableModalController
extends DefaultController

Author:
Felix Jost
Comment: this controller takes a component in its contructor and wraps a velocity container around it with a single link/button (with a userdefined displayname) which closes the dialog.
Important: the method getMainComponent is overridden and throws an Exception, since there is a different method to be used: activate(WindowController wControl). This reason is the this controller is intended to be used only as "a popup"/modal dialog (since it offers the 'close' button) and after clicking that button, it should disappear by itself. Therefore you can only use it in conjunction with a WindowsController.

Field Summary
static Event CLOSE_MODAL_EVENT
          Deprecated. Comment for CLOSE_MODAL_EVENT
 
Constructor Summary
CloseableModalController(WindowControl wControl, java.lang.String closeButtonText, Component modalContent)
          Deprecated.  
CloseableModalController(WindowControl wControl, java.lang.String closeButtonText, Component modalContent, boolean displayAsOverlay, java.lang.String title)
          Deprecated. Additional constructor if display of content as overlay is not suitable.
 
Method Summary
 void activate()
          Deprecated.  
 void deactivate()
          Deprecated. deactivates the modal controller.
 void event(UserRequest ureq, Component source, Event event)
          Deprecated. abstract event method for subclasses.
 Component getInitialComponent()
          Deprecated. Get the initial component from this controller.
 void insertHeaderCss()
          Deprecated. insert css in HTML-header, wich overwrites default css
 
Methods inherited from class org.olat.core.gui.control.DefaultController
addControllerListener, addLoggingResourceable, dispatchEvent, dispatchEvent, dispose, getControllerCount, getUserActivityLogger, getWindowControlForDebug, isDisposed, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

CLOSE_MODAL_EVENT

public static final Event CLOSE_MODAL_EVENT
Deprecated. 
Comment for CLOSE_MODAL_EVENT

Constructor Detail

CloseableModalController

public CloseableModalController(WindowControl wControl,
                                java.lang.String closeButtonText,
                                Component modalContent)
Deprecated. 
Parameters:
wControl -
closeButtonText -
modalContent -

CloseableModalController

public CloseableModalController(WindowControl wControl,
                                java.lang.String closeButtonText,
                                Component modalContent,
                                boolean displayAsOverlay,
                                java.lang.String title)
Deprecated. 
Additional constructor if display of content as overlay is not suitable.

Parameters:
wControl -
closeButtonText -
modalContent -
showAsOverlay -
Method Detail

event

public void event(UserRequest ureq,
                  Component source,
                  Event event)
Deprecated. 
Description copied from class: DefaultController
abstract event method for subclasses. the event received from the component we are listening to are always rerouted to this method here, except when the component has been disposed, in which case the events are simply ignored.

See Also:
DefaultController.event(org.olat.core.gui.UserRequest, org.olat.core.gui.components.Component, org.olat.core.gui.control.Event)

getInitialComponent

public Component getInitialComponent()
Deprecated. 
Description copied from interface: Controller
Get the initial component from this controller.

Specified by:
getInitialComponent in interface Controller
Overrides:
getInitialComponent in class DefaultController
Returns:
Component
See Also:
DefaultController.getInitialComponent()

activate

public void activate()
Deprecated. 

deactivate

public void deactivate()
Deprecated. 
deactivates the modal controller. please do use this method here instead of getWindowControl().pop() !


insertHeaderCss

public void insertHeaderCss()
Deprecated. 
insert css in HTML-header, wich overwrites default css