com.arsdigita.cms.ui
Class ArticleImageDisplay

java.lang.Object
  extended bycom.arsdigita.bebop.Completable
      extended bycom.arsdigita.bebop.SimpleComponent
          extended bycom.arsdigita.cms.ui.ImageDisplay
              extended bycom.arsdigita.cms.ui.ArticleImageDisplay
All Implemented Interfaces:
Cloneable, com.arsdigita.bebop.Component, com.arsdigita.util.Lockable

public class ArticleImageDisplay
extends ImageDisplay

Extends ImageDisplay to display the first (according to the order attribute) image associated with an Article The typical usage for this component is

ArticleImageDisplay d = new ArticleImageDisplay(myItemSelectionModel, false);

Version:
$Revision: #7 $ $DateTime: 2004/04/07 16:07:11 $
Author:
Michael Pih (pihman@arsdigita.com), Stanislav Freidin (stas@arsdigita.com)

Field Summary
static String versionId
           
 
Fields inherited from class com.arsdigita.bebop.SimpleComponent
m_attr
 
Fields inherited from interface com.arsdigita.bebop.Component
BEBOP_XML_NS, CLASS, ID, ON_CLICK, STYLE
 
Constructor Summary
ArticleImageDisplay(ItemSelectionModel article, ItemSelectionModel assets)
          Construct a new ArticleImageDisplay
 
Method Summary
protected  void generateImagePropertiesXML(ImageAsset image, com.arsdigita.bebop.PageState state, com.arsdigita.xml.Element element)
          Adds the image caption as an attribute of the DOM element.
protected  Article getArticle(com.arsdigita.bebop.PageState state)
           
 ItemSelectionModel getArticleSelectionModel()
           
 
Methods inherited from class com.arsdigita.cms.ui.ImageDisplay
generateXML, getImageAsset, getImageSelectionModel
 
Methods inherited from class com.arsdigita.bebop.SimpleComponent
children, clone, exportAttributes, getAttribute, getClassAttr, getIdAttr, getKey, getMetaDataAttribute, getStyleAttr, hasAttributes, isLocked, isVisible, lock, register, register, respond, setAttribute, setClassAttr, setIdAttr, setKey, setMetaDataAttribute, setStyleAttr, setVisible
 
Methods inherited from class com.arsdigita.bebop.Completable
addCompletionListener, fireCompletionEvent
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

versionId

public static final String versionId
See Also:
Constant Field Values
Constructor Detail

ArticleImageDisplay

public ArticleImageDisplay(ItemSelectionModel article,
                           ItemSelectionModel assets)
Construct a new ArticleImageDisplay

Parameters:
article - the ItemSelectionModel which supplies the Article
assets - the ItemSelectionModel which supplies the ImageAsset for the article; it is the parent's responsibility to register any state parameters for this model
Method Detail

getArticleSelectionModel

public final ItemSelectionModel getArticleSelectionModel()
Returns:
The item selection model which supplies the current article

getArticle

protected Article getArticle(com.arsdigita.bebop.PageState state)
Parameters:
state - The page state
Returns:
the currently selected article

generateImagePropertiesXML

protected void generateImagePropertiesXML(ImageAsset image,
                                          com.arsdigita.bebop.PageState state,
                                          com.arsdigita.xml.Element element)
Adds the image caption as an attribute of the DOM element.

Overrides:
generateImagePropertiesXML in class ImageDisplay


Copyright (c) 2004 Red Hat, Inc. Corporation. All Rights Reserved. Generated at July 19 2004:2352 UTC