Rollups

Rollups are conceptually similar to Expanders. Like expanders, rollups also allow the user to expand or collapse a region of the screen to make more room for other content. However, rather than a defining a titled, rectangular region, Rollups supports a configurable "header" component; when collapsed, only the header is visible. Additionally, rollups can be nested to create the appearance of a "tree" structure.

The first three rollups in the example below present the same content as in the Expanders example. The fourth includes an example of nested rollups:

The BXML source for this example is as follows. Note that the "fill" style is set to true on the nested rollups - this allows the rollup content to wrap:

            
            <Window title="Rollups" maximized="true"
                xmlns:bxml="http://pivot.apache.org/bxml"
                xmlns="org.apache.pivot.wtk">
                <Border>
                    <ScrollPane horizontalScrollBarPolicy="fill">
                        <BoxPane orientation="vertical" styles="{fill:true, padding:6}">
                            <Rollup expanded="true">
                                <heading>
                                    <Label text="Stocks" styles="{font:{bold:true}, color:13}"/>
                                </heading>

                                <bxml:include src="stocks.bxml"/>
                            </Rollup>

                            <Rollup>
                                <heading>
                                    <Label text="Weather" styles="{font:{bold:true}, color:13}"/>
                                </heading>

                                <bxml:include src="weather.bxml"/>
                            </Rollup>

                            <Rollup>
                                <heading>
                                    <Label text="Calendar" styles="{font:{bold:true}, color:13}"/>
                                </heading>

                                <Calendar/>
                            </Rollup>

                            <Rollup styles="{fill:true}">
                                <heading>
                                    <Label text="Nested" styles="{font:{bold:true}, color:13}"/>
                                </heading>

                                <BoxPane orientation="vertical" styles="{fill:true}">
                                    <Rollup styles="{fill:true}">
                                        <heading>
                                            <Label text="Level 1"/>
                                        </heading>

                                        <Label text="Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum."
                                            styles="{wrapText:true}"/>
                                    </Rollup>

                                    <Rollup styles="{fill:true}">
                                        <heading>
                                            <Label text="Level 2"/>
                                        </heading>

                                        <Label text="Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum."
                                            styles="{wrapText:true}"/>
                                    </Rollup>

                                    <Rollup styles="{fill:true}">
                                        <heading>
                                            <Label text="Level 3"/>
                                        </heading>

                                        <Label text="Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum."
                                            styles="{wrapText:true}"/>
                                    </Rollup>
                                </BoxPane>
                            </Rollup>
                        </BoxPane>
                    </ScrollPane>
                </Border>
            </Window>
            
        

Since this example contains no logic, there is no associated Java source.

Next: Viewports