com.arsdigita.cms.contenttypes.ui
Class ResettableContainer

java.lang.Object
  extended bycom.arsdigita.bebop.Completable
      extended bycom.arsdigita.bebop.SimpleComponent
          extended bycom.arsdigita.bebop.TextStylable
              extended bycom.arsdigita.bebop.BlockStylable
                  extended bycom.arsdigita.bebop.SimpleContainer
                      extended bycom.arsdigita.cms.contenttypes.ui.ResettableContainer
All Implemented Interfaces:
Cloneable, com.arsdigita.bebop.Component, com.arsdigita.bebop.Container, com.arsdigita.util.Lockable, com.arsdigita.bebop.Resettable
Direct Known Subclasses:
LinkPropertiesStep

public class ResettableContainer
extends com.arsdigita.bebop.SimpleContainer
implements com.arsdigita.bebop.Resettable

A container which implements the Resettable interface and provides other useful methods.

Version:
$Revision: #6 $
Author:
Phong Nguyen

Field Summary
 
Fields inherited from class com.arsdigita.bebop.SimpleContainer
versionId
 
Fields inherited from class com.arsdigita.bebop.BlockStylable
ABSBOTTOM, ABSMIDDLE, BASELINE, BOTTOM, CENTER, FULL_WIDTH, INSERT, LEFT, MIDDLE, RIGHT, TEXTTOP, TOP
 
Fields inherited from class com.arsdigita.bebop.SimpleComponent
m_attr
 
Fields inherited from interface com.arsdigita.bebop.Resettable
versionId
 
Fields inherited from interface com.arsdigita.bebop.Component
BEBOP_XML_NS, CLASS, ID, ON_CLICK, STYLE
 
Constructor Summary
ResettableContainer()
          Constructs a new, empty RessetableContainer.
ResettableContainer(String key)
          Constructs a new, empty RessetableContainer.
ResettableContainer(String tag, String ns)
          Constructs a new, empty RessetableContainer.
 
Method Summary
 void add(com.arsdigita.bebop.Component pc)
          Adds a component to container.
 void add(com.arsdigita.bebop.Component pc, boolean defaultVisibility)
          Adds the component to this pane with the specified default visibility.
 void add(com.arsdigita.bebop.Component pc, int constraints)
          Add a component to this container
 void onlyShowComponent(com.arsdigita.bebop.PageState state, com.arsdigita.bebop.Component c)
          Sets the visibility of all child components to false, except for the specified component.
 void onlyShowComponent(com.arsdigita.bebop.PageState state, String key)
          Sets the visibility of all child components to false, except for the component with the specified key.
 void register(com.arsdigita.bebop.Page p)
          Registers with page that this container belongs to and sets the default visibility of child components.
 void reset(com.arsdigita.bebop.PageState state)
          Resets all resettable components added to this container.
 
Methods inherited from class com.arsdigita.bebop.SimpleContainer
children, contains, generateChildrenXML, generateParent, generateXML, get, getNamespace, getTag, indexOf, isEmpty, setNamespace, setTag, size
 
Methods inherited from class com.arsdigita.bebop.BlockStylable
setBorder, setBorder, setBorderColor, setHorizontalAlignment, setMargin, setMargin, setPadding, setPadding, setVerticalAlignment
 
Methods inherited from class com.arsdigita.bebop.TextStylable
setBackgroundColor, setColor
 
Methods inherited from class com.arsdigita.bebop.SimpleComponent
clone, exportAttributes, getAttribute, getClassAttr, getIdAttr, getKey, getMetaDataAttribute, getStyleAttr, hasAttributes, isLocked, isVisible, lock, 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
 
Methods inherited from interface com.arsdigita.bebop.Component
getClassAttr, getIdAttr, getKey, getStyleAttr, isVisible, register, respond, setClassAttr, setIdAttr, setKey, setStyleAttr, setVisible
 
Methods inherited from interface com.arsdigita.util.Lockable
isLocked, lock
 

Constructor Detail

ResettableContainer

public ResettableContainer()
Constructs a new, empty RessetableContainer.


ResettableContainer

public ResettableContainer(String key)
Constructs a new, empty RessetableContainer.

Parameters:
key - The key for this container.

ResettableContainer

public ResettableContainer(String tag,
                           String ns)
Constructs a new, empty RessetableContainer. The container will wrap its children in the specified tag.

Parameters:
tag - The name of the XML element that will be used to wrap the children of this container.
ns - The namespace for the tag.
Method Detail

add

public void add(com.arsdigita.bebop.Component pc)
Adds a component to container.

Specified by:
add in interface com.arsdigita.bebop.Container
Parameters:
pc - The component to be added.

add

public void add(com.arsdigita.bebop.Component pc,
                int constraints)
Add a component to this container

Specified by:
add in interface com.arsdigita.bebop.Container
Parameters:
pc - The component to be added.
constraints - This parameter is ignored. Child classes should override the add method if they wish to provide special handling of constraints.

add

public void add(com.arsdigita.bebop.Component pc,
                boolean defaultVisibility)
Adds the component to this pane with the specified default visibility.

Parameters:
defaultVisibility - The default visibility of this component

onlyShowComponent

public void onlyShowComponent(com.arsdigita.bebop.PageState state,
                              String key)
Sets the visibility of all child components to false, except for the component with the specified key.

Parameters:
state - The state of the current request.
key - The key of the component. There will be no visibility changes if key is null.

onlyShowComponent

public void onlyShowComponent(com.arsdigita.bebop.PageState state,
                              com.arsdigita.bebop.Component c)
Sets the visibility of all child components to false, except for the specified component.

Parameters:
state - The state of the current request.
c - The key of the component. There will be no visibility changes if c is null.

reset

public void reset(com.arsdigita.bebop.PageState state)
Resets all resettable components added to this container.

Specified by:
reset in interface com.arsdigita.bebop.Resettable
Parameters:
state - The state of the current request.

register

public void register(com.arsdigita.bebop.Page p)
Registers with page that this container belongs to and sets the default visibility of child components.

Specified by:
register in interface com.arsdigita.bebop.Component
Parameters:
p - The page this container belongs to.


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