📄 constructdialog.java
字号:
package net.aetherial.gis.surface.design;
import java.awt.*;
import javax.swing.*;
import com.borland.jbcl.layout.XYLayout;
import com.borland.jbcl.layout.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import net.aetherial.gis.surface.ItemValue;
/**
* <p>Title: </p>
*
* <p>Description: </p>
*
* <p>Copyright: Copyright (c) 2004</p>
*
* <p>Company: </p>
*
* @author 王爱国
* @version 1.0
*/
public class ConstructDialog
extends JDialog {
private ConstructFrame cf = null;
JPanel panel1 = new JPanel();
BorderLayout borderLayout1 = new BorderLayout();
XYLayout xYLayout1 = new XYLayout();
JLabel jLabel1 = new JLabel();
NumberTextField jT_touzi_bili = new NumberTextField();
JLabel jLabel2 = new JLabel();
JButton jButton1 = new JButton();
JButton jButton2 = new JButton();
public ConstructDialog(Frame owner, String title, boolean modal) {
super(owner, title, modal);
try {
setDefaultCloseOperation(DISPOSE_ON_CLOSE);
jbInit();
pack();
}
catch (Exception exception) {
exception.printStackTrace();
}
}
public ConstructDialog(ConstructFrame frame) {
this(frame, "设置投资/里程比例", false);
this.cf = frame;
}
private void jbInit() throws Exception {
panel1.setLayout(borderLayout1);
this.getContentPane().setLayout(xYLayout1);
jLabel2.setText("万元/公里");
jButton1.setText("确定");
jButton1.addActionListener(new ConstructDialog_jButton1_actionAdapter(this));
jButton2.setText("取消");
jButton2.addActionListener(new ConstructDialog_jButton2_actionAdapter(this));
jLabel1.setFont(new java.awt.Font("Dialog", Font.BOLD, 15));
xYLayout1.setWidth(327);
xYLayout1.setHeight(165);
this.getContentPane().add(panel1, new XYConstraints(0, 0, -1, -1));
this.getContentPane().add(jButton2, new XYConstraints(171, 93, -1, -1));
this.getContentPane().add(jButton1, new XYConstraints(89, 94, -1, -1));
this.getContentPane().add(jLabel1, new XYConstraints(121, 12, 111, 24));
this.getContentPane().add(jT_touzi_bili, new XYConstraints(105, 55, 78, -1));
this.getContentPane().add(jLabel2, new XYConstraints(194, 51, 100, 28));
jLabel1.setToolTipText("");
jLabel1.setText("投资/里程 比例");
jT_touzi_bili.setData(ItemValue.getTouzi_bili());
this.initShow();
}
private void initShow(){
Dimension screenDim = Toolkit.getDefaultToolkit().getScreenSize();
this.setLocation(
(screenDim.width - 335) / 2,
(screenDim.height - 192) / 2
);
this.setSize(335,192);
}
public void jButton1_actionPerformed(ActionEvent e) {
ItemValue.setTouzi_bili(jT_touzi_bili.getData());
this.hide();
this.cf.setTouzi();
}
public void jButton2_actionPerformed(ActionEvent e) {
this.hide();
}
}
class ConstructDialog_jButton2_actionAdapter
implements ActionListener {
private ConstructDialog adaptee;
ConstructDialog_jButton2_actionAdapter(ConstructDialog adaptee) {
this.adaptee = adaptee;
}
public void actionPerformed(ActionEvent e) {
adaptee.jButton2_actionPerformed(e);
}
}
class ConstructDialog_jButton1_actionAdapter
implements ActionListener {
private ConstructDialog adaptee;
ConstructDialog_jButton1_actionAdapter(ConstructDialog adaptee) {
this.adaptee = adaptee;
}
public void actionPerformed(ActionEvent e) {
adaptee.jButton1_actionPerformed(e);
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -