Package br.com.visualmidia.ui.dialog

Examples of br.com.visualmidia.ui.dialog.AccountDialog


        addAccountButton = new Button(area.getComponentsComposite(), SWT.PUSH);
        addAccountButton.setText("Adicionar");
        addAccountButton.setEnabled(system.hasAccess("Adicionar Contas"));
        addAccountButton.addListener(SWT.Selection, new Listener() {
            public void handleEvent(Event arg0) {
                new AccountDialog(getParent().getShell(), getMySelf()).open();
            }
        });

        FormData data = new FormData();
        data.top = new FormAttachment(0, 10);
        data.right = new FormAttachment(100, -10);
        data.width = 80;
        addAccountButton.setLayoutData(data);

        editAccountButton = new Button(area.getComponentsComposite(), SWT.PUSH);
        editAccountButton.setText("Editar");
        editAccountButton.setEnabled(system.hasAccess("Editar Contas"));
        editAccountButton.addListener(SWT.Selection, new Listener() {
            public void handleEvent(Event arg0) {
                TableItem[] itens = accountsTable.getSelection();
                if (itens.length > 0) {
                  try {
                    String nameAccount = accountsTable.getSelection()[0].getText(1);
            Account account = (Account) system.query(new GetAccountByName(nameAccount));
            new AccountDialog(getParent().getShell(), getMySelf(), account).open();
          } catch (Exception e) {
            logger.error("GetAccountByName Exception: ", e);
          }
                }else{
                    setErrorMessage("Voc� deve selecionar uma conta para editar.");
View Full Code Here

TOP

Related Classes of br.com.visualmidia.ui.dialog.AccountDialog

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.