Example usage for org.eclipse.jface.dialogs MessageDialog openConfirm

List of usage examples for org.eclipse.jface.dialogs MessageDialog openConfirm

Introduction

In this page you can find the example usage for org.eclipse.jface.dialogs MessageDialog openConfirm.

Prototype

public static boolean openConfirm(Shell parent, String title, String message) 

Source Link

Document

Convenience method to open a simple confirm (OK/Cancel) dialog.

Usage

From source file:com.hangum.tadpole.importexport.core.dialogs.SQLToDBImportDialog.java

License:Open Source License

/**
 * Create contents of the dialog.//  ww  w  .  ja v a2  s. co m
 * @param parent
 */
@Override
protected Control createDialogArea(Composite parent) {
    Composite container = (Composite) super.createDialogArea(parent);
    GridLayout gridLayout = (GridLayout) container.getLayout();
    gridLayout.verticalSpacing = 5;
    gridLayout.horizontalSpacing = 5;
    gridLayout.marginHeight = 5;
    gridLayout.marginWidth = 5;

    Composite compositeHead = new Composite(container, SWT.NONE);
    compositeHead.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
    compositeHead.setLayout(new GridLayout(3, false));

    Label lblFileName = new Label(compositeHead, SWT.NONE);
    lblFileName.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));
    lblFileName.setText(Messages.get().CsvToRDBImportDialog_1);

    fileNameLabel = new Text(compositeHead, SWT.BORDER);
    fileNameLabel.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));

    final String url = startUploadReceiver();
    pushSession = new ServerPushSession();

    /* fileUpload ?  ???    */
    /*
    Label lblDumy = new Label(compositeHead, SWT.NONE);
    lblDumy.setText(Messages.get().CsvToRDBImportDialog_2);
    lblDumy.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false));
    */
    fileUpload = new FileUpload(compositeHead, SWT.NONE);
    fileUpload.setText(Messages.get().CsvToRDBImportDialog_2);
    fileUpload.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false));
    fileUpload.addSelectionListener(new SelectionAdapter() {
        @Override
        public void widgetSelected(SelectionEvent e) {
            String fileName = fileUpload.getFileName();
            if ("".equals(fileName) || null == fileName) //$NON-NLS-1$
                return;

            if (!MessageDialog.openConfirm(null, Messages.get().Confirm, Messages.get().CsvToRDBImportDialog_5))
                return;
            fileNameLabel.setText(fileName == null ? "" : fileName); //$NON-NLS-1$

            pushSession.start();
            fileUpload.submit(url);
        }
    });

    Label lblSeprator = new Label(compositeHead, SWT.NONE);
    lblSeprator.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));
    lblSeprator.setText(Messages.get().SQLToDBImportDialog_lblSeprator_text);

    textSeprator = new Text(compositeHead, SWT.BORDER);
    textSeprator.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
    new Label(compositeHead, SWT.NONE);

    Label lblBatchSize = new Label(compositeHead, SWT.NONE);
    lblBatchSize.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));
    lblBatchSize.setText(Messages.get().SQLToDBImportDialog_0);

    textBatchSize = new Text(compositeHead, SWT.BORDER | SWT.RIGHT);
    if (userDB.getDBDefine() == DBDefine.SQLite_DEFAULT) {
        //SQLite  BatchExecute? ? 200 ??  database logic? ?  1 executeBatch ? commit? ?? .
        textBatchSize.setEditable(false);
        textBatchSize.setText(Messages.get().SQLToDBImportDialog_2);
    } else {
        textBatchSize.setEditable(true);
        textBatchSize.setText(Messages.get().SQLToDBImportDialog_BatchSize);
    }
    textBatchSize.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
    new Label(compositeHead, SWT.NONE);

    Label lblException = new Label(compositeHead, SWT.NONE);
    lblException.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));
    lblException.setText(Messages.get().SQLToDBImportDialog_Exception);

    Composite composite = new Composite(compositeHead, SWT.NONE);
    composite.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false, 1, 1));
    composite.setLayout(new GridLayout(2, false));

    btnIgnore = new Button(composite, SWT.RADIO);
    GridData gd_btnIgnore = new GridData(SWT.LEFT, SWT.CENTER, false, false, 1, 1);
    gd_btnIgnore.widthHint = 98;
    btnIgnore.setLayoutData(gd_btnIgnore);
    btnIgnore.setText(Messages.get().SQLToDBImportDialog_Ignore);

    btnStop = new Button(composite, SWT.RADIO);
    btnStop.setSelection(true);
    GridData gd_btnStop = new GridData(SWT.LEFT, SWT.CENTER, false, false, 1, 1);
    gd_btnStop.widthHint = 92;
    btnStop.setLayoutData(gd_btnStop);
    btnStop.setText(Messages.get().SQLToDBImportDialog_Stop);
    new Label(compositeHead, SWT.NONE);
    new Label(compositeHead, SWT.NONE);

    compositeDumy = new Composite(compositeHead, SWT.NONE);
    GridData gd_composite_1 = new GridData(SWT.FILL, SWT.TOP, false, false, 1, 1);
    gd_composite_1.heightHint = 16;
    compositeDumy.setLayoutData(gd_composite_1);
    new Label(compositeHead, SWT.NONE);

    registerServiceHandler();

    return container;
}

From source file:com.hangum.tadpole.importexport.core.dialogs.SQLToDBImportDialog.java

License:Open Source License

private void insert() throws IOException {
    int ret;//www  .  j  av  a 2 s . c  o  m
    BOMInputStream bomInputStream = null;

    File[] arryFiles = receiver.getTargetFiles();
    if (arryFiles.length == 0) {
        MessageDialog.openWarning(null, Messages.get().Warning, Messages.get().CsvToRDBImportDialog_21);
        return;
    }

    if (!MessageDialog.openConfirm(null, Messages.get().Confirm,
            Messages.get().SQLToDBImportDialog_UploadQuestion))
        return;
    bufferBatchResult = new StringBuffer();

    try {
        batchSize = Integer.valueOf(textBatchSize.getText());
    } catch (Exception e) {
        batchSize = 1000;
    }

    File userUploadFile = arryFiles[arryFiles.length - 1];
    try {
        // bom?  charset? ? ?.
        bomInputStream = new BOMInputStream(FileUtils.openInputStream(FileUtils.getFile(userUploadFile)));//`, false, ByteOrderMark.UTF_8, ByteOrderMark.UTF_16LE, ByteOrderMark.UTF_16BE, ByteOrderMark.UTF_32LE, ByteOrderMark.UTF_32BE);

        String charsetName = "utf-8"; //$NON-NLS-1$
        String strSQLData = ""; //$NON-NLS-1$
        if (bomInputStream.getBOM() == null) {
            strSQLData = FileUtils.readFileToString(userUploadFile, charsetName);
        } else {
            charsetName = bomInputStream.getBOMCharsetName();
            strSQLData = FileUtils.readFileToString(userUploadFile, charsetName).substring(1);
        }

        String[] strArrySQL = StringUtils.split(strSQLData, textSeprator.getText());
        ret = runSQLExecuteBatch(Arrays.asList(strArrySQL));

        if (ret == 0)
            MessageDialog.openInformation(null, Messages.get().Confirm,
                    Messages.get().SQLToDBImportDialog_StoreData); //$NON-NLS-1$
    } catch (IOException e) {
        logger.error(Messages.get().SQLToDBImportDialog_ReadError, e);
        MessageDialog.openError(null, Messages.get().Confirm,
                Messages.get().SQLToDBImportDialog_LoadException + e.getMessage());

    } catch (Exception e) {
        logger.error(Messages.get().SQLToDBImportDialog_ImportException, e);
        MessageDialog.openError(null, Messages.get().Confirm,
                Messages.get().SQLToDBImportDialog_LoadException + e.getMessage());
    } finally {
        if (bomInputStream != null)
            bomInputStream.close();
    }
}

From source file:com.hangum.tadpole.importexport.core.editors.mongodb.MongoDBImportEditor.java

License:Open Source License

/**
 * data import// w  w w . j av  a 2 s. co m
 */
private void importData() {
    // ? .
    if (tabFolderQuery.getSelectionIndex() == 0) {
        if (tableColumnListComposite.getSelectListTables().isEmpty())
            return;
    } else if (tabFolderQuery.getSelectionIndex() == 1) {
        if ("".equals(textCollectionName.getText().trim())) { //$NON-NLS-1$
            MessageDialog.openWarning(null, Messages.get().Warning, Messages.get().QueryToMongoDBImport_5);
            return;
        }

        if ("".equals(textQuery.getText().trim())) { //$NON-NLS-1$
            MessageDialog.openWarning(null, Messages.get().Warning, Messages.get().QueryToMongoDBImport_2);
            return;
        }
    }

    // job make
    final UserDBDAO sourceDBDAO = (UserDBDAO) comboDBList.getData(comboDBList.getText());
    Job job = null;
    if (MessageDialog.openConfirm(null, Messages.get().Confirm, Messages.get().MongoDBImportEditor_1)) { //$NON-NLS-1$
        if (tabFolderQuery.getSelectionIndex() == 0) {

            DBImport dbImport = null;
            if (targetDBDAO != null && DBDefine.MONGODB_DEFAULT == sourceDBDAO.getDBDefine()) {
                dbImport = new MongoDBCollectionToMongodBImport(sourceDBDAO, targetDBDAO,
                        tableColumnListComposite.getSelectListTables());
            } else {
                dbImport = new RDBTableToMongoDBImport(sourceDBDAO, targetDBDAO,
                        tableColumnListComposite.getSelectListTables());
            }
            job = dbImport.workTableImport();
            if (job == null)
                return;

        } else if (tabFolderQuery.getSelectionIndex() == 1) {
            if (targetDBDAO != null && DBDefine.MONGODB_DEFAULT == sourceDBDAO.getDBDefine()) {
                MessageDialog.openInformation(null, Messages.get().Confirm, "Not support MongoDB.");
                return;
            } else {
                QueryToMongoDBImport importData = new QueryToMongoDBImport(sourceDBDAO, targetDBDAO,
                        textCollectionName.getText(), textQuery.getText(), btnExistOnDelete.getSelection());
                job = importData.workTableImport();
                if (job == null)
                    return;
            }
        }
    } else
        return;

    // job listener
    job.addJobChangeListener(new JobChangeAdapter() {
        public void done(IJobChangeEvent event) {
            final IJobChangeEvent jobEvent = event;
            getSite().getShell().getDisplay().asyncExec(new Runnable() {
                public void run() {
                    if (jobEvent.getResult().isOK()) {
                        MessageDialog.openInformation(null, Messages.get().Confirm,
                                Messages.get().MongoDBImportEditor_11); //$NON-NLS-1$
                    } else {
                        ExceptionDetailsErrorDialog.openError(null, Messages.get().Error,
                                Messages.get().MongoDBImportEditor_12, jobEvent.getResult()); //$NON-NLS-1$
                    }
                }
            }); // end display.asyncExec
        } // end done         
    }); // end job

    job.setName(targetDBDAO.getDisplay_name());
    job.setUser(true);
    job.schedule();
}

From source file:com.hangum.tadpole.manager.core.dialogs.users.DetailUserAndDBRoleDialog.java

License:Open Source License

@Override
protected void okPressed() {
    if ("NONE".equals(comboRoleType.getText())) { //$NON-NLS-1$
        MessageDialog.openWarning(getShell(), Messages.get().Warning,
                Messages.get().DetailUserAndDBRoleDialog_8);
        comboRoleType.setFocus();// w  ww  .  j av  a  2  s  .  c  o m
        return;
    }

    // ?  ?  ?  . 
    try {
        if (!MessageDialog.openConfirm(getShell(), Messages.get().Confirm, Messages.get().FindUserDialog_4))
            return;

        Calendar calStart = Calendar.getInstance();
        calStart.set(dateTimeStart.getYear(), dateTimeStart.getMonth(), dateTimeStart.getDay(), 0, 0, 0);

        Calendar calEnd = Calendar.getInstance();
        calEnd.set(dateTimeEndDay.getYear(), dateTimeEndDay.getMonth(), dateTimeEndDay.getDay(),
                dateTimeEndTime.getHours(), dateTimeEndTime.getMinutes(), 00);

        userDBRole.setRole_id(comboRoleType.getText());
        userDBRole.setTerms_of_use_starttime(new Timestamp(calStart.getTimeInMillis()));
        userDBRole.setTerms_of_use_endtime(new Timestamp(calEnd.getTimeInMillis()));
        TadpoleSystem_UserRole.updateTadpoleUserDBRole(userDBRole);

        MessageDialog.openInformation(getShell(), Messages.get().Confirm,
                Messages.get().DetailUserAndDBRoleDialog_11);

    } catch (Exception e) {
        logger.error("Is DB add role error.", e); //$NON-NLS-1$
        MessageDialog.openError(getShell(), Messages.get().Error,
                Messages.get().DetailUserAndDBRoleDialog_14 + e.getMessage());

        return;
    }

    super.okPressed();
}

From source file:com.hangum.tadpole.manager.core.dialogs.users.FindUserAndDBRoleDialog.java

License:Open Source License

@Override
protected void okPressed() {
    IStructuredSelection iss = (IStructuredSelection) tableViewer.getSelection();
    if (iss.isEmpty())
        return;//from www  . j a v a2s .c o  m
    UserDAO userDAO = (UserDAO) iss.getFirstElement();

    if ("NONE".equals(comboRoleType.getText())) { //$NON-NLS-1$
        MessageDialog.openWarning(getShell(), Messages.get().Warning, Messages.get().FindUserAndDBRoleDialog_6);
        comboRoleType.setFocus();
        return;
    }

    // ?  ?  ?  . 
    try {
        boolean isAddDBRole = TadpoleSystem_UserRole.isDBAddRole(userDBDao, userDAO);
        if (isAddDBRole) {
            if (!MessageDialog.openConfirm(getShell(), Messages.get().Confirm, Messages.get().FindUserDialog_4))
                return;

            Calendar calStart = Calendar.getInstance();
            calStart.set(dateTimeStart.getYear(), dateTimeStart.getMonth(), dateTimeStart.getDay(), 0, 0, 0);

            Calendar calEnd = Calendar.getInstance();
            calEnd.set(dateTimeEndDay.getYear(), dateTimeEndDay.getMonth(), dateTimeEndDay.getDay(),
                    dateTimeEndTime.getHours(), dateTimeEndTime.getMinutes(), 00);

            tadpoleUserRoleDao = TadpoleSystem_UserRole.insertTadpoleUserDBRole(userDAO.getSeq(),
                    userDBDao.getSeq(), comboRoleType.getText(), "*", //$NON-NLS-1$
                    new Timestamp(calStart.getTimeInMillis()), new Timestamp(calEnd.getTimeInMillis()));

            MessageDialog.openInformation(getShell(), Messages.get().Confirm,
                    Messages.get().FindUserAndDBRoleDialog_10);

            //            super.okPressed();
        } else {
            MessageDialog.openWarning(getShell(), Messages.get().Warning,
                    Messages.get().FindUserAndDBRoleDialog_12);
        }
    } catch (Exception e) {
        logger.error(Messages.get().RoleType, e);
        MessageDialog.openError(getShell(), Messages.get().Error,
                Messages.get().FindUserAndDBRoleDialog_15 + e.getMessage());
    }

}

From source file:com.hangum.tadpole.manager.core.dialogs.users.FindUserDialog.java

License:Open Source License

@Override
protected void buttonPressed(int buttonId) {
    super.buttonPressed(buttonId);

    if (buttonId == BTN_ADD) {
        IStructuredSelection iss = (IStructuredSelection) tableViewer.getSelection();
        if (iss.isEmpty())
            return;

        if (MessageDialog.openConfirm(null, "Confirm", Messages.FindUserDialog_4)) { //$NON-NLS-1$
            UserDAO userDAO = (UserDAO) iss.getFirstElement();

            try {
                if (TadpoleSystem_UserRole.findGroupUserRole(SessionManager.getGroupSeq(), userDAO.getSeq())) {
                    MessageDialog.openError(null, "Error", Messages.FindUserDialog_6); //$NON-NLS-1$
                    return;
                } else {
                    TadpoleSystem_UserRole.newUserRole(SessionManager.getGroupSeq(), userDAO.getSeq(),
                            PublicTadpoleDefine.USER_TYPE.USER.toString(),
                            PublicTadpoleDefine.YES_NO.YES.toString(), userDAO.getName());
                }//from ww  w.  j a v a2  s  . co m
            } catch (Exception e) {
                logger.error("Fine user role", e); //$NON-NLS-1$
            }

        }
    }
}

From source file:com.hangum.tadpole.manager.core.dialogs.users.ModifyUserDialog.java

License:Open Source License

@Override
protected void okPressed() {
    if (MessageDialog.openConfirm(getShell(), Messages.ModifyUserDialog_12, Messages.ModifyUserDialog_13)) {
        UserDAO user = new UserDAO();
        user.setApproval_yn(comboApproval.getText());
        user.setDelYn(comboDel.getText());
        user.setSeq(userDAO.getSeq());// w  ww  .j a va  2s  .  c o  m
        user.setSecurity_question(textQuestion.getText());
        user.setSecurity_answer(textAnswer.getText());

        // ?? ? no  session?  ?? .
        if ("YES".equals(user.getDelYn()) || "YES".equals(user.getApproval_yn())) {
            String sessionId = SessionManagerListener.getSessionIds(user.getEmail());
        }

        try {
            TadpoleSystem_UserQuery.updateUserData(user);
        } catch (Exception e) {
            logger.error("data update", e); //$NON-NLS-1$

            Status errStatus = new Status(IStatus.ERROR, Activator.PLUGIN_ID, e.getMessage(), e); //$NON-NLS-1$
            ExceptionDetailsErrorDialog.openError(getShell(), "Error", "User Info update", errStatus); //$NON-NLS-1$ //$NON-NLS-2$

            return;
        }

        super.okPressed();
    } else {
        return;
    }
}

From source file:com.hangum.tadpole.manager.core.editor.auth.DBListComposite.java

License:Open Source License

/**
 * delete db (delete marking)/*from  w ww  . ja  v a 2s.  c  o m*/
 */
private void deleteDB() {
    IStructuredSelection ss = (IStructuredSelection) treeViewerDBList.getSelection();
    if (!ss.isEmpty()) {
        if (!MessageDialog.openConfirm(null, "Confirm", "Do you want to delete the selected database?")) //$NON-NLS-1$
            return;

        UserDBDAO userDB = (UserDBDAO) ss.getFirstElement();

        try {
            if (userDB.getGroup_seq() == SessionManager.getGroupSeq()) {
                TadpoleSystem_UserDBQuery.removeUserDB(userDB.getSeq());
                TadpoleSQLManager.removeInstance(userDB);
                treeViewerDBList.setInput(initData());
                refreshConnections();
            }
        } catch (Exception e) {
            logger.error("disconnection exception", e);
            Status errStatus = new Status(IStatus.ERROR, Activator.PLUGIN_ID, e.getMessage(), e); //$NON-NLS-1$
            ExceptionDetailsErrorDialog.openError(
                    PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), "Error", //$NON-NLS-1$
                    "Disconnection Exception", errStatus); //$NON-NLS-1$
        }
    }
}

From source file:com.hangum.tadpole.manager.core.editor.auth.DBListComposite.java

License:Open Source License

/**
 * export db list//ww w.ja v  a2 s.c o  m
 */
private void exportDB() {
    final String strDBEncrypt = SystemDBDataManager.exportUserDB(listUserDBs);

    if (!"".equals(strDBEncrypt)) {
        if (MessageDialog.openConfirm(null, "Confirm", "?  export?")) { //$NON-NLS-1$

            try {
                byte[] arrayData = strDBEncrypt.getBytes();

                downloadServiceHandler.setContentType("txt");
                downloadServiceHandler.setName("Tadpole_DBList_Export.txt"); //$NON-NLS-1$
                downloadServiceHandler.setByteContent(arrayData);
                DownloadUtils.provideDownload(compositeDumy, downloadServiceHandler.getId());
            } catch (Exception e) {
                logger.error("DB export exception", e); //$NON-NLS-1$

                Status errStatus = new Status(IStatus.ERROR, Activator.PLUGIN_ID, e.getMessage(), e); //$NON-NLS-1$
                ExceptionDetailsErrorDialog.openError(null, "Error", "DB export Exception", errStatus); //$NON-NLS-1$ //$NON-NLS-2$
            }
        }
    }
}

From source file:com.hangum.tadpole.manager.core.editor.auth.dialogs.DBAccessControlDialog.java

License:Open Source License

/**
 * Create contents of the dialog./*from w  w  w. j a va  2s.c  o m*/
 * @param parent
 */
@Override
protected Control createDialogArea(Composite parent) {
    Composite container = (Composite) super.createDialogArea(parent);
    GridLayout gridLayout = (GridLayout) container.getLayout();
    gridLayout.verticalSpacing = 5;
    gridLayout.horizontalSpacing = 5;
    gridLayout.marginHeight = 5;
    gridLayout.marginWidth = 5;

    Composite compositeHead = new Composite(container, SWT.NONE);
    compositeHead.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
    compositeHead.setLayout(new GridLayout(2, false));

    Label lblDbName = new Label(compositeHead, SWT.NONE);
    lblDbName.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));
    lblDbName.setText("DB Name");

    textDBName = new Text(compositeHead, SWT.BORDER);
    textDBName.setEditable(false);
    textDBName.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
    textDBName.setText(useDB.getDisplay_name());

    Label lblUser = new Label(compositeHead, SWT.NONE);
    lblUser.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));
    lblUser.setText("User");

    comboUser = new Combo(compositeHead, SWT.READ_ONLY);
    comboUser.addSelectionListener(new SelectionAdapter() {
        @Override
        public void widgetSelected(SelectionEvent e) {
            initData();
        }
    });
    comboUser.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
    List<TadpoleUserDbRoleDAO> listUser = useDB.getListChildren();
    for (int i = 0; i < listUser.size(); i++) {
        TadpoleUserDbRoleDAO tadpoleUserDbRoleDAO = listUser.get(i);
        comboUser
                .add(String.format("%s (%s)", tadpoleUserDbRoleDAO.getName(), tadpoleUserDbRoleDAO.getEmail()));
        comboUser.setData("" + i, tadpoleUserDbRoleDAO);
    }
    comboUser.select(0);
    new Label(compositeHead, SWT.NONE);

    Composite compositeBody = new Composite(container, SWT.NONE);
    compositeBody.setLayout(new GridLayout(1, false));
    compositeBody.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));

    Group grpAuthority = new Group(compositeBody, SWT.NONE);
    grpAuthority.setLayout(new GridLayout(2, false));
    grpAuthority.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));
    grpAuthority.setText("Authority(Does't use check)");

    btnSelect = new Button(grpAuthority, SWT.CHECK);
    btnSelect.setEnabled(false);
    btnSelect.setSelection(true);
    btnSelect.setText("SELECT");

    Composite compositeSelectBtn = new Composite(grpAuthority, SWT.NONE);
    compositeSelectBtn.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
    compositeSelectBtn.setLayout(new GridLayout(3, false));

    btnSelectAdd = new Button(compositeSelectBtn, SWT.NONE);
    btnSelectAdd.addSelectionListener(new SelectionAdapter() {
        @Override
        public void widgetSelected(SelectionEvent e) {
            TableColumnFilterDialog tableColumnDialog = new TableColumnFilterDialog(getShell(), dbAccessDetail);
            if (Dialog.OK == tableColumnDialog.open()) {
                listTableColumn.add(tableColumnDialog.getUpdateData());
                tvSelect.refresh();
            }
        }
    });
    btnSelectAdd.setText("Add");

    btnSelectDelete = new Button(compositeSelectBtn, SWT.NONE);
    btnSelectDelete.addSelectionListener(new SelectionAdapter() {
        @Override
        public void widgetSelected(SelectionEvent e) {
            IStructuredSelection iss = (IStructuredSelection) tvSelect.getSelection();
            if (!iss.isEmpty()) {
                if (!MessageDialog.openConfirm(getShell(), "Confirm", "Do you want delete"))
                    return;

                AccessCtlObjectDAO dao = (AccessCtlObjectDAO) iss.getFirstElement();

                listTableColumn.remove(dao);
                tvSelect.refresh();
            }
        }
    });
    btnSelectDelete.setText("Delete");
    btnSelectDelete.setEnabled(false);
    new Label(compositeSelectBtn, SWT.NONE);

    new Label(grpAuthority, SWT.NONE);

    tvSelect = new TableViewer(grpAuthority, SWT.BORDER | SWT.FULL_SELECTION);
    tvSelect.addPostSelectionChangedListener(new ISelectionChangedListener() {
        public void selectionChanged(SelectionChangedEvent event) {
            btnSelectDelete.setEnabled(true);
        }
    });
    tvSelect.addDoubleClickListener(new IDoubleClickListener() {
        public void doubleClick(DoubleClickEvent event) {
            IStructuredSelection iss = (IStructuredSelection) event.getSelection();
            if (!iss.isEmpty()) {
                AccessCtlObjectDAO acObject = (AccessCtlObjectDAO) iss.getFirstElement();

                TableColumnFilterDialog tableColumnDialog = new TableColumnFilterDialog(getShell(),
                        dbAccessDetail, acObject);
                if (Dialog.OK == tableColumnDialog.open()) {
                    //                  listTableColumn.add(tableColumnDialog.getUpdateData());
                    tvSelect.refresh();
                }
            }

        }
    });
    Table table = tvSelect.getTable();
    table.setLinesVisible(true);
    table.setHeaderVisible(true);
    table.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));

    TableViewerColumn tvColumnName = new TableViewerColumn(tvSelect, SWT.NONE);
    TableColumn tblclmnTable = tvColumnName.getColumn();
    tblclmnTable.setWidth(150);
    tblclmnTable.setText("Table");

    TableViewerColumn tableViewerColumn_2 = new TableViewerColumn(tvSelect, SWT.NONE);
    TableColumn tblclmnDoNotUse = tableViewerColumn_2.getColumn();
    tblclmnDoNotUse.setWidth(60);
    tblclmnDoNotUse.setText("Do not use");

    TableViewerColumn tableViewerColumn_1 = new TableViewerColumn(tvSelect, SWT.NONE);
    TableColumn tblclmnColumn = tableViewerColumn_1.getColumn();
    tblclmnColumn.setWidth(500);
    tblclmnColumn.setText("Column");

    tvSelect.setContentProvider(new ArrayContentProvider());
    tvSelect.setLabelProvider(new SelectTableFilterLabelprovider());
    tvSelect.setInput(listTableColumn);

    btnInsert = new Button(grpAuthority, SWT.CHECK);
    btnInsert.setText("INSERT");
    new Label(grpAuthority, SWT.NONE);

    btnUpdate = new Button(grpAuthority, SWT.CHECK);
    btnUpdate.setText("UPDATE");
    new Label(grpAuthority, SWT.NONE);

    btnDelete = new Button(grpAuthority, SWT.CHECK);
    btnDelete.setText("DELETE");
    new Label(grpAuthority, SWT.NONE);

    btnDdl = new Button(grpAuthority, SWT.CHECK);
    btnDdl.setText("DDL");
    new Label(grpAuthority, SWT.NONE);

    firstInit();
    initData();

    return container;
}