summaryrefslogtreecommitdiffstats
path: root/src/cppcheckplus/outlookpanel/MyOutlookList.java
blob: 9af3c2465bab322e0851c8447e407800eb966a63 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
package cppcheckplus.outlookpanel;

import cppcheckplus.control.MyContorlUtil;
import javax.swing.JList;

public class MyOutlookList extends JList {
    //通过MyOutlookBar获得MyOutlookPanel是否sh
    private MyOutlookBar bar;

    public MyOutlookList(MyOutlookPanelListItem[] listItems, MyOutlookBar bar) {
        this.bar = bar;
        setListData(listItems);
        init();
    }

    private void init() {
        setCellRenderer(new MyOutlookListRenderer());
        setFont(MyContorlUtil.FONT_12_BOLD);
        setForeground(MyContorlUtil.OUTLOOK_TEXT_COLOR);
        setSelectionMode(0);
    }

    public MyOutlookBar getOutlookBar() {
        return this.bar;
    }
}