现在的位置: 首页 > 综合 > 正文

ATM系统实现[5]——注意事项窗口[00原创]

2013年04月08日 ⁄ 综合 ⁄ 共 1218字 ⁄ 字号 评论关闭
package cn.edu.ynu.sei.atm.client.ui;

import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Label;

/**
 * 注意事项窗口
 * 
@author 88250
 
*/
public class NoticeComposite extends Composite
{
    
/**
     * 返回按钮
     
*/
    
private Button returnBtn = null;

    /**
     * 注意事项内容
     
*/
    
private Label label = null;

    /**
     * 创建注意事项实例
     * 
@param parent 父窗口
     
*/
    
public NoticeComposite(Composite parent)
    {
    
super(parent, SWT.NONE);
    returnBtn 
= new Button(parent, SWT.NONE);
    returnBtn.setText(
"返回");
    returnBtn.setBounds(
791505429);

    label = new Label(parent, SWT.NONE);
    label.setText(
"1、提示安全使用… 2、防止周围有人窃取密码 3、吞卡处理");
    label.setBounds(
718115050);
    }

    /**
     * 设置注意事项容器内控件的可见性
     * 
@param b 可见性
     
*/
    
public void setContentsVisible(boolean b)
    {
    label.setVisible(b);
    returnBtn.setVisible(b);
    }

    /**
     * 取得返回按钮
     * 
@return 返回按钮
     
*/
    
public Button getReturnBtn()
    {
    
return returnBtn;
    }

    @Override
    public void dispose()
    {
    
super.dispose();
    }

    @Override
    protected void checkSubclass()
    {
    
// Disable the check that prevents subclassing of SWT components
    }

}

 

抱歉!评论已关闭.