org.olat.core.gui.control.generic.tool
Interface ToolController

All Superinterfaces:
Controller, Disposable

public interface ToolController
extends Controller

Description:
A graphical thing displayed on the right side of the screen, containing mainly links which are offered in the current process. The order the Header, Links, or component are added determines their vertical position. Direction is top-down.

Author:
Felix Jost

Method Summary
 void addComponent(Component component)
          the most generic solution, the Tool renderer will just display the component, nothing more
 void addComponent(Component component, java.lang.String ident)
          the most generic solution, the Tool renderer will just display the component, nothing more
 void addHeader(java.lang.String text)
          a header text like 'Course tools' 'Actions' 'Edit' or whatever
 void addHeader(java.lang.String text, java.lang.String ident)
          a header text like 'Course tools' 'Actions' 'Edit' or whatever
 void addHeader(java.lang.String text, java.lang.String ident, java.lang.String cssClass)
          a header text like 'Course tools' 'Actions' 'Edit' or whatever
 void addLink(java.lang.String action, java.lang.String text)
          a link (= a velocity $r.link(..)).
 void addLink(java.lang.String action, java.lang.String text, java.lang.String ident, java.lang.String cssClass)
          a link (= a velocity $r.link(..)).
 void addLink(java.lang.String action, java.lang.String text, java.lang.String ident, java.lang.String cssClass, boolean isDownloadLink)
          a link (= a velocity $r.link(..)).
 void addPopUpLink(java.lang.String action, java.lang.String text, java.lang.String ident, java.lang.String cssClass, java.lang.String width, java.lang.String height, boolean browserMenubarEnabled)
          a link (= a velocity $r.link(..)).
 boolean isEmpty()
           
 void remove(java.lang.String ident)
          Remove tool entry with given ident
 void setDragEnabled(boolean dragEnabled)
           
 void setEnabled(java.lang.String ident, boolean enabled)
          Enable/Disable a tool entry.
 
Methods inherited from interface org.olat.core.gui.control.Controller
addControllerListener, dispatchEvent, dispose, getInitialComponent, getUserActivityLogger, getWindowControlForDebug, isDisposed
 

Method Detail

addHeader

void addHeader(java.lang.String text)
a header text like 'Course tools' 'Actions' 'Edit' or whatever

Parameters:
text -

addHeader

void addHeader(java.lang.String text,
               java.lang.String ident)
a header text like 'Course tools' 'Actions' 'Edit' or whatever

Parameters:
text -
ident - An ident to reference this entry

addHeader

void addHeader(java.lang.String text,
               java.lang.String ident,
               java.lang.String cssClass)
a header text like 'Course tools' 'Actions' 'Edit' or whatever

Parameters:
text -
ident - An ident to reference this entry
cssClass - a css class that provides an toolbox title bar image. optional, can be null (default image)

addLink

void addLink(java.lang.String action,
             java.lang.String text)
a link (= a velocity $r.link(..)). in order to receive events, the code creating the tool must use tool.addControllerListener(ControllerEventListener el) to receive the link events (us usual: subscribe to controller events)

Parameters:
action - the command which the event will have when the event is fired because the user clicked this link.
text -

addLink

void addLink(java.lang.String action,
             java.lang.String text,
             java.lang.String ident,
             java.lang.String cssClass)
a link (= a velocity $r.link(..)). in order to receive events, the code creating the tool must use tool.addControllerListener(ControllerEventListener el) to receive the link events (us usual: subscribe to controller events)

Parameters:
action - the command which the event will have when the event is fired because the user clicked this link.
text -
ident - An ident to reference this entry
cssClass - The class for the enclosing div tag or null if default class used

addLink

void addLink(java.lang.String action,
             java.lang.String text,
             java.lang.String ident,
             java.lang.String cssClass,
             boolean isDownloadLink)
a link (= a velocity $r.link(..)). in order to receive events, the code creating the tool must use tool.addControllerListener(ControllerEventListener el) to receive the link events (us usual: subscribe to controller events)

Parameters:
action - the command which the event will have when the event is fired because the user clicked this link.
text -
ident - An ident to reference this entry
cssClass - The class for the enclosing div tag or null if default class used
isDownloadLink - if the link results in a download !! works not together with cssClass != null

addPopUpLink

void addPopUpLink(java.lang.String action,
                  java.lang.String text,
                  java.lang.String ident,
                  java.lang.String cssClass,
                  java.lang.String width,
                  java.lang.String height,
                  boolean browserMenubarEnabled)
a link (= a velocity $r.link(..)). in order to receive events, the code creating the tool must use tool.addControllerListener(ControllerEventListener el) to receive the link events (us usual: subscribe to controller events)

Parameters:
action - the command which the event will have when the event is fired because the user clicked this link.
text -
ident - An ident to reference this entry
cssClass - The class for the enclosing div tag or null if default class used
width - popup window width
height - popup window height
browserMenubarEnabled - true: browser menu bar visible

addComponent

void addComponent(Component component)
the most generic solution, the Tool renderer will just display the component, nothing more

Parameters:
component -

addComponent

void addComponent(Component component,
                  java.lang.String ident)
the most generic solution, the Tool renderer will just display the component, nothing more

Parameters:
component -
ident - An ident to reference this entry

remove

void remove(java.lang.String ident)
Remove tool entry with given ident

Parameters:
ident -

setEnabled

void setEnabled(java.lang.String ident,
                boolean enabled)
Enable/Disable a tool entry.

Parameters:
ident -
enabled -

setDragEnabled

void setDragEnabled(boolean dragEnabled)
Parameters:
dragEnabled - if true, all active toolentries can be dragged

isEmpty

boolean isEmpty()
Returns:
true when toolbox has no entries, false if toolbox has at least one entry