1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.springframework.richclient.dialog;
17
18 import javax.swing.JComponent;
19 import javax.swing.JLabel;
20
21 import org.springframework.richclient.core.DefaultMessage;
22
23
24
25
26
27
28 public class TitledPageApplicationDialogTests extends TitledApplicationDialogTestCase {
29
30 protected TitledApplicationDialog createTitledApplicationDialog(final Runnable onAboutToShow) {
31 DialogPage dialogPage = new AbstractDialogPage("pageId") {
32 protected JComponent createControl() {
33 return new JLabel("test");
34 }
35 };
36 dialogPage.setMessage(new DefaultMessage("test message", null));
37
38 return new TitledPageApplicationDialog(dialogPage) {
39 protected boolean onFinish() {
40 return true;
41 }
42
43 protected void onAboutToShow() {
44 onAboutToShow.run();
45 }
46 };
47 }
48
49 }