com.arsdigita.toolbox.ui
Class Section

java.lang.Object
  extended bycom.arsdigita.bebop.Completable
      extended bycom.arsdigita.bebop.SimpleComponent
          extended bycom.arsdigita.toolbox.ui.Section
All Implemented Interfaces:
Cloneable, Component, Lockable

public class Section
extends SimpleComponent

A simple layout panel with top, bottom, left, right, and body sections.

Version:
$Id: //core-platform/dev/src/com/arsdigita/toolbox/ui/Section.java#9 $
Author:
Justin Ross <jross@redhat.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
Section()
           
Section(Component heading)
           
Section(Component heading, Component body)
           
Section(GlobalizedMessage heading)
           
Section(GlobalizedMessage heading, Component body)
           
 
Method Summary
 Iterator children()
          Returns an iterator over the children of this component.
 void generateXML(PageState state, Element parent)
          Adds [J]DOM nodes for this component.
 void register(Form form, FormModel model)
          Registers form parameters with the form model for this form.
 void register(Page page)
          Registers state parameters for the page with its model.
 void setBody(Component body)
           
 void setHeading(Component heading)
           
 void setHeading(GlobalizedMessage message)
           
 
Methods inherited from class com.arsdigita.bebop.SimpleComponent
clone, exportAttributes, getAttribute, getClassAttr, getIdAttr, getKey, getMetaDataAttribute, getStyleAttr, hasAttributes, isLocked, isVisible, lock, 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

Section

public Section(Component heading,
               Component body)

Section

public Section(GlobalizedMessage heading,
               Component body)

Section

public Section(Component heading)

Section

public Section(GlobalizedMessage heading)

Section

public Section()
Method Detail

setHeading

public final void setHeading(Component heading)

setHeading

public final void setHeading(GlobalizedMessage message)

setBody

public final void setBody(Component body)

register

public void register(Page page)
Description copied from interface: Component
Registers state parameters for the page with its model. A simple component with a state parameter param would do the following in the body of this method:
   p.addComponent(this);
   p.addComponentStateParam(this, param);
 
You should override this method to set the default visibility of your component:
 public void register(Page p) {
     super.register(p);
     p.setVisibleDefault(childNotInitiallyShown,false);
     p.setVisibleDefault(anotherChild, false);
 }
 
Always call super.register when you override register. Otherwise your component may malfunction and produce errors like "Widget ... isn't associated with any Form"

Specified by:
register in interface Component
Overrides:
register in class SimpleComponent

register

public void register(Form form,
                     FormModel model)
Description copied from interface: Component
Registers form parameters with the form model for this form. This method is only important for form sections and widgets (components that have a connection to an HTML form). Other components can implement it as a no-op.

Specified by:
register in interface Component
Overrides:
register in class SimpleComponent

children

public final Iterator children()
Description copied from interface: Component
Returns an iterator over the children of this component. If the component has no children, returns an empty (not null) iterator.

Specified by:
children in interface Component
Overrides:
children in class SimpleComponent

generateXML

public final void generateXML(PageState state,
                              Element parent)
Description copied from class: SimpleComponent
Adds [J]DOM nodes for this component. Specifically for base class SimpleComponent, does nothing.

Specified by:
generateXML in interface Component
Overrides:
generateXML in class SimpleComponent


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