mailbutton.java

来自「自己编写的邮件管理系统程序源代码,方便管理自己的邮件」· Java 代码 · 共 78 行

JAVA
78
字号
package mail.ui;

import javax.swing.JButton;


public class MailButton extends JButton
{
    /**
     * 按钮类型
     * 0:阅读邮件
     * 1:回复邮件
     * 2:转发邮件
     */
    private int type=-1;
    
    /**
     * 操作邮件的序号
     */
    private int index=-1;

    /**
     * 是否已读
     */
    private boolean isRead=false;
    
    public MailButton()
    {
        super();
    }
    public MailButton(String name)
    {
        super(name);
    }
    /**
     * @return 返回 index。
     */
    public int getIndex()
    {
        return index;
    }
    /**
     * @param index 要设置的 index。
     */
    public void setIndex(int index)
    {
        this.index = index;
    }
    /**
     * @return 返回 type。
     */
    public int getType()
    {
        return type;
    }
    /**
     * @param type 要设置的 type。
     */
    public void setType(int type)
    {
        this.type = type;
    }
    
    /**
     * @return 返回 isRead。
     */
    public boolean isRead()
    {
        return isRead;
    }
    /**
     * @param isRead 要设置的 isRead。
     */
    public void setRead(boolean isRead)
    {
        this.isRead = isRead;
    }
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?