ATM system implementation [7]--Service Selection window [00 original]

Source: Internet
Author: User
Package cn.edu.ynu.sei.atm.client.ui;

Import Com.swtdesigner.SWTResourceManager;
Import Org.eclipse.swt.SWT;
Import Org.eclipse.swt.events.MouseAdapter;
Import org.eclipse.swt.events.MouseEvent;
Import Org.eclipse.swt.widgets.Composite;
Import Org.eclipse.swt.widgets.Label;

/**
* Service Selection window container
* @author 88250
*/
public class Serviceselectcomposite extends composite
{
/**
* Service Selection Prompt label
*/
Private Label Pleaseselectservicelbl;

/**
* Transfer button
*/
Private Label Transferaccountlbl;

/**
* Deposit button
*/
Private Label Depositlbl;

/**
* Modify the Password button
*/
Private Label Changepwdlbl;

/**
* Balance Query button
*/
Private Label Balancequerylbl;

/**
* Back button
*/
Private Label Returnlbl;

/**
* Withdrawal button
*/
Private Label Withdrawlbl;

/**
* Take the card button
*/
Private Label Getcardlbl;

/**
* Historical Transaction Inquiry
*/
Private Label Transactionquerylbl;

/**
* Parent Window Container
*/
Private composite parent = NULL;

/**
* Modify Password Window container
*/
Private Changepwdcomposite CPC = NULL;

/**
* Withdrawal window Container
*/
Private Withdrawcomposite WC = null;

/**
* Balance Query Window container
*/
Private Balancequerycomposite BQC = null;

/**
* transfer window Container
*/
Private Transferaccountcomposite TAC = null;

/**
* History Transaction Query window container
*/
Private Transactionquerycomposite TQC = null;

/**
* Create service Selection container
* @param parent window Container
*/
Public Serviceselectcomposite (composite parent)
{
Super (parent, SWT. NONE);
this. Parent = parent;
Createcontents ();
Setcontentsvisible (FALSE);
}

/**
* Create a Service selection dialog window containing controls
*/
private void Createcontents ()
{
TRANSFERACCOUNTLBL = new Label (parent, SWT. BORDER);
TAC = new Transferaccountcomposite (parent);
Transferaccountlbl.addmouselistener (New Mouseadapter ()
{
public void MouseDown (MouseEvent arg0)
{
Tac.setbounds (50, 30, 400, 300);
Tac.setvisible (TRUE);
Setcontentsvisible (FALSE);
}
});
TAC.GETRETURNLBL (). Addmouselistener (New Mouseadapter ()
{
public void MouseDown (MouseEvent arg0)
{
Tac.setvisible (FALSE);
Setcontentsvisible (TRUE);
}
});
Transferaccountlbl.setbackgroundimage (Swtresourcemanager.getimage (
Serviceselectcomposite. Class,
"Selectserviceimages/transferaccounts.jpg"));
Transferaccountlbl.setbounds (11, 36, 80, 18);

PLEASESELECTSERVICELBL = new Label (parent, SWT. NONE);
Pleaseselectservicelbl.settext ("Please select the service you need:");
Pleaseselectservicelbl.setbounds (10, 8, 130, 20);

DEPOSITLBL = new Label (parent, SWT. BORDER);
Depositlbl.setbackgroundimage (Swtresourcemanager
. GetImage (Serviceselectcomposite. Class,
"Selectserviceimages/deposit. JPG "));
Depositlbl.setbounds (89, 36, 80, 18);

BALANCEQUERYLBL = new Label (parent, SWT. BORDER);
BQC = new Balancequerycomposite (parent);
Balancequerylbl.addmouselistener (New Mouseadapter ()
{
public void MouseDown (MouseEvent arg0)
{
Bqc.setbounds (50, 30, 400, 300);
Bqc.displayaccountinfo ();
Bqc.setvisible (TRUE);
Setcontentsvisible (FALSE);
}
});
BQC.GETRETURNLBL (). Addmouselistener (New Mouseadapter ()
{
public void MouseDown (MouseEvent arg0)
{
Bqc.setvisible (FALSE);
Setcontentsvisible (TRUE);
}
});
Balancequerylbl.setbackgroundimage (Swtresourcemanager.getimage (
Serviceselectcomposite. Class,
"Selectserviceimages/balancequery.jpg"));
Balancequerylbl.setbounds (11, 53, 80, 18);

TRANSACTIONQUERYLBL = new Label (parent, SWT. BORDER);
TQC = new Transactionquerycomposite (parent);
Transactionquerylbl.addmouselistener (New Mouseadapter ()
{
public void MouseDown (MouseEvent arg0)
{
Tqc.setbounds (20, 10, 400, 300);
Tqc.setvisible (TRUE);
Setcontentsvisible (FALSE);
}
});
TQC.GETRETURNLBL (). Addmouselistener (New Mouseadapter ()
{
public void MouseDown (MouseEvent arg0)
{
Tqc.setvisible (FALSE);
Setcontentsvisible (TRUE);
}
});
Transactionquerylbl.setbackgroundimage (Swtresourcemanager.getimage (
Serviceselectcomposite. Class,
"Selectserviceimages/transactionquery.jpg"));
Transactionquerylbl.setbounds (11, 70, 80, 18);

WITHDRAWLBL = new Label (parent, SWT. BORDER);
WC = new Withdrawcomposite (parent);
Withdrawlbl.addmouselistener (New Mouseadapter ()
{
public void MouseDown (MouseEvent arg0)
{
Wc.setbounds (50, 30, 400, 300);
Wc.setvisible (TRUE);
Setcontentsvisible (FALSE);
}
});
WC.GETRETURNBTN (). Addmouselistener (New Mouseadapter ()
{
public void MouseDown (MouseEvent arg0)
{
Wc.setvisible (FALSE);
Setcontentsvisible (TRUE);
}
});
Withdrawlbl.setbackgroundimage (Swtresourcemanager.getimage (
Serviceselectcomposite. Class,
"Selectserviceimages/withdraw. JPG "));
Withdrawlbl.setbounds (89, 53, 80, 18);
CPC = new Changepwdcomposite (parent);
CHANGEPWDLBL = new Label (parent, SWT. BORDER);
Changepwdlbl.addmouselistener (New Mouseadapter ()
{
public void MouseDown (MouseEvent arg0)
{
Cpc.setbounds (0, 0, 400, 300);
Cpc.setvisible (TRUE);
Setcontentsvisible (FALSE);
}
});
    CPC.GETRETURNBTN (). Addmouselistener (New

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.