Package org.springframework.richclient.application

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


    // 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

        }
        return throwableClassList;
    }

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

     * 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

            }
        }
    }

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

                    .getService(MessageSourceAccessor.class))
                    .getMessage("applicationDialog.defaultException", defaultMessage);
        }

        Message message = new DefaultMessage(exceptionMessage, Severity.ERROR);
        ApplicationWindow activeWindow = Application.instance().getActiveWindow();
        JFrame parentFrame = (activeWindow == null) ? null : activeWindow.getControl();
        JOptionPane.showMessageDialog(parentFrame, message.getMessage(), "Error", JOptionPane.ERROR_MESSAGE);
    }
View Full Code Here

     *
     * @return The control component of the application window, never null.
     */
    protected JFrame getParentWindowControl() {
        // allow subclasses to derive where the application window comes from
        final ApplicationWindow applicationWindow = getApplicationWindow();
        if (applicationWindow == null) {
            return Application.instance().getActiveWindow().getControl();
        }
        return applicationWindow.getControl();
    }
View Full Code Here

public class DefaultApplicationPageFactoryTests extends SpringRichTestCase {

  public void testCreate() {
    DefaultApplicationPageFactory factory = new DefaultApplicationPageFactory();
   
    ApplicationWindow window = (ApplicationWindow) EasyMock.createMock(ApplicationWindow.class);
    SingleViewPageDescriptor descriptor= new SingleViewPageDescriptor(new DefaultViewDescriptor());
   
    DefaultApplicationPage page = (DefaultApplicationPage) factory.createApplicationPage(window, descriptor);
    assertNotNull("page cannot be null", page);
    assertEquals(window, page.getWindow());
View Full Code Here

    return selectionManager;
  }

  @NotNull
  public WindowSelectionManager getActiveWindowSelectionManager() {
    ApplicationWindow activeWindow = Application.instance().getActiveWindow();
    return getWindowSelectionManager( activeWindow );
  }
View Full Code Here

TOP

Related Classes of org.springframework.richclient.application.ApplicationWindow

Copyright © 2018 www.massapicom. 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.