Applet Container applet example
The AppletContainer applet lets you instantiate
one or more of the eSuite applets and display the
InfoCenter appropriate to
each contained applet at run time when that applet has focus. An AppletContainer
can accommodate up to four applets.
The following HTML page shows how to do the following:
- Create an instance of the AppletContainer applet and specify its
height and width (in pixels).
- Specify the container's layout style, that is, the order and orientation
in which its constituent applets are to be displayed.
- Cause the InfoCenter to be displayed for each contained applet when that
applet has focus at run time.
- Include two applets (a spreadsheet and a chart) in the container and
specify their height. Because the layout style in this case is TopToBottom, the
combined height of the two applets must add up to the container's height.
- Load an existing spreadsheet file (salesbymonth.html), which has been
created with the template builder, rather than a new (empty) spreadsheet.
- Specify the source of the data (TotalRevenue) that the chart is to display.
In this case, the source is a named range in the spreadsheet salesbymonth.html.
- Finally, the JavaScript function makeChartFlat() allows the user to
change the chart's display type (from 3D to 2D) at run time by clicking
a button.
The HTML code looks like this:
<HTML>
<HEAD>
<TITLE>AppletContainer example</TITLE>
</HEAD>
<BODY BGCOLOR="#FFFFFF">
<APPLET NAME="MyAppletContainer" CODE="lotus.fc.AppletContainer"
CODEBASE="../../.."
WIDTH=620 HEIGHT=550
NAME="myContainer">
<PARAM NAME = "layoutStyle" VALUE = "TopToBottom">
<PARAM NAME = "infoCenterVisible" VALUE = "true">
<PARAM NAME = "applet_0" VALUE = "lotus.sheet.Sheet">
<PARAM NAME = "name_0" VALUE = "sheet">
<PARAM NAME = "sheet.fileName" VALUE = "salesbymonth.html">
<PARAM NAME = "sheet.height" VALUE = "220">
<PARAM NAME = "applet_1" VALUE = "lotus.chart.Chart">
<PARAM NAME = "name_1" VALUE = "myChart">
<PARAM NAME = "myChart.DataSource" VALUE = "TotalRevenue">
<PARAM NAME = "myChart.height" VALUE = "330">
</APPLET>
<SCRIPT LANGUAGE = "JavaScript">
<!--
function makeChartFlat()
{
//Obtain a reference to the chart.
thisChart = document.myContainer.getContainedApplet(1);
//Make the chart 2-dimensional and repaint it.
thisChart.setPerspective(1);
thisChart.refresh()
}
//-->
</SCRIPT>
<FORM>
<INPUT TYPE = "button" VALUE = "Flatten chart" ONCLICK = "makeChartFlat()">
</FORM>
</APPLET>
</BODY>
</HTML>
Parameters
The AppletContainer applet supports the following PARAM tags:
applet_n
applet_name.PARAM
InfoCenterVisible
layoutStyle
name_n
propertyBag_n
Methods
The AppletContainer applet supports the following methods:
getAppletDescription
getContainedApplet
getContainedAppletByName
getNumberOfContainedApplets
setAppletDescription
Another Example
Charting sheet data example