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

项目: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();

}
项目: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();
    }


}
项目: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);
}
项目: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);
            }
        });
    }
}
项目: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() {
            });
        }
    }
}
项目: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();
            }
        }
    };
}
项目:p2-installer    文件:WizardDialog.java   
public void addPageChangedListener(IPageChangedListener listener) {
    pageChangedListeners.add(listener);
}
项目:p2-installer    文件:WizardDialog.java   
public void removePageChangedListener(IPageChangedListener listener) {
    pageChangedListeners.remove(listener);
}
项目:translationstudio8    文件:TSWizardDialog.java   
public void addPageChangedListener(IPageChangedListener listener) {
    pageChangedListeners.add(listener);
}
项目:translationstudio8    文件:TSWizardDialog.java   
public void removePageChangedListener(IPageChangedListener listener) {
    pageChangedListeners.remove(listener);
}
项目:gef-gwt    文件:WizardDialog.java   
public void addPageChangedListener(IPageChangedListener listener) {
    pageChangedListeners.add(listener);
}
项目:gef-gwt    文件:WizardDialog.java   
public void removePageChangedListener(IPageChangedListener listener) {
    pageChangedListeners.remove(listener);
}
项目:gef-gwt    文件:PreferenceDialog.java   
/**
 * @see org.eclipse.jface.dialogs.IPageChangeProvider#removePageChangedListener(org.eclipse.jface.dialogs.IPageChangedListener)
 * @since 3.1
 */
public void removePageChangedListener(IPageChangedListener listener) {
    pageChangedListeners.remove(listener);

}
项目:tmxeditor8    文件:TSWizardDialog.java   
public void addPageChangedListener(IPageChangedListener listener) {
    pageChangedListeners.add(listener);
}
项目:tmxeditor8    文件:TSWizardDialog.java   
public void removePageChangedListener(IPageChangedListener listener) {
    pageChangedListeners.remove(listener);
}
项目:birt    文件:AbstractPropertyDialog.java   
public void addPageChangedListener( IPageChangedListener listener )
{
    pageChangedListeners.add( listener );
}
项目:birt    文件:AbstractPropertyDialog.java   
public void removePageChangedListener( IPageChangedListener listener )
{
    pageChangedListeners.remove( listener );
}
项目:birt    文件:WizardBaseDialog.java   
public void addPageChangedListener( IPageChangedListener listener )
{
    pageChangedListeners.add( listener );
}
项目:birt    文件:WizardBaseDialog.java   
public void removePageChangedListener( IPageChangedListener listener )
{
    pageChangedListeners.remove( listener );
}
项目:wt-studio    文件:TableModelPart.java   
@Override
public void performRequest(Request request)
{
    if (request.getType().equals(RequestConstants.REQ_OPEN)) {
        try {
            TableSqlAreaModel sqlArea = new TableSqlAreaModel();
            CreateTableSqlWizard wizard = new CreateTableSqlWizard(sqlArea);
            final WizardDialog dialog = new WizardDialog(Display.getCurrent().getActiveShell(),
                    wizard);
            if (((TableModel) this.getModel()).getSqlAreaModel() != null) {

                final IPageChangedListener pageChangedListener = new IPageChangedListener() {
                    @Override
                    public void pageChanged(PageChangedEvent event)
                    {
                        if (event.getSelectedPage() instanceof CreateTableSqlPageOne) {
                            ((CreateTableSqlPageOne) dialog.getCurrentPage())
                                    .setData(((TableModel) getModel()).getSqlAreaModel());
                            dialog.removePageChangedListener(this);
                        }
                    }
                };
                dialog.addPageChangedListener(pageChangedListener);
            }
            dialog.open();
            if (sqlArea.getSqlName() != null && sqlArea.getSqlArea() != null
                    && sqlArea.getCms() != null) {
                ((TableModel) getModel()).setSqlAreaModel(sqlArea);
                ((TableModel) getModel()).setSql(sqlArea.getSqlArea());
                ((TableModel) getModel()).setSqlName(sqlArea.getSqlName());
                ((TableModel) getModel()).removeAllColumn();
                ((TableModel) getModel()).addAllColumn(sqlArea.getCms());
                ((TableModel) getModel()).setBlockName(sqlArea.getSqlName());
                this.getRoot().getViewer().getEditDomain().getCommandStack()
                        .execute(new Command() {
                        });
            }
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}
项目:geoprism    文件:LocalizedWizardDialog.java   
public void addPageChangedListener(IPageChangedListener listener)
{
  pageChangedListeners.add(listener);
}
项目:geoprism    文件:LocalizedWizardDialog.java   
public void removePageChangedListener(IPageChangedListener listener)
{
  pageChangedListeners.remove(listener);
}
项目:p2-installer    文件:WizardDialog.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);
            }
        });
    }
}
项目:translationstudio8    文件:TSWizardDialog.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);
            }
        });
    }
}
项目:gef-gwt    文件:WizardDialog.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);
            }
        });
    }
}
项目:tmxeditor8    文件:TSWizardDialog.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);
            }
        });
    }
}
项目:PDFReporter-Studio    文件:MultiPageToolbarEditorPart.java   
/**
 * Add the page change listener to be notified when the page changes. The newly selected page will be the Object
 * returned from {@link #getSelectedPage()}. In the default case, this will be the active page Control, IEditorPart,
 * or <code>null</code>.
 * <p>
 * This method has no effect if the listener has already been added.
 * </p>
 * 
 * @nooverride
 * 
 * @since 3.5
 */
public void addPageChangedListener(IPageChangedListener listener) {
    pageChangeListeners.add(listener);
}
项目:PDFReporter-Studio    文件:MultiPageToolbarEditorPart.java   
/**
 * Remove the page change listener.
 * <p>
 * This method has no effect if the listener is not in the list.
 * </p>
 * 
 * @nooverride
 * 
 * @since 3.5
 */
public void removePageChangedListener(IPageChangedListener listener) {
    pageChangeListeners.remove(listener);
}
项目:gef-gwt    文件:PreferenceDialog.java   
/**
 * @see org.eclipse.jface.dialogs.IPageChangeProvider#addPageChangedListener(org.eclipse.jface.dialogs.IPageChangedListener)
 * @since 3.1
 */
public void addPageChangedListener(IPageChangedListener listener) {
    pageChangedListeners.add(listener);
}