📄 querypanel.jad
字号:
// Decompiled by DJ v3.7.7.81 Copyright 2004 Atanas Neshkov Date: 2006-3-7 21:21:18
// Home Page : http://members.fortunecity.com/neshkov/dj.html - Check often for new version!
// Decompiler options: packimports(3)
// Source File Name: QueryPanel.java
package Telephone;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.io.PrintStream;
import java.net.URL;
import java.rmi.Naming;
import javax.swing.*;
// Referenced classes of package Telephone:
// CallManagerInterface
public class QueryPanel extends JPanel
implements ActionListener
{
public QueryPanel(JApplet japplet)
{
applet = japplet;
setLayout(new BorderLayout());
setBorder(BorderFactory.createEmptyBorder(12, 12, 12, 12));
JPanel jpanel = new JPanel(new BorderLayout());
jpanel.setBorder(BorderFactory.createEtchedBorder());
add("North", jpanel);
JPanel jpanel1 = new JPanel(new FlowLayout(0));
jpanel.add("Center", jpanel1);
JLabel jlabel = new JLabel("\u7535\u8BDD\u7528\u6237\u540D");
jpanel1.add(jlabel);
subscriberTextField = new JTextField();
subscriberTextField.setPreferredSize(new Dimension(160, 18));
jpanel1.add(subscriberTextField);
JPanel jpanel2 = new JPanel(new FlowLayout(2));
jpanel.add("East", jpanel2);
JButton jbutton = new JButton("\u67E5\u8BE2");
jbutton.setActionCommand("QUERY");
jbutton.addActionListener(this);
jpanel2.add(jbutton);
JButton jbutton1 = new JButton("\u6E05\u9664");
jbutton1.setActionCommand("RESET");
jbutton1.addActionListener(this);
jpanel2.add(jbutton1);
JTabbedPane jtabbedpane = new JTabbedPane();
add(jtabbedpane);
tablePanel = new JPanel(new BorderLayout());
jtabbedpane.addTab("\u67E5\u8BE2\u7ED3\u679C", null, tablePanel, "");
validate();
setVisible(true);
}
public void actionPerformed(ActionEvent actionevent)
{
String s = actionevent.getActionCommand();
if(s.equals("QUERY"))
{
String s1 = subscriberTextField.getText();
if(s1.equals(""))
return;
Database.DatabaseTableModel databasetablemodel = null;
try
{
String s2 = "//" + applet.getCodeBase().getHost() + "/";
String s3 = "CallManager";
CallManagerInterface callmanagerinterface = (CallManagerInterface)Naming.lookup(s2 + s3);
databasetablemodel = callmanagerinterface.getCallHistory(s1);
}
catch(Exception exception)
{
exception.printStackTrace();
}
tablePanel.removeAll();
tablePanel.add(new JScrollPane(new JTable(databasetablemodel)));
tablePanel.validate();
System.out.println(databasetablemodel);
} else
if(s.equals("RESET"))
{
subscriberTextField.setText("");
subscriberTextField.requestFocus();
}
}
protected JApplet applet;
protected JTextField subscriberTextField;
protected JPanel tablePanel;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -