Search in sources :

Example 11 with IWizardPage

use of org.eclipse.jface.wizard.IWizardPage in project cubrid-manager by CUBRID.

the class SetAutoAddVolumeInfoPage method pageChanged.

/**
	 * Call this method when page changed
	 * 
	 * @param event the page changed event
	 */
public void pageChanged(PageChangedEvent event) {
    IWizardPage page = (IWizardPage) event.getSelectedPage();
    if (page.getName().equals(PAGENAME)) {
        VolumeInfoPage volumeInfoPage = (VolumeInfoPage) getWizard().getPage(VolumeInfoPage.PAGENAME);
        volumeList = volumeInfoPage.getVolumeList();
        changeButtonStatus(true);
    }
}
Also used : IWizardPage(org.eclipse.jface.wizard.IWizardPage)

Example 12 with IWizardPage

use of org.eclipse.jface.wizard.IWizardPage in project cubrid-manager by CUBRID.

the class PartitionEditHashPage method pageChanged.

/**
	 * Call this method when page changed
	 * 
	 * @param event the page changed event
	 */
public void pageChanged(PageChangedEvent event) {
    IWizardPage page = (IWizardPage) event.getSelectedPage();
    if (page.getName().equals(PAGENAME)) {
        PartitionTypePage partitionTypePage = (PartitionTypePage) getWizard().getPage(PartitionTypePage.PAGENAME);
        String partitionType = partitionTypePage.getPartitionType();
        String partitionExpr = partitionTypePage.getPartitionExpr();
        partitionTypeText.setText(partitionType);
        partitionExprText.setText(partitionExpr);
        partitionNumText.selectAll();
        partitionNumText.setFocus();
    }
}
Also used : IWizardPage(org.eclipse.jface.wizard.IWizardPage)

Example 13 with IWizardPage

use of org.eclipse.jface.wizard.IWizardPage in project dbeaver by serge-rider.

the class MultiPageWizardDialog method updateButtons.

@Override
public void updateButtons() {
    boolean complete = true;
    for (TreeItem item : pagesTree.getItems()) {
        if (item.getData() instanceof IWizardPage) {
            IWizardPage page = (IWizardPage) item.getData();
            if (page.getControl() != null && !page.isPageComplete()) {
                complete = false;
                break;
            }
        }
    }
    Button button = getButton(IDialogConstants.OK_ID);
    if (button != null && !button.isDisposed()) {
        button.setEnabled(complete);
    }
}
Also used : IWizardPage(org.eclipse.jface.wizard.IWizardPage)

Example 14 with IWizardPage

use of org.eclipse.jface.wizard.IWizardPage in project cubrid-manager by CUBRID.

the class ChangeTablesPage method pageChanged.

/**
	 * @see org.eclipse.jface.dialogs.IPageChangedListener#pageChanged(org.eclipse.jface.dialogs.PageChangedEvent)
	 * @param event PageChangedEvent
	 */
public void pageChanged(PageChangedEvent event) {
    IWizardPage page = (IWizardPage) event.getSelectedPage();
    if (page.getName().equals(PAGENAME)) {
        SetDatabaseInfoPage selectDatabasePage = (SetDatabaseInfoPage) getWizard().getPage(SetDatabaseInfoPage.PAGENAME);
        String ip = selectDatabasePage.getIp();
        String port = selectDatabasePage.getPort();
        String userName = selectDatabasePage.getUserName();
        String password = selectDatabasePage.getPassword();
        String dbName = selectDatabasePage.getMasterDbName();
        String dbaPassword = selectDatabasePage.getMasterDbaPassword();
        GetAllClassesTaskExecutor taskExcutor = new GetAllClassesTaskExecutor(getShell(), ip, port, userName, password, dbName, dbaPassword);
        new ExecTaskWithProgress(taskExcutor).exec(true, true);
        if (taskExcutor.isSuccess()) {
            DBClasses dbClasses = taskExcutor.getDBClasses();
            selectTableComp.fillTableViewer(dbClasses);
            initialize();
            setErrorMessage(null);
        } else {
            setErrorMessage(Messages.errPreviousPage);
        }
    }
}
Also used : ExecTaskWithProgress(com.cubrid.common.ui.spi.progress.ExecTaskWithProgress) IWizardPage(org.eclipse.jface.wizard.IWizardPage) DBClasses(com.cubrid.cubridmanager.core.cubrid.table.model.DBClasses)

Example 15 with IWizardPage

use of org.eclipse.jface.wizard.IWizardPage in project cubrid-manager by CUBRID.

the class SelectTablesPage method pageChanged.

/**
	 * @see org.eclipse.jface.dialogs.IPageChangedListener#pageChanged(org.eclipse.jface.dialogs.PageChangedEvent)
	 * @param event PageChangedEvent
	 */
public void pageChanged(PageChangedEvent event) {
    setPageComplete(false);
    IWizardPage page = (IWizardPage) event.getSelectedPage();
    if (page.getName().equals(PAGENAME)) {
        SlaveDbInfoPage slaveDbInfoPage = (SlaveDbInfoPage) getWizard().getPage(SlaveDbInfoPage.PAGENAME);
        String ip = slaveDbInfoPage.getReplInfo().getMasterList().get(0).getMasterIp();
        String port = slaveDbInfoPage.getMasterHostPort();
        String userName = "admin";
        String password = slaveDbInfoPage.getMasterHostPassword();
        String mdbName = slaveDbInfoPage.getMasterDbName();
        String mdbDbaPassword = slaveDbInfoPage.getMasterDbDbaPassword();
        GetAllClassesTaskExecutor taskExcutor = new GetAllClassesTaskExecutor(getShell(), ip, port, userName, password, mdbName, mdbDbaPassword);
        new ExecTaskWithProgress(taskExcutor).exec();
        if (taskExcutor.isSuccess()) {
            DBClasses dbClasses = taskExcutor.getDBClasses();
            selectTableComp.fillTableViewer(dbClasses);
            setErrorMessage(null);
            setPageComplete(true);
        } else {
            setErrorMessage(Messages.errPreviousPage);
            setPageComplete(false);
        }
    }
}
Also used : ExecTaskWithProgress(com.cubrid.common.ui.spi.progress.ExecTaskWithProgress) IWizardPage(org.eclipse.jface.wizard.IWizardPage) DBClasses(com.cubrid.cubridmanager.core.cubrid.table.model.DBClasses)

Aggregations

IWizardPage (org.eclipse.jface.wizard.IWizardPage)36 InvocationTargetException (java.lang.reflect.InvocationTargetException)4 Control (org.eclipse.swt.widgets.Control)4 ExecTaskWithProgress (com.cubrid.common.ui.spi.progress.ExecTaskWithProgress)3 DBClasses (com.cubrid.cubridmanager.core.cubrid.table.model.DBClasses)3 IProgressMonitor (org.eclipse.core.runtime.IProgressMonitor)3 IPageChangedListener (org.eclipse.jface.dialogs.IPageChangedListener)3 IPageChangingListener (org.eclipse.jface.dialogs.IPageChangingListener)3 IRunnableWithProgress (org.eclipse.jface.operation.IRunnableWithProgress)3 IOpenListener (org.eclipse.jface.viewers.IOpenListener)3 ISelectionChangedListener (org.eclipse.jface.viewers.ISelectionChangedListener)3 OpenEvent (org.eclipse.jface.viewers.OpenEvent)3 SelectionChangedEvent (org.eclipse.jface.viewers.SelectionChangedEvent)3 GridData (org.eclipse.swt.layout.GridData)3 GridLayout (org.eclipse.swt.layout.GridLayout)3 Composite (org.eclipse.swt.widgets.Composite)3 IStructuredSelection (org.eclipse.jface.viewers.IStructuredSelection)2 TableViewer (org.eclipse.jface.viewers.TableViewer)2 WizardPage (org.eclipse.jface.wizard.WizardPage)2 SelectionAdapter (org.eclipse.swt.events.SelectionAdapter)2