com.arsdigita.bebop
Class SegmentedPanel
java.lang.Object
com.arsdigita.bebop.Completable
com.arsdigita.bebop.SimpleComponent
com.arsdigita.bebop.TextStylable
com.arsdigita.bebop.BlockStylable
com.arsdigita.bebop.SimpleContainer
com.arsdigita.bebop.SegmentedPanel
- All Implemented Interfaces:
- BebopConstants, Cloneable, Component, Container, Lockable
- public class SegmentedPanel
- extends SimpleContainer
- implements BebopConstants
Generates a list of segments. Each segment consists of a header
(which could be any Bebop component) and a body (which, likewise,
could be any component). The entire SegmentedPanel
look roughly like this:
----------------------
Header 1
----------------------
Body 1
More Body 1
Even more Body 1
----------------------
Header 2
----------------------
Body 2
More Body 2
Even more Body 2
Typically, the body of each segment will be a SimpleContainer
which contains many other components
The XML generated by this component looks something like this:
<bebop:segmentedPanel>
<bebop:segment id="foo">
<bebop:segmentHeader>
<aRandomHeaderComponent/>
<anotherRandomHeaderComponent/>
...
</bebop:segmentHeader>
<bebop:segmentBody>
<aRandomBodyComponent>
<anotherRandomBodyComponent>
...
</bebop:segmentBody>
</bebop:segment>
...
</bebop:segmentedPanel>
- Version:
- $Revision: #10 $ $Date: 2004/04/07 $
- Author:
- Michael Pih
- See Also:
generateXML(PageState, Element)
Fields inherited from class com.arsdigita.bebop.BlockStylable |
ABSBOTTOM, ABSMIDDLE, BASELINE, BOTTOM, CENTER, FULL_WIDTH, INSERT, LEFT, MIDDLE, RIGHT, TEXTTOP, TOP |
Fields inherited from interface com.arsdigita.bebop.util.BebopConstants |
BEBOP_BORDER, BEBOP_BOXPANEL, BEBOP_CELL, BEBOP_CHECKBOX, BEBOP_CHECKBOXGROUP, BEBOP_COLUMNPANEL, BEBOP_DATE, BEBOP_DATETIME, BEBOP_DHTMLEDITOR, BEBOP_FORMERRORS, BEBOP_FORMWIDGET, BEBOP_GRIDPANEL, BEBOP_LIST, BEBOP_MULTISELECT, BEBOP_OPTION, BEBOP_PAD, BEBOP_PADFRAME, BEBOP_PANELROW, BEBOP_PORTAL, BEBOP_PORTLET, BEBOP_RADIO, BEBOP_RADIOGROUP, BEBOP_SEG_BODY, BEBOP_SEG_HEADER, BEBOP_SEG_PANEL, BEBOP_SEGMENT, BEBOP_SELECT, BEBOP_TABLE, BEBOP_TABLEBODY, BEBOP_TABLEROW, BEBOP_TEXTAREA |
Methods inherited from class com.arsdigita.bebop.SimpleContainer |
add, add, children, contains, generateChildrenXML, generateParent, get, getNamespace, getTag, indexOf, isEmpty, setNamespace, setTag, size |
Methods inherited from class com.arsdigita.bebop.SimpleComponent |
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 interface com.arsdigita.bebop.Component |
getClassAttr, getIdAttr, getKey, getStyleAttr, isVisible, register, register, respond, setClassAttr, setIdAttr, setKey, setStyleAttr, setVisible |
versionId
public static final String versionId
- See Also:
- Constant Field Values
HEADER_CLASS
public static final String HEADER_CLASS
- See Also:
- Constant Field Values
SegmentedPanel
public SegmentedPanel()
- Construct a new
SegmentedPanel
SegmentedPanel
public SegmentedPanel(String idAttr)
- Construct a new
SegmentedPanel
- Parameters:
idAttr
- the XSL ID attribute for this container- See Also:
SimpleComponent.setIdAttr(String)
addSegment
public SegmentedPanel.Segment addSegment(Component header,
Component body)
- Add a segment to this container
- Parameters:
header
- the component that will act as the headerbody
- the component that will act as the body
- Returns:
- the new segment
addSegment
public SegmentedPanel.Segment addSegment(String segmentID,
Component header,
Component body)
- Add a segment to this container.
- Parameters:
segmentID
- the XSL ID attribute for the new segment.header
- the component that will act as the header.body
- the component that will act as the body
- Returns:
- the new segment
addSegment
public SegmentedPanel.Segment addSegment(String segmentID,
Component body)
- Add a segment to this container.
- Parameters:
segmentID
- the XSL ID attribute for the new segment. The XSL template
for this component will render the correct header based on the ID attributebody
- the component that will act as the body
- Returns:
- the new segment
addSegment
public SegmentedPanel.Segment addSegment()
- Add and return a new empty segment.
- Returns:
- a new empty segment that is part of the panel.
generateXML
public void generateXML(PageState state,
Element parent)
- Generate the XML for this component, as described above
- Specified by:
generateXML
in interface Component
- Overrides:
generateXML
in class SimpleContainer
- Parameters:
state
- represents the page state for the current requestparent
- the parent XML element- See Also:
SimpleContainer.setTag(String)
,
SimpleContainer.setNamespace(String)
Copyright (c) 2004 Red Hat, Inc. Corporation. All Rights Reserved. Generated at July 21 2004:2337 UTC