home *** CD-ROM | disk | FTP | other *** search
- /****************************************************************************\
- * *
- * Java.jfm -- Sample Java Applet Form *
- * *
- * Java.jfm demonstrates the use of a Java Applet control on an IntraBuilder *
- * form. The Sun charting control is used. The .class file for this Java *
- * applet resides on the Sun web server. Notice that the codebase property *
- * simply points to the URL where the .class file is located. The actual name *
- * of the file is stored in the code property. The params of the control are *
- * set both in the control definition and in the form's onServerLoad event. *
- * The onServerload computs the total orders by state and stores the data to *
- * the control. *
- * *
- * Dependencies: customer.dbf *
- * orders.dbf *
- * http://java.sun.com/applets/applets/BarChart/chart.class *
- * *
- * Updated 11/13/96 by IntraBuilder Samples Group *
- * $Revision: 1.3 $ *
- * *
- * Copyright (c) 1996, Borland International, Inc. All rights reserved. *
- * *
- \****************************************************************************/
- // {End Header} Do not remove this comment//
- // Generated on 11/13/96
- //
- var f = new javaForm();
- f.open();
- class javaForm extends Form {
- _sys.scripts.load("CHART.CC")
- with (this) {
- onServerLoad = class::form_onServerLoad;
- height = 14.6667;
- left = 0;
- top = 0;
- width = 76;
- title = "Java Applet Sample";
- }
-
-
- with (this.query1 = new Query()){
- left = 54;
- top = 0;
- sql = "select c.state_prov, sum(o.total) as sumTotal from customer c, orders o where c.customer_n = o.customer_n group by c.state_prov";
-
- active = true;
- }
-
-
- with (this.query1.rowset) {
-
- }
-
-
- with (this.html1 = new HTML(this)){
- height = 1.5;
- width = 74;
- color = "black";
- alignHorizontal = 1;
- text = "Total Orders by State (in U.S. Dollars)";
- }
-
-
- with (this.javaapplet1 = new JavaChartQuery(this)){
- height = 18;
- top = 1.5;
- width = 74;
- params["orientation"] = "horizontal";
-
- }
-
-
- with (this.html2 = new HTML(this)){
- height = 1;
- top = 20;
- width = 74;
- color = "black";
- alignHorizontal = 1;
- text = "(Data computed from customer.dbf and orders.dbf.)";
- }
-
-
- with (this.button1 = new Button(this)){
- onClick = class::button1_onClick;
- left = 32;
- top = 21;
- width = 10.5;
- text = "Back";
- }
-
- this.rowset = this.query1.rowset;
-
- function form_onServerLoad()
- {
- this.javaapplet1.Init("state_prov","sumTotal",this.query1.rowset);
- }
-
- function button1_onClick()
- {
- history.back();
- }
-
- }
-