org.olat.core.commons.fullWebApp
Class LayoutMain3ColsPreviewController

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.controller.MainLayoutBasicController
              extended by org.olat.core.commons.fullWebApp.LayoutMain3ColsPreviewController
All Implemented Interfaces:
CustomCSSProvider, Controller, ControllerEventListener, Disposable, MainLayout3ColumnsController, MainLayoutController

public class LayoutMain3ColsPreviewController
extends MainLayoutBasicController
implements MainLayout3ColumnsController

Description:

This layouter controller provides a fullscreen view with a preview background

Events thrown by this controller:

Initial Date: 21.01.2008

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

Constructor Summary
LayoutMain3ColsPreviewController(UserRequest ureq, WindowControl wControl, Component col1, Component col2, Component col3, java.lang.String layoutConfigKey)
          Constructor for creating a 3 col based menu on the main area
 
Method Summary
 void activate()
          Activate this preview workflow
 void addCssClassToMain(java.lang.String cssClass)
          Add a css class to the #b_main wrapper div, e.g.
 void addDisposableChildController(Controller toBedisposedControllerOnDispose)
          Add a controller to this layout controller that should be cleaned up when this layout controller is diposed.
 void deactivate()
          Deactivates preview controller.
 void event(UserRequest ureq, Component source, Event event)
          abstract event method for subclasses.
 Component getInitialComponent()
          Get the initial component from this controller.
 void hideCol1(boolean hide)
          Temporarily hide the column 1 withour removing the component
 void hideCol2(boolean hide)
          Temporarily hide the column 2 withour removing the component
 void hideCol3(boolean hide)
          Temporarily hide the column 3 withour removing the component
 void removeCssClassFromMain(java.lang.String cssClass)
          Remove a CSS class from the #b_main wrapper div
 void setCol1(Component col1Component)
          Set a new component to this column or null to not use this column
 void setCol2(Component col2Component)
          Set a new component to this column or null to not use this column
 void setCol3(Component col3Component)
          Set a new component to this column or null to not use this column
 
Methods inherited from class org.olat.core.gui.control.controller.MainLayoutBasicController
dispose, getCustomCSS, setCustomCSS
 
Methods inherited from class org.olat.core.gui.control.DefaultController
addControllerListener, addLoggingResourceable, dispatchEvent, dispatchEvent, getControllerCount, getUserActivityLogger, getWindowControlForDebug, isDisposed, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.olat.core.gui.control.generic.layout.MainLayoutController
setCustomCSS
 
Methods inherited from interface org.olat.core.gui.control.Controller
addControllerListener, dispatchEvent, dispose, getUserActivityLogger, getWindowControlForDebug, isDisposed
 
Methods inherited from interface org.olat.core.gui.components.htmlheader.jscss.CustomCSSProvider
getCustomCSS
 

Constructor Detail

LayoutMain3ColsPreviewController

public LayoutMain3ColsPreviewController(UserRequest ureq,
                                        WindowControl wControl,
                                        Component col1,
                                        Component col2,
                                        Component col3,
                                        java.lang.String layoutConfigKey)
Constructor for creating a 3 col based menu on the main area

Parameters:
ureq -
wControl -
col1 - usually the left column
col2 - usually the right column
col3 - usually the content column
layoutConfigKey - identificator for this layout to persist the users column width settings
Method Detail

event

public void event(UserRequest ureq,
                  Component source,
                  Event event)
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()
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

activate

public void activate()
Activate this preview workflow


deactivate

public void deactivate()
Deactivates preview controller. Please do use this method here instead of getWindowControl().pop() !


hideCol1

public void hideCol1(boolean hide)
Description copied from interface: MainLayout3ColumnsController
Temporarily hide the column 1 withour removing the component

Specified by:
hideCol1 in interface MainLayout3ColumnsController
Parameters:
hide - The column to hide

hideCol2

public void hideCol2(boolean hide)
Description copied from interface: MainLayout3ColumnsController
Temporarily hide the column 2 withour removing the component

Specified by:
hideCol2 in interface MainLayout3ColumnsController
Parameters:
hide - The column to hide

hideCol3

public void hideCol3(boolean hide)
Description copied from interface: MainLayout3ColumnsController
Temporarily hide the column 3 withour removing the component

Specified by:
hideCol3 in interface MainLayout3ColumnsController
Parameters:
hide - The column to hide

setCol1

public void setCol1(Component col1Component)
Description copied from interface: MainLayout3ColumnsController
Set a new component to this column or null to not use this column

Specified by:
setCol1 in interface MainLayout3ColumnsController

setCol2

public void setCol2(Component col2Component)
Description copied from interface: MainLayout3ColumnsController
Set a new component to this column or null to not use this column

Specified by:
setCol2 in interface MainLayout3ColumnsController

setCol3

public void setCol3(Component col3Component)
Description copied from interface: MainLayout3ColumnsController
Set a new component to this column or null to not use this column

Specified by:
setCol3 in interface MainLayout3ColumnsController

addCssClassToMain

public void addCssClassToMain(java.lang.String cssClass)
Description copied from interface: MainLayout3ColumnsController
Add a css class to the #b_main wrapper div, e.g. for special background formatting

Specified by:
addCssClassToMain in interface MainLayout3ColumnsController

addDisposableChildController

public void addDisposableChildController(Controller toBedisposedControllerOnDispose)
Description copied from interface: MainLayout3ColumnsController
Add a controller to this layout controller that should be cleaned up when this layout controller is diposed. In most scenarios you should hold a reference to the content controllers that controll the col1, col2 or col3, but in rare cases this is not the case and you have no local reference to your controller. You can then use this method to add your controller. At the dispose time of the layout controller your controller will be disposed as well.

Specified by:
addDisposableChildController in interface MainLayout3ColumnsController

removeCssClassFromMain

public void removeCssClassFromMain(java.lang.String cssClass)
Description copied from interface: MainLayout3ColumnsController
Remove a CSS class from the #b_main wrapper div

Specified by:
removeCssClassFromMain in interface MainLayout3ColumnsController