Examples of ApplicationWindow


Examples of org.springframework.richclient.application.ApplicationWindow

                settings.getNumberOfDays(), settings.getTimeslotsPerDay()));
        if (ret != JOptionPane.OK_OPTION)
            return;

        track2allData.changeSettings();
        ApplicationWindow aw = getApplicationWindow();
        final StatusBar bar = aw.getStatusBar();

        try {
            if (download) {
                // see MySwingWorker.construct -> it could be that site is not accessible
                // -> then the ui should not freeze
            } else {
                JFileChooser fc = new JFileChooser();
                fc.setDialogTitle(tr.get(ID + ".fileDialog"));
                int resultFC = fc.showOpenDialog(aw.getControl());
                if (resultFC != JFileChooser.APPROVE_OPTION) {
                    bar.setMessage(tr.get(ID + ".noFileSelected"));
                    return;
                }
                file = fc.getSelectedFile();
View Full Code Here

Examples of org.springframework.richclient.application.ApplicationWindow

    @Override
    protected void doOnce() {
        checkIfDataIsAlreadyAvailable();
        closeAllViews();

        ApplicationWindow aw = getApplicationWindow();
        final StatusBar bar = aw.getStatusBar();
        final ProgressMonitor pm = bar.getProgressMonitor();

        JFileChooser fc = new JFileChooser();
        fc.setDialogTitle(tr.get(ID + ".fileDialog"));
        fc.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
        int res = fc.showOpenDialog(aw.getControl());
        if (res != JFileChooser.APPROVE_OPTION) {
            bar.setMessage(tr.get(ID + ".noFileSelected"));
            return;
        }
        file = fc.getSelectedFile();
View Full Code Here

Examples of org.springframework.richclient.application.ApplicationWindow

     *
     * @see Application#close()
     */
    @Override
    protected void doOnce() {
        ApplicationWindow aw = getApplicationWindow();
        final StatusBar bar = aw.getStatusBar();
        ProgressMonitor pm = bar.getProgressMonitor();

        JFileChooser fc = new JFileChooser();
        fc.setDialogTitle(tr.get(ID + ".fileDialog"));
        int res = fc.showSaveDialog(aw.getControl());
        if (res != JFileChooser.APPROVE_OPTION) {
            bar.setMessage(tr.get(ID + ".noFileSelected"));
            return;
        }
        final File f = fc.getSelectedFile();
View Full Code Here

Examples of org.springframework.richclient.application.ApplicationWindow

    @Override
    protected void doOnce() {
        checkIfDataIsAlreadyAvailable();
        closeAllViews();

        ApplicationWindow aw = getApplicationWindow();
        final StatusBar bar = aw.getStatusBar();
        final ProgressMonitor pm = bar.getProgressMonitor();

        JFileChooser fc = new JFileChooser();
        fc.setDialogTitle(tr.get(ID + ".fileDialog"));
        int res = fc.showOpenDialog(aw.getControl());
        if (res != JFileChooser.APPROVE_OPTION) {
            bar.setMessage(tr.get(ID + ".noFileSelected"));
            return;
        }
        file = fc.getSelectedFile();
View Full Code Here

Examples of org.springframework.richclient.application.ApplicationWindow

    }
  }

  protected CommandManager getCommandManager() {
    CommandManager commandManager;
    ApplicationWindow appWindow = Application.instance().getActiveWindow();
    if (appWindow == null || appWindow.getCommandManager() == null) {
      if (localCommandManager == null) {
        localCommandManager = new DefaultCommandManager();
      }
      commandManager = localCommandManager;
    }
    else {
      commandManager = appWindow.getCommandManager();
    }
    for (int i = 0; i < COMMANDS.length; i++) {
      if (!commandManager.containsActionCommand(COMMANDS[i])) {
        commandManager.registerCommand(new TargetableActionCommand(COMMANDS[i], null));
      }
View Full Code Here

Examples of org.springframework.richclient.application.ApplicationWindow

        if (parent == null)
        {
            if (org.springframework.richclient.application.Application.isLoaded())
            {
                ApplicationWindow activeWindow = org.springframework.richclient.application.Application
                        .instance().getActiveWindow();
                if (activeWindow != null)
                    parent = activeWindow.getControl();
            }
        }

        JXErrorPane pane = new JXErrorPane();
        pane.setErrorInfo(errorInfo);
View Full Code Here

Examples of org.springframework.richclient.application.ApplicationWindow

            }
        }       
        System.out.println(Sizes.getUnitConverter().dialogUnitYAsPixel(10, new JLabel()));
        ApplicationWindow[] applicationWindows = Application.instance().getWindowManager().getWindows();
        for (int i = 0; i < applicationWindows.length; i++) {
            ApplicationWindow window = applicationWindows[i];
            SwingUtilities.updateComponentTreeUI(window.getControl());
            window.getControl().repaint();
        }       
    }
View Full Code Here

Examples of org.springframework.richclient.application.ApplicationWindow

    // Helper classes:

    public static class TestAdvisor extends DefaultApplicationLifecycleAdvisor {
        public TestAdvisor() {
            setStartingPageId("whatever");
            ApplicationWindow window = (ApplicationWindow) EasyMock.createMock(ApplicationWindow.class);
            setOpeningWindow(window);
        }
View Full Code Here

Examples of org.springframework.richclient.application.ApplicationWindow

        }
        return throwableClassList;
    }

    private JFrame resolveParentFrame() {
        ApplicationWindow activeWindow = Application.isLoaded() ? Application.instance().getActiveWindow() : null;
        return (activeWindow == null) ? null : activeWindow.getControl();
    }
View Full Code Here

Examples of org.springframework.richclient.application.ApplicationWindow

     * windowAware object.
     */
    public void testPostProcessBeforeInit() {
       
        //create required mocks
        ApplicationWindow window = (ApplicationWindow) EasyMock.createMock(ApplicationWindow.class);
        ApplicationWindowAware windowAware
                = (ApplicationWindowAware) EasyMock.createMock(ApplicationWindowAware.class);
       
        //confirm null bean is ok
        ApplicationWindowSetter windowSetter = new ApplicationWindowSetter(window);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.