Sample JSP: A Sample Method To Use Airline GUI-Class & Methods for external code to access its services
 
This simple JSP file builds a simple demo that has only one Airline-AC. It uses boxes to control the Airline’s component. If user clicks on the Airline component, it displays information about the Flight.
The following JSP-code presents the above SVG-component. The JSP code is in one file, but it is dived into sections to explain then in parts. To inspect the SVG-code of the AC’s, please select right mouse button and select “View Source” in the pop-up menu.
 
The JSP file to present the Above SVG-Component
 
The section-1 just defined few global Objects. The section-2, includes code for Info-table, which is global utility-AC (please click here to see the Appendix-A). The Airplane’s AC requests the Info-table’s service method to display the Flight-info.
 
Please review the Section-3 to see, how one could use Raju’s GUI-Class for the Airplane in an application. The Java-class for the Airplane accepts wide range of information to initialize the Airline Component’s state. Once the Airline-Object is initialized, one may use CGM() to get the AC’s code. For this demo, the JSP file is using the static-data, but one may get the data for the Flight appropriate data sources.
 

// Instantiate and initialize the GUI-Class for the to present the Airline.
Airplane AirLine = new Airplane(aci, "TWA486","B737", 1, "get_info.jsp" );
AirLine.set_location(70.0, 90.0, 10.0); 
// Set location
AirLine.setSmallMessages("LAX-to-JFK", "Radio Ch#1116");
//Set Service method of external AC, the Info-table to be called upon Mouse click
AirLine.setCallBackName("flight_info_table.Display_info");
AirLine.CGM(pw); 
// Generate AC code and place in the web page

 
The final section contains few boxes, when mouse click on of them; each requests a service of the Airline AC. This is just to demo, how other AC’s in the application could communicate with the Airline’s AC.
 
Appendix-A: info_table.jsp
 
 
Miscellaneous Documents Privacy Policy | Site Map | Services
Designed By SINDHU SYNERGY
Copy Right © 2006 Pioneer Soft, LLC. All Rights Reserved.