zsh_root
2024-01-02 7b595546af704983dbafcd0d385c8768ddacefc2
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
27
28
29
30
31
32
33
package PbuliClass;
import java.awt.Color;
import java.awt.Cursor;
import java.awt.Font;
 
import javax.swing.JCheckBox;
 
import ColorAndFont.UIColor;
/**¹«¹²µÄ¸´Ñ¡¿òÄ£ÐÍ*/
public class JCheckBoxModel extends JCheckBox {
    /**
     * 
     */
    private static final long serialVersionUID = 1L;
    Font f=new Font("΢ÈíÑźÚ",Font.PLAIN,15);//°´Å¥×ÖÌåÉèÖÃ
    String text;
    
    public JCheckBoxModel(String text,String z) {
        this.setText(text);
        if(z.equals("1")) {
            this.setSelected(true);
            this.setForeground(Color.red);
        }else {
            this.setSelected(false);
            this.setForeground(Color.black);
        }
        
        this.setBackground(UIColor.getNorth_color());
        this.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));//Êó±êÖ¸ÔÚ°´Å¥ÉϱäÊÖÐÍ
        this.setFont(f);
    };
 
}