📄 orderfindframe.java
字号:
/**
* Copyright (c) 1996-2004 Borland Software Corporation. All Rights Reserved.
*
* This SOURCE CODE FILE, which has been provided by Borland Software as part
* of a Borland Software product for use ONLY by licensed users of the product,
* includes CONFIDENTIAL and PROPRIETARY information of Borland Software.
*
* 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 SOFTWARE, 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.
*/
//------------------------------------------------------------------------------
// Copyright (c) 1996-2004 Borland Software Corporation. All Rights Reserved.
//------------------------------------------------------------------------------
package com.borland.samples.orderentry;
import java.awt.*;
import java.awt.event.*;
import java.util.*;
import javax.swing.*;
import com.borland.dx.sql.dataset.*;
import com.borland.dx.dataset.*;
/**
* 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;
ResourceBundle res = Res.getBundle("com.borland.samples.orderentry.Res");
/**
* The constructor is public, but you should use the getOrderFindFrame method
* to get an instance of the class.
*/
public 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"));
this.setDataSet(dm.getOrderDataSet());
this.setComboBoxItems(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.
*
* @return OrderFindFrame
*/
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.
*
* @param e ActionEvent
*/
protected void btnGoto_actionPerformed(ActionEvent e) {
// Show the Customer form and show it centered in the screen
JFrame frame = OrderEntryFrame.getOrderEntryFrame();
CliffhangerApplication.showCenteredWindow(frame, false);
// Hide this frame ...
this.setVisible(false);
this.dispose();
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -