1
2
3
4
5 package de.mindcrimeilab.xsanalyzer.ui;
6
7 import javax.swing.JComponent;
8
9 import org.apache.xerces.xs.XSObject;
10 import org.springframework.richclient.command.AbstractCommand;
11 import org.springframework.richclient.dialog.CloseAction;
12 import org.springframework.richclient.dialog.TitledApplicationDialog;
13
14 import de.mindcrimeilab.xsanalyzer.ui.panels.TypeHierarchyPanel;
15
16
17
18
19
20
21
22 public class TypeHierarchyDialog extends TitledApplicationDialog {
23
24 private final XSObject type;
25
26 public TypeHierarchyDialog(XSObject type) {
27 super();
28 setTitle(getMessage("typeHierarchy.title"));
29 setTitlePaneTitle(getMessage("typeHierarchy.label"));
30 setDescription(getMessage("typeHierarchy.description", new Object[] { type.getName()}));
31 setResizable(false);
32 setCloseAction(CloseAction.DISPOSE);
33 this.type = type;
34 }
35
36
37
38
39
40
41 @Override
42 protected boolean onFinish() {
43 return true;
44 }
45
46 @Override
47 protected JComponent createTitledDialogContentPane() {
48 final TypeHierarchyPanel contentPane = new TypeHierarchyPanel();
49 contentPane.setType(type);
50 return contentPane;
51 }
52
53 @Override
54 protected Object[] getCommandGroupMembers() {
55 return new AbstractCommand[] { getFinishCommand()};
56 }
57
58 }