org.olat.core.commons.fullWebApp
Class LayoutMain3ColsController

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.LayoutMain3ColsController
All Implemented Interfaces:
CustomCSSProvider, Controller, ControllerEventListener, Disposable, MainLayout3ColumnsController, MainLayoutController

public class LayoutMain3ColsController
extends MainLayoutBasicController
implements MainLayout3ColumnsController

Description:

This main layout controller provides a three column layout based on the YAML framework. You must use the the BaseFullWebappController as parent controller or implement the necessary YAML HTML wrapper markup code yourself.

The meaning of the col1, col2 and col3 are strictly following the YAML concept. This means, that in a brasato web application in most cases the following mapping is applied:

Read the YAML specification if you don't understand why this is. Rendering is all done using CSS.

For information about YAML please see @see http://www.yaml.de

Events thrown by this controller:

Initial Date: 11.10.2007

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

Constructor Summary
LayoutMain3ColsController(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.
LayoutMain3ColsController(UserRequest ureq, WindowControl wControl, Component col1, Component col2, Component col3, java.lang.String layoutConfigKey, LayoutMain3ColsConfig defaultConfiguration)
          Constructor for creating a 3 col based menu on the main area
 
Method Summary
 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 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
 void setDisposedMessageController(Controller disposedMessageControllerOnDipsose)
          The Controller to be set on the mainPanel in case of disposing this layout controller.
 
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, getInitialComponent, 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, getInitialComponent, getUserActivityLogger, getWindowControlForDebug, isDisposed
 
Methods inherited from interface org.olat.core.gui.components.htmlheader.jscss.CustomCSSProvider
getCustomCSS
 

Constructor Detail

LayoutMain3ColsController

public LayoutMain3ColsController(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. This constructor uses the default column width configuration

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

LayoutMain3ColsController

public LayoutMain3ColsController(UserRequest ureq,
                                 WindowControl wControl,
                                 Component col1,
                                 Component col2,
                                 Component col3,
                                 java.lang.String layoutConfigKey,
                                 LayoutMain3ColsConfig defaultConfiguration)
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
defaultConfiguration - The layout width configuration to be used
Method Detail

addDisposableChildController

public void addDisposableChildController(Controller toBedisposedControllerOnDispose)
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
Parameters:
toBedisposedControllerOnDispose -

setDisposedMessageController

public void setDisposedMessageController(Controller disposedMessageControllerOnDipsose)
The Controller to be set on the mainPanel in case of disposing this layout controller.

Parameters:
disposedMessageControllerOnDipsose -

addCssClassToMain

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

Specified by:
addCssClassToMain in interface MainLayout3ColumnsController
Parameters:
cssClass -

removeCssClassFromMain

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

Specified by:
removeCssClassFromMain in interface MainLayout3ColumnsController
Parameters:
cssClass -

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
See Also:
MainLayout3ColumnsController.hideCol1(boolean)

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
See Also:
MainLayout3ColumnsController.hideCol2(boolean)

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
See Also:
MainLayout3ColumnsController.hideCol3(boolean)

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
See Also:
MainLayout3ColumnsController.setCol1(org.olat.core.gui.components.Component)

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
See Also:
MainLayout3ColumnsController.setCol2(org.olat.core.gui.components.Component)

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
See Also:
MainLayout3ColumnsController.setCol3(org.olat.core.gui.components.Component)