Lizzy v1.1.1

christophedelory.playlist.smil
Class Region

java.lang.Object
  extended by christophedelory.playlist.smil.Core
      extended by christophedelory.playlist.smil.Position
          extended by christophedelory.playlist.smil.Region

public class Region
extends Position

Controls the position, size and scaling of media object elements that are placed within it rendering space.

Version:
$Revision: 92 $
Author:
Christophe Delory

Constructor Summary
Region()
           
 
Method Summary
 void acceptDown(SmilVisitor visitor)
          Accepts the specified SMIL playlist visitor.
 void addRegion(Region region)
          Adds a region to this region.
 boolean equals(Object o)
           
 String getBackgroundColor()
          Returns the background color used to fill the area of a region displaying media that is not filled by the media.
 String getBackgroundImage()
          Returns the background image as a string.
 String getHeightString()
          Returns the height of this region as a a string.
 String getRegionName()
          Returns the region name.
 List<Region> getRegions()
          Returns the list of regions defined in this region.
 Boolean getSkipContent()
          Checks if the content may be skipped or not.
 String getSoundAlign()
          Returns the default 2D placement of the audio portion of a media element assigned to play within the given region.
 String getSoundLevelString()
          Returns the region sound level as a string.
 String getWidthString()
          Returns the width of this region as a string.
 Integer getZIndex()
          Returns the stack level of the region.
 int hashCode()
           
 boolean isSkipContent()
          Checks if the content may be skipped or not.
 void setBackgroundColor(String color)
          Initializes the background color.
 void setBackgroundImage(String image)
          Initializes the background image as a string.
 void setHeight(int height)
          Initializes the height of this region as an integer.
 void setHeightString(String height)
          Initializes the height of this region as a a string.
 void setRegionName(String regionName)
          Initializes the region name.
 void setSkipContent(Boolean skipContent)
          Specifies if the content may be skipped or not.
 void setSoundAlign(String soundAlign)
          Initializes the default 2D placement of the audio portion of a media element assigned to play within the given region.
 void setSoundLevelString(String soundLevel)
          Initializes the sound level of the region.
 void setWidth(int width)
          Initializes the width of this region as an integer.
 void setWidthString(String width)
          Initializes the width of this region as a string.
 void setZIndex(int zIndex)
          Initializes the stack level of the region.
 void setZIndex(Integer zIndex)
          Initializes the stack level of the region.
 
Methods inherited from class christophedelory.playlist.smil.Position
getBottomString, getLeftString, getRightString, getTopString, setBottom, setBottomString, setLeft, setLeftString, setRight, setRightString, setTop, setTopString
 
Methods inherited from class christophedelory.playlist.smil.Core
getClassName, getId, getLang, getTitle, setClassName, setId, setLang, setTitle
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Region

public Region()
Method Detail

getRegions

public List<Region> getRegions()
Returns the list of regions defined in this region.

Returns:
a list of regions. May be empty but not null.
See Also:
addRegion(christophedelory.playlist.smil.Region)

addRegion

public void addRegion(Region region)
Adds a region to this region.

Parameters:
region - a region. Shall not be null.
Throws:
NullPointerException - if region is null.
See Also:
getRegions()

getRegionName

public String getRegionName()
Returns the region name. The attribute assigns a name to this region element that can be referred to by the region attribute of media object elements. The regionName attribute is not a unique identifier; multiple region elements can share the same regionName attribute value. This attribute does not have a default value.

Returns:
the region name. May be null.
See Also:
setRegionName(java.lang.String)

setRegionName

public void setRegionName(String regionName)
Initializes the region name.

Parameters:
regionName - a region name. May be null.
See Also:
getRegionName()

getBackgroundColor

public String getBackgroundColor()
Returns the background color used to fill the area of a region displaying media that is not filled by the media. Default value is transparent.

Returns:
the background color. May be null.
See Also:
setBackgroundColor(java.lang.String)

setBackgroundColor

public void setBackgroundColor(String color)
Initializes the background color.

Parameters:
color - the background color. May be null.
See Also:
getBackgroundColor()

getBackgroundImage

public String getBackgroundImage()
Returns the background image as a string. The attribute may be used to specify an image that may be placed as the background of a region. Default value is none.

Returns:
the background image as a string.
See Also:
setBackgroundImage(java.lang.String)

setBackgroundImage

public void setBackgroundImage(String image)
Initializes the background image as a string.

Parameters:
image - the background image. May be null.
See Also:
getBackgroundImage()

getHeightString

public String getHeightString()
Returns the height of this region as a a string. The use and definition of this attribute are identical to the "height" property in the CSS2 specification.

Returns:
a height. May be null.
See Also:
setHeightString(java.lang.String)

setHeightString

public void setHeightString(String height)
Initializes the height of this region as a a string.

Parameters:
height - a height. May be null.
See Also:
getHeightString(), setHeight(int)

setHeight

public void setHeight(int height)
Initializes the height of this region as an integer.

Parameters:
height - a height.
See Also:
setHeightString(java.lang.String)

getWidthString

public String getWidthString()
Returns the width of this region as a string. The use and definition of this attribute are identical to the "width" property in the CSS2 specification.

Returns:
a width. May be null.
See Also:
setWidthString(java.lang.String)

setWidthString

public void setWidthString(String width)
Initializes the width of this region as a string.

Parameters:
width - a width. May be null.
See Also:
getWidthString(), setWidth(int)

setWidth

public void setWidth(int width)
Initializes the width of this region as an integer.

Parameters:
width - a width.
See Also:
setWidthString(java.lang.String)

isSkipContent

public boolean isSkipContent()
Checks if the content may be skipped or not.

Returns:
the associated boolean.
See Also:
getSkipContent()

getSkipContent

public Boolean getSkipContent()
Checks if the content may be skipped or not. The skip content controls whether the content of an element is evaluated or should be skipped.

Returns:
the associated boolean. May be null.
See Also:
setSkipContent(java.lang.Boolean), isSkipContent()

setSkipContent

public void setSkipContent(Boolean skipContent)
Specifies if the content may be skipped or not.

Parameters:
skipContent - the associated boolean. May be null.
See Also:
getSkipContent()

getSoundLevelString

public String getSoundLevelString()
Returns the region sound level as a string. Allows the sound intensity of an audio object to be specified. Defaults to "100%".

Returns:
a sound level. May be null.
See Also:
setSoundLevelString(java.lang.String)

setSoundLevelString

public void setSoundLevelString(String soundLevel)
Initializes the sound level of the region.

Parameters:
soundLevel - a sound level. May be null.
See Also:
getSoundLevelString()

getZIndex

public Integer getZIndex()
Returns the stack level of the region.

Returns:
a stack level. May be null.
See Also:
setZIndex(java.lang.Integer)

setZIndex

public void setZIndex(Integer zIndex)
Initializes the stack level of the region.

Parameters:
zIndex - a stack level. May be null.
See Also:
getZIndex(), setZIndex(int)

setZIndex

public void setZIndex(int zIndex)
Initializes the stack level of the region.

Parameters:
zIndex - a stack level.
See Also:
setZIndex(Integer)

getSoundAlign

public String getSoundAlign()
Returns the default 2D placement of the audio portion of a media element assigned to play within the given region.
The following values are allowed:
both
Place the audio on both channels. If stereo or other dual-channel audio is used, the audio will be reproduced on both channels, implementation permitting.
left
Place the audio on the left channel only. If stereo audio is used, only the left source audio will be reproduced on the left audio channel, implementation permitting.
right
Place the audio on the right channel only. If stereo audio is used, only the right source audio will be reproduced on the right audio channel, implementation permitting.
The default value is "both".

Returns:
the default sound alignment. May be null.
See Also:
setSoundAlign(java.lang.String), Reference.getSoundAlign()

setSoundAlign

public void setSoundAlign(String soundAlign)
Initializes the default 2D placement of the audio portion of a media element assigned to play within the given region.

Parameters:
soundAlign - the default sound alignment. May be null.
See Also:
getSoundAlign(), Reference.setSoundAlign(java.lang.String)

acceptDown

public void acceptDown(SmilVisitor visitor)
Accepts the specified SMIL playlist visitor.

Parameters:
visitor - a SMIL playlist visitor. Shall not be null.
Throws:
NullPointerException - if visitor is null.

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object o)
Overrides:
equals in class Object

© 2008-2009 Christophe Delory

Copyright © 2008-2009 Christophe Delory. All Rights Reserved.