?? userlogininfopanel.java
字號:
package com.ciash.bms.gui.impl;
import java.awt.Color;
import java.awt.Dimension;
import java.awt.GridBagConstraints;
import java.awt.GridBagLayout;
import java.awt.Insets;
import javax.swing.JLabel;
import javax.swing.JScrollPane;
import javax.swing.JTextArea;
import javax.swing.JTextField;
import com.ciash.bms.entity.User;
import com.ciash.bms.gui.selecter.UserSelecter;
import com.ciash.common.gui.GroupPanel;
public class UserLoginInfoPanel
extends GroupPanel implements UserSelecter {
private User user;
private JLabel qqLabel = new JLabel();
private JLabel nameLabel = new JLabel();
private JLabel jLabel6 = new JLabel();
private JLabel idLabel = new JLabel();
private JLabel emailLabel = new JLabel();
private JTextField email = new JTextField();
private JTextArea info = new JTextArea();
private JTextField msn = new JTextField();
private JTextField qq = new JTextField();
private JTextField name = new JTextField();
private JTextField id = new JTextField();
private JLabel jLabel5 = new JLabel();
private JScrollPane jScrollPane1 = new JScrollPane();
private GridBagLayout gridBagLayout1 = new GridBagLayout();
public UserLoginInfoPanel() {
try {
jbInit();
}
catch (Exception e) {
e.printStackTrace();
}
}
private void jbInit() throws Exception {
jLabel5.setMaximumSize(new Dimension(62, 22));
jLabel5.setText("MSN:");
id.setText("");
id.setMaximumSize(new Dimension(62, 22));
id.setEditable(false);
name.setText("");
name.setMaximumSize(new Dimension(62, 22));
name.setEditable(false);
qq.setText("");
qq.setSelectionStart(7);
qq.setMaximumSize(new Dimension(62, 22));
qq.setEditable(false);
msn.setText("");
msn.setMaximumSize(new Dimension(62, 22));
msn.setEditable(false);
info.setEditable(false);
info.setDoubleBuffered(false);
info.setEnabled(true);
email.setText("");
email.setMaximumSize(new Dimension(62, 22));
email.setEditable(false);
emailLabel.setMaximumSize(new Dimension(62, 22));
emailLabel.setText("電子郵箱:");
idLabel.setMaximumSize(new Dimension(62, 22));
idLabel.setText("用戶名:");
jLabel6.setText("個人信息:");
nameLabel.setText("姓名:");
nameLabel.setMaximumSize(new Dimension(62, 22));
nameLabel.setRequestFocusEnabled(true);
qqLabel.setMaximumSize(new Dimension(62, 22));
qqLabel.setText("QQ/ICQ:");
this.setLayout(gridBagLayout1);
this.setForeground(Color.black);
this.setDebugGraphicsOptions(0);
this.setMaximumSize(new Dimension(32767, 32767));
this.add(name, new GridBagConstraints(1, 1, 1, 1, 1.0, 0.0
,GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(7, 8, 0, 16), 84, 0));
this.add(id, new GridBagConstraints(1, 0, 1, 1, 1.0, 0.0
,GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(14, 8, 0, 16), 84, 0));
this.add(qq, new GridBagConstraints(1, 4, 1, 1, 1.0, 0.0
,GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(9, 8, 0, 16), 84, 0));
this.add(idLabel, new GridBagConstraints(0, 0, 1, 1, 0.0, 0.0
,GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(14, 16, 0, 0), 14, 5));
this.add(nameLabel, new GridBagConstraints(0, 1, 1, 1, 0.0, 0.0
,GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 16, 0, 0), 26, 5));
this.add(emailLabel, new GridBagConstraints(0, 2, 1, 1, 0.0, 0.0
,GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 16, 0, 0), 2, 5));
this.add(jLabel5, new GridBagConstraints(0, 3, 1, 1, 0.0, 0.0
,GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(11, 16, 0, 0), 24, 5));
this.add(qqLabel, new GridBagConstraints(0, 4, 1, 1, 0.0, 0.0
,GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(9, 16, 0, 0), 8, 5));
this.add(msn, new GridBagConstraints(1, 3, 1, 1, 1.0, 0.0
,GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(10, 8, 0, 16), 84, 0));
this.add(email, new GridBagConstraints(1, 2, 1, 1, 1.0, 0.0
,GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(9, 8, 0, 16), 84, 0));
this.add(jLabel6, new GridBagConstraints(0, 5, 1, 1, 0.0, 0.0
,GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(10, 16, 0, 0), 2, 5));
this.add(jScrollPane1, new GridBagConstraints(0, 6, 2, 1, 1.0, 1.0
,GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(0, 16, 15, 16), 155, 278));
jScrollPane1.getViewport().add(info, null);
jScrollPane1.setVerticalScrollBarPolicy(JScrollPane.
VERTICAL_SCROLLBAR_NEVER);
}
public void setSelectUser(User user) {
setGroupName("歡迎" + user.getUserName() +"的登陸!");
this.id.setText(user.getUserId());
this.name.setText(user.getUserName());
this.email.setText(user.getUserEmail());
this.qq.setText(user.getUserQQ());
this.msn.setText(user.getUserMsn());
this.info.setText(user.getUserIntroduce());
this.user = user;
}
public User getSelectUser() {
return user;
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -