站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > JBOSS Portal 2.6 API 英文版文档

Region - JBOSS Portal 2.6 API 英文版文档


org.jboss.portal.theme.page
Class Region

java.lang.Object
  extended byorg.jboss.portal.theme.page.Region

public final class Region
extends java.lang.Object

A region on a page.

A region wraps one or more portlets to allow them to act as one unit inside the layout of a page.

Version:
$Revision: 5448 $
Author:
Julien Viet

Field Summary
private  java.lang.String cssId
           
private  java.lang.String name
           
private  RegionOrientation orientation
           
private  java.util.Map properties
           
private  boolean sorted
           
private  java.util.ArrayList windows
           
 
Constructor Summary
Region(java.lang.String name)
          Create a region with default orientation (how the portlet windows are arranged) and the region name as the css id selector
Region(java.lang.String name, java.lang.String cssId, RegionOrientation orientation)
          Create a region with the provided properties.
 
Method Summary
(package private)  void addWindowContext(WindowContext windowContext)
          Add a window to the region
 java.lang.String getCssId()
           
 java.lang.String getId()
           
 RegionOrientation getOrientation()
           
 java.lang.String getProperty(java.lang.String name)
           
 java.util.List getWindows()
          Get a list of all window contexts in this region.
 boolean isEmpty()
           
 void setProperty(java.lang.String name, java.lang.String value)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

name

private final java.lang.String name

sorted

private boolean sorted

windows

private final java.util.ArrayList windows

cssId

private java.lang.String cssId

orientation

private RegionOrientation orientation

properties

private java.util.Map properties
Constructor Detail

Region

public Region(java.lang.String name)
Create a region with default orientation (how the portlet windows are arranged) and the region name as the css id selector

Parameters:
name - the name of the region to create

Region

public Region(java.lang.String name,
              java.lang.String cssId,
              RegionOrientation orientation)
Create a region with the provided properties.

Parameters:
name - the name of the region to create
cssId - the id attribute value that can be used by css selectors to identify this region
orientation - arrange portlet windows inside this region in this orientation
Method Detail

getProperty

public java.lang.String getProperty(java.lang.String name)

setProperty

public void setProperty(java.lang.String name,
                        java.lang.String value)

getId

public java.lang.String getId()
Returns:
the identifier of this region (i.e. the name of this region)

getCssId

public java.lang.String getCssId()
Returns:
the attribute value to use in the markup to allow a css selector to select this region

getOrientation

public RegionOrientation getOrientation()
Returns:
the orientation of this region

isEmpty

public boolean isEmpty()
Returns:
if there are any portlet windows in this region

addWindowContext

void addWindowContext(WindowContext windowContext)
Add a window to the region

Parameters:
windowContext - the context of the window signaling where the window should go in the region

getWindows

public java.util.List getWindows()
Get a list of all window contexts in this region. The list is sorted by order according to the order provided in the window definition.

Returns:
a sorted list of org.jboss.portal.theme.page.WindowContext items

toString

public java.lang.String toString()