Overview | Package | Class | Tree | Deprecated | Index | Help
| Copyright © 2008 BEA Systems, Inc. All Rights Reserved
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`

Method Summary
`Capability` | `getCapability(Capability capability)` Gets the capability for the Window, may be a state or a mode.
`ContentAttributeRenderer` | `getContentAttributeRenderer()` Returns a renderer for this window's content attributes.
`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.
`MetaData` | `getMetaData(String name)` Return the metadata elements for this control matching the supplied name
`MetaData[]` | `getMetaDatas()` Return the metadata elements for this control
`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(javax.servlet.http.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
`getAttributeRenderer, getChildren, getChildren, getFirstChild, getOrderedChildren, getParsedProperties, getPresentationClass, getPresentationId, getPresentationStyle, getProperties, getProperty, getProperty, getPropertyAsBoolean, getPropertyAsInt, getRenderFormat, getResolvedLocale, getTagName, isVisible, setVisible`

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

### 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. Angle brackets are escaped by this call.

  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

### getContentAttributeRenderer

    public ContentAttributeRenderer getContentAttributeRenderer()

  Returns a renderer for this window's content attributes. This renderer is intended to be used in skeleton files.

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

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

### 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`, `Capability`, `WindowMode`, `WindowState`

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

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

### getMetaDatas

    public MetaData[] getMetaDatas()

  Return the metadata elements for this control

  Returns
    a non null array of `MetaData`` objects`

### getMetaData

    public MetaData getMetaData(String name)

  Return the metadata elements for this control matching the supplied name

  Returns
    a MetaData element if a match is found otherwise null.

### getWindowPresentationContext

    public static WindowPresentationContext getWindowPresentationContext(javax.servlet.http.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

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2008 BEA Systems, Inc. All Rights Reserved