Package org.springframework.richclient.dialog

Examples of org.springframework.richclient.dialog.TitlePane


    }

    public void testCreateTitlePane() {
        TestDialogPage page = new TestDialogPage();

        TitlePane titlePane = DialogPageUtils.createTitlePane(page);

        page.setMessage(new DefaultMessage("test message"));
        assertEquals("Message text not equal", titlePane.getMessage().getMessage(), "test message");
    }
View Full Code Here


     * page. The title pane will also be configured from the dialog page's title and icon.
     *
     * @param dialogPage to process
     */
    public static TitlePane createTitlePane( DialogPage dialogPage ) {
        TitlePane titlePane = new TitlePane();
        titlePane.setTitle(dialogPage.getTitle());
        titlePane.setImage(dialogPage.getImage());
        addMessageMonitor(dialogPage, titlePane);

        return titlePane;
    }
View Full Code Here

  @Override
  public JComponent getControl() {
    if ( control == null ) {
      control = new JPanel( new BorderLayout() );

      TitlePane titlePane = new TitlePane();
      titlePane.setTitle( getTitle() );
      titlePane.setMessage( new DefaultMessage( getMessage() ) );

      JPanel titlePaneContainer = new JPanel( new BorderLayout() );
      titlePaneContainer.add( titlePane.getControl(), BorderLayout.CENTER );
      titlePaneContainer.add( new JSeparator(), BorderLayout.SOUTH );

      control.add( BorderLayout.NORTH, titlePaneContainer );
      JComponent content = createControl();
      content.setBorder( BorderFactory.createEmptyBorder( UIConstants.ONE_SPACE, UIConstants.TWO_SPACES, UIConstants.ONE_SPACE, UIConstants.TWO_SPACES ) );
View Full Code Here

TOP

Related Classes of org.springframework.richclient.dialog.TitlePane

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.