diff options
Diffstat (limited to 'src/cppcheckplus/outlookpanel/MyOutlookList.java')
-rw-r--r-- | src/cppcheckplus/outlookpanel/MyOutlookList.java | 41 |
1 files changed, 18 insertions, 23 deletions
diff --git a/src/cppcheckplus/outlookpanel/MyOutlookList.java b/src/cppcheckplus/outlookpanel/MyOutlookList.java index d5c04d5..9af3c24 100644 --- a/src/cppcheckplus/outlookpanel/MyOutlookList.java +++ b/src/cppcheckplus/outlookpanel/MyOutlookList.java | |||
@@ -1,31 +1,26 @@ | |||
1 | |||
2 | package cppcheckplus.outlookpanel; | 1 | package cppcheckplus.outlookpanel; |
3 | 2 | ||
3 | import cppcheckplus.control.MyContorlUtil; | ||
4 | import javax.swing.JList; | 4 | import javax.swing.JList; |
5 | 5 | ||
6 | import cppcheckplus.control.MyContorlUtil; | 6 | public class MyOutlookList extends JList { |
7 | //通过MyOutlookBar获得MyOutlookPanel是否sh | ||
8 | private MyOutlookBar bar; | ||
7 | 9 | ||
8 | public class MyOutlookList extends JList | 10 | public MyOutlookList(MyOutlookPanelListItem[] listItems, MyOutlookBar bar) { |
9 | { | 11 | this.bar = bar; |
10 | //通过MyOutlookBar获得MyOutlookPanel是否sh | 12 | setListData(listItems); |
11 | private MyOutlookBar bar; | 13 | init(); |
12 | public MyOutlookList(MyOutlookPanelListItem[] listItems,MyOutlookBar bar) | 14 | } |
13 | { | ||
14 | this.bar = bar; | ||
15 | setListData(listItems); | ||
16 | init(); | ||
17 | } | ||
18 | 15 | ||
19 | private void init() | 16 | private void init() { |
20 | { | 17 | setCellRenderer(new MyOutlookListRenderer()); |
21 | setCellRenderer(new MyOutlookListRenderer()); | 18 | setFont(MyContorlUtil.FONT_12_BOLD); |
22 | setFont(MyContorlUtil.FONT_12_BOLD); | 19 | setForeground(MyContorlUtil.OUTLOOK_TEXT_COLOR); |
23 | setForeground(MyContorlUtil.OUTLOOK_TEXT_COLOR); | 20 | setSelectionMode(0); |
24 | setSelectionMode(0); | 21 | } |
25 | } | ||
26 | 22 | ||
27 | public MyOutlookBar getOutlookBar() | 23 | public MyOutlookBar getOutlookBar() { |
28 | { | 24 | return this.bar; |
29 | return this.bar; | 25 | } |
30 | } | ||
31 | } | 26 | } |