use of org.eclipse.jface.dialogs.IPageChangedListener in project cubrid-manager by CUBRID.
the class ConfigHAWizardDialog method createContents.
/**
* Overwrite the method. Auto add IPageChangingListener(s);
*
* @param parent of the control.
* @return Control
*/
protected Control createContents(Composite parent) {
Control result = super.createContents(parent);
IWizardPage[] pages = this.getWizard().getPages();
for (IWizardPage page : pages) {
if (page instanceof IPageChangingListener) {
this.addPageChangingListener((IPageChangingListener) page);
}
if (page instanceof IPageChangedListener) {
this.addPageChangedListener((IPageChangedListener) page);
}
}
return result;
}
use of org.eclipse.jface.dialogs.IPageChangedListener in project cubrid-manager by CUBRID.
the class AddShardAction method run.
/**
* Open a dialog to add a shard.
*/
public void run() {
Object[] obj = this.getSelectedObj();
if (obj != null && obj.length > 0) {
if (!isSupported(obj[0])) {
this.setEnabled(false);
return;
}
node = (ICubridNode) obj[0];
server = node.getServer();
}
CMWizardDialog dialog = new CMWizardDialog(getShell(), new AddShardWizard(server)) {
/**
* Overwrite the method. Auto add IPageChangingListener(s);
*
* @param parent
* of the control.
* @return Control
*/
protected Control createContents(Composite parent) {
Control result = super.createContents(parent);
IWizardPage[] pages = this.getWizard().getPages();
for (IWizardPage page : pages) {
if (page instanceof IPageChangingListener) {
this.addPageChangingListener((IPageChangingListener) page);
}
if (page instanceof IPageChangedListener) {
this.addPageChangedListener((IPageChangedListener) page);
}
}
return result;
}
};
dialog.setPageSize(660, 450);
dialog.open();
}
use of org.eclipse.jface.dialogs.IPageChangedListener in project tdi-studio-se by Talend.
the class AbstractDumpEditor method createPages.
/*
* @see MultiPageEditorPart#createPages()
*/
@Override
protected final void createPages() {
createClientPages();
createInfoPage();
addPageChangedListener(new IPageChangedListener() {
@Override
public void pageChanged(PageChangedEvent event) {
if (event.getSelectedPage().equals(infoPage)) {
infoPage.focusCommnentsText();
}
}
});
resourceChangeListener = new ResourceChangeListener();
ResourcesPlugin.getWorkspace().addResourceChangeListener(resourceChangeListener);
}
use of org.eclipse.jface.dialogs.IPageChangedListener in project translationstudio8 by heartsome.
the class TSWizardDialog method firePageChanged.
/**
* Notifies any selection changed listeners that the selected page has
* changed. Only listeners registered at the time this method is called are
* notified.
*
* @param event
* a selection changed event
*
* @see IPageChangedListener#pageChanged
*
* @since 3.1
*/
protected void firePageChanged(final PageChangedEvent event) {
Object[] listeners = pageChangedListeners.getListeners();
for (int i = 0; i < listeners.length; ++i) {
final IPageChangedListener l = (IPageChangedListener) listeners[i];
SafeRunnable.run(new SafeRunnable() {
public void run() {
l.pageChanged(event);
}
});
}
}
use of org.eclipse.jface.dialogs.IPageChangedListener in project mdw-designer by CenturyLinkCloud.
the class SearchPage method createControl.
@SuppressWarnings("restriction")
public void createControl(Composite parent) {
// create the composite to hold the widgets
Composite composite = new Composite(parent, SWT.NULL);
// create the layout for this page
GridLayout gl = new GridLayout();
gl.numColumns = 3;
composite.setLayout(gl);
createSearchPatternControls(composite);
createSearchTypeControls(composite);
setControl(composite);
if (searchPageContainer instanceof org.eclipse.search.internal.ui.SearchDialog) {
org.eclipse.search.internal.ui.SearchDialog searchDialog = (org.eclipse.search.internal.ui.SearchDialog) searchPageContainer;
searchDialog.addPageChangedListener(new IPageChangedListener() {
public void pageChanged(PageChangedEvent event) {
checkEnablement();
}
});
}
checkEnablement();
searchPatternText.forceFocus();
}
Aggregations