Overview | Package | Class | Tree | Deprecated | Index | Help
| © 2005 BEA Systems, Inc.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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

    java.lang.Object
      com.bea.netuix.servlets.controls.ControlContext
          com.bea.netuix.servlets.controls.PresentationContext
              com.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

Field Summary
`protected static String` | `CLASS_NAME`

Fields inherited from class com.bea.netuix.servlets.controls.ControlContext
`debug`

Method Summary
`Capability` | `getCapability(Capability capability)` Gets the capability for the Window, may be a state or a mode.
`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.
`ThemePresentationContext` | `getThemePresentationContext()` Returns a ThemePresentation context for this portlet, page or book if one has been applied.
`String` | `getTitle()` Returns the display title for the window, which may be localized if a proper localizable value can be resolved.
`TitlebarPresentationContext` | `getTitlebarPresentationContext()` Returns a TitlebarPresentation context for this portlet, page or book if one exists.
`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 com.bea.netuix.servlets.controls.ControlContext
`getContextFromRequest, getContextFromRequest, getContextKey, getControl, getRequestKey, getUniqueId, removeContextFromRequest, setContextInRequest`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### CLASS_NAME

    protected static final String CLASS_NAME

Method Detail

### getCapability

    public Capability getCapability(Capability capability)
                             throws NullPointerException

  Gets the capability for the Window, may be a state or a mode. This method can be used to check if a Window (Book, Page or Portlet) supports a given Mode or State. If you are intersted in the current or active Window Mode or Window State you should use `getWindowMode()` and `getWindowState` repectively.

  Note: this method should be called after the `init()` lifcycle, because the buttons have net yet registered with the parent window.

  Parameters:
    `capability` - the `Capability` to check for.
  Returns:
    The Capability if this Window has it and the user is entitled to use it, otherwise null. Note. this Capability may be cast to a WindowMode or WindowState to get additional information such as mode content uri.
  Throws:
    `NullPointerException`
  See Also:
    `WindowCapabilities`, `com.bea.netuix.servlets.controls;.Capability`, `com.bea.netuix.servlets.controls.window.WindowMode;`, `com.bea.netuix.servlets.controls.window.WindowState;`

### 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`

### 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

### 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`

### 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

### 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

### 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

### 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

### 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

### 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

### 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`

### getThemePresentationContext

    public ThemePresentationContext getThemePresentationContext()

  Returns a ThemePresentation context for this portlet, page or book if one has been applied.

  Returns:
    a ThemePresentationContext otherwise null if none was applied.

### 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

### getTitlebarPresentationContext

    public TitlebarPresentationContext getTitlebarPresentationContext()

  Returns a TitlebarPresentation context for this portlet, page or book if one exists.

  Returns:
    a TitlebarPresentationContext otherwise null if none was applied.

### 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`

### 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

### 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`

### 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`

### 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

Overview | Package | Class | Tree | Deprecated | Index | Help
| © 2005 BEA Systems, Inc.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2005 BEA Systems, Inc. All Rights Reserved