Java 类org.eclipse.jface.dialogs.PageChangedEvent 实例源码

项目:SPLevo    文件:VPMAnalysisWizardPageChangeListener.java   
@Override
public void pageChanged(PageChangedEvent event) {
    Object selectedPage = event.getSelectedPage();

    vpmAnalysisWizard.updateConfiguration();

    if (selectedPage instanceof VPMAnalyzerConfigurationPage) {
        VPMAnalyzerConfigurationPage configPage = (VPMAnalyzerConfigurationPage) selectedPage;
        analyzers = configPage.getAnalyzers();

    } else if (selectedPage instanceof ResultHandlingConfigurationPage) {
        ResultHandlingConfigurationPage resultPage = (ResultHandlingConfigurationPage) selectedPage;
        if (analyzers != null) {
            resultPage.setSelectedAnalyzers(analyzers);
        }
    }
}
项目:birt    文件:AbstractPropertyDialog.java   
/**
 * 
 * @param event
 */
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 );
            }
        } );
    }
}
项目:birt    文件:WizardBaseDialog.java   
/**
 * 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 2.1
 */
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 );
            }
        } );
    }
}
项目:wt-studio    文件:CTableDialogCellEditor.java   
@Override
protected Object openDialogBox(Control cellEditorWindow)
{
    this.setInjectModel((InjectModel) this.getValue());
    CreateInjectWizard wizard = new CreateInjectWizard(this);
    final WizardDialog dialog = new WizardDialog(cellEditorWindow.getShell(), wizard);
    if (getInjectModel() != null) {
        final IPageChangedListener pageChangedListener = new IPageChangedListener() {
            @Override
            public void pageChanged(PageChangedEvent event)
            {
                if (event.getSelectedPage() instanceof CreateCTablePage) {
                    ((CreateCTablePage) dialog.getCurrentPage())
                            .setData((InjectModel) getInjectModel());
                    dialog.removePageChangedListener(this);
                }
            }
        };
        dialog.addPageChangedListener(pageChangedListener);
    }
    dialog.open();
    return this.getInjectModel();
}
项目:wt-studio    文件:SqlAreaDialogCellEditor.java   
protected Object openDialogBox(Control cellEditorWindow)
{
    this.setSqlAreaModel((TableSqlAreaModel) this.getValue());
    CreateTableSqlWizard wizard = new CreateTableSqlWizard(this);
    final WizardDialog dialog = new WizardDialog(cellEditorWindow.getShell(), wizard);
    if (getSqlAreaModel() != null) {
        final IPageChangedListener pageChangedListener = new IPageChangedListener() {
            @Override
            public void pageChanged(PageChangedEvent event)
            {
                if (event.getSelectedPage() instanceof CreateTableSqlPageOne) {
                    ((CreateTableSqlPageOne) dialog.getCurrentPage())
                            .setData((TableSqlAreaModel) getSqlAreaModel());
                    dialog.removePageChangedListener(this);
                }
            }
        };
        dialog.addPageChangedListener(pageChangedListener);
    }
    dialog.open();
    return this.getSqlAreaModel();
}
项目:wt-studio    文件:SqlSetDialogCellEditor.java   
@Override
protected Object openDialogBox(Control cellEditorWindow)
{

    this.setSqlSet((SqlSet) this.getValue());
    CreateChartSqlWizard wizard = new CreateChartSqlWizard(this);
    final WizardDialog dialog = new WizardDialog(cellEditorWindow.getShell(), wizard);
    if (getSqlSet() != null) {
        final IPageChangedListener pageChangedListener = new IPageChangedListener() {
            @Override
            public void pageChanged(PageChangedEvent event)
            {
                if (event.getSelectedPage() instanceof CreateSelectChartPage) {
                    ((CreateSelectChartPage) dialog.getCurrentPage()).setData(getSqlSet());
                    dialog.removePageChangedListener(this);
                }
            }
        };
        dialog.addPageChangedListener(pageChangedListener);
    }
    dialog.open();
    return this.getSqlSet();

}
项目:eclipseRecorder    文件:MultiEditorPageChangedListener.java   
@Override
public void pageChanged(PageChangedEvent event) {
    Object selectedPage = event.getSelectedPage();
    if (seenPages.contains(selectedPage))
        return;

    seenPages.add(selectedPage);
    if (selectedPage instanceof AbstractTextEditor) {
        IEditorPart editorPart = (IEditorPart) selectedPage;
        IProject project = plugin.getProjectForEditor(editorPart.getEditorInput());
        if (plugin.getIgnoreProjectsList().contains(project.getName()))
            return;
        ISourceViewer sourceViewer = (ISourceViewer) editorPart.getAdapter(ITextOperationTarget.class);
        sourceViewer.getDocument().addDocumentListener(new DocumentListener());
    }
}
项目:geoprism    文件:LocalizedWizardDialog.java   
/**
 * 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);
      }
    });
  }
}
项目:mule-tooling-incubator    文件:MultiPagePropertiesEditor.java   
/**
 * Creates page 1 of the multi-page editor, which allows you to change the
 * font used in page 2.
 */
void createGraphicalEditor() {
    graphicalEditor = new GraphicalMulePropertiesEditor();
    addPageChangedListener(new IPageChangedListener() {

        @Override
        public void pageChanged(PageChangedEvent event) {
            if (event.getSelectedPage().equals(textEditor) && graphicalEditor.isDirty()){
                textEditor.getPropertiesDocument().set(graphicalEditor.getContent());
            } else if(textEditor.isDirty()) {
                graphicalEditor.setContent(textEditor.getPropertiesDocument().get());
            }
        }
    });

    try {
        graphicalEditorIndex = addPage(graphicalEditor, getEditorInput());
        setPageText(graphicalEditorIndex, graphicalEditor.getTitle());
    } catch (PartInitException e) {
        e.printStackTrace();
    }


}
项目:scenarioo-example-swtbot-e4    文件:NewOrderWizard.java   
/**
 * @see org.eclipse.jface.dialogs.IPageChangedListener#pageChanged(org.eclipse.jface.dialogs.PageChangedEvent)
 */
@Override
public void pageChanged(final PageChangedEvent event) {
    if (two.equals(event.getSelectedPage())) {
        two.updateOrderInfo(one.getOrderForUpdate());
    }
}
项目:PDFReporter-Studio    文件:MultiPageToolbarEditorPart.java   
public void firePageChanged(final PageChangedEvent event) {
    Object[] listeners = pageChangeListeners.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);
            }
        });
    }
}
项目:PDFReporter-Studio    文件:JrxmlEditor.java   
/**
 * Creates page 1 of the multi-page editor, which allows you to change the font used in page 2.
 */
void createPage0() throws PartInitException {
    reportContainer = new ReportContainer(this, jrContext);
    reportContainer.addPageChangedListener(new IPageChangedListener() {

        public void pageChanged(PageChangedEvent event) {
            updateContentOutline(getActivePage());
        }
    });

    int index = addPage(reportContainer, getEditorInput());
    setPageText(index, Messages.JrxmlEditor_design);
}
项目:OpenSPIFe    文件:SnapToTimelineHandler.java   
@Override
protected void pageChanged(PageChangedEvent event) {
    Object page = event.getSelectedPage();
    if (page instanceof IWorkbenchPart) {
        setBaseEnabled(page != null && ((IWorkbenchPart) page).getAdapter(Timeline.class) != null);
    }
}
项目:OpenSPIFe    文件:FollowCurrentTimeHandler.java   
@Override
protected void pageChanged(PageChangedEvent event) {
    Object page = event.getSelectedPage();
    if (page instanceof IWorkbenchPart) {
        setBaseEnabled(page != null && ((IWorkbenchPart) page).getAdapter(Timeline.class) != null);
    }
}
项目:OpenSPIFe    文件:ShowConstraintsHandler.java   
@Override
protected void pageChanged(PageChangedEvent event) {
    Object page = event.getSelectedPage();
    if (page instanceof IWorkbenchPart) {
        setBaseEnabled(page != null && ((IWorkbenchPart) page).getAdapter(Timeline.class) != null);
    }
}
项目:OpenSPIFe    文件:ShowViolationsHandler.java   
@Override
protected void pageChanged(PageChangedEvent event) {
    Object page = event.getSelectedPage();
    if (page instanceof IWorkbenchPart) {
        setBaseEnabled(page != null && ((IWorkbenchPart) page).getAdapter(Timeline.class) != null);
    }
}
项目:OpenSPIFe    文件:OneOfEachRowDecoratorParameter.java   
@Override
protected void pageChanged(PageChangedEvent event) {
    Object selectedPage = event.getSelectedPage();
    if (selectedPage instanceof IWorkbenchPart) {
        setBaseEnabled(isDecorable((IWorkbenchPart) selectedPage));
    }
}
项目:OpenSPIFe    文件:FlattenHierarchyHandler.java   
@Override
public void pageChanged(PageChangedEvent event) {
    Object page = event.getSelectedPage();
    if (page instanceof IWorkbenchPart) {
        updateHandler((IWorkbenchPart) page);
    }
}
项目:OpenSPIFe    文件:ShowRowHighlightHandler.java   
@Override
public void pageChanged(PageChangedEvent event) {
    Object page = event.getSelectedPage();
    if (page instanceof IWorkbenchPart) {
        Object adapter = ((WorkbenchPart) page).getAdapter(MergeRowHighlightDecorator.class);
        MergeRowHighlightDecorator decorator = (MergeRowHighlightDecorator) adapter;
        updateState(decorator);
    }
}
项目:p2-installer    文件:WizardDialog.java   
/**
 * Updates this dialog's controls to reflect the current page.
 */
protected void update() {
    // Update the window title
    updateWindowTitle();
    // Update the title bar
    updateTitleBar();
    // Update the buttons
    updateButtons();

    // Fires the page change event
    firePageChanged(new PageChangedEvent(this, getCurrentPage()));
}
项目:translationstudio8    文件:TSWizardDialog.java   
/**
 * Updates this dialog's controls to reflect the current page.
 */
protected void update() {
    // Update the window title
    updateWindowTitle();
    // Update the title bar
    updateTitleBar();
    // Update the buttons
    updateButtons();

    // Fires the page change event
    firePageChanged(new PageChangedEvent(this, getCurrentPage()));
}
项目:gef-gwt    文件:WizardDialog.java   
/**
 * Updates this dialog's controls to reflect the current page.
 */
protected void update() {
    // Update the window title
    updateWindowTitle();
    // Update the title bar
    updateTitleBar();
    // Update the buttons
    updateButtons();

    // Fires the page change event
    firePageChanged(new PageChangedEvent(this, getCurrentPage()));
}
项目:gef-gwt    文件:PreferenceDialog.java   
/**
 * Updates this dialog's controls to reflect the current page.
 */
protected void update() {
    // Update the title bar
    updateTitle();
    // Update the message line
    updateMessage();
    // Update the buttons
    updateButtons();
    //Saved the selected node in the preferences
    setSelectedNode();
    firePageChanged(new PageChangedEvent(this, getCurrentPage()));
}
项目:gef-gwt    文件:PreferenceDialog.java   
/**
 * 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);
            }
        });
    }
}
项目:eclipse-plugin    文件:WorkspaceWizardPage.java   
@Override
public void pageChanged(PageChangedEvent event) {
    if (isCurrentPage()) {
        workspaceTableViewer.setInput(null);
        loadWorkspaces();
        setPageComplete(!workspaceTableViewer.getSelection().isEmpty());
    }
}
项目:eclipse-plugin    文件:ProjectWizardPage.java   
@Override
public void pageChanged(PageChangedEvent event) {
    if (isCurrentPage()) {
        projectTableViewer.setInput(null);
        workspaceComboViewer.setInput(null);
        loadWorkspaces();
        validatePage();
    }
}
项目:tmxeditor8    文件:TSWizardDialog.java   
/**
 * Updates this dialog's controls to reflect the current page.
 */
protected void update() {
    // Update the window title
    updateWindowTitle();
    // Update the title bar
    updateTitleBar();
    // Update the buttons
    updateButtons();

    // Fires the page change event
    firePageChanged(new PageChangedEvent(this, getCurrentPage()));
}
项目:birt    文件:BirtWebProjectWizardConfigurationPage.java   
/**
 * Called whenever the wizard page has changed and forces its container
 * to resize its content.
 * 
 * @see org.eclipse.jface.dialogs.IPageChangedListener#pageChanged(org.eclipse.jface.dialogs.PageChangedEvent)
 */
public void pageChanged( PageChangedEvent event )
{
    if ( this.wizardPage == event.getSelectedPage( ) )
    {
        // force size update
        IWizardContainer container = getContainer( );
        if ( container instanceof IWizardContainer2 )
        {
            ( (IWizardContainer2) container ).updateSize( );
        }
    }
}
项目:birt    文件:WizardBaseDialog.java   
public void switchTask( )
{
    // Set the description for each task
    String strDesc = this.wizardBase.getCurrentTask( ).getDescription( );
    if ( strDesc != null )
    {
        setMessage( strDesc );
    }

    // Update or create UI
    if ( getTabContainer( ).getSelectionIndex( ) < 0 )
    {
        getTabContainer( ).setSelection( 0 );
    }
    CTabItem currentItem = getTabContainer( ).getItem( getTabContainer( ).getSelectionIndex( ) );
    this.wizardBase.getCurrentTask( ).createControl( getTabContainer( ) );
    if ( currentItem.getControl( ) == null )
    {
        currentItem.setControl( this.wizardBase.getCurrentTask( ).getControl( ) );
    }

    // Pack every task to show as much as possible
    packWizard( );

    // Notify page changed to refresh help page
    firePageChanged( new PageChangedEvent( this, this.wizardBase.getCurrentTask( ) ) );
}
项目:wt-studio    文件:ChartBlockModelPart.java   
@Override
public void performRequest(Request request)
{
    if (request.getType().equals(RequestConstants.REQ_OPEN)) {
        SqlSet sqlSet = new SqlSet();
        CreateChartSqlWizard wizard = new CreateChartSqlWizard(sqlSet);
        final WizardDialog dialog = new WizardDialog(Display.getCurrent().getActiveShell(),
                wizard);
        if (((ChartBlockModel) this.getModel()).getSqlSet() != null) {
            final IPageChangedListener pageChangedListener = new IPageChangedListener() {
                @Override
                public void pageChanged(PageChangedEvent event)
                {
                    if (event.getSelectedPage() instanceof CreateSelectChartPage) {
                        ((CreateSelectChartPage) dialog.getCurrentPage())
                                .setData(((ChartBlockModel) getModel()).getSqlSet());
                        dialog.removePageChangedListener(this);
                    }
                }
            };
            dialog.addPageChangedListener(pageChangedListener);
        }
        dialog.open();
        if (sqlSet.getChartType() != null && sqlSet.getSqls() != null) {
            ((ChartBlockModel) getModel()).setSqlSet(sqlSet);
            ((ChartBlockModel) getModel()).setChartType(sqlSet.getChartType().getName());
            ((ChartBlockModel) getModel()).setChartTypeDisplayName(sqlSet.getChartType()
                    .getDisplayName());
            ((ChartBlockModel) getModel()).setBlockName(sqlSet.getName());
            this.getRoot().getViewer().getEditDomain().getCommandStack().execute(new Command() {
            });
        }
    }
}
项目:LinGUIne    文件:VisualizationWizardSelectVisualizationPage.java   
/**
 * Called whenever a page in the wizard is changed. Since all wizard pages
 * are constructed and added to the wizard on launch, this page won't know
 * about result types selected by the user. This listener will update the
 * list of result types once this page is shown to the user.
 */
@Override
public void pageChanged(PageChangedEvent event) {
    lstVisualizations.removeAll();
    // Populate the list of visualizations based on result types
    for (IVisualization visualization : visualizationPluginMan
            .getVisualizationsBySupportedResultTypeSet(wizardData
                    .getChosenResultTypes())) {
        lstVisualizations.add(visualization.getName());
    }
}
项目:geoprism    文件:LocalizedWizardDialog.java   
/**
 * Updates this dialog's controls to reflect the current page.
 */
protected void update()
{
  // Update the window title
  updateWindowTitle();
  // Update the title bar
  updateTitleBar();
  // Update the buttons
  updateButtons();

  // Fires the page change event
  firePageChanged(new PageChangedEvent(this, getCurrentPage()));
}
项目:n4js    文件:NpmExportWizard.java   
@Override
public void init(IWorkbench targetWorkbench, IStructuredSelection currentSelection) {

    // this.selection = currentSelection;

    List<?> selectedResources = IDE.computeSelectedResources(currentSelection);
    List<IProject> workspaceProjects = Arrays.asList(ResourcesPlugin.getWorkspace().getRoot().getProjects());

    // Find all selected projects
    Set<IProject> projects = selectedResources.stream()
            .filter(m -> m instanceof IResource)
            .map(m -> ((IResource) m).getProject())
            .filter(p -> p.isOpen()) // only open projects
            .collect(Collectors.toSet());
    // make the behavior predictable by ordering:
    TreeSet<IProject> sortedProjects = Sets
            .<IProject> newTreeSet((a, b) -> a.getName()
                    .compareToIgnoreCase(b.getName()));
    sortedProjects.addAll(projects);

    // 0) turn into IN4JSProject and give and process further.
    // a) find out which projects fulfill the npm-"exportable"-contract
    // b) give back a list to the user what to export,
    // c) disable things not fullfilling the contract.
    // d) take choosing from the list and pass to exporter in non-ui package.

    // 0)
    List<IN4JSEclipseProject> rawN4jsProjects = Lists.newArrayList();
    iP2in4jsP = HashBiMap.create();
    for (IProject iProject : workspaceProjects) {
        IN4JSEclipseProject mappedIn4jsProject = map2In4js(iProject);
        if (mappedIn4jsProject != null) {
            rawN4jsProjects.add(mappedIn4jsProject);

            iP2in4jsP.put(iProject, mappedIn4jsProject);
        }
    }

    // filter out Non-N4JS-projects from initial selection.
    sortedProjects.retainAll(iP2in4jsP.keySet());

    // filter out all non-N4JS-projects from the workspace projects.
    ArrayList<IProject> filteredWorkspaceProjects = new ArrayList<>(workspaceProjects);
    filteredWorkspaceProjects.retainAll(iP2in4jsP.keySet());

    setWindowTitle("N4JS to npm Export");
    setNeedsProgressMonitor(true);

    Map<IProject, Boolean> selectedProjects = new HashMap<>();
    // Add all workspace projects to list, default selection value is false
    filteredWorkspaceProjects.forEach(project -> selectedProjects.put(project, false));
    // Override selection value for all initially selected projects
    sortedProjects.forEach(project -> selectedProjects.put(project, true));

    // exportPage = new ExportSelectionPage("Export Page", rawN4jsProjects, labelProvider);
    exportPage = new ExportSelectionPage("Export Page", selectedProjects);
    if (runTools())
        toolRunnerPage = new NpmToolRunnerPage("npm Execution Page");
    comparePage = new PackageJsonComparePage("Compare package.json Page");

    pageListener = new IPageChangedListener() {

        @Override
        public void pageChanged(PageChangedEvent event) {
            if (event.getSelectedPage() == comparePage) {
                udpatePackagJasonComparison();
            }
        }
    };
}
项目:tlaplus    文件:ModelEditor.java   
public void pageChanged(final PageChangedEvent event) {
    final INavigationHistory navigationHistory = getSite().getPage()
            .getNavigationHistory();
    navigationHistory.markLocation((IEditorPart) event
            .getSelectedPage());
}
项目:PDFReporter-Studio    文件:MultiPageToolbarEditorPart.java   
protected void pageChange(final int newPageIndex, final int oldPageIndex) {
    getActiveEditor();
    deactivateSite(false, false);

    IPartService partService = (IPartService) getSite().getService(IPartService.class);
    if (partService.getActivePart() == this) {
        setFocus();
    }

    IEditorPart activeEditor = getEditor(newPageIndex);

    IEditorActionBarContributor contributor = getEditorSite().getActionBarContributor();
    if (contributor != null && contributor instanceof MultiPageEditorActionBarContributor) {
        ((MultiPageEditorActionBarContributor) contributor).setActivePage(activeEditor);
    }

    if (activeEditor != null) {
        ISelectionProvider selectionProvider = activeEditor.getSite().getSelectionProvider();
        if (selectionProvider != null) {
            ISelectionProvider outerProvider = getSite().getSelectionProvider();
            if (outerProvider instanceof MultiPageToolbarSelectionProvider) {
                SelectionChangedEvent event = new SelectionChangedEvent(selectionProvider, selectionProvider.getSelection());

                MultiPageToolbarSelectionProvider provider = (MultiPageToolbarSelectionProvider) outerProvider;
                provider.fireSelectionChanged(event);
                provider.firePostSelectionChanged(event);
            } else {
                if (Policy.DEBUG_MPE) {
                    Tracing.printTrace(TRACING_COMPONENT, "MultiPageEditorPart " + getTitle() //$NON-NLS-1$
                            + " did not propogate selection for " //$NON-NLS-1$
                            + activeEditor.getTitle());
                }
            }
        }
    }

    activateSite();

    postPageChange(newPageIndex, oldPageIndex);

    Object selectedPage = getSelectedPage();
    if (selectedPage != null) {
        firePageChanged(new PageChangedEvent(this, selectedPage));
    }
}
项目:APICloud-Studio    文件:InvasiveThemeHijacker.java   
public void pageChanged(PageChangedEvent event)
{
}
项目:OpenSPIFe    文件:CommandRefreshingActiveEditorPartListener.java   
@Override
public void pageChanged(PageChangedEvent event) {
    refreshEditorCommand(oldEditorPartReference);
}
项目:OpenSPIFe    文件:AbstractPlanEditorHandler.java   
protected void pageChanged(PageChangedEvent event) {
    //do nothing by default; override if necessary
}
项目:OpenSPIFe    文件:AbstractPlanEditorHandler.java   
@Override
public void pageChanged(org.eclipse.jface.dialogs.PageChangedEvent event) {
    AbstractPlanEditorHandler.this.pageChanged(event);
}
项目:EASyProducer    文件:AbstractEASyEditorPage.java   
@Override
public final void pageChanged(PageChangedEvent event) {
    if (event.getSelectedPage() == this) {
        pageActivated();
    }
}