/**
* QQ主界面
*/
package Windows_MainInterface;
import java.awt.*;
import java.awt.event.*;
import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.lang.reflect.Array;
import java.net.InetAddress;
import java.net.ServerSocket;
import java.net.Socket;
import java.net.UnknownHostException;
import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
import javax.swing.tree.*;
import javax.swing.*;
import Windows_chat.chat;
import Windows_chat.chatWarningWindow;
import Windows_info.friendinfo;
import Windows_info.information;
import Windows_safe.safe;
import Windows_search.search;
import Windows_systemMessage.message;
import common.playAudio;
import common.time;
import common.message.chatMessage;
import common.message.deleteMessage;
import common.message.getAvailableServerSocketFunction;
import common.message.groupDeal;
import common.message.ipPort;
import common.message.login_message;
import common.message.mainInfo;
import common.message.moveFriend;
import common.message.personalInfo;
import common.message.singleGroupInfoInMain;
import common.message.systemMessage;
import common.message.testMessage;
import common.message.updateRemark;
import client.thread.chatWithAnotherQQThread.getAnotherQQIpPortThread_Thread;
import client.thread.chatWithAnotherQQThread.send_messageThread;
import client.thread.deleteFriendsThread.sendDeleteFriendsThread;
import client.thread.groupDealThread.groupDealThread;
import client.thread.loginThread.loginClientThread;
import client.thread.moveFriendThread.moveFriendThread;
import client.thread.updateRemarkThread.updateRemarkThread;
/**
* 2011年10月
*
* 山东科技大学信息学院 版权所有
*
* 联系邮箱:415939252@qq.com
*
* Copyright © 1999-2012, sdust, All Rights Reserved
*
* @author 王昌帅,司吉峰,王松松 (计算机2009-5、6班)
*
*/
public class MainInterface extends JFrame implements ActionListener
{
/**
*
*/
private static final long serialVersionUID = 1L;
static public String ip = "192.168.136.105";
HashMap<String, String> map_qq = new HashMap<String, String>();
// 定义组件
String b2 = ".jpg";
String b1 = "images//main//";
JLabel imgLabel1 = new JLabel();
JLabel imgLabel2 = new JLabel();
JMenuBar jmb1, jmb2;
JMenu jm1, jm2;
JMenuItem jm1_online, jm1_hiden, jm1_leave, jm2_sysedit, jm2_editpw, jm2_help, jm2_exit;
JPanel top, top_1, top_2, bottom, bottom_1, bottom_2, middle1, middle2, middle3;
JLabel headimg, name, jl_down;
JButton add, sysseting, Safe, skin;
JButton q_zone, blog, email, friend_net, wallet, soso, news, messagebox, shopping;
JTabbedPane jtp;
JScrollPane jsp1, jsp2, jsp3;
JComboBox jcb;
JTree jt;
JPopupMenu popupMenu;
JPopupMenu popupMenugp;
JPopupMenu popupMenuchild;
JFrame login_jf;
JPanel login_jp;
JLabel login_jl;
JButton login_jb;
DefaultMutableTreeNode root;
DefaultMutableTreeNode[] Node = new DefaultMutableTreeNode[20];
receiveMainInfoThread receiver = new receiveMainInfoThread();
receiveSystemMessageThread receiver_sys = new receiveSystemMessageThread();
clientAliveMessageReceiverThread receiver_alive = new clientAliveMessageReceiverThread();
messageTransmitThread transmit = new messageTransmitThread();
receiveTransmitWarningThread transmitWarning = new receiveTransmitWarningThread();
sendHeartbeatThread_main sendHeartbeatThread_main_temp = new sendHeartbeatThread_main();
loginFounction login = new loginFounction();
login_message lmessage = null;
static public mainInfo mInfo = null;
static public HashMap<String, chat> map_chatWindows = new HashMap<String, chat>();
static public HashMap<String, ipPort> map_ipPort = new HashMap<String, ipPort>();
static public HashMap<String, Integer> map_portLocal = new HashMap<String, Integer>();
static public HashMap<String, personalInfo> map_friendsInfo = new HashMap<String, personalInfo>();
static public Integer main_port = 20001;
static public Integer sys_port = 20101;
static public Integer alive_port = 20201;
static public Integer transmit_port = 20301;
static public Integer TransmitWarning_port = 20401; // 会话信息右下角弹窗
static public Integer begin_window_port = 20501;
static public Container c_temp_main = null; // 会话信息右下角弹窗
static public MainInterface main_frame = null;
static public int status; // 当期状态
static public String text_leave = "20000000000您好,我现在不在电脑旁,稍后联系您......";
static public String text_busy = "20000000000您好,我现在有点忙,稍后联系您......";
static public Date lastExceptionTime = null; // 记录发心跳异常时间以便对比
static public int heartbeatJudge = 0;
static public int heartbeatFrequency = 6; // 心跳频率
static public int changed = 0; // 判断是否接收过mInfo
String back = "main_background.jpg";
final static Integer temp = new Integer(1);
Dimension dm = null;
// static public ArrayList<String> chatWindows = new ArrayList<String>();
public MainInterface(login_message lmessage)
{
// ---------------------登陆中的等待界面-------------------------\
status = lmessage.status;// 与后面status-1有关
main_frame = this;
c_temp_main = this.getContentPane();
this.lmessage = lmessage;
receiver.start();
receiver_alive.start();
receiver_sys.start();
transmit.start();
transmitWarning.start();
// 创建组件
login_jf = new JFrame();
Toolkit tk = this.getToolkit();// 得到窗口工具条
dm = tk.getScreenSize();
login_jf.setLocation((int) (dm.getWidth() - 315), 20);
login_jp = new JPanel();
login_jp.setLayout(null);
login_jp.setOpaque(false);
login_jb = new JButton("取消");
login_jb.setFont(new Font("黑体", Font.BOLD, 15));
login_jb.setActionCommand("取消登录");
login_jb.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e)
{
// TODO Auto-generated method stub
if (e.getActionCommand() == "取消登录")
{
System.exit(0);// 并且停止对服务器的申请(未完成)
}
}
});
login_jl = new JLabel(new ImageIcon("images/logining_Vip.gif"));
// 添加组件
login_jl.setBounds(0, 100, 295, 150);
login_jb.setBounds(100, 300, 80, 30);
login_jp.add(login_jl);
login_jp.add(login_jb);
login_jf.add(login_jp);
// 设置背景图片
final Container c1 = login_jf.getContentPane();
ImageIcon img1 = new ImageIcon("images/loginingBg.jpg");
imgLabel2.setIcon(img1);
imgLabel2.setBounds(0, 0, img1.getIconWidth(), img1.getIconHeight());
((JPanel) login_jf.getContentPane()).setOpaque(false);
login_jf.getLayeredPane().add(imgLabel2, new Integer(Integer.MIN_VALUE));
// 设置背景图片完成
// 窗体设置
login_jf.setTitle("飞Q2012");
Image icon = Toolkit.getDefaultToolkit().getImage("pic\\headpic.jpg");
login_jf.setIconImage(icon);
login_jf.setSize(295, 589);
login_jf.setMinimumSize(new Dimension(295, 450));
login_jf.setResizable(false);
login_jf.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
login_jf.setVisible(true);
login.start();
this.addWindowListener(new WindowAdapter() {
public void windowClosing(WindowEvent e)
没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
收起资源包目录
飞Q2012 (java版QQ)含mysql数据库 (1121个子文件)
start.bat 20B
MainInterface.class 24KB
safe.class 22KB
information.class 18KB
serverMain.class 18KB
search.class 17KB
chat.class 14KB
apply.class 14KB
group.class 10KB
head.class 10KB
friendinfo.class 9KB
find_password.class 9KB
sendSystemMessageThread.class 9KB
message.class 8KB
login.class 8KB
login_dealingThread.class 7KB
request_add.class 7KB
search_result.class 7KB
applicate_dealingThread.class 6KB
information$head.class 6KB
search_dealingThread.class 6KB
MainInterface$Change_Beizhu.class 6KB
sendMainInfoThread.class 6KB
chatWarningWindow.class 6KB
addfriend.class 5KB
MainInterface$Event_popuMenu.class 5KB
receive_dealingAgreeRefuseThread.class 5KB
MainInterface$add_group.class 5KB
MainInterface$Background.class 5KB
MainInterface$update_group.class 4KB
MainInterface$mgroup_transit.class 4KB
MainInterface$Change_Beizhu$1.class 4KB
JTextPane1.class 4KB
authenticationReceive_dealingThread.class 4KB
updatePersonalInfo_dealingThread.class 4KB
chat$expression.class 4KB
group$expression.class 4KB
personalInfo.class 4KB
personalInfo.class 4KB
add_dealingThread.class 4KB
getInfo_dealingThread.class 4KB
MainInterface$transmit_dealingThread.class 3KB
delete_dealingThread.class 3KB
heartbeatReceiver_dealingThread.class 3KB
receiveAnswer_dealingThread.class 3KB
setSafeQuestion_dealingThread.class 3KB
MainInterface$ChatEvent.class 3KB
addqqCanUseThread.class 3KB
judgeWhetherExist_dealingThread.class 3KB
group_dealingThread.class 3KB
serverMain$Menu.class 3KB
MainInterface$receive_dealingThread.class 3KB
updatePassword_dealingThread.class 3KB
sendAddRequestThread.class 3KB
serverMain$MyTableModel.class 3KB
chat$1.class 3KB
chat$receiverMessage_dealingThread.class 2KB
search_result$MyTableModel.class 2KB
judgeSecondThread.class 2KB
playAudio.class 2KB
moveFriend_dealingThread.class 2KB
updateRemark_dealingThread.class 2KB
applicateServerThread.class 2KB
serverMain$7.class 2KB
setting_dealingThread.class 2KB
MainInterface$receiveMain_dealingThread.class 2KB
MainInterface$sendHeartbeatThread.class 2KB
systemMessage.class 2KB
systemMessage.class 2KB
applicateClientThread.class 2KB
MainInterface$loginFounction.class 2KB
searchThread.class 2KB
getSafeQuestionThread.class 2KB
serverMain$Menu$3.class 2KB
getIp_dealingThread.class 2KB
sendSafeAnswerThread.class 2KB
sendSetSafeQuestionThread.class 2KB
loginClientThread.class 2KB
aliveMessageSenderThread.class 2KB
MainInterface$4.class 2KB
group$1.class 2KB
getAnotherQQIpPortThread.class 2KB
getInfoThread.class 2KB
judgeAliveThread.class 2KB
searchInfo.class 2KB
searchInfo.class 2KB
receiveAgreeRefuseThread.class 2KB
personalSmallInfo.class 2KB
personalSmallInfo.class 2KB
authenticationMessageReceiverThread.class 2KB
getAnotherQQIpThread.class 2KB
deleteFriendsThread.class 2KB
updatePersonalInfoThread.class 2KB
receiveSafeAnswerThread.class 2KB
judgeWhetherQuestionExistThread.class 2KB
loginServerThread.class 2KB
MyTreeCellRenderer.class 2KB
addFriendsThread.class 2KB
getInfoThread.class 2KB
searchThread.class 2KB
共 1121 条
- 1
- 2
- 3
- 4
- 5
- 6
- 12
资源评论
- xingwuhen12302013-10-13很好很强大,可以从中学到很多网络编程的东西
- Tenser12342013-12-17很好啊..借鉴学习.好多包- -够研究一阵了
- 帅云2013-07-07的确特别强大,可以参考,但是运行的时候有问题,菜鸟不知道怎么解决啊
- dw9626667212013-07-02解压出现错误 真坑
android1982
- 粉丝: 7
- 资源: 67
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功