© 2004 BEA Systems, Inc.

com.bea.netuix.servlets.controls.window
Class WindowPresentationContext

java.lang.Object
  extended bycom.bea.netuix.servlets.controls.ControlContext
      extended bycom.bea.netuix.servlets.controls.PresentationContext
          extended bycom.bea.netuix.servlets.controls.window.WindowPresentationContext
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
PagePresentationContext, PortletPresentationContext

public abstract class WindowPresentationContext
extends PresentationContext

This class represents a portal window component. All presentation-related attributes of a window component are available from instances of this class. Such instances are typically used during portal rendering via look and feel skeleton files (e.g. window.jsp).

See Also:
getWindowPresentationContext(javax.servlet.http.HttpServletRequest), Serialized Form

Method Summary
 String getContentPresentationClass()
          Returns this window's content presentationClass attribute.
 List getContentPresentationContextChildren()
          Returns a list of PresentationContext children within this window's content area.
 String getContentPresentationStyle()
          Returns this window's content presentationStyle attribute.
 String getDefinitionId()
          The definition id for the window.
 String getDefinitionLabel()
          The definition label for the window.
 String getInstanceId()
          Returns the instance id for the window.
abstract  String getLabel()
          Returns a general label for the window.
 String getOrientation()
          Returns the orientation of the window's navigation/titlebar.
 PagePresentationContext getParentPagePresentationContext()
          If this window is a child of a page, that page's PagePresentationContext is returned.
 WindowMode getPreviousWindowMode()
          Returns the previous mode of the window, which may be from the standard set or an extended mode.
 String getTitle()
          Returns the display title for the window, which may be localized if a proper localizable value can be resolved.
 WindowMode getWindowMode()
          Returns the current mode of the window, which may be from the standard set or an extended mode.
static WindowPresentationContext getWindowPresentationContext(HttpServletRequest request)
          This is a convenience method for returning a reference to the current WindowPresentationContext.
 WindowState getWindowState()
          Returns the current state of the window, which may be from the following fixed set: normal, minimized, maximized.
 boolean isCapable(Capability capability)
          Returns true if this control has the specified capability.
 boolean isPacked()
          Returns whether or not the window should be rendered such that it occupies a minimal space as required by its contents (packed), or tries to expand to the maximum size of its containing layout cell.
 
Methods inherited from class com.bea.netuix.servlets.controls.PresentationContext
getChildren, getChildren, getFirstChild, getParsedProperties, getPresentationClass, getPresentationId, getPresentationStyle, getProperties, getProperty, getProperty, getPropertyAsBoolean, getPropertyAsInt, getResolvedLocale, getTagName, isVisible, setVisible
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getWindowMode

public WindowMode getWindowMode()
Returns the current mode of the window, which may be from the standard set or an extended mode. Standard modes include (but are not limited to) view, edit, help, etc.

Returns:
The WindowMode instance
See Also:
WindowMode

getPreviousWindowMode

public WindowMode getPreviousWindowMode()
Returns the previous mode of the window, which may be from the standard set or an extended mode. Standard modes include (but are not limited to) view, edit, help, etc.

Returns:
The WindowMode instance or null is there was no previous mode
See Also:
WindowMode

getWindowState

public WindowState getWindowState()
Returns the current state of the window, which may be from the following fixed set: normal, minimized, maximized.

Returns:
The WindowState instance
See Also:
WindowState

getTitle

public String getTitle()
Returns the display title for the window, which may be localized if a proper localizable value can be resolved.

Returns:
The title of the window, which may be localized

getInstanceId

public String getInstanceId()
Returns the instance id for the window. This value is only valid in portal streaming mode.

Returns:
A unique instance label for the portlet

getDefinitionId

public String getDefinitionId()
The definition id for the window. This value is only valid in portal streaming mode.

Returns:
The definition id of this window

getOrientation

public String getOrientation()
Returns the orientation of the window's navigation/titlebar. Values are top (the default), left, right, or bottom.

Returns:
A string describing the window's nav/titlebar orientation

isPacked

public boolean isPacked()
Returns whether or not the window should be rendered such that it occupies a minimal space as required by its contents (packed), or tries to expand to the maximum size of its containing layout cell.

Returns:
True, if the window should be packed into as small a space as possible

getDefinitionLabel

public String getDefinitionLabel()
The definition label for the window. This will be valid in both portal streaming and non-streaming modes, but may not necessarily be unique.

Returns:
The definition label of this window

getLabel

public abstract String getLabel()
Returns a general label for the window. The precise semantic of the value depends on the subclass's implementation, but generally returns the most specific label (between definition label and instance label) available for the subtype.

Returns:
A string label used to identify this window as specifically as possible

getContentPresentationContextChildren

public List getContentPresentationContextChildren()
Returns a list of PresentationContext children within this window's content area.

Returns:
The list of this window's content PresentationContext children

getParentPagePresentationContext

public PagePresentationContext getParentPagePresentationContext()
If this window is a child of a page, that page's PagePresentationContext is returned.

Returns:
The parent PagePresentationContext, or null if it does not exist

getWindowPresentationContext

public static WindowPresentationContext getWindowPresentationContext(HttpServletRequest request)
This is a convenience method for returning a reference to the current WindowPresentationContext. Note this method will only work if called from within a portal (typically, from the window.jsp skeleton). This method may return null if called when no appropriate context exists, but such a context should safely exist when being fetched from the associated skeleton JSP during normal portal rendering.

Parameters:
request - The current HTTPServletRequest instance
Returns:
A reference to the current WindowPresentationContext, if any

getContentPresentationClass

public String getContentPresentationClass()
Returns this window's content presentationClass attribute. Since window content areas do not have presentation contexts, their presentationClass attribute can be accessed from their parent window. This attribute should only affect the content area of the window.

Returns:
The presentationClass for this window's content area
See Also:
getPresentationClass

getContentPresentationStyle

public String getContentPresentationStyle()
Returns this window's content presentationStyle attribute. Since window content areas do not have presentation contexts, their presentationStyle attribute can be accessed from their parent window. This attribute should only affect the content area of the window.

Returns:
The presentationStyle for this window's content area
See Also:
getPresentationStyle

isCapable

public boolean isCapable(Capability capability)
Returns true if this control has the specified capability.

Parameters:
capability - A window mode or state
See Also:
WindowCapabilities

© 2004 BEA Systems, Inc.

Copyright © 2004 BEA Systems, Inc. All Rights Reserved