home *** CD-ROM | disk | FTP | other *** search
Java Source | 1998-05-08 | 3.8 KB | 110 lines |
- /*
- * Copyright (c) 1997-1998 Borland International, Inc. All Rights Reserved.
- *
- * This SOURCE CODE FILE, which has been provided by Borland as part
- * of a Borland product for use ONLY by licensed users of the product,
- * includes CONFIDENTIAL and PROPRIETARY information of Borland.
- *
- * USE OF THIS SOFTWARE IS GOVERNED BY THE TERMS AND CONDITIONS
- * OF THE LICENSE STATEMENT AND LIMITED WARRANTY FURNISHED WITH
- * THE PRODUCT.
- *
- * IN PARTICULAR, YOU WILL INDEMNIFY AND HOLD BORLAND, ITS RELATED
- * COMPANIES AND ITS SUPPLIERS, HARMLESS FROM AND AGAINST ANY CLAIMS
- * OR LIABILITIES ARISING OUT OF THE USE, REPRODUCTION, OR DISTRIBUTION
- * OF YOUR PROGRAMS, INCLUDING ANY CLAIMS OR LIABILITIES ARISING OUT OF
- * OR RESULTING FROM THE USE, MODIFICATION, OR DISTRIBUTION OF PROGRAMS
- * OR FILES CREATED FROM, BASED ON, AND/OR DERIVED FROM THIS SOURCE
- * CODE FILE.
- */
-
- //Title: Cliffhanger Adventure Gear
- //Version:
- //Copyright: Copyright (c) 1997 Borland International, Inc.
- //Author: Application Methods, Inc.
- //Description: Cliffhanger Adventure Gear order entry system
-
- package borland.reference.cliffhanger;
-
- import java.awt.*;
- import java.awt.event.*;
- import borland.jbcl.layout.*;
- import borland.jbcl.control.*;
- import borland.sql.dataset.*;
- import borland.jbcl.dataset.*;
- import java.util.*;
-
- /**
- * OrderFindFrame is inherited from FindFrame which is the base form for
- * all Find windows in the Cliffhanger application.
- * This find forms allows users to lookup orders by searching on a value for
- * a single column in the order dataset. A grid displays all the records
- * for the datasets, and the grid will try to find the closet
- * matching record as the user types in the search value.
- */
- public class OrderFindFrame extends FindFrame {
- private static DataModule1 dm = DataModule1.getDataModule();
- private static OrderFindFrame myOrderFindFrame;
- // private QueryDataSet qdsOrder;
- ResourceBundle res = Res.getBundle("borland.reference.cliffhanger.Res");
-
- /**
- * The constructor is protected. Use the getOrderFindFrame method to get
- * an instance of the class.
- */
- protected OrderFindFrame() {
- try {
- jbInit(); // initialize frame's controls (JBuilder designer)
- }
- catch (Exception e) {
- e.printStackTrace();
- }
- }
-
- private void jbInit() throws Exception{
- this.setTitle(res.getString("OFF_Find_Order"));
- statusBar1.setDataSet(dm.getOrderDataSet());
- locatorControl1.setDataSet(dm.getOrderDataSet());
- gridControl1.setDataSet(dm.getOrderDataSet());
- choiceControl1.setItems(new String [] { res.getString("DM_OrderDS_ORDERTRACKNUM"), res.getString("DM_OrderDS_CUSTOMERPONUM"), res.getString("DM_OrderDS_ID") });
- }
-
- /**
- * Class method to access the singleton instance of the class.
- */
- public static OrderFindFrame getOrderFindFrame() {
- if (myOrderFindFrame == null)
- myOrderFindFrame = new OrderFindFrame();
-
- return myOrderFindFrame;
- }
-
- /**
- * When the Go To button is clicked, override this event handler
- * to show the appropriate form for the record selected, then
- * close this form.
- */
- void btnGoto_actionPerformed(ActionEvent e) {
- // Show the Customer form and show it centered in the screen
- DecoratedFrame frame = OrderEntryFrame.getOrderEntryFrame();
- CliffhangerApplication.showCenteredFrame(frame, false);
-
- // Hide this frame ...
- this.setVisible(false);
- this.dispose();
- }
- }
-
- class OrderFindFrame_btnGoto_actionAdapter implements java.awt.event.ActionListener{
- OrderFindFrame adaptee;
-
- OrderFindFrame_btnGoto_actionAdapter(OrderFindFrame adaptee) {
- this.adaptee = adaptee;
- }
-
- public void actionPerformed(ActionEvent e) {
- adaptee.btnGoto_actionPerformed(e);
- }
- }
-
-