📄 framecuttrack.java
字号:
package net.aetherial.gis.our.cut;
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.*;
/**
* <p>Title: </p>
*
* <p>Description: </p>
*
* <p>Copyright: Copyright (c) 2004</p>
*
* <p>Company: </p>
*
* @author not attributable
* @version 1.0
*/
public class FrameCutTrack
extends JFrame {
XYLayout xYLayout1 = new XYLayout();
JTextField jTextField1 = new JTextField();
JLabel jLabel1 = new JLabel();
JLabel jLabel2 = new JLabel();
JPanel jPanel1 = new JPanel();
JButton jButton1 = new JButton();
JButton jButton2 = new JButton();
private static int number = 0;
public FrameCutTrack() {
try {
jbInit();
}
catch (Exception exception) {
exception.printStackTrace();
}
}
private void jbInit() throws Exception {
this.number++;
this.setSize(400,370);
Dimension screenDim = Toolkit.getDefaultToolkit().getScreenSize();
this.setLocation(
(screenDim.width - 400) / 2,
(screenDim.height - 370) / 2
);
this.setTitle("切割航迹");
this.setIconImage(ItemValue.getImage("HSDIlogo.gif"));
getContentPane().setLayout(xYLayout1);
jLabel1.setText("生成的航迹名称:");
jTextField1.setText("切割成航迹"+this.number);
jButton1.setText(" O K ");
jButton1.addActionListener(new FrameCutTrack_jButton_actionAdapter(this));
jButton1.setActionCommand("OK");
this.getContentPane().add(jLabel1, new XYConstraints(12, 11, 111, 25));
jButton2.setText("添加航迹");
jButton2.addActionListener(new FrameCutTrack_jButton_actionAdapter(this));
jButton2.setActionCommand("Cut");
xYLayout1.setWidth(400);
xYLayout1.setHeight(324);
jPanel1.setBackground(Color.white);
jLabel2.setText("航迹所包含的点:");
this.getContentPane().add(jTextField1, new XYConstraints(117, 12, 205, -1));
this.getContentPane().add(jLabel2, new XYConstraints(12, 46, 118, 28));
this.getContentPane().add(jPanel1, new XYConstraints(21, 82, 344, 186));
this.getContentPane().add(jButton1, new XYConstraints(198, 280, -1, -1));
this.getContentPane().add(jButton2, new XYConstraints(89, 281, -1, -1));
}
public static void main(String[] args) {
FrameCutTrack fct = new FrameCutTrack();
fct.show();
}
public void jButton_actionPerformed(ActionEvent e) {
if(e.getActionCommand().equals("OK")){
System.out.println("Height:" + this.getHeight() + ",width:" +
this.getWidth());
}else if(e.getActionCommand().equals("Cut")){
DialogCutTrack dct = new DialogCutTrack();
dct.show();
}
}
}
class FrameCutTrack_jButton_actionAdapter
implements ActionListener {
private FrameCutTrack adaptee;
FrameCutTrack_jButton_actionAdapter(FrameCutTrack adaptee) {
this.adaptee = adaptee;
}
public void actionPerformed(ActionEvent e) {
adaptee.jButton_actionPerformed(e);
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -