com.sapportals.htmlb

Class Tray

java.lang.Object
  extended bycom.sapportals.htmlb.Component
      extended bycom.sapportals.htmlb.Container
          extended bycom.sapportals.htmlb.EventValidationContainer
              extended bycom.sapportals.htmlb.Tray
All Implemented Interfaces:
IEventValidationComponent

public class Tray
extends EventValidationContainer

a Tray is an outer container similar to the Group but with additional functionality (collapse/expand). Application developers who write components for a Portal must NOT use this control since this element is provided by the portal environment.

Copyright 2004 SAP AG


Field Summary
static String UI_ID
           
static int VAR_BEGIN
           
static int VAR_END
           
 
Fields inherited from class com.sapportals.htmlb.Container
elements
 
Constructor Summary
Tray()
           
Tray(String id)
           
 
Method Summary
 String getAccessibilityDescription()
          get the semantical description of the component in it's applicationcontext used by screenreaders
 TrayDesign getDesign()
          gets the design to be used for rendering this Tray.
 String getHeight()
          gets the height of this tray
 HoverMenu getHoverMenu()
          returns the hover menu which should be displayed as mouse moves over the text
 HoverMenu getMenu()
          returns the menu of the tray
 String getOnClientToggle()
          get the JavaScript fragment that is executed on the client side if the user toggles the tray
 String getOnCollapse()
          gets the event action associated with collapsing the tray or null if no action should occur.
 String getOnEdit()
          Deprecated. gets the event action associated with clicking on the trays 'Edit' icon or null if no action should occur.

The 'Edit' icon will only be visible if an event action is set.

 String getOnExpand()
          Deprecated. not supported.
 String getOnRemove()
          Deprecated. gets the event action associated with clicking on the trays 'Remove' icon or null if no action should occur.

The 'Remove' icon will only be visible if an event action is set.

 boolean getPersistExpansionState()
           
 String getTitle()
          gets the title for this Tray.
 String getTooltip()
          gets the Tooltip for this Tray.
 String getUI()
          get a identification String for the renderer that is unique across all supported components.
 String getWidth()
          gets the width of this tray
 boolean hasContentPadding()
           
 boolean hasMenu()
          check if menu item was set
protected  void init()
           
protected  void initFromPageContext(IPageContext pc, String baseId)
          internal use only.
 boolean isCollapsed()
          determines if this Tray should be rendered in a collapsed state.
 boolean isCollapsible()
          get the collapsible value for the correct rendering
 boolean requiresForm()
          check if this tray really requires a form around it.
 void setAccessibilityDescription(String accessibilityDescription)
          sets the sematical description for the component in it's applicationcontext used by screenreaders
 void setCollapsed(boolean collapsed)
          sets if this Tray should be rendered in a collapsed state.
 void setCollapsible(boolean collapsible)
          Set the collapse icon in the top right corner
 void setDesign(TrayDesign design)
          sets the design to be used for rendering this Tray.
 void setHasContentPadding(boolean hasContentPadding)
           
 void setHeight(String height)
          sets the height of the tray
 void setHoverMenu(HoverMenu hoverMenu)
          sets the hove menu which should be displayed as mouse moves over the text
 void setMenu(HoverMenu menu)
          sets the menu of the tray
 void setOnClientToggle(String onClientToggle)
          set a Javascript fragment that is executed when the user toggles the tray
 void setOnCollapse(String onCollapse)
          Deprecated. not supported.
 void setOnEdit(String onEdit)
          Deprecated. sets the event action associated with clicking on the trays 'Edit' icon or null if no action should occur.

The 'Edit' icon will only be visible if an event action is set.

 void setOnExpand(String onExpand)
          Deprecated. not supported.
 void setOnRemove(String onRemove)
          Deprecated. sets the event action associated with clicking on the trays 'Remove' icon or null if no action should occur.

The 'Remove' icon will only be visible if an event action is set.

 void setPersistExpansionState(boolean persistExpansionState)
           
 void setTitle(String title)
          sets the title for this Tray.
 void setTooltip(String tooltip)
          sets the Tooltip for this Tray.
 void setWidth(String width)
          sets the width of the tray
 
Methods inherited from class com.sapportals.htmlb.EventValidationContainer
getAllValidators, getClientEvent, getClientEventMap, getErrorText, getServerEvent, getServerEventMap, getValidator, isDisabled, isEnabled, isRequiresValidation, renderJavascriptInterface, setClientEvent, setDisabled, setEnabled, setErrorText, setServerEvent, setValidator
 
Methods inherited from class com.sapportals.htmlb.Container
addComponent, addRawText, addText, getChildCount, iterator, preRender, removeComponent, render
 
Methods inherited from class com.sapportals.htmlb.Component
getEncodedIdForForm, getId, getParent, initFromShortId, initializeFromId, isJsObjectNeeded, render, renderAsString, setId, setJsObjectNeeded, setParent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

UI_ID

public static final String UI_ID
See Also:
Constant Field Values

VAR_BEGIN

public static final int VAR_BEGIN
See Also:
Constant Field Values

VAR_END

public static final int VAR_END
See Also:
Constant Field Values
Constructor Detail

Tray

public Tray()

Tray

public Tray(String id)
Method Detail

init

protected void init()

getUI

public String getUI()
Description copied from class: Component
get a identification String for the renderer that is unique across all supported components. E.g. you could simply return the class name of the component class. The reason for using a separate method and not some internal reflection method is that you can more easily extend the functionality or your Component class without having to rewrite the view class.

Specified by:
getUI in class Component
Returns:
a unique identification string for this Component

getDesign

public TrayDesign getDesign()
gets the design to be used for rendering this Tray.

Returns:
the design for this Tray.

setDesign

public void setDesign(TrayDesign design)
sets the design to be used for rendering this Tray.

Parameters:
design - the design for this Tray.PageProce

getWidth

public String getWidth()
gets the width of this tray

Returns:
the width of the tray

setWidth

public void setWidth(String width)
sets the width of the tray

Parameters:
width - the width of the tray

getHeight

public String getHeight()
gets the height of this tray

Returns:
the height of the tray

setHeight

public void setHeight(String height)
sets the height of the tray

Parameters:
height - the height of the tray

isCollapsed

public boolean isCollapsed()
determines if this Tray should be rendered in a collapsed state.

Returns:
true if the Tray should be collapsed

setCollapsed

public void setCollapsed(boolean collapsed)
sets if this Tray should be rendered in a collapsed state.

Parameters:
collapsed - true if the Tray should be collapsed

getTitle

public String getTitle()
gets the title for this Tray.

Returns:
the title

setTitle

public void setTitle(String title)
sets the title for this Tray.

Parameters:
title - the title

getTooltip

public String getTooltip()
gets the Tooltip for this Tray. Tooltips can not contain HTML coding.

Returns:
the tooltip text

setTooltip

public void setTooltip(String tooltip)
sets the Tooltip for this Tray. Tooltips can not contain HTML coding.

Parameters:
tooltip - the tooltip text

getOnCollapse

public String getOnCollapse()
gets the event action associated with collapsing the tray or null if no action should occur.

Returns:
the event action associated with collapsing the tray

setOnCollapse

public void setOnCollapse(String onCollapse)
Deprecated. not supported.

sets the event action associated with collapsing the tray or null if no action should occur.

Parameters:
onCollapse - the event action associated with collapsing the tray

getOnEdit

public String getOnEdit()
Deprecated. gets the event action associated with clicking on the trays 'Edit' icon or null if no action should occur.

The 'Edit' icon will only be visible if an event action is set.

Returns:
the event action associated with clicking the trays 'Edit' icon

setOnEdit

public void setOnEdit(String onEdit)
Deprecated. sets the event action associated with clicking on the trays 'Edit' icon or null if no action should occur.

The 'Edit' icon will only be visible if an event action is set.

Parameters:
onEdit - the event action associated with clicking the trays 'Edit' icon

getOnExpand

public String getOnExpand()
Deprecated. not supported.

gets the event action associated with expanding the tray or null if no action should occur.

Returns:
the event action associated with expanding the tray

setOnExpand

public void setOnExpand(String onExpand)
Deprecated. not supported.

sets the event action associated with expanding the tray or null if no action should occur.

Parameters:
onExpand - the event action associated with expanding the tray

getOnRemove

public String getOnRemove()
Deprecated. gets the event action associated with clicking on the trays 'Remove' icon or null if no action should occur.

The 'Remove' icon will only be visible if an event action is set.

Returns:
the event action associated with clicking the trays 'Remove' icon

setOnRemove

public void setOnRemove(String onRemove)
Deprecated. sets the event action associated with clicking on the trays 'Remove' icon or null if no action should occur.

The 'Remove' icon will only be visible if an event action is set.

Parameters:
onRemove - the event action associated with clicking the trays 'Remove' icon

hasMenu

public boolean hasMenu()
check if menu item was set

Returns:
true if tray is associated with a menu component

getMenu

public HoverMenu getMenu()
returns the menu of the tray

Returns:
menu component associated with the tray

setMenu

public void setMenu(HoverMenu menu)
sets the menu of the tray

Parameters:
menu - menu component associated with the tray

getHoverMenu

public HoverMenu getHoverMenu()
returns the hover menu which should be displayed as mouse moves over the text


setHoverMenu

public void setHoverMenu(HoverMenu hoverMenu)
sets the hove menu which should be displayed as mouse moves over the text


requiresForm

public boolean requiresForm()
check if this tray really requires a form around it.

Overrides:
requiresForm in class Component
Returns:
true if any server side event action is set for this tray.

setPersistExpansionState

public void setPersistExpansionState(boolean persistExpansionState)

getPersistExpansionState

public boolean getPersistExpansionState()

initFromPageContext

protected void initFromPageContext(IPageContext pc,
                                   String baseId)
Description copied from class: Component
internal use only. Components should override this method to analyse the parameters from the request object (via IPageContext) and set their internal data structures accordingly.

Overrides:
initFromPageContext in class Component
Parameters:
pc - the context, including the parameters
baseId - the prefix used for the component. (The result of a former RenderUtil.getIdForForm(rc, c);)

hasContentPadding

public boolean hasContentPadding()

setHasContentPadding

public void setHasContentPadding(boolean hasContentPadding)

getOnClientToggle

public String getOnClientToggle()
get the JavaScript fragment that is executed on the client side if the user toggles the tray

Returns:
the JavaScript fragment.

setOnClientToggle

public void setOnClientToggle(String onClientToggle)
set a Javascript fragment that is executed when the user toggles the tray

Parameters:
onClientToggle - the Javascript

setCollapsible

public void setCollapsible(boolean collapsible)
Set the collapse icon in the top right corner

Parameters:
collapsible - true/false

isCollapsible

public boolean isCollapsible()
get the collapsible value for the correct rendering

Returns:
true/false

getAccessibilityDescription

public String getAccessibilityDescription()
get the semantical description of the component in it's applicationcontext used by screenreaders

Returns:
description text

setAccessibilityDescription

public void setAccessibilityDescription(String accessibilityDescription)
sets the sematical description for the component in it's applicationcontext used by screenreaders

Parameters:
accessibilityDescription - description text
Returns:


Copyright 2006 SAP AG Complete Copyright Notice