org.olat.core.gui
Interface WindowManager

All Superinterfaces:
Disposable
All Known Implementing Classes:
WindowManagerImpl

public interface WindowManager
extends Disposable

handles all windows of a user

Initial Date: 23.03.2006

Author:
Felix Jost

Method Summary
 ContentableChiefController createContentableChiefController(UserRequest ureq)
           
 MediaResource createMediaResourceFor(java.lang.Class baseClass, java.lang.String relPath)
          locates and returns the resource found under /relpath; e.g.
 PopupBrowserWindow createNewPopupBrowserWindowFor(UserRequest ureq, ControllerCreator controllerCreator)
          a new browser window with content (controller) provided through the controller creator.
 WindowBackOffice createWindowBackOffice(java.lang.String windowName, ChiefController owner)
           
 GlobalSettings getGlobalSettings()
           
 java.lang.String getMapPathFor(java.lang.Class baseClass)
          creates (or gets) a path for a given class
 boolean isAjaxEnabled()
          whether or not ajax mode ("web 2.0") is enabled.
 boolean isForScreenReader()
           
 void setAjaxEnabled(boolean enabled)
           
 void setAjaxWanted(UserRequest ureq, boolean enabled)
          call this method after having e.g.
 void setFontSize(int fontSize)
           
 void setForScreenReader(boolean forScreenReader)
           
 void setHighLightingEnabled(boolean enabled)
           
 
Methods inherited from interface org.olat.core.gui.control.Disposable
dispose
 

Method Detail

setAjaxWanted

void setAjaxWanted(UserRequest ureq,
                   boolean enabled)
call this method after having e.g. logged on, and when you would like to switch to ajax mode.
ajax will be enable if all of the following criterion meet: a) it is globally enabled in olat_config.xml b) the browser of the user supports it c) the given argument "enabled" is true

Parameters:
ureq -
enabled - if true, ajax should be enabled if possible

getMapPathFor

java.lang.String getMapPathFor(java.lang.Class baseClass)
creates (or gets) a path for a given class

Parameters:
baseClass -
Returns:

createMediaResourceFor

MediaResource createMediaResourceFor(java.lang.Class baseClass,
                                     java.lang.String relPath)
locates and returns the resource found under /relpath; e.g. for baseClass org.olat.demo.MyDemo and relPath /js/myfunc.js -> org/olat/demo/_static/js/myfunc.js

Parameters:
baseClass - the class which packages denotes the base path for the lookup
relPath - e.g. /js/myfunc.js
Returns:
the MediaResource which delivers the resource

getGlobalSettings

GlobalSettings getGlobalSettings()

createWindowBackOffice

WindowBackOffice createWindowBackOffice(java.lang.String windowName,
                                        ChiefController owner)
Parameters:
windowName -
owner -
Returns:

setAjaxEnabled

void setAjaxEnabled(boolean enabled)

setForScreenReader

void setForScreenReader(boolean forScreenReader)

setHighLightingEnabled

void setHighLightingEnabled(boolean enabled)

setFontSize

void setFontSize(int fontSize)
Parameters:
fontSize - relative to default font size

createContentableChiefController

ContentableChiefController createContentableChiefController(UserRequest ureq)
Parameters:
ureq -
Returns:

isForScreenReader

boolean isForScreenReader()
Returns:

isAjaxEnabled

boolean isAjaxEnabled()
whether or not ajax mode ("web 2.0") is enabled. should only called by controllers to determine whether they can offer additional ui capabilites due to ajax turned on. e.g. provide an autocompletion

Returns:

createNewPopupBrowserWindowFor

PopupBrowserWindow createNewPopupBrowserWindowFor(UserRequest ureq,
                                                  ControllerCreator controllerCreator)
a new browser window with content (controller) provided through the controller creator. If the different layouts in popup windows are needed, the application must provide wrapping layouting controller containing the content. Feed in the wrapping layouting controller.
please see the Link on how to define a link to act as a popup window link. Once such a link is clicked the listening controller uses the popupBrowserWindow = getWindowControl().getWindowBackOffice().getWindowManager().createNewPopupBrowserWindowFor(ureq, this); to create the popup window (this may be any ControllerCreator!). Just call the method PopupBrowserWindow.open(UserRequest) to activate/open/render the content in the new browserwindow.

Parameters:
ureq -
controllerCreator -
Returns: