diff options
Diffstat (limited to 'src/cppcheckplus/tab/MyTabPage.java')
-rw-r--r-- | src/cppcheckplus/tab/MyTabPage.java | 69 |
1 files changed, 31 insertions, 38 deletions
diff --git a/src/cppcheckplus/tab/MyTabPage.java b/src/cppcheckplus/tab/MyTabPage.java index ef26580..a240b58 100644 --- a/src/cppcheckplus/tab/MyTabPage.java +++ b/src/cppcheckplus/tab/MyTabPage.java | |||
@@ -1,46 +1,39 @@ | |||
1 | |||
2 | package cppcheckplus.tab; | 1 | package cppcheckplus.tab; |
3 | 2 | ||
3 | import cppcheckplus.toolbar.MyToolBar; | ||
4 | import java.awt.BorderLayout; | 4 | import java.awt.BorderLayout; |
5 | import javax.swing.JComponent; | 5 | import javax.swing.JComponent; |
6 | import javax.swing.JPanel; | 6 | import javax.swing.JPanel; |
7 | 7 | ||
8 | import cppcheckplus.toolbar.MyToolBar; | ||
9 | |||
10 | 8 | ||
11 | public class MyTabPage extends JPanel | 9 | public class MyTabPage extends JPanel { |
12 | { | 10 | private MyToolBar toolbar; |
13 | private MyToolBar toolbar; | 11 | private JPanel centerPane; |
14 | private JPanel centerPane; | 12 | |
15 | 13 | public MyTabPage() { | |
16 | public MyTabPage() | 14 | this(null); |
17 | { | 15 | } |
18 | this(null); | 16 | |
19 | } | 17 | public MyTabPage(JComponent contentComponent) { |
20 | 18 | toolbar = new MyToolBar(); | |
21 | public MyTabPage(JComponent contentComponent) | 19 | centerPane = new JPanel(new BorderLayout()); |
22 | { | 20 | init(contentComponent); |
23 | toolbar = new MyToolBar(); | 21 | } |
24 | centerPane = new JPanel(new BorderLayout()); | 22 | |
25 | init(contentComponent); | 23 | private void init(JComponent contentComponent) { |
26 | } | 24 | setLayout(new BorderLayout()); |
27 | 25 | add(toolbar, "North"); | |
28 | private void init(JComponent contentComponent) | 26 | add(centerPane, "Center"); |
29 | { | 27 | if (contentComponent != null) { |
30 | setLayout(new BorderLayout()); | 28 | centerPane.add(contentComponent, "Center"); |
31 | add(toolbar, "North"); | 29 | } |
32 | add(centerPane, "Center"); | 30 | } |
33 | if (contentComponent != null) | 31 | |
34 | centerPane.add(contentComponent, "Center"); | 32 | public JPanel getCenterPane() { |
35 | } | 33 | return centerPane; |
36 | 34 | } | |
37 | public JPanel getCenterPane() | 35 | |
38 | { | 36 | public MyToolBar getToolBar() { |
39 | return centerPane; | 37 | return toolbar; |
40 | } | 38 | } |
41 | |||
42 | public MyToolBar getToolBar() | ||
43 | { | ||
44 | return toolbar; | ||
45 | } | ||
46 | } | 39 | } |