⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 userlogininfopanel.java

📁 此文档针对开发人员和测试人员。第二章对软件进行了全面的描述。第三章对接口进行了分析。第四章对软件实现的功能进行概述。第五章对软件后续开发实现提出的要求。第六章提出其他一些在软件开发过程中需要注意的问题
💻 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 + -